6.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-2020 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 
54 void
55 cs_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 
69 void
70 cs_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 
84 void
85 cs_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 
99 void
100 cs_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 
114 void
115 cs_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 
129 void
130 cs_selector_get_cell_list(const char *criteria,
131  cs_lnum_t *n_cells,
132  cs_lnum_t cell_list[]);
133 
134 /*----------------------------------------------------------------------------*/
143 /*----------------------------------------------------------------------------*/
144 
145 void
146 cs_selector_get_cell_vertices_list(const char *criteria,
147  cs_lnum_t *n_vertices,
148  cs_lnum_t vtx_ids[]);
149 
150 /*----------------------------------------------------------------------------*/
160 /*----------------------------------------------------------------------------*/
161 
162 void
164  const cs_lnum_t cell_ids[],
165  cs_lnum_t *n_vertices,
166  cs_lnum_t vtx_ids[]);
167 
168 /*----------------------------------------------------------------------------
169  * Fill lists of faces at the boundary of a set of cells verifying a given
170  * selection criteria.
171  *
172  * parameters:
173  * criteria <-- selection criteria string
174  * n_i_faces --> number of selected interior faces
175  * n_b_faces --> number of selected interior faces
176  * i_face_id --> list of selected interior faces
177  * (0 to n-1, preallocated to cs_glob_mesh->n_i_faces)
178  * b_face_id --> list of selected boundary faces
179  * (0 to n-1, preallocated to cs_glob_mesh->n_b_faces)
180  *----------------------------------------------------------------------------*/
181 
182 void
183 cs_selector_get_cells_boundary(const char *criteria,
184  cs_lnum_t *n_i_faces,
185  cs_lnum_t *n_b_faces,
186  cs_lnum_t i_face_id[],
187  cs_lnum_t b_face_id[]);
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 
199 void
200 cs_selector_get_perio_face_list(int perio_num,
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 families faces
211  * (0 to n-1, preallocated to cs_glob_mesh->n_families + 1)
212  *----------------------------------------------------------------------------*/
213 
214 void
215 cs_selector_get_family_list(const char *criteria,
216  int *n_families,
217  int family_list[]);
218 
219 /*----------------------------------------------------------------------------*/
220 
222 
223 #endif /* __CS_SELECTOR_H__ */
#define BEGIN_C_DECLS
Definition: cs_defs.h:495
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.c:493
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.c: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.c:577
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.c:676
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.c:642
int cs_lnum_t
local mesh entity id
Definition: cs_defs.h:301
#define END_C_DECLS
Definition: cs_defs.h:496
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.c:213
void cs_selector_get_cell_num_list(const char *criteria, cs_lnum_t *n_cells, cs_lnum_t cell_num_list[])
Definition: cs_selector.c:171
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.c:291
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.c:369
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.c:462
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.c:89