TheBoussinesqModel  3.2.1
 All Data Structures Files Functions Variables Typedefs Macros Pages
bigcells2.h
Go to the documentation of this file.
1 /* BGEOMETRY BUILDS THE MESH FROM A RASTER FOR THE BOUSSINESQ MODEL
2 BGEOMETRY Version 0.9375 KMackenzie
3 
4 file bigcells2.h
5 
6 Copyright, 2009 Emanuele Cordano and Riccardo Rigon
7 
8 This file is part of BGEOMETRY.
9  BGEOMETRY is free software: you can redistribute it and/or modify
10  it under the terms of the GNU General Public License as published by
11  the Free Software Foundation, either version 3 of the License, or
12  (at your option) any later version.
13 
14  BGEOMETRY is distributed in the hope that it will be useful,
15  but WITHOUT ANY WARRANTY; without even the implied warranty of
16  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17  GNU General Public License for more details.
18 
19  You should have received a copy of the GNU General Public License
20  along with this program. If not, see <http://www.gnu.org/licenses/>.
21 */
22 
23 typedef struct {
25 
27 
29 
33 
35 
36 } GRID;
37 
38 typedef struct {
39 
41 
42  LONGMATRIX *indices_pixel, *indices_horizontal_lines, *indices_vertical_lines, *indices_vertex;
43 
44  long novalue;
45 
47 
48 
49 } SQUARE_GRID;
50 
51 
52 typedef struct {
53 
54  //short is_Dynamic;
55 
56  long nl,nh;
57 
59 
61 
62 
63 typedef struct {
64 
67 
70 
73 
74 
76 
77 
78 
79 
80 
81 typedef struct {
82 
84  long nl,nh;
88  int (*check_novalues)(double x, DOUBLEVECTOR *V);
90 } RASTER_MAP;
91 
92 typedef struct {
93 
96 
98  char *mapname_fine;
99 
101 
102 SQUARE_GRID *get_square_grid(DOUBLEMATRIX *DTM, T_INIT *UV,char *file_resume_lines, char *file_resume_polygons, char *file_resume_connections,long (*index_pixel_from_a_bin)(long r, long c,LONGVECTOR *s_index), int (*check_novalues)(double x, DOUBLEVECTOR *V),long displacement,short print);
103 
104 void write_grid(GRID *grid);
105 
107 
108 RASTER_MAP *new_raster_map(long nh);
109 int add_map_to_raster(long index,char *filename, RASTER_MAP *raster, short a, short print);
110 
111 DOUBLERASTER_MAP *get_doubleraster_map(long n_coarsemaps, long n_finemaps,char *coarse_mapname, char *fine_mapname,short print);
112 
113 DOUBLESQUARE_GRID *get_doublesquare_grid(DOUBLERASTER_MAP *draster, char *resume_filenames,long (*index_pixel_from_a_bin_coarse)(long r, long c,LONGVECTOR *s_index),long (*index_pixel_from_a_bin_fine)(long r, long c,LONGVECTOR *s_index),long d_coarse,long d_fine,short print);
114 
116 LONGMATRIX_VECTOR *get_fine_indices(LONGMATRIX *fine,LONGMATRIX *coarse,long i_firstcell,long i_lastcell,long novalue,short print);
117 
118 
119 
120 
121 LONGBIN *get_fine_line_indices (LONGMATRIX *h_fine,LONGMATRIX *h_coarse,LONGMATRIX *v_fine,LONGMATRIX *v_coarse,long n_horizontal,long n_lines, long novalue,short print);
122 
124 
125 int write_longmatrix_vector(LONGMATRIX_VECTOR *lmv,char *filename);
127 
128 void free_grid(GRID *grid);
129 void free_square_grid(SQUARE_GRID *sq);
130 void free_raster_map(RASTER_MAP *raster);
133 char *strcpy2(char *dest, const char *src);
134 char *copy_string(char *origin);