TheBoussinesqModel  3.2.1
 All Data Structures Files Functions Variables Typedefs Macros Pages
write_dem.c
Go to the documentation of this file.
1 #include "turtle.h"
2 
3 #include "write_dem.h"
4 
5 #include "t_utilities.h"
6 
7 #include "t_datamanipulation.h"
8 
9 
10 
11 
12 
19 /* Stampa un file DEM in formato Fluidturtle
20 
21  WORKING_DIRECTORY deve essere dichiarata come variabile esterna nel main()
22 
23  Inputs: matrix matrice
24 
25  U,V vettori di header del DEM
26 
27  otputname nome del file di output
28 
29  comment eventuali commenti da scrivere nel file */
30 
31 
32 
34 
35  char *outputname, char *comment,short print)
36 
37 {
38 
39 /* Declaration variables */
40 
41 FILE *outputfile;
42 
43 extern char *WORKING_DIRECTORY;
44 
45 
46 
47 /* Writes output file */
48 
49 if(print==1){
50 
51  outputname=join_strings(WORKING_DIRECTORY,outputname);
52 
53  outputfile=t_fopen(outputname,"w");
54 
55  fprintf(outputfile,"/** File %s */\n",outputname);
56 
57  fprintf(outputfile,"/** %s */\n",comment);
58 
59  fprintf(outputfile,"index{3,DEM}\n");
60 
61  fprintf(outputfile,"1: float array pixels size ");
62 
63  write_floatarray_elements(outputfile,U,600);
64 
65  fprintf(outputfile,"2: float array novalues ");
66 
67  write_floatarray_elements(outputfile,V,600);
68 
69  fprintf(outputfile,"3: short matrix data {%ld,%ld}\n",matrix->nrh,matrix->nch);
70 
71  write_shortmatrix_elements(outputfile,matrix,matrix->nch+1);
72 
73  t_fclose(outputfile);
74 
75 } else {
76 
77  return;
78 
79 }
80 
81 }
82 
83 
90 /* Stampa un file DEM in formato Fluidturtle
91 
92  WORKING_DIRECTORY deve essere dichiarata come variabile esterna nel main()
93 
94  Inputs: matrix matrice
95 
96  U,V vettori di header del DEM
97 
98  otputname nome del file di output
99 
100  comment eventuali commenti da scrivere nel file */
101 
102 
103 
105 
106  char *outputname, char *comment,short print)
107 
108 {
109 
110 /* Declaration variables */
111 
112 FILE *outputfile;
113 
114 extern char *WORKING_DIRECTORY;
115 
116 
117 
118 /* Writes output file */
119 
120 if(print==1){
121 
122  outputname=join_strings(WORKING_DIRECTORY,outputname);
123 
124  outputfile=t_fopen(outputname,"w");
125 
126  fprintf(outputfile,"/** File %s */\n",outputname);
127 
128  fprintf(outputfile,"/** %s */\n",comment);
129 
130  fprintf(outputfile,"index{3,DEM}\n");
131 
132  fprintf(outputfile,"1: double array pixels size ");
133 
134  write_doublearray_elements(outputfile,U,600);
135 
136  fprintf(outputfile,"2: double array novalues ");
137 
138  write_doublearray_elements(outputfile,V,600);
139 
140  fprintf(outputfile,"3: short matrix data {%ld,%ld}\n",matrix->nrh,matrix->nch);
141 
142  write_shortmatrix_elements(outputfile,matrix,matrix->nch+1);
143 
144  t_fclose(outputfile);
145 
146 } else {
147 
148  return;
149 
150 }
151 
152 }
153 
154 
155 
156 
163 /* Stampa un file DEM in formato Fluidturtle
164 
165  WORKING_DIRECTORY deve essere dichiarata come variabile esterna nel main()
166 
167  Inputs: matrix matrice
168 
169  U,V vettori di header del DEM
170 
171  otputname nome del file di output
172 
173  comment eventuali commenti da scrivere nel file */
174 
175 
176 
178 
179  char *outputname, char *comment,short print)
180 
181 
182 
183 {
184 
185 /* Declaration variables */
186 
187 FILE *outputfile;
188 
189 extern char *WORKING_DIRECTORY;
190 
191 
192 
193 /* Writes output file */
194 
195 if(print==1){
196 
197 outputname=join_strings(WORKING_DIRECTORY,outputname);
198 
199 outputfile=t_fopen(outputname,"w");
200 
201 fprintf(outputfile,"/** File %s */\n",outputname);
202 
203 fprintf(outputfile,"/** %s */\n",comment);
204 
205 fprintf(outputfile,"index{3,DEM}\n");
206 
207 fprintf(outputfile,"1: float array pixels size ");
208 
209 write_floatarray_elements(outputfile,U,600);
210 
211 fprintf(outputfile,"2: float array novalues ");
212 
213 write_floatarray_elements(outputfile,V,600);
214 
215 fprintf(outputfile,"3: long matrix data {%ld,%ld}\n",matrix->nrh,matrix->nch);
216 
217 write_longmatrix_elements(outputfile,matrix,matrix->nch+1);
218 
219 t_fclose(outputfile);
220 
221 } else {
222 
223  return;
224 
225 }
226 
227 }
228 
229 
230 
231 
232 
239 /* Stampa un file DEM in formato Fluidturtle
240 
241  WORKING_DIRECTORY deve essere dichiarata come variabile esterna nel main()
242 
243  Inputs: matrix matrice
244 
245  U,V vettori di header del DEM
246 
247  otputname nome del file di output
248 
249  comment eventuali commenti da scrivere nel file */
250 
251 
252 
254 
255  char *outputname, char *comment,short print)
256 
257 
258 
259 {
260 
261 /* Declaration variables */
262 
263 FILE *outputfile;
264 
265 extern char *WORKING_DIRECTORY;
266 
267 
268 
269 /* Writes output file */
270 
271 if(print==1){
272 
273 outputname=join_strings(WORKING_DIRECTORY,outputname);
274 
275 outputfile=t_fopen(outputname,"w");
276 
277 fprintf(outputfile,"/** File %s */\n",outputname);
278 
279 fprintf(outputfile,"/** %s */\n",comment);
280 
281 fprintf(outputfile,"index{3,DEM}\n");
282 
283 fprintf(outputfile,"1: float array pixels size ");
284 
285 write_floatarray_elements(outputfile,U,600);
286 
287 fprintf(outputfile,"2: float array novalues ");
288 
289 write_floatarray_elements(outputfile,V,600);
290 
291 fprintf(outputfile,"3: int matrix data {%ld,%ld}\n",matrix->nrh,matrix->nch);
292 
293 write_intmatrix_elements(outputfile,matrix,matrix->nch+1);
294 
295 t_fclose(outputfile);
296 
297 } else {
298 
299  return;
300 
301 }
302 
303 }
304 
305 
306 
307 
308 
315 /* Stampa un file DEM in formato Fluidturtle
316 
317  WORKING_DIRECTORY deve essere dichiarata come variabile esterna nel main()
318 
319  Inputs: matrix matrice
320 
321  U,V vettori di header del DEM
322 
323  otputname nome del file di output
324 
325  comment eventuali commenti da scrivere nel file */
326 
327 
328 
330 
331  char *outputname, char *comment,short print)
332 
333 
334 
335 {
336 
337 /* Declaration variables */
338 
339 //char *newoname;
340 
341 FILE *outputfile;
342 
343 extern char *WORKING_DIRECTORY;
344 
345 //printf("i1qu\n");
346 
347 
348 
349 /* Writes output file */
350 
351 if(print==1){
352 
353 outputname=join_strings(WORKING_DIRECTORY,outputname);
354 
355 outputfile=t_fopen(outputname,"w");
356 
357 fprintf(outputfile,"/** File %s */\n",outputname);
358 
359 fprintf(outputfile,"/** %s */\n",comment);
360 
361 fprintf(outputfile,"index{3,DEM}\n");
362 
363 fprintf(outputfile,"1: float array pixels size ");
364 
365 write_floatarray_elements(outputfile,U,600);
366 
367 fprintf(outputfile,"2: float array novalues ");
368 
369 write_floatarray_elements(outputfile,V,600);
370 
371 fprintf(outputfile,"3: float matrix data {%ld,%ld}\n",matrix->nrh,matrix->nch);
372 
373 write_floatmatrix_elements(outputfile,matrix,matrix->nch+1);
374 
375 t_fclose(outputfile);
376 
377 } else {
378 
379  return;
380 
381 }
382 
383 }
384 
385 
386 
387 
388 
395 /* Stampa un file DEM in formato Fluidturtle
396 
397  WORKING_DIRECTORY deve essere dichiarata come variabile esterna nel main()
398 
399  Inputs: matrix matrice
400 
401  U,V vettori di header del DEM
402 
403  otputname nome del file di output
404 
405  comment eventuali commenti da scrivere nel file */
406 
407 
408 
410 
411  char *outputname, char *comment,short print)
412 
413 
414 
415 {
416 
417 /* Declaration variables */
418 
419 FILE *outputfile;
420 
421 extern char *WORKING_DIRECTORY;
422 
423 
424 
425 /* Writes output file */
426 
427 if(print==1){
428 
429 outputname=join_strings(WORKING_DIRECTORY,outputname);
430 
431 outputfile=t_fopen(outputname,"w");
432 
433 fprintf(outputfile,"/** File %s */\n",outputname);
434 
435 fprintf(outputfile,"/** %s */\n",comment);
436 
437 fprintf(outputfile,"index{3,DEM}\n");
438 
439 fprintf(outputfile,"1: float array pixels size ");
440 
441 write_floatarray_elements(outputfile,U,600);
442 
443 fprintf(outputfile,"2: float array novalues ");
444 
445 write_floatarray_elements(outputfile,V,600);
446 
447 fprintf(outputfile,"3: double matrix data {%ld,%ld}\n",matrix->nrh,matrix->nch);
448 
449 write_doublematrix_elements(outputfile,matrix,matrix->nch+1);
450 
451 t_fclose(outputfile);
452 
453 } else {
454 
455  return;
456 
457 }
458 
459 }
460 
467 /* Stampa un file DEM in formato Fluidturtle
468 
469  WORKING_DIRECTORY deve essere dichiarata come variabile esterna nel main()
470 
471  Inputs: matrix matrice
472 
473  U,V vettori di header del DEM
474 
475  otputname nome del file di output
476 
477  comment eventuali commenti da scrivere nel file */
478 
479 
480 
482 
483  char *outputname, char *comment,short print)
484 
485 
486 
487 {
488 
489 /* Declaration variables */
490 
491 FILE *outputfile;
492 
493 extern char *WORKING_DIRECTORY;
494 
495 
496 
497 /* Writes output file */
498 
499 if(print==1){
500 
501 outputname=join_strings(WORKING_DIRECTORY,outputname);
502 
503 outputfile=t_fopen(outputname,"w");
504 
505 fprintf(outputfile,"/** File %s */\n",outputname);
506 
507 fprintf(outputfile,"/** %s */\n",comment);
508 
509 fprintf(outputfile,"index{3,DEM}\n");
510 
511 fprintf(outputfile,"1: double array pixels size ");
512 
513 write_doublearray_elements(outputfile,U,600);
514 
515 fprintf(outputfile,"2: double array novalues ");
516 
517 write_doublearray_elements(outputfile,V,600);
518 
519 fprintf(outputfile,"3: double matrix data {%ld,%ld}\n",matrix->nrh,matrix->nch);
520 
521 write_doublematrix_elements(outputfile,matrix,matrix->nch+1);
522 
523 t_fclose(outputfile);
524 
525 } else {
526 
527  return;
528 
529 }
530 
531 }
532 
533 
534 
535 
536 
543 /* Stampa una matrice in un file in formato Fluidturtle
544 
545  WORKING_DIRECTORY deve essere dichiarata come variabile esterna nel main()
546 
547  Inputs: matrix matrice
548 
549  otputname nome del file di output
550 
551  comment eventuali commenti da scrivere nel file */
552 
553 
554 
556 
557  char *outputname, char *comment,short print)
558 
559 
560 
561 {
562 
563 /* Declaration variables */
564 
565 FILE *outputfile;
566 
567 extern char *WORKING_DIRECTORY;
568 
569 
570 
571 /* Writes output file */
572 
573 if(print==1){
574 
575  outputname=join_strings(WORKING_DIRECTORY,outputname);
576 
577  outputfile=t_fopen(outputname,"w");
578 
579  fprintf(outputfile,"/** File %s */\n",outputname);
580 
581  fprintf(outputfile,"/** %s */\n",comment);
582 
583  fprintf(outputfile,"index{1}\n");
584 
585  fprintf(outputfile,"1: double matrix data {%ld,%ld}\n",matrix->nrh,matrix->nch);
586 
587  write_doublematrix_elements(outputfile,matrix,matrix->nch+1);
588 
589  t_fclose(outputfile);
590 
591 } else {
592 
593  return;
594 
595 }
596 
597 }
598 
599 
600 
607 /* Stampa un vettore in formato Fluidturtle
608 
609  WORKING_DIRECTORY deve essere dichiarata come variabile esterna nel main()
610 
611  Inputs: matrix matrice
612 
613  U,V vettori di header del DEM
614 
615  otputname nome del file di output
616 
617  comment eventuali commenti da scrivere nel file */
618 
619 
620 
621 void floatvector_dem(FLOATVECTOR *vector_dem,
622 
623  char *outputname, char *comment,short print)
624 
625 
626 
627 {
628 
629 /* Declaration variables */
630 
631 FILE *outputfile;
632 
633 extern char *WORKING_DIRECTORY;
634 
635 
636 
637 /* Writes output file */
638 
639 if(print==1){
640 
641  outputname=join_strings(WORKING_DIRECTORY,outputname);
642 
643  outputfile=t_fopen(outputname,"w");
644 
645  fprintf(outputfile,"/** File %s */\n",outputname);
646 
647  fprintf(outputfile,"/** %s */\n",comment);
648 
649  fprintf(outputfile,"index{1}\n");
650 
651  fprintf(outputfile,"1: float array vector ");
652 
653  write_floatarray_elements(outputfile,vector_dem,vector_dem->nh+1);
654 
655  t_fclose(outputfile);
656 
657 } else {
658 
659  return;
660 
661 }
662 
663 }
664 
665 
666 
667 
668 
675 /* Stampa un vettore in formato Fluidturtle
676 
677  WORKING_DIRECTORY deve essere dichiarata come variabile esterna nel main()
678 
679  Inputs: matrix matrice
680 
681  U,V vettori di header del DEM
682 
683  otputname nome del file di output
684 
685  comment eventuali commenti da scrivere nel file */
686 
687 
688 
690 
691  char *outputname, char *comment,short print)
692 
693 
694 
695 {
696 
697 /* Declaration variables */
698 
699 FILE *outputfile;
700 
701 extern char *WORKING_DIRECTORY;
702 
703 
704 
705 /* Writes output file */
706 
707 if(print==1){
708 
709  outputname=join_strings(WORKING_DIRECTORY,outputname);
710 
711  outputfile=t_fopen(outputname,"w");
712 
713  fprintf(outputfile,"/** File %s */\n",outputname);
714 
715  fprintf(outputfile,"/** %s */\n",comment);
716 
717  fprintf(outputfile,"index{1}\n");
718 
719  fprintf(outputfile,"1:double array vector ");
720 
721  write_doublearray_elements(outputfile,vector_dem,vector_dem->nh+1);
722 
723  t_fclose(outputfile);
724 
725 } else {
726 
727  return;
728 
729 }
730 
731 }
732 
733 
734 
735 
736 
737 
738 
745 /* Stampa un file DEM in formato Fluidturtle
746 
747  WORKING_DIRECTORY deve essere dichiarata come variabile esterna nel main()
748 
749  Inputs: tensor tensor
750 
751  layer numero del livello del tensore che vuoi stampare
752 
753  U,V vettori di header del DEM
754 
755  outputname nome del file di output senza estensione
756 
757  comment eventuali commenti da scrivere nel file */
758 
759 
760 
761 void doubletensor_dem(DOUBLETENSOR *tensor,long layer,DOUBLEVECTOR *U,
762 
763  DOUBLEVECTOR *V,char *outputname,char *comment,short print)
764 
765 
766 
767 {
768 
769 /* Declaration variables */
770 
771 long r,c;
772 
773 FILE *outputfile;
774 
775 extern char *WORKING_DIRECTORY;
776 
778 
779 
780 
781 /* Allocation and initialisation of matrix */
782 
783 matrix=new_doublematrix(tensor->nrh,tensor->nch);
784 
785 for(r=1;r<=tensor->nrh;r++){
786 
787  for(c=1;c<=tensor->nch;c++){
788 
789  matrix->co[r][c]=tensor->co[layer][r][c];
790 
791  }
792 
793 }
794 
795 
796 
797 /* Writes output file */
798 
799 if(print==1){
800 
801 outputname=join_strings(WORKING_DIRECTORY,outputname);
802 
803 outputfile=t_fopen(outputname,"w");
804 
805 fprintf(outputfile,"/** File %s */\n",outputname);
806 
807 fprintf(outputfile,"/** %s (layer %ld)*/\n",comment,layer);
808 
809 fprintf(outputfile,"index{3,DEM}\n");
810 
811 fprintf(outputfile,"1: float array pixels size ");
812 
813 write_doublearray_elements(outputfile,U,600);
814 
815 fprintf(outputfile,"2: float array novalues ");
816 
817 write_doublearray_elements(outputfile,V,600);
818 
819 fprintf(outputfile,"3: double matrix layer_%ld {%ld,%ld}\n",layer,matrix->nrh,
820 
821  matrix->nch);
822 
823 write_doublematrix_elements(outputfile,matrix,matrix->nch+1);
824 
825 t_fclose(outputfile);
826 
827 free_doublematrix(matrix);
828 
829 } else {
830 
831  return;
832 
833 }
834 
835 }
836 
837 
838 
839 
840 
841 
842 
843 
844 
845 
846 
847 
848 
849 
850 
851 
852 
853 
854 
855 
856 
857 
858 
859 
860 
861 
862 
863 
864 
865 
866 
867 
868 
869 
870 
877 /* Stampa un file DEM in formato Fluidturtle
878 
879  !!! non viene usata la WORKING_DIRECTORY !!!
880 
881  Inputs: matrix matrice
882 
883  U,V vettori di header del DEM
884 
885  otputname nome del file di output
886 
887  comment eventuali commenti da scrivere nel file */
888 
889 
890 
892 
893  char *outputname, char *comment,short print)
894 
895 {
896 
897 /* Declaration variables */
898 
899 FILE *outputfile;
900 
901 
902 
903 /* Writes output file */
904 
905 if(print==1){
906 
907  outputfile=t_fopen(outputname,"w");
908 
909  fprintf(outputfile,"/** %s */\n",comment);
910 
911  fprintf(outputfile,"index{3}\n");
912 
913  fprintf(outputfile,"1: double array pixels size ");
914 
915  write_doublearray_elements(outputfile,U,600);
916 
917  fprintf(outputfile,"2: double array novalues ");
918 
919  write_doublearray_elements(outputfile,V,600);
920 
921  fprintf(outputfile,"3: short matrix data {%ld,%ld}\n",matrix->nrh,matrix->nch);
922 
923  write_shortmatrix_elements(outputfile,matrix,matrix->nch+1);
924 
925  t_fclose(outputfile);
926 
927 } else {
928 
929  return;
930 
931 }
932 
933 }
934 
935 
936 
937 
938 
945 /* Stampa un file DEM in formato Fluidturtle
946 
947  !!! non viene usata la WORKING_DIRECTORY !!!
948 
949  Inputs: matrix matrice
950 
951  U,V vettori di header del DEM
952 
953  otputname nome del file di output
954 
955  comment eventuali commenti da scrivere nel file */
956 
957 
958 
960 
961  char *outputname, char *comment,short print)
962 
963 
964 
965 {
966 
967 /* Declaration variables */
968 
969 FILE *outputfile;
970 
971 
972 
973 /* Writes output file */
974 
975 if(print==1){
976 
977 outputfile=t_fopen(outputname,"w");
978 
979 fprintf(outputfile,"/** %s */\n",comment);
980 
981 fprintf(outputfile,"index{3}\n");
982 
983 fprintf(outputfile,"1: double array pixels size ");
984 
985 write_doublearray_elements(outputfile,U,600);
986 
987 fprintf(outputfile,"2: double array novalues ");
988 
989 write_doublearray_elements(outputfile,V,600);
990 
991 fprintf(outputfile,"3: long matrix data {%ld,%ld}\n",matrix->nrh,matrix->nch);
992 
993 write_longmatrix_elements(outputfile,matrix,matrix->nch+1);
994 
995 t_fclose(outputfile);
996 
997 } else {
998 
999  return;
1000 
1001 }
1002 
1003 }
1004 
1005 
1006 
1007 
1008 
1015 /* Stampa un file DEM in formato Fluidturtle
1016 
1017  !!! non viene usata la WORKING_DIRECTORY !!!
1018 
1019  Inputs: matrix matrice
1020 
1021  U,V vettori di header del DEM
1022 
1023  otputname nome del file di output
1024 
1025  comment eventuali commenti da scrivere nel file */
1026 
1027 
1028 
1030 
1031  char *outputname, char *comment,short print)
1032 
1033 
1034 
1035 {
1036 
1037 /* Declaration variables */
1038 
1039 FILE *outputfile;
1040 
1041 
1042 
1043 /* Writes output file */
1044 
1045 if(print==1){
1046 
1047 outputfile=t_fopen(outputname,"w");
1048 
1049 fprintf(outputfile,"/** %s */\n",comment);
1050 
1051 fprintf(outputfile,"index{3}\n");
1052 
1053 fprintf(outputfile,"1: float array pixels size ");
1054 
1055 write_floatarray_elements(outputfile,U,600);
1056 
1057 fprintf(outputfile,"2: float array novalues ");
1058 
1059 write_floatarray_elements(outputfile,V,600);
1060 
1061 fprintf(outputfile,"3: int matrix data {%ld,%ld}\n",matrix->nrh,matrix->nch);
1062 
1063 write_intmatrix_elements(outputfile,matrix,matrix->nch+1);
1064 
1065 t_fclose(outputfile);
1066 
1067 } else {
1068 
1069  return;
1070 
1071 }
1072 
1073 }
1074 
1075 
1076 
1077 
1078 
1085 /* Stampa un file DEM in formato Fluidturtle
1086 
1087  !!! non viene usata la WORKING_DIRECTORY !!!
1088 
1089  Inputs: matrix matrice
1090 
1091  U,V vettori di header del DEM
1092 
1093  otputname nome del file di output
1094 
1095  comment eventuali commenti da scrivere nel file */
1096 
1097 
1098 
1100 
1101  char *outputname, char *comment,short print)
1102 
1103 
1104 
1105 {
1106 
1107 /* Declaration variables */
1108 
1109 FILE *outputfile;
1110 
1111 
1112 
1113 /* Writes output file */
1114 
1115 if(print==1){
1116 
1117 outputfile=t_fopen(outputname,"w");
1118 
1119 fprintf(outputfile,"/** %s */\n",comment);
1120 
1121 fprintf(outputfile,"index{3}\n");
1122 
1123 fprintf(outputfile,"1: float array pixels size ");
1124 
1125 
1126 
1127 write_floatarray_elements(outputfile,U,600);
1128 
1129 
1130 
1131 fprintf(outputfile,"2: float array novalues ");
1132 
1133 
1134 
1135 write_floatarray_elements(outputfile,V,600);
1136 
1137 
1138 
1139 fprintf(outputfile,"3: float matrix data {%ld,%ld}\n",matrix->nrh,matrix->nch);
1140 
1141 write_floatmatrix_elements(outputfile,matrix,matrix->nch+1);
1142 
1143 t_fclose(outputfile);
1144 
1145 } else {
1146 
1147  return;
1148 
1149 }
1150 
1151 }
1152 
1153 
1154 
1155 
1156 
1163 /* Stampa un file DEM in formato Fluidturtle
1164 
1165  !!! non viene usata la WORKING_DIRECTORY !!!
1166 
1167  Inputs: matrix matrice
1168 
1169  U,V vettori di header del DEM
1170 
1171  otputname nome del file di output
1172 
1173  comment eventuali commenti da scrivere nel file */
1174 
1175 
1176 
1178 
1179  char *outputname, char *comment,short print)
1180 
1181 
1182 
1183 {
1184 
1185 /* Declaration variables */
1186 
1187 FILE *outputfile;
1188 
1189 
1190 
1191 /* Writes output file */
1192 
1193 if(print==1){
1194 
1195 outputfile=t_fopen(outputname,"w");
1196 
1197 fprintf(outputfile,"/** %s */\n",comment);
1198 
1199 fprintf(outputfile,"index{3}\n");
1200 
1201 fprintf(outputfile,"1: double array pixels size ");
1202 
1203 write_doublearray_elements(outputfile,U,600);
1204 
1205 fprintf(outputfile,"2: double array novalues ");
1206 
1207 write_doublearray_elements(outputfile,V,600);
1208 
1209 fprintf(outputfile,"3: double matrix data {%ld,%ld}\n",matrix->nrh,matrix->nch);
1210 
1211 write_doublematrix_elements(outputfile,matrix,matrix->nch+1);
1212 
1213 t_fclose(outputfile);
1214 
1215 } else {
1216 
1217  return;
1218 
1219 }
1220 
1221 }
1222 
1223 
1224 
1225 
1226 
1227 
1228 
1229 
1230 
1231 
1232 
1233 
1234