8.3
general documentation
All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
cs_selector.h
Go to the documentation of this file.
1#ifndef __CS_SELECTOR_H__
2#define __CS_SELECTOR_H__
3
4/*============================================================================
5 * Build selection lists for faces or cells
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#include "cs_base.h"
31
32/*----------------------------------------------------------------------------*/
33
35
36/*============================================================================
37 * Public function prototypes for Fortran API
38 *============================================================================*/
39
40/*=============================================================================
41 * Public function prototypes
42 *============================================================================*/
43
44/*----------------------------------------------------------------------------
45 * Fill a list of boundary face numbers verifying a given selection criteria.
46 *
47 * parameters:
48 * criteria <-- selection criteria string
49 * n_b_faces --> number of selected interior faces
50 * b_face_num_list --> list of selected boundary face numbers
51 * (1 to n, preallocated to cs_glob_mesh->n_b_faces)
52 *----------------------------------------------------------------------------*/
53
54void
55cs_selector_get_b_face_num_list(const char *criteria,
56 cs_lnum_t *n_b_faces,
57 cs_lnum_t b_face_num_list[]);
58
59/*----------------------------------------------------------------------------
60 * Fill a list of interior faces verifying a given selection criteria.
61 *
62 * parameters:
63 * criteria <-- selection criteria string
64 * n_i_faces --> number of selected interior faces
65 * i_face_num_list --> list of selected interior face numbers
66 * (1 to n, preallocated to cs_glob_mesh->n_i_faces)
67 *----------------------------------------------------------------------------*/
68
69void
70cs_selector_get_i_face_num_list(const char *criteria,
71 cs_lnum_t *n_i_faces,
72 cs_lnum_t i_face_num_list[]);
73
74/*----------------------------------------------------------------------------
75 * Fill a list of cells verifying a given selection criteria.
76 *
77 * parameters:
78 * criteria <-- selection criteria string
79 * n_cells --> number of selected cells
80 * cell_num_list --> list of selected cell numbers
81 * (1 to n, preallocated to cs_glob_mesh->n_cells)
82 *----------------------------------------------------------------------------*/
83
84void
85cs_selector_get_cell_num_list(const char *criteria,
86 cs_lnum_t *n_cells,
87 cs_lnum_t cell_num_list[]);
88
89/*----------------------------------------------------------------------------
90 * Fill a list of boundary faces verifying a given selection criteria.
91 *
92 * parameters:
93 * criteria <-- selection criteria string
94 * n_b_faces --> number of selected interior faces
95 * b_face_list --> list of selected boundary faces
96 * (0 to n-1, preallocated to cs_glob_mesh->n_b_faces)
97 *----------------------------------------------------------------------------*/
98
99void
100cs_selector_get_b_face_list(const char *criteria,
101 cs_lnum_t *n_b_faces,
102 cs_lnum_t b_face_list[]);
103
104/*----------------------------------------------------------------------------
105 * Fill a list of interior faces verifying a given selection criteria.
106 *
107 * parameters:
108 * criteria <-- selection criteria string
109 * n_i_faces --> number of selected interior faces
110 * i_face_list --> list of selected interior faces
111 * (0 to n-1, preallocated to cs_glob_mesh->n_i_faces)
112 *----------------------------------------------------------------------------*/
113
114void
115cs_selector_get_i_face_list(const char *criteria,
116 cs_lnum_t *n_i_faces,
117 cs_lnum_t i_face_list[]);
118
119/*----------------------------------------------------------------------------
120 * Fill a list of cells verifying a given selection criteria.
121 *
122 * parameters:
123 * criteria <-- selection criteria string
124 * n_cells --> number of selected cells
125 * cell_list --> list of selected cells
126 * (0 to n-1, preallocated to cs_glob_mesh->n_cells)
127 *----------------------------------------------------------------------------*/
128
129void
130cs_selector_get_cell_list(const char *criteria,
131 cs_lnum_t *n_cells,
132 cs_lnum_t cell_list[]);
133
134/*----------------------------------------------------------------------------*/
143/*----------------------------------------------------------------------------*/
144
145void
146cs_selector_get_cell_vertices_list(const char *criteria,
147 cs_lnum_t *n_vertices,
148 cs_lnum_t vtx_ids[]);
149
150/*----------------------------------------------------------------------------*/
160/*----------------------------------------------------------------------------*/
161
162void
164 const cs_lnum_t cell_ids[],
165 cs_lnum_t *n_vertices,
166 cs_lnum_t vtx_ids[]);
167
168/*----------------------------------------------------------------------------*/
177/*----------------------------------------------------------------------------*/
178
179void
180cs_selector_get_b_face_vertices_list(const char *criteria,
181 cs_lnum_t *n_vertices,
182 cs_lnum_t vtx_ids[]);
183
184/*----------------------------------------------------------------------------*/
194/*----------------------------------------------------------------------------*/
195
196void
198 const cs_lnum_t face_ids[],
199 cs_lnum_t *n_vertices,
200 cs_lnum_t vtx_ids[]);
201
202/*----------------------------------------------------------------------------
203 * Fill lists of faces at the boundary of a set of cells verifying a given
204 * selection criteria.
205 *
206 * parameters:
207 * criteria <-- selection criteria string
208 * n_i_faces --> number of selected interior faces
209 * n_b_faces --> number of selected interior faces
210 * i_face_id --> list of selected interior faces
211 * (0 to n-1, preallocated to cs_glob_mesh->n_i_faces)
212 * b_face_id --> list of selected boundary faces
213 * (0 to n-1, preallocated to cs_glob_mesh->n_b_faces)
214 *----------------------------------------------------------------------------*/
215
216void
217cs_selector_get_cells_boundary(const char *criteria,
218 cs_lnum_t *n_i_faces,
219 cs_lnum_t *n_b_faces,
220 cs_lnum_t i_face_id[],
221 cs_lnum_t b_face_id[]);
222
223/*----------------------------------------------------------------------------*/
235/*----------------------------------------------------------------------------*/
236
237void
238cs_selector_get_b_face_cells_list(const char *criteria,
239 cs_lnum_t *n_b_cells,
240 cs_lnum_t b_cell_list[]);
241
242/*----------------------------------------------------------------------------
243 * Fill a list of interior faces belonging to a given periodicity.
244 *
245 * parameters:
246 * perio_num <-- periodicity number
247 * n_i_faces --> number of selected interior faces
248 * i_face_id --> list of selected interior faces
249 * (0 to n-1, preallocated to cs_glob_mesh->n_i_faces)
250 *----------------------------------------------------------------------------*/
251
252void
254 cs_lnum_t *n_i_faces,
255 cs_lnum_t i_face_id[]);
256
257/*----------------------------------------------------------------------------
258 * Fill a list of families verifying a given selection criteria.
259 *
260 * parameters:
261 * criteria <-- selection criteria string
262 * n_families --> number of selected families
263 * family_list --> list of selected family ids
264 * (preallocated to cs_glob_mesh->n_families + 1)
265 *----------------------------------------------------------------------------*/
266
267void
268cs_selector_get_family_list(const char *criteria,
269 int *n_families,
270 int family_list[]);
271
272/*----------------------------------------------------------------------------*/
273
275
276#endif /* __CS_SELECTOR_H__ */
#define BEGIN_C_DECLS
Definition: cs_defs.h:542
#define END_C_DECLS
Definition: cs_defs.h:543
int cs_lnum_t
local mesh entity id
Definition: cs_defs.h:335
void cs_selector_get_b_face_cells_list(const char *criteria, cs_lnum_t *n_b_cells, cs_lnum_t b_cell_list[])
Fill a list of cells attached to a given boundary selection criteria.
Definition: cs_selector.cpp:734
void cs_selector_get_cell_list(const char *criteria, cs_lnum_t *n_cells, cs_lnum_t cell_list[])
Fill a list of cells verifying a given selection criteria.
Definition: cs_selector.cpp:369
void cs_selector_get_b_face_list(const char *criteria, cs_lnum_t *n_b_faces, cs_lnum_t b_face_list[])
Fill a list of boundary faces verifying a given selection criteria.
Definition: cs_selector.cpp:213
void cs_selector_get_b_face_vertices_list_by_ids(cs_lnum_t n_faces, const cs_lnum_t face_ids[], cs_lnum_t *n_vertices, cs_lnum_t vtx_ids[])
Fill a list of vertices belonging to a given list of boundary faces.
Definition: cs_selector.cpp:605
void cs_selector_get_b_face_vertices_list(const char *criteria, cs_lnum_t *n_vertices, cs_lnum_t vtx_ids[])
Fill a list of vertices verifying a given boundary selection criteria.
Definition: cs_selector.cpp:573
void cs_selector_get_cell_num_list(const char *criteria, cs_lnum_t *n_cells, cs_lnum_t cell_num_list[])
Definition: cs_selector.cpp:171
void cs_selector_get_perio_face_list(int perio_num, cs_lnum_t *n_i_faces, cs_lnum_t i_face_id[])
Fill a list of interior faces belonging to a given periodicity.
Definition: cs_selector.cpp:791
void cs_selector_get_cell_vertices_list_by_ids(cs_lnum_t n_cells, const cs_lnum_t cell_ids[], cs_lnum_t *n_vertices, cs_lnum_t vtx_ids[])
Fill a list of vertices belonging to a given list of cells.
Definition: cs_selector.cpp:493
void cs_selector_get_b_face_num_list(const char *criteria, cs_lnum_t *n_b_faces, cs_lnum_t b_face_num_list[])
Definition: cs_selector.cpp:89
void cs_selector_get_i_face_num_list(const char *criteria, cs_lnum_t *n_i_faces, cs_lnum_t i_face_num_list[])
Definition: cs_selector.cpp:130
void cs_selector_get_cells_boundary(const char *criteria, cs_lnum_t *n_i_faces, cs_lnum_t *n_b_faces, cs_lnum_t i_face_id[], cs_lnum_t b_face_id[])
Fill lists of faces at the boundary of a set of cells verifying a given selection criteria.
Definition: cs_selector.cpp:666
void cs_selector_get_family_list(const char *criteria, int *n_families, int family_list[])
Fill a list of families verifying a given selection criteria.
Definition: cs_selector.cpp:825
void cs_selector_get_cell_vertices_list(const char *criteria, cs_lnum_t *n_vertices, cs_lnum_t vtx_ids[])
Fill a list of cells verifying a given selection criteria.
Definition: cs_selector.cpp:462
void cs_selector_get_i_face_list(const char *criteria, cs_lnum_t *n_i_faces, cs_lnum_t i_face_list[])
Fill a list of interior faces verifying a given selection criteria.
Definition: cs_selector.cpp:291