TheBoussinesqModel  3.2.1
 All Data Structures Files Functions Variables Typedefs Macros Pages
rw_maps.h
Go to the documentation of this file.
1 
2 /* STATEMENT:
3 
4 ASCII-GEOtop LIBRARIES
5 
6 Copyright, 2008 Stefano Endrizzi, Riccardo Rigon
7 
8  LICENSE:
9 
10  This file is part of ASCII-GEOtop LIBRARIES
11  ASCII-GEOtop LIBRARIES is a free software: you can redistribute it and/or modify
12  it under the terms of the GNU General Public License as published by
13  the Free Software Foundation, either version 3 of the License, or
14  (at your option) any later version.
15 
16  This program is distributed in the hope that it will be useful,
17  but WITHOUT ANY WARRANTY; without even the implied warranty of
18  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19  GNU General Public License for more details.
20 
21  You should have received a copy of the GNU General Public License
22  along with this program. If not, see <http://www.gnu.org/licenses/>.*/
23 
24 
25 //------------------------------------------------------------------------------------------------------
26 //------------------------------------------------------------------------------------------------------
27 //BASE subroutines
28 //------------------------------------------------------------------------------------------------------
29 //------------------------------------------------------------------------------------------------------
30 
32 
34 
36 
38 
39 DOUBLEMATRIX *copydoublematrix_const(double c0, DOUBLEMATRIX *Mref, double NOVALUE);
40 
41 DOUBLEMATRIX *multiplydoublematrix(double f, DOUBLEMATRIX *Mref, double NOVALUE);
42 
43 void build_doubletensor(DOUBLETENSOR *T, DOUBLEMATRIX *M, long l);
44 
46 
48 
49 DOUBLETENSOR *build_frommatrix(DOUBLEMATRIX *M, long l, long lmax);
50 
51 void write_frommatrix(long l, DOUBLEMATRIX *M, DOUBLETENSOR *T);
52 
53 void fmultiplydoublematrix(DOUBLEMATRIX *destination, DOUBLEMATRIX *origin, double f, double novalue);
54 
55 void assignnovalue(DOUBLEMATRIX *destination, DOUBLEMATRIX *origin, double novalue);
56 
57 //------------------------------------------------------------------------------------------------------
58 //------------------------------------------------------------------------------------------------------
59 //UTILITITY subroutines
60 //------------------------------------------------------------------------------------------------------
61 //------------------------------------------------------------------------------------------------------
62 
63 void write_suffix(char *suffix, long i, short start);
64 
65 short existing_file(char *name);
66 short existing_file_text(char *name);
67 
68 char *namefile_i(char *name, long i);
69 char *namefile_i_we(char *name, long i);
70 char *namefile_i_we2(char *name, long i);
71 
72 //------------------------------------------------------------------------------------------------------
73 //------------------------------------------------------------------------------------------------------
74 //READ subroutines
75 //------------------------------------------------------------------------------------------------------
76 //------------------------------------------------------------------------------------------------------
77 
78 DOUBLEMATRIX *read_map(short a, char *filename, DOUBLEMATRIX *Mref, T_INIT *UVref);
79 
80 DOUBLEMATRIX *read_mapseries(long i, char *filename, DOUBLEMATRIX *Mref, T_INIT *UVref);
81 
82 DOUBLETENSOR *read_tensor(long nl, char *filename, DOUBLEMATRIX *Mref, T_INIT *UVref);
83 
84 DOUBLETENSOR *read_maptensor(long i, long lmax, char *filename, DOUBLEMATRIX *Mref, T_INIT *UVref);
85 
86 //------------------------------------------------------------------------------------------------------
87 //------------------------------------------------------------------------------------------------------
88 //WRITE subroutines
89 //------------------------------------------------------------------------------------------------------
90 //------------------------------------------------------------------------------------------------------
91 
92 void write_map(char *filename, short type, short format, DOUBLEMATRIX *M, T_INIT *UV);
93 
94 void write_mapseries(long i, char *filename, short type, short format, DOUBLEMATRIX *M, T_INIT *UV);
95 
96 void write_tensorseries(short a, long l, long i, char *filename, short type, short format, DOUBLETENSOR *T, T_INIT *UV);
97 
98 void write_tensorseries_bis(short a, long l, long i, char *filename, short type, short format, DOUBLETENSOR *T, T_INIT *UV);
99 
100 void write_tensorseries2(long i, char *filename, short type, short format, DOUBLETENSOR *T, T_INIT *UV);