8.1
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-2023 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 /*----------------------------------------------------------------------------*/
252 /*----------------------------------------------------------------------------*/
253 
254 int
255 cs_boundary_zone_id_by_name(const char *z_name);
256 
257 /*----------------------------------------------------------------------------*/
264 /*----------------------------------------------------------------------------*/
265 
266 void
268  int type_flag);
269 
270 /*----------------------------------------------------------------------------*/
277 /*----------------------------------------------------------------------------*/
278 
279 void
281  bool time_varying);
282 
283 /*----------------------------------------------------------------------------*/
290 /*----------------------------------------------------------------------------*/
291 
292 void
294  bool allow_overlay);
295 
296 /*----------------------------------------------------------------------------*/
304 /*----------------------------------------------------------------------------*/
305 
306 const int *
308 
309 /*----------------------------------------------------------------------------*/
315 /*----------------------------------------------------------------------------*/
316 
317 void
319 
320 /*----------------------------------------------------------------------------*/
324 /*----------------------------------------------------------------------------*/
325 
326 void
328 
329 /*----------------------------------------------------------------------------*/
340 /*----------------------------------------------------------------------------*/
341 
342 int
343 cs_boundary_zone_n_type_zones(int type_flag);
344 
345 /*----------------------------------------------------------------------------*/
367 /*----------------------------------------------------------------------------*/
368 
369 int *
371 
372 /*----------------------------------------------------------------------------*/
381 /*----------------------------------------------------------------------------*/
382 
383 const int *
385 
386 /*----------------------------------------------------------------------------*/
392 /*----------------------------------------------------------------------------*/
393 
394 void
396 
397 /*----------------------------------------------------------------------------*/
403 /*----------------------------------------------------------------------------*/
404 
405 int
407 
408 /*----------------------------------------------------------------------------*/
412 /*----------------------------------------------------------------------------*/
413 
414 void
416 
417 /*----------------------------------------------------------------------------*/
418 
420 
421 #endif /* __CS_BOUNDARY_ZONE_H__ */
void cs_boundary_zone_initialize(void)
Initialize boundary zone structures.
Definition: cs_boundary_zone.c:375
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:1082
void cs_boundary_zone_build_all(bool mesh_modified)
Update association of boundary zones with a mesh.
Definition: cs_boundary_zone.c:491
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:711
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:652
int * cs_boundary_zone_face_class_id(void)
Get pointer to optional boundary face class ids.
Definition: cs_boundary_zone.c:1026
int cs_boundary_zone_n_zones(void)
Return number of boundary zones defined.
Definition: cs_boundary_zone.c:426
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:687
const int * cs_boundary_zone_face_zone_id(void)
Return pointer to zone id associated with each boundary face.
Definition: cs_boundary_zone.c:845
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:608
void cs_boundary_zone_set_overlay(int id, bool allow_overlay)
Set overlay behavior for a given boundary zone.
Definition: cs_boundary_zone.c:826
void cs_boundary_zone_build_private(int id)
Update association of a given private boundary zone with a mesh.
Definition: cs_boundary_zone.c:463
void cs_boundary_zone_print_info(void)
Print boundary zones information to listing file.
Definition: cs_boundary_zone.c:1119
void cs_boundary_zone_finalize(void)
Free all boundary zone structures.
Definition: cs_boundary_zone.c:401
int cs_boundary_zone_id_by_name(const char *z_name)
Retrieve the boundary zone id from its zone name. If the zone name is equal to NULL or has an empty l...
Definition: cs_boundary_zone.c:761
int cs_boundary_zone_n_zones_time_varying(void)
Return number of boundary zones which may vary in time.
Definition: cs_boundary_zone.c:440
void cs_boundary_zone_update_face_class_id(void)
Update boundary face output class ids if present.
Definition: cs_boundary_zone.c:1045
void cs_boundary_zone_log_setup(void)
Log setup information relative to defined boundary zones.
Definition: cs_boundary_zone.c:960
int cs_boundary_zone_max_class_or_zone_id(void)
Return the maximum defined face class or zone id.
Definition: cs_boundary_zone.c:1102
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:988
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:859
void cs_boundary_zone_set_type(int id, int type_flag)
Set type flag for a given boundary zone.
Definition: cs_boundary_zone.c:790
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:737
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:808
#define BEGIN_C_DECLS
Definition: cs_defs.h:514
#define END_C_DECLS
Definition: cs_defs.h:515
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:110
Definition: cs_zone.h:55