programmer's documentation
cs_xdef_eval.h
Go to the documentation of this file.
1 #ifndef __CS_XDEF_EVAL_H__
2 #define __CS_XDEF_EVAL_H__
3 
4 /*============================================================================
5  * Manage the (generic) evaluation of extended definitions
6  *============================================================================*/
7 
8 /*
9  This file is part of Code_Saturne, a general-purpose CFD tool.
10 
11  Copyright (C) 1998-2018 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_cdo_connect.h"
35 #include "cs_cdo_quantities.h"
36 #include "cs_mesh.h"
37 #include "cs_quadrature.h"
38 #include "cs_xdef.h"
39 
40 /*----------------------------------------------------------------------------*/
41 
43 
44 /*============================================================================
45  * Function pointer type definitions
46  *============================================================================*/
47 
48 /*----------------------------------------------------------------------------*/
63 /*----------------------------------------------------------------------------*/
64 
65 typedef void
67  const cs_lnum_t *elt_ids,
68  bool compact,
69  const cs_mesh_t *mesh,
70  const cs_cdo_connect_t *connect,
71  const cs_cdo_quantities_t *quant,
72  cs_real_t time_eval,
73  void *input,
74  cs_real_t *eval);
75 
76 /*============================================================================
77  * Public function prototypes
78  *============================================================================*/
79 
80 /*----------------------------------------------------------------------------*/
94 /*----------------------------------------------------------------------------*/
95 
96 void
98  const cs_lnum_t *elt_ids,
99  bool compact,
100  const cs_mesh_t *mesh,
101  const cs_cdo_connect_t *connect,
102  const cs_cdo_quantities_t *quant,
103  cs_real_t time_eval,
104  void *input,
105  cs_real_t *eval);
106 
107 /*----------------------------------------------------------------------------*/
121 /*----------------------------------------------------------------------------*/
122 
123 void
125  const cs_lnum_t *elt_ids,
126  bool compact,
127  const cs_mesh_t *mesh,
128  const cs_cdo_connect_t *connect,
129  const cs_cdo_quantities_t *quant,
130  cs_real_t time_eval,
131  void *input,
132  cs_real_t *eval);
133 
134 /*----------------------------------------------------------------------------*/
148 /*----------------------------------------------------------------------------*/
149 
150 void
152  const cs_lnum_t *elt_ids,
153  bool compact,
154  const cs_mesh_t *mesh,
155  const cs_cdo_connect_t *connect,
156  const cs_cdo_quantities_t *quant,
157  cs_real_t time_eval,
158  void *input,
159  cs_real_t *eval);
160 
161 /*----------------------------------------------------------------------------*/
175 /*----------------------------------------------------------------------------*/
176 
177 void
179  const cs_lnum_t *elt_ids,
180  bool compact,
181  const cs_mesh_t *mesh,
182  const cs_cdo_connect_t *connect,
183  const cs_cdo_quantities_t *quant,
184  cs_real_t time_eval,
185  void *input,
186  cs_real_t *eval);
187 
188 /*----------------------------------------------------------------------------*/
203 /*----------------------------------------------------------------------------*/
204 
205 void
207  const cs_lnum_t *elt_ids,
208  bool compact,
209  const cs_mesh_t *mesh,
210  const cs_cdo_connect_t *connect,
211  const cs_cdo_quantities_t *quant,
212  cs_real_t time_eval,
213  void *input,
214  cs_real_t *eval);
215 
216 /*----------------------------------------------------------------------------*/
233 /*----------------------------------------------------------------------------*/
234 
235 void
237  const cs_lnum_t *elt_ids,
238  bool compact,
239  const cs_mesh_t *mesh,
240  const cs_cdo_connect_t *connect,
241  const cs_cdo_quantities_t *quant,
242  cs_real_t time_eval,
243  void *input,
244  cs_quadrature_type_t qtype,
245  const int dim,
246  cs_real_t *eval);
247 
248 /*----------------------------------------------------------------------------*/
262 /*----------------------------------------------------------------------------*/
263 
264 void
266  const cs_lnum_t *elt_ids,
267  bool compact,
268  const cs_mesh_t *mesh,
269  const cs_cdo_connect_t *connect,
270  const cs_cdo_quantities_t *quant,
271  cs_real_t time_eval,
272  void *input,
273  cs_real_t *eval);
274 
275 /*----------------------------------------------------------------------------*/
290 /*----------------------------------------------------------------------------*/
291 
292 void
294  const cs_lnum_t *elt_ids,
295  bool compact,
296  const cs_mesh_t *mesh,
297  const cs_cdo_connect_t *connect,
298  const cs_cdo_quantities_t *quant,
299  cs_real_t time_eval,
300  void *input,
301  cs_real_t *eval);
302 
303 /*----------------------------------------------------------------------------*/
318 /*----------------------------------------------------------------------------*/
319 
320 void
322  const cs_lnum_t *elt_ids,
323  bool compact,
324  const cs_mesh_t *mesh,
325  const cs_cdo_connect_t *connect,
326  const cs_cdo_quantities_t *quant,
327  cs_real_t time_eval,
328  void *input,
329  cs_real_t *eval);
330 
331 /*----------------------------------------------------------------------------*/
345 /*----------------------------------------------------------------------------*/
346 
347 void
349  const cs_lnum_t *elt_ids,
350  bool compact,
351  const cs_mesh_t *mesh,
352  const cs_cdo_connect_t *connect,
353  const cs_cdo_quantities_t *quant,
354  cs_real_t time_eval,
355  void *input,
356  cs_real_t *eval);
357 
358 /*----------------------------------------------------------------------------*/
374 /*----------------------------------------------------------------------------*/
375 
376 void
378  const cs_lnum_t *elt_ids,
379  bool compact,
380  const cs_mesh_t *mesh,
381  const cs_cdo_connect_t *connect,
382  const cs_cdo_quantities_t *quant,
383  cs_real_t time_eval,
384  void *input,
385  cs_real_t *eval);
386 
387 /*----------------------------------------------------------------------------*/
401 /*----------------------------------------------------------------------------*/
402 
403 void
405  const cs_lnum_t *elt_ids,
406  bool compact,
407  const cs_mesh_t *mesh,
408  const cs_cdo_connect_t *connect,
409  const cs_cdo_quantities_t *quant,
410  cs_real_t time_eval,
411  void *input,
412  cs_real_t *eval);
413 
414 /*----------------------------------------------------------------------------*/
415 
417 
418 #endif /* __CS_XDEF_EVAL_H__ */
void() cs_xdef_eval_t(cs_lnum_t n_elts, const cs_lnum_t *elt_ids, bool compact, const cs_mesh_t *mesh, const cs_cdo_connect_t *connect, const cs_cdo_quantities_t *quant, cs_real_t time_eval, void *input, cs_real_t *eval)
Function pointer for evaluating a quantity defined through a descriptor (cs_xdef_t structure) ...
Definition: cs_xdef_eval.h:66
void cs_xdef_eval_at_vertices_by_analytic(cs_lnum_t n_elts, const cs_lnum_t *elt_ids, bool compact, const cs_mesh_t *mesh, const cs_cdo_connect_t *connect, const cs_cdo_quantities_t *quant, cs_real_t time_eval, void *input, cs_real_t *eval)
Evaluate a quantity defined at vertices using an analytic function.
Definition: cs_xdef_eval.c:484
void cs_xdef_eval_avg_at_b_faces_by_analytic(cs_lnum_t n_elts, const cs_lnum_t *elt_ids, bool compact, const cs_mesh_t *mesh, const cs_cdo_connect_t *connect, const cs_cdo_quantities_t *quant, cs_real_t time_eval, void *input, cs_quadrature_type_t qtype, const int dim, cs_real_t *eval)
Evaluate a quantity defined at border faces using an analytic function.
Definition: cs_xdef_eval.c:350
void cs_xdef_eval_at_cells_by_analytic(cs_lnum_t n_elts, const cs_lnum_t *elt_ids, bool compact, const cs_mesh_t *mesh, const cs_cdo_connect_t *connect, const cs_cdo_quantities_t *quant, cs_real_t time_eval, void *input, cs_real_t *eval)
Evaluate a quantity defined at cells using an analytic function.
Definition: cs_xdef_eval.c:266
#define BEGIN_C_DECLS
Definition: cs_defs.h:462
Definition: cs_cdo_connect.h:74
double cs_real_t
Floating-point value.
Definition: cs_defs.h:297
Definition: cs_cdo_quantities.h:94
Definition: cs_mesh.h:63
void cs_xdef_eval_nd_at_cells_by_array(cs_lnum_t n_elts, const cs_lnum_t *elt_ids, bool compact, const cs_mesh_t *mesh, const cs_cdo_connect_t *connect, const cs_cdo_quantities_t *quant, cs_real_t time_eval, void *input, cs_real_t *eval)
Evaluate a nd-valued quantity at cells defined by an array. Array is assumed to be interlaced...
Definition: cs_xdef_eval.c:627
cs_quadrature_type_t
Definition: cs_quadrature.h:51
void cs_xdef_eval_3_at_all_vertices_by_array(cs_lnum_t n_elts, const cs_lnum_t *elt_ids, bool compact, const cs_mesh_t *mesh, const cs_cdo_connect_t *connect, const cs_cdo_quantities_t *quant, cs_real_t time_eval, void *input, cs_real_t *eval)
Evaluate a vector-valued quantity at all vertices defined by an array. Array is assumed to be interla...
Definition: cs_xdef_eval.c:829
static int input(void)
void cs_xdef_eval_tensor_by_val(cs_lnum_t n_elts, const cs_lnum_t *elt_ids, bool compact, const cs_mesh_t *mesh, const cs_cdo_connect_t *connect, const cs_cdo_quantities_t *quant, cs_real_t time_eval, void *input, cs_real_t *eval)
Evaluate a tensor-valued quantity for a list of elements.
Definition: cs_xdef_eval.c:201
void cs_xdef_eval_vector_by_val(cs_lnum_t n_elts, const cs_lnum_t *elt_ids, bool compact, const cs_mesh_t *mesh, const cs_cdo_connect_t *connect, const cs_cdo_quantities_t *quant, cs_real_t time_eval, void *input, cs_real_t *eval)
Evaluate a vector-valued quantity for a list of elements.
Definition: cs_xdef_eval.c:143
void cs_xdef_eval_cell_by_field(cs_lnum_t n_elts, const cs_lnum_t *elt_ids, bool compact, const cs_mesh_t *mesh, const cs_cdo_connect_t *connect, const cs_cdo_quantities_t *quant, cs_real_t time_eval, void *input, cs_real_t *eval)
Evaluate a quantity inside a cell defined using a field.
Definition: cs_xdef_eval.c:960
int cs_lnum_t
local mesh entity id
Definition: cs_defs.h:293
void cs_xdef_eval_at_b_faces_by_analytic(cs_lnum_t n_elts, const cs_lnum_t *elt_ids, bool compact, const cs_mesh_t *mesh, const cs_cdo_connect_t *connect, const cs_cdo_quantities_t *quant, cs_real_t time_eval, void *input, cs_real_t *eval)
Evaluate a quantity defined at border faces using an analytic function.
Definition: cs_xdef_eval.c:307
void cs_xdef_eval_at_vertices_by_array(cs_lnum_t n_elts, const cs_lnum_t *elt_ids, bool compact, const cs_mesh_t *mesh, const cs_cdo_connect_t *connect, const cs_cdo_quantities_t *quant, cs_real_t time_eval, void *input, cs_real_t *eval)
Evaluate a quantity defined at vertices using an array.
Definition: cs_xdef_eval.c:735
#define END_C_DECLS
Definition: cs_defs.h:463
void cs_xdef_eval_scalar_at_cells_by_array(cs_lnum_t n_elts, const cs_lnum_t *elt_ids, bool compact, const cs_mesh_t *mesh, const cs_cdo_connect_t *connect, const cs_cdo_quantities_t *quant, cs_real_t time_eval, void *input, cs_real_t *eval)
Evaluate a scalar-valued quantity at cells defined by an array. Array is assumed to be interlaced...
Definition: cs_xdef_eval.c:525
Definition: mesh.f90:26
void cs_xdef_eval_scalar_by_val(cs_lnum_t n_elts, const cs_lnum_t *elt_ids, bool compact, const cs_mesh_t *mesh, const cs_cdo_connect_t *connect, const cs_cdo_quantities_t *quant, cs_real_t time_eval, void *input, cs_real_t *eval)
Evaluate a scalar-valued quantity for a list of elements.
Definition: cs_xdef_eval.c:92