8.3
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-2024 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
96void
98
99/*----------------------------------------------------------------------------*/
103/*----------------------------------------------------------------------------*/
104
105void
107
108/*----------------------------------------------------------------------------*/
112/*----------------------------------------------------------------------------*/
113
114int
116
117/*----------------------------------------------------------------------------*/
123/*----------------------------------------------------------------------------*/
124
125int
127
128/*----------------------------------------------------------------------------*/
136/*----------------------------------------------------------------------------*/
137
138void
140
141/*----------------------------------------------------------------------------*/
149/*----------------------------------------------------------------------------*/
150
151void
152cs_boundary_zone_build_all(bool mesh_modified);
153
154/*----------------------------------------------------------------------------*/
164/*----------------------------------------------------------------------------*/
165
166int
167cs_boundary_zone_define(const char *name,
168 const char *criteria,
169 int type_flag);
170
171/*----------------------------------------------------------------------------*/
189/*----------------------------------------------------------------------------*/
190
191int
192cs_boundary_zone_define_by_func(const char *name,
194 void *input,
195 int type_flag);
196
197/*----------------------------------------------------------------------------*/
207/*----------------------------------------------------------------------------*/
208
209const cs_zone_t *
211
212/*----------------------------------------------------------------------------*/
222/*----------------------------------------------------------------------------*/
223
224const cs_zone_t *
225cs_boundary_zone_by_name(const char *name);
226
227/*----------------------------------------------------------------------------*/
237/*----------------------------------------------------------------------------*/
238
239const cs_zone_t *
240cs_boundary_zone_by_name_try(const char *name);
241
242/*----------------------------------------------------------------------------*/
252/*----------------------------------------------------------------------------*/
253
254int
255cs_boundary_zone_id_by_name(const char *z_name);
256
257/*----------------------------------------------------------------------------*/
264/*----------------------------------------------------------------------------*/
265
266void
268 int type_flag);
269
270/*----------------------------------------------------------------------------*/
277/*----------------------------------------------------------------------------*/
278
279void
281 bool time_varying);
282
283/*----------------------------------------------------------------------------*/
290/*----------------------------------------------------------------------------*/
291
292void
294 bool allow_overlay);
295
296/*----------------------------------------------------------------------------*/
304/*----------------------------------------------------------------------------*/
305
306const int *
308
309/*----------------------------------------------------------------------------*/
315/*----------------------------------------------------------------------------*/
316
317void
319
320/*----------------------------------------------------------------------------*/
324/*----------------------------------------------------------------------------*/
325
326void
328
329/*----------------------------------------------------------------------------*/
340/*----------------------------------------------------------------------------*/
341
342int
343cs_boundary_zone_n_type_zones(int type_flag);
344
345/*----------------------------------------------------------------------------*/
367/*----------------------------------------------------------------------------*/
368
369int *
371
372/*----------------------------------------------------------------------------*/
381/*----------------------------------------------------------------------------*/
382
383const int *
385
386/*----------------------------------------------------------------------------*/
392/*----------------------------------------------------------------------------*/
393
394void
396
397/*----------------------------------------------------------------------------*/
403/*----------------------------------------------------------------------------*/
404
405int
407
408/*----------------------------------------------------------------------------*/
412/*----------------------------------------------------------------------------*/
413
414void
416
417/*----------------------------------------------------------------------------*/
418
420
421#endif /* __CS_BOUNDARY_ZONE_H__ */
void cs_boundary_zone_initialize(void)
Initialize boundary zone structures.
Definition: cs_boundary_zone.cpp:375
void cs_boundary_zone_build_all(bool mesh_modified)
Update association of boundary zones with a mesh.
Definition: cs_boundary_zone.cpp:491
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.cpp:1082
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.cpp:711
int * cs_boundary_zone_face_class_id(void)
Get pointer to optional boundary face class ids.
Definition: cs_boundary_zone.cpp:1026
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.cpp:652
int cs_boundary_zone_n_zones(void)
Return number of boundary zones defined.
Definition: cs_boundary_zone.cpp:426
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.cpp:608
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.cpp:737
void cs_boundary_zone_set_overlay(int id, bool allow_overlay)
Set overlay behavior for a given boundary zone.
Definition: cs_boundary_zone.cpp:826
void cs_boundary_zone_build_private(int id)
Update association of a given private boundary zone with a mesh.
Definition: cs_boundary_zone.cpp:463
void cs_boundary_zone_print_info(void)
Print boundary zones information to listing file.
Definition: cs_boundary_zone.cpp:1119
void cs_boundary_zone_finalize(void)
Free all boundary zone structures.
Definition: cs_boundary_zone.cpp: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.cpp:761
int cs_boundary_zone_n_zones_time_varying(void)
Return number of boundary zones which may vary in time.
Definition: cs_boundary_zone.cpp:440
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.cpp:687
void cs_boundary_zone_update_face_class_id(void)
Update boundary face output class ids if present.
Definition: cs_boundary_zone.cpp:1045
void cs_boundary_zone_log_setup(void)
Log setup information relative to defined boundary zones.
Definition: cs_boundary_zone.cpp:960
int cs_boundary_zone_max_class_or_zone_id(void)
Return the maximum defined face class or zone id.
Definition: cs_boundary_zone.cpp: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.cpp: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.cpp:859
void cs_boundary_zone_set_type(int id, int type_flag)
Set type flag for a given boundary zone.
Definition: cs_boundary_zone.cpp:790
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.cpp:808
const int * cs_boundary_zone_face_zone_id(void)
Return pointer to zone id associated with each boundary face.
Definition: cs_boundary_zone.cpp:845
#define BEGIN_C_DECLS
Definition: cs_defs.h:542
#define END_C_DECLS
Definition: cs_defs.h:543
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