7.1
general documentation
cs_mesh_cartesian.h
Go to the documentation of this file.
1 #ifndef __CS_MESH_CARTESIAN_H__
2 #define __CS_MESH_CARTESIAN_H__
3 
4 /*============================================================================
5  * Cartesian mesh generation
6  *============================================================================*/
7 
8 /*
9  This file is part of Code_Saturne, a general-purpose CFD tool.
10 
11  Copyright (C) 1998-2021 EDF S.A.
12 
13  This program is free software; you can redistribute it and/or modify it under
14  the terms of the GNU General Public License as published by the Free Software
15  Foundation; either version 2 of the License, or (at your option) any later
16  version.
17 
18  This program is distributed in the hope that it will be useful, but WITHOUT
19  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
20  FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
21  details.
22 
23  You should have received a copy of the GNU General Public License along with
24  this program; if not, write to the Free Software Foundation, Inc., 51 Franklin
25  Street, Fifth Floor, Boston, MA 02110-1301, USA.
26 */
27 
28 /*----------------------------------------------------------------------------
29  * Local headers
30  *----------------------------------------------------------------------------*/
31 
32 #include "cs_defs.h"
33 
34 /*============================================================================
35  * Type definitions
36  *============================================================================*/
37 
38 typedef enum {
39 
45 
47 
48 typedef struct _cs_mesh_cartesian_params_t cs_mesh_cartesian_params_t;
49 
50 /*============================================================================
51  * Public C function prototypes
52  *============================================================================*/
53 
54 /*----------------------------------------------------------------------------*/
60 /*----------------------------------------------------------------------------*/
61 
62 cs_mesh_cartesian_params_t *
64 
65 /*----------------------------------------------------------------------------*/
68 /*----------------------------------------------------------------------------*/
69 
70 void
72 
73 /*----------------------------------------------------------------------------*/
82 /*----------------------------------------------------------------------------*/
83 
84 void
86  cs_real_t xyz[6]);
87 
88 /*----------------------------------------------------------------------------*/
96 /*----------------------------------------------------------------------------*/
97 
98 void
100  int ncells,
101  cs_real_t vtx_coord[]);
102 
103 /*----------------------------------------------------------------------------*/
122 /*----------------------------------------------------------------------------*/
123 
124 void
126  int n_parts,
127  const cs_real_t part_coords[],
128  const cs_lnum_t n_part_cells[],
129  const cs_real_t amp_factors[]);
130 
131 /*----------------------------------------------------------------------------*/
147 /*----------------------------------------------------------------------------*/
148 
149 void
150 cs_mesh_cartesian_define_from_csv(const char *csv_file_name);
151 
152 /*----------------------------------------------------------------------------*/
164 /*----------------------------------------------------------------------------*/
165 
166 void
169  int ncells,
170  cs_real_t smin,
171  cs_real_t smax,
172  cs_real_t progression);
173 
174 /*----------------------------------------------------------------------------*/
179 /*----------------------------------------------------------------------------*/
180 
181 int
183 
184 /*----------------------------------------------------------------------------*/
191 /*----------------------------------------------------------------------------*/
192 
193 int
195 
196 /*----------------------------------------------------------------------------*/
203 /*----------------------------------------------------------------------------*/
204 
205 void
207  cs_mesh_builder_t *mb,
208  long echo);
209 
210 /*----------------------------------------------------------------------------*/
213 /*----------------------------------------------------------------------------*/
214 
215 void
217 
218 /*----------------------------------------------------------------------------*/
219 
220 #endif /* __CS_MESH_CARTESIAN_H__ */
void cs_mesh_cartesian_define_dir_params(int idim, cs_mesh_cartesian_law_t law, int ncells, cs_real_t smin, cs_real_t smax, cs_real_t progression)
Define parameters for a given direction.
Definition: cs_mesh_cartesian.c:769
Definition: cs_mesh_builder.h:57
void cs_mesh_cartesian_define_simple(int ncells[3], cs_real_t xyz[6])
Define a simple cartesian mesh with a constant step in all directions.
Definition: cs_mesh_cartesian.c:494
Definition: cs_mesh_cartesian.h:41
int cs_mesh_cartesian_get_ncells(int idim)
Get number of cells in a given direction.
Definition: cs_mesh_cartesian.c:847
double cs_real_t
Floating-point value.
Definition: cs_defs.h:322
Definition: cs_mesh.h:84
void cs_mesh_cartesian_define_dir_geom_by_part(int idir, int n_parts, const cs_real_t part_coords[], const cs_lnum_t n_part_cells[], const cs_real_t amp_factors[])
Define direction parameters based on a piecewise definition. Each part follows a geometric (or unifor...
Definition: cs_mesh_cartesian.c:576
Definition: cs_mesh_cartesian.h:42
void cs_mesh_cartesian_params_destroy(void)
Destroy cartesian mesh parameters.
Definition: cs_mesh_cartesian.c:1028
void cs_mesh_cartesian_define_dir_user(int idir, int ncells, cs_real_t vtx_coord[])
Define directions parameters based on a user input.
Definition: cs_mesh_cartesian.c:524
int cs_mesh_cartesian_need_build(void)
Indicate if a cartesian mesh is to be built.
Definition: cs_mesh_cartesian.c:830
int cs_lnum_t
local mesh entity id
Definition: cs_defs.h:316
void cs_mesh_cartesian_create(void)
Create cartesian mesh structure.
Definition: cs_mesh_cartesian.c:475
integer(c_int), pointer, save smin
starting min
Definition: atincl.f90:196
Definition: cs_mesh_cartesian.h:43
cs_mesh_cartesian_params_t * cs_mesh_cartesian_get_params(void)
Return pointer to cartesian mesh parameters structure.
Definition: cs_mesh_cartesian.c:464
void cs_mesh_cartesian_connectivity(cs_mesh_t *m, cs_mesh_builder_t *mb, long echo)
Build unstructured connectivity needed for partitionning.
Definition: cs_mesh_cartesian.c:862
void cs_mesh_cartesian_define_from_csv(const char *csv_file_name)
Define a simple cartesian mesh based on a CSV file. CSV file needs to contain : (1) First line which ...
Definition: cs_mesh_cartesian.c:669
Definition: cs_mesh_cartesian.h:44
cs_mesh_cartesian_law_t
Definition: cs_mesh_cartesian.h:38
Definition: cs_mesh_cartesian.h:40