9.1
general documentation
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-2025 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 "base/cs_base.h"
31
32/*----------------------------------------------------------------------------*/
33
35
36/*=============================================================================
37 * Public function prototypes
38 *============================================================================*/
39
40/*----------------------------------------------------------------------------
41 * Fill a list of boundary faces verifying a given selection criteria.
42 *
43 * parameters:
44 * criteria <-- selection criteria string
45 * n_b_faces --> number of selected interior faces
46 * b_face_list --> list of selected boundary faces
47 * (0 to n-1, preallocated to cs_glob_mesh->n_b_faces)
48 *----------------------------------------------------------------------------*/
49
50void
51cs_selector_get_b_face_list(const char *criteria,
52 cs_lnum_t *n_b_faces,
53 cs_lnum_t b_face_list[]);
54
55/*----------------------------------------------------------------------------
56 * Fill a list of interior faces verifying a given selection criteria.
57 *
58 * parameters:
59 * criteria <-- selection criteria string
60 * n_i_faces --> number of selected interior faces
61 * i_face_list --> list of selected interior faces
62 * (0 to n-1, preallocated to cs_glob_mesh->n_i_faces)
63 *----------------------------------------------------------------------------*/
64
65void
66cs_selector_get_i_face_list(const char *criteria,
67 cs_lnum_t *n_i_faces,
68 cs_lnum_t i_face_list[]);
69
70/*----------------------------------------------------------------------------
71 * Fill a list of cells verifying a given selection criteria.
72 *
73 * parameters:
74 * criteria <-- selection criteria string
75 * n_cells --> number of selected cells
76 * cell_list --> list of selected cells
77 * (0 to n-1, preallocated to cs_glob_mesh->n_cells)
78 *----------------------------------------------------------------------------*/
79
80void
81cs_selector_get_cell_list(const char *criteria,
82 cs_lnum_t *n_cells,
83 cs_lnum_t cell_list[]);
84
85/*----------------------------------------------------------------------------*/
94/*----------------------------------------------------------------------------*/
95
96void
97cs_selector_get_cell_vertices_list(const char *criteria,
98 cs_lnum_t *n_vertices,
99 cs_lnum_t vtx_ids[]);
100
101/*----------------------------------------------------------------------------*/
111/*----------------------------------------------------------------------------*/
112
113void
115 const cs_lnum_t cell_ids[],
116 cs_lnum_t *n_vertices,
117 cs_lnum_t vtx_ids[]);
118
119/*----------------------------------------------------------------------------*/
128/*----------------------------------------------------------------------------*/
129
130void
131cs_selector_get_b_face_vertices_list(const char *criteria,
132 cs_lnum_t *n_vertices,
133 cs_lnum_t vtx_ids[]);
134
135/*----------------------------------------------------------------------------*/
145/*----------------------------------------------------------------------------*/
146
147void
149 const cs_lnum_t face_ids[],
150 cs_lnum_t *n_vertices,
151 cs_lnum_t vtx_ids[]);
152
153/*----------------------------------------------------------------------------
154 * Fill lists of faces at the boundary of a set of cells verifying a given
155 * selection criteria.
156 *
157 * parameters:
158 * criteria <-- selection criteria string
159 * n_i_faces --> number of selected interior faces
160 * n_b_faces --> number of selected interior faces
161 * i_face_id --> list of selected interior faces
162 * (0 to n-1, preallocated to cs_glob_mesh->n_i_faces)
163 * b_face_id --> list of selected boundary faces
164 * (0 to n-1, preallocated to cs_glob_mesh->n_b_faces)
165 *----------------------------------------------------------------------------*/
166
167void
168cs_selector_get_cells_boundary(const char *criteria,
169 cs_lnum_t *n_i_faces,
170 cs_lnum_t *n_b_faces,
171 cs_lnum_t i_face_id[],
172 cs_lnum_t b_face_id[]);
173
174/*----------------------------------------------------------------------------*/
186/*----------------------------------------------------------------------------*/
187
188void
189cs_selector_get_b_face_cells_list(const char *criteria,
190 cs_lnum_t *n_b_cells,
191 cs_lnum_t b_cell_list[]);
192
193/*----------------------------------------------------------------------------
194 * Fill a list of interior faces belonging to a given periodicity.
195 *
196 * parameters:
197 * perio_num <-- periodicity number
198 * n_i_faces --> number of selected interior faces
199 * i_face_id --> list of selected interior faces
200 * (0 to n-1, preallocated to cs_glob_mesh->n_i_faces)
201 *----------------------------------------------------------------------------*/
202
203void
205 cs_lnum_t *n_i_faces,
206 cs_lnum_t i_face_id[]);
207
208/*----------------------------------------------------------------------------
209 * Fill a list of families verifying a given selection criteria.
210 *
211 * parameters:
212 * criteria <-- selection criteria string
213 * n_families --> number of selected families
214 * family_list --> list of selected family ids
215 * (preallocated to cs_glob_mesh->n_families + 1)
216 *----------------------------------------------------------------------------*/
217
218void
219cs_selector_get_family_list(const char *criteria,
220 int *n_families,
221 int family_list[]);
222
223/*----------------------------------------------------------------------------*/
224
226
227#endif /* __CS_SELECTOR_H__ */
#define BEGIN_C_DECLS
Definition: cs_defs.h:554
#define END_C_DECLS
Definition: cs_defs.h:555
int cs_lnum_t
local mesh entity id
Definition: cs_defs.h:350
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:648
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:265
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:91
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:519
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:487
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:705
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:407
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:580
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:739
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:376
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:178