9.2
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-2026 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 * Public function prototypes
34 *============================================================================*/
35
36/*----------------------------------------------------------------------------
37 * Fill a list of boundary faces verifying a given selection criteria.
38 *
39 * parameters:
40 * criteria <-- selection criteria string
41 * n_b_faces --> number of selected interior faces
42 * b_face_list --> list of selected boundary faces
43 * (0 to n-1, preallocated to cs_glob_mesh->n_b_faces)
44 *----------------------------------------------------------------------------*/
45
46void
47cs_selector_get_b_face_list(const char *criteria,
48 cs_lnum_t *n_b_faces,
49 cs_lnum_t b_face_list[]);
50
51/*----------------------------------------------------------------------------
52 * Fill a list of interior faces verifying a given selection criteria.
53 *
54 * parameters:
55 * criteria <-- selection criteria string
56 * n_i_faces --> number of selected interior faces
57 * i_face_list --> list of selected interior faces
58 * (0 to n-1, preallocated to cs_glob_mesh->n_i_faces)
59 *----------------------------------------------------------------------------*/
60
61void
62cs_selector_get_i_face_list(const char *criteria,
63 cs_lnum_t *n_i_faces,
64 cs_lnum_t i_face_list[]);
65
66/*----------------------------------------------------------------------------
67 * Fill a list of cells verifying a given selection criteria.
68 *
69 * parameters:
70 * criteria <-- selection criteria string
71 * n_cells --> number of selected cells
72 * cell_list --> list of selected cells
73 * (0 to n-1, preallocated to cs_glob_mesh->n_cells)
74 *----------------------------------------------------------------------------*/
75
76void
77cs_selector_get_cell_list(const char *criteria,
78 cs_lnum_t *n_cells,
79 cs_lnum_t cell_list[]);
80
81/*----------------------------------------------------------------------------*/
90/*----------------------------------------------------------------------------*/
91
92void
93cs_selector_get_cell_vertices_list(const char *criteria,
94 cs_lnum_t *n_vertices,
95 cs_lnum_t vtx_ids[]);
96
97/*----------------------------------------------------------------------------*/
107/*----------------------------------------------------------------------------*/
108
109void
111 const cs_lnum_t cell_ids[],
112 cs_lnum_t *n_vertices,
113 cs_lnum_t vtx_ids[]);
114
115/*----------------------------------------------------------------------------*/
124/*----------------------------------------------------------------------------*/
125
126void
127cs_selector_get_b_face_vertices_list(const char *criteria,
128 cs_lnum_t *n_vertices,
129 cs_lnum_t vtx_ids[]);
130
131/*----------------------------------------------------------------------------*/
141/*----------------------------------------------------------------------------*/
142
143void
145 const cs_lnum_t face_ids[],
146 cs_lnum_t *n_vertices,
147 cs_lnum_t vtx_ids[]);
148
149/*----------------------------------------------------------------------------
150 * Fill lists of faces at the boundary of a set of cells verifying a given
151 * selection criteria.
152 *
153 * parameters:
154 * criteria <-- selection criteria string
155 * n_i_faces --> number of selected interior faces
156 * n_b_faces --> number of selected interior faces
157 * i_face_id --> list of selected interior faces
158 * (0 to n-1, preallocated to cs_glob_mesh->n_i_faces)
159 * b_face_id --> list of selected boundary faces
160 * (0 to n-1, preallocated to cs_glob_mesh->n_b_faces)
161 *----------------------------------------------------------------------------*/
162
163void
164cs_selector_get_cells_boundary(const char *criteria,
165 cs_lnum_t *n_i_faces,
166 cs_lnum_t *n_b_faces,
167 cs_lnum_t i_face_id[],
168 cs_lnum_t b_face_id[]);
169
170/*----------------------------------------------------------------------------*/
182/*----------------------------------------------------------------------------*/
183
184void
185cs_selector_get_b_face_cells_list(const char *criteria,
186 cs_lnum_t *n_b_cells,
187 cs_lnum_t b_cell_list[]);
188
189/*----------------------------------------------------------------------------
190 * Fill a list of interior faces belonging to a given periodicity.
191 *
192 * parameters:
193 * perio_num <-- periodicity number
194 * n_i_faces --> number of selected interior faces
195 * i_face_id --> list of selected interior faces
196 * (0 to n-1, preallocated to cs_glob_mesh->n_i_faces)
197 *----------------------------------------------------------------------------*/
198
199void
201 cs_lnum_t *n_i_faces,
202 cs_lnum_t i_face_id[]);
203
204/*----------------------------------------------------------------------------
205 * Fill a list of families verifying a given selection criteria.
206 *
207 * parameters:
208 * criteria <-- selection criteria string
209 * n_families --> number of selected families
210 * family_list --> list of selected family ids
211 * (preallocated to cs_glob_mesh->n_families + 1)
212 *----------------------------------------------------------------------------*/
213
214void
215cs_selector_get_family_list(const char *criteria,
216 int *n_families,
217 int family_list[]);
218
219/*----------------------------------------------------------------------------*/
220
221#endif /* CS_SELECTOR_H */
int cs_lnum_t
local mesh entity id
Definition: cs_defs.h:325
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:646
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:263
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:89
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:517
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:485
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:703
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:405
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:578
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:737
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:374
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:176