8.0
general documentation
cs_medcoupling_postprocess.h
Go to the documentation of this file.
1 #ifndef __CS_MEDCOUPLING_POSTPROCESS_HXX__
2 #define __CS_MEDCOUPLING_POSTPROCESS_HXX__
3 
4 /*============================================================================
5  * Postprocessing utilities based on MEDCoupling functions
6  *============================================================================*/
7 
8 /*
9  This file is part of code_saturne, a general-purpose CFD tool.
10 
11  Copyright (C) 1998-2023 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  * Local headers
32  *----------------------------------------------------------------------------*/
33 
34 #include "cs_defs.h"
35 
36 /*----------------------------------------------------------------------------*/
37 
39 
40 /*============================================================================
41  * Type definitions
42  *============================================================================*/
43 
44 /*============================================================================
45  * Structure definitions
46  *============================================================================*/
47 
48 typedef struct _medcoupling_slice_t cs_medcoupling_slice_t;
49 
50 /*============================================================================
51  * Public function prototypes
52  *============================================================================*/
53 
54 /*----------------------------------------------------------------------------*/
63 /*----------------------------------------------------------------------------*/
64 
65 cs_medcoupling_slice_t *
67 
68 /*----------------------------------------------------------------------------*/
77 /*----------------------------------------------------------------------------*/
78 
79 cs_medcoupling_slice_t *
80 cs_medcoupling_slice_by_name(const char *name);
81 
82 /*----------------------------------------------------------------------------*/
91 /*----------------------------------------------------------------------------*/
92 
93 cs_medcoupling_slice_t *
94 cs_medcoupling_slice_by_name_try(const char *name);
95 
96 /*----------------------------------------------------------------------------*/
107 /*----------------------------------------------------------------------------*/
108 
109 void
111  const char *selection_criteria,
112  const cs_real_t origin[],
113  const cs_real_t normal[],
114  const cs_real_t length1,
115  const cs_real_t length2);
116 
117 /*----------------------------------------------------------------------------*/
129 /*----------------------------------------------------------------------------*/
130 
131 void
133  const char *selection_criteria,
134  const cs_real_t origin[],
135  const cs_real_t normal[],
136  const cs_real_t radius,
137  const int n_sectors);
138 
139 /*----------------------------------------------------------------------------*/
152 /*----------------------------------------------------------------------------*/
153 
154 void
156  const char *selection_criteria,
157  const cs_real_t origin[],
158  const cs_real_t normal[],
159  const cs_real_t radius1,
160  const cs_real_t radius2,
161  const int n_sectors);
162 
163 /*----------------------------------------------------------------------------*/
171 /*----------------------------------------------------------------------------*/
172 
173 cs_lnum_t
174 cs_medcoupling_slice_get_n_elts(const char *name);
175 
176 /*----------------------------------------------------------------------------*/
184 /*----------------------------------------------------------------------------*/
185 
186 cs_lnum_t *
187 cs_medcoupling_slice_get_elt_ids(const char *name);
188 
189 /*----------------------------------------------------------------------------*/
197 /*----------------------------------------------------------------------------*/
198 
199 cs_real_t *
200 cs_medcoupling_slice_get_surfaces(const char *name);
201 
202 /*----------------------------------------------------------------------------*/
210 /*----------------------------------------------------------------------------*/
211 
212 cs_real_t
214 
215 /*----------------------------------------------------------------------------*/
224 /*----------------------------------------------------------------------------*/
225 
226 cs_real_t
227 cs_medcoupling_slice_scalar_integral(const char *name,
228  const cs_real_t *scalar);
229 
230 /*----------------------------------------------------------------------------*/
239 /*----------------------------------------------------------------------------*/
240 
241 cs_real_t
242 cs_medcoupling_slice_scalar_mean(const char *name,
243  const cs_real_t *scalar);
244 
245 /*----------------------------------------------------------------------------*/
258 /*----------------------------------------------------------------------------*/
259 
260 cs_real_t
262  const cs_real_t *scalar,
263  const cs_real_t *weight_s,
264  const cs_real_3_t *weight_v);
265 
266 /*----------------------------------------------------------------------------*/
279 /*----------------------------------------------------------------------------*/
280 
281 cs_real_t
283  const cs_real_t *scalar,
284  const cs_real_t *weight_s,
285  const cs_real_3_t *weight_v);
286 
287 /*----------------------------------------------------------------------------*/
291 /*----------------------------------------------------------------------------*/
292 
293 void
295 
296 /*----------------------------------------------------------------------------*/
297 
299 
300 #endif /* __CS_MEDCOUPLING_POSTPROCESS_HXX__ */
#define BEGIN_C_DECLS
Definition: cs_defs.h:509
double cs_real_t
Floating-point value.
Definition: cs_defs.h:319
cs_real_t cs_real_3_t[3]
vector of 3 floating-point values
Definition: cs_defs.h:332
#define END_C_DECLS
Definition: cs_defs.h:510
int cs_lnum_t
local mesh entity id
Definition: cs_defs.h:313
cs_real_t cs_medcoupling_slice_scalar_integral(const char *name, const cs_real_t *scalar)
Compute integral of a scalar over a slice.
Definition: cs_medcoupling_postprocess.cxx:741
void cs_medcoupling_slice_destroy_all(void)
Destroy all slices.
Definition: cs_medcoupling_postprocess.cxx:929
void cs_medcoupling_postprocess_add_annulus_slice(const char *name, const char *selection_criteria, const cs_real_t origin[], const cs_real_t normal[], const cs_real_t radius1, const cs_real_t radius2, const int n_sectors)
Add a slice based on an annulus.
Definition: cs_medcoupling_postprocess.cxx:617
cs_real_t cs_medcoupling_slice_scalar_integral_weighted(const char *name, const cs_real_t *scalar, const cs_real_t *weight_s, const cs_real_3_t *weight_v)
Compute integral of a scalar over a slice using a scalar and/or vectorial weights....
Definition: cs_medcoupling_postprocess.cxx:802
cs_medcoupling_slice_t * cs_medcoupling_slice_by_name_try(const char *name)
Get pointer to slice based on name. Returns NULL if not found.
Definition: cs_medcoupling_postprocess.cxx:490
void cs_medcoupling_postprocess_add_plane_slice(const char *name, const char *selection_criteria, const cs_real_t origin[], const cs_real_t normal[], const cs_real_t length1, const cs_real_t length2)
Add a slice based on a plane.
Definition: cs_medcoupling_postprocess.cxx:522
cs_real_t * cs_medcoupling_slice_get_surfaces(const char *name)
Get list of intersection surfaces for each cell intersected.
Definition: cs_medcoupling_postprocess.cxx:701
cs_medcoupling_slice_t * cs_medcoupling_slice_by_id(int id)
Get pointer to a slice based on id.
Definition: cs_medcoupling_postprocess.cxx:445
cs_real_t cs_medcoupling_slice_scalar_mean_weighted(const char *name, const cs_real_t *scalar, const cs_real_t *weight_s, const cs_real_3_t *weight_v)
Compute mean of a scalar over a slice using a scalar and/or vectorial weights. If NULL is provided fo...
Definition: cs_medcoupling_postprocess.cxx:868
cs_lnum_t * cs_medcoupling_slice_get_elt_ids(const char *name)
Get list of ids of the elements which may be intersected.
Definition: cs_medcoupling_postprocess.cxx:682
cs_real_t cs_medcoupling_slice_scalar_mean(const char *name, const cs_real_t *scalar)
Compute mean value of a scalar over a slice.
Definition: cs_medcoupling_postprocess.cxx:775
cs_real_t cs_medcoupling_slice_get_total_surface(const char *name)
Get total intersection surface between a slice and volume mesh.
Definition: cs_medcoupling_postprocess.cxx:720
cs_lnum_t cs_medcoupling_slice_get_n_elts(const char *name)
Get number cells that may be intersected by the slice.
Definition: cs_medcoupling_postprocess.cxx:663
cs_medcoupling_slice_t * cs_medcoupling_slice_by_name(const char *name)
Get pointer to slice based on name, raises an error if not found.
Definition: cs_medcoupling_postprocess.cxx:466
void cs_medcoupling_postprocess_add_disc_slice(const char *name, const char *selection_criteria, const cs_real_t origin[], const cs_real_t normal[], const cs_real_t radius, const int n_sectors)
Add a slice based on a disc.
Definition: cs_medcoupling_postprocess.cxx:569