7.0
general documentation
cs_boundary_zone.h
Go to the documentation of this file.
1 #ifndef __CS_BOUNDARY_ZONE_H__
2 #define __CS_BOUNDARY_ZONE_H__
3 
4 /*============================================================================
5  * Boundary zones handling.
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 
30 /*----------------------------------------------------------------------------
31  * Standard C library headers
32  *----------------------------------------------------------------------------*/
33 
34 /*----------------------------------------------------------------------------
35  * Local headers
36  *----------------------------------------------------------------------------*/
37 
38 #include "cs_base.h"
39 #include "cs_mesh_location.h"
40 
41 /*----------------------------------------------------------------------------
42  * Local headers
43  *----------------------------------------------------------------------------*/
44 
45 #include "cs_defs.h"
46 #include "cs_zone.h"
47 
48 /*----------------------------------------------------------------------------*/
49 
51 
52 /*============================================================================
53  * Macro definitions
54  *============================================================================*/
55 
62 /*
63  * Zone type
64  */
65 
67 #define CS_BOUNDARY_ZONE_WALL (1 << 0)
68 
70 #define CS_BOUNDARY_ZONE_PRIVATE (1 << 1)
71 
74 /*============================================================================
75  * Type definitions
76  *============================================================================*/
77 
78 /*=============================================================================
79  * Global variables
80  *============================================================================*/
81 
82 /*============================================================================
83  * Public function prototypes
84  *============================================================================*/
85 
86 /*----------------------------------------------------------------------------*/
94 /*----------------------------------------------------------------------------*/
95 
96 void
98 
99 /*----------------------------------------------------------------------------*/
103 /*----------------------------------------------------------------------------*/
104 
105 void
107 
108 /*----------------------------------------------------------------------------*/
112 /*----------------------------------------------------------------------------*/
113 
114 int
116 
117 /*----------------------------------------------------------------------------*/
123 /*----------------------------------------------------------------------------*/
124 
125 int
127 
128 /*----------------------------------------------------------------------------*/
136 /*----------------------------------------------------------------------------*/
137 
138 void
140 
141 /*----------------------------------------------------------------------------*/
149 /*----------------------------------------------------------------------------*/
150 
151 void
152 cs_boundary_zone_build_all(bool mesh_modified);
153 
154 /*----------------------------------------------------------------------------*/
164 /*----------------------------------------------------------------------------*/
165 
166 int
167 cs_boundary_zone_define(const char *name,
168  const char *criteria,
169  int type_flag);
170 
171 /*----------------------------------------------------------------------------*/
189 /*----------------------------------------------------------------------------*/
190 
191 int
192 cs_boundary_zone_define_by_func(const char *name,
194  void *input,
195  int type_flag);
196 
197 /*----------------------------------------------------------------------------*/
207 /*----------------------------------------------------------------------------*/
208 
209 const cs_zone_t *
210 cs_boundary_zone_by_id(int id);
211 
212 /*----------------------------------------------------------------------------*/
222 /*----------------------------------------------------------------------------*/
223 
224 const cs_zone_t *
225 cs_boundary_zone_by_name(const char *name);
226 
227 /*----------------------------------------------------------------------------*/
237 /*----------------------------------------------------------------------------*/
238 
239 const cs_zone_t *
240 cs_boundary_zone_by_name_try(const char *name);
241 
242 /*----------------------------------------------------------------------------*/
249 /*----------------------------------------------------------------------------*/
250 
251 void
253  int type_flag);
254 
255 /*----------------------------------------------------------------------------*/
262 /*----------------------------------------------------------------------------*/
263 
264 void
266  bool time_varying);
267 
268 /*----------------------------------------------------------------------------*/
275 /*----------------------------------------------------------------------------*/
276 
277 void
279  bool allow_overlay);
280 
281 /*----------------------------------------------------------------------------*/
289 /*----------------------------------------------------------------------------*/
290 
291 const int *
293 
294 /*----------------------------------------------------------------------------*/
300 /*----------------------------------------------------------------------------*/
301 
302 void
304 
305 /*----------------------------------------------------------------------------*/
309 /*----------------------------------------------------------------------------*/
310 
311 void
313 
314 /*----------------------------------------------------------------------------*/
325 /*----------------------------------------------------------------------------*/
326 
327 int
328 cs_boundary_zone_n_type_zones(int type_flag);
329 
330 /*----------------------------------------------------------------------------*/
352 /*----------------------------------------------------------------------------*/
353 
354 int *
356 
357 /*----------------------------------------------------------------------------*/
366 /*----------------------------------------------------------------------------*/
367 
368 const int *
370 
371 /*----------------------------------------------------------------------------*/
377 /*----------------------------------------------------------------------------*/
378 
379 void
381 
382 /*----------------------------------------------------------------------------*/
388 /*----------------------------------------------------------------------------*/
389 
390 int
392 
393 /*----------------------------------------------------------------------------*/
397 /*----------------------------------------------------------------------------*/
398 
399 void
401 
402 /*----------------------------------------------------------------------------*/
403 
405 
406 #endif /* __CS_BOUNDARY_ZONE_H__ */
void cs_boundary_zone_set_time_varying(int id, bool time_varying)
Set time varying behavior for a given boundary zone.
Definition: cs_boundary_zone.c:791
const cs_zone_t * cs_boundary_zone_by_name_try(const char *name)
Return a pointer to a boundary zone based on its name if present.
Definition: cs_boundary_zone.c:752
void cs_boundary_zone_finalize(void)
Free all boundary zone structures.
Definition: cs_boundary_zone.c:416
void cs_boundary_zone_update_face_class_id(void)
Update boundary face output class ids if present.
Definition: cs_boundary_zone.c:977
void cs_boundary_zone_log_setup(void)
Log setup information relative to defined boundary zones.
Definition: cs_boundary_zone.c:892
void cs_boundary_zone_build_all(bool mesh_modified)
Update association of boundary zones with a mesh.
Definition: cs_boundary_zone.c:506
int * cs_boundary_zone_face_class_id(void)
Get pointer to optional boundary face class ids.
Definition: cs_boundary_zone.c:958
void() cs_mesh_location_select_t(void *input, const cs_mesh_t *m, int location_id, cs_lnum_t *n_elts, cs_lnum_t **elt_ids)
Definition: cs_mesh_location.h:99
#define BEGIN_C_DECLS
Definition: cs_defs.h:495
void cs_boundary_zone_print_info(void)
Print boundary zones information to listing file.
Definition: cs_boundary_zone.c:1051
int cs_boundary_zone_n_zones(void)
Return number of boundary zones defined.
Definition: cs_boundary_zone.c:441
const int * cs_boundary_zone_face_zone_id(void)
Return pointer to zone id associated with each boundary face.
Definition: cs_boundary_zone.c:828
const cs_zone_t * cs_boundary_zone_by_name(const char *name)
Return a pointer to a boundary zone based on its name if present.
Definition: cs_boundary_zone.c:726
void cs_boundary_zone_log_info(const cs_zone_t *z)
Print info relative to a given boundary zone to log file.
Definition: cs_boundary_zone.c:842
void cs_boundary_zone_set_overlay(int id, bool allow_overlay)
Set overlay behavior for a given boundary zone.
Definition: cs_boundary_zone.c:809
int cs_boundary_zone_define_by_func(const char *name, cs_mesh_location_select_t *func, void *input, int type_flag)
Define a new mesh location with an associated selection function.
Definition: cs_boundary_zone.c:667
int cs_boundary_zone_n_zones_time_varying(void)
Return number of boundary zones which may vary in time.
Definition: cs_boundary_zone.c:455
int cs_boundary_zone_define(const char *name, const char *criteria, int type_flag)
Define a new boundary zone using a selection criteria string.
Definition: cs_boundary_zone.c:623
const cs_zone_t * cs_boundary_zone_by_id(int id)
Return a pointer to a boundary zone based on its id.
Definition: cs_boundary_zone.c:702
int cs_boundary_zone_max_class_or_zone_id(void)
Return the maximum defined face class or zone id.
Definition: cs_boundary_zone.c:1034
void cs_boundary_zone_set_type(int id, int type_flag)
Set type flag for a given boundary zone.
Definition: cs_boundary_zone.c:773
#define END_C_DECLS
Definition: cs_defs.h:496
void cs_boundary_zone_initialize(void)
Initialize boundary zone structures.
Definition: cs_boundary_zone.c:390
int cs_boundary_zone_n_type_zones(int type_flag)
Return number of boundary zones associated with a given zone flag.
Definition: cs_boundary_zone.c:920
const int * cs_boundary_zone_face_class_or_zone_id(void)
Get read pointer to optional boundary face class or zone ids.
Definition: cs_boundary_zone.c:1014
void cs_boundary_zone_build_private(int id)
Update association of a given private boundary zone with a mesh.
Definition: cs_boundary_zone.c:478
Definition: cs_zone.h:55