My Project
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-2019 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 /*----------------------------------------------------------------------------*/
176 /*----------------------------------------------------------------------------*/
177 
178 void
180  const cs_lnum_t *elt_ids,
181  bool compact,
182  const cs_mesh_t *mesh,
183  const cs_cdo_connect_t *connect,
184  const cs_cdo_quantities_t *quant,
185  cs_real_t time_eval,
186  void *input,
187  cs_real_t *eval);
188 
189 /*----------------------------------------------------------------------------*/
204 /*----------------------------------------------------------------------------*/
205 
206 void
208  const cs_lnum_t *elt_ids,
209  bool compact,
210  const cs_mesh_t *mesh,
211  const cs_cdo_connect_t *connect,
212  const cs_cdo_quantities_t *quant,
213  cs_real_t time_eval,
214  void *input,
215  cs_real_t *eval);
216 
217 /*----------------------------------------------------------------------------*/
232 /*----------------------------------------------------------------------------*/
233 
234 void
236  const cs_lnum_t *elt_ids,
237  bool compact,
238  const cs_mesh_t *mesh,
239  const cs_cdo_connect_t *connect,
240  const cs_cdo_quantities_t *quant,
241  cs_real_t time_eval,
242  void *input,
243  cs_real_t *eval);
244 
245 /*----------------------------------------------------------------------------*/
259 /*----------------------------------------------------------------------------*/
260 
261 void
263  const cs_lnum_t *elt_ids,
264  bool compact,
265  const cs_mesh_t *mesh,
266  const cs_cdo_connect_t *connect,
267  const cs_cdo_quantities_t *quant,
268  cs_real_t time_eval,
269  void *input,
270  cs_real_t *eval);
271 
272 /*----------------------------------------------------------------------------*/
287 /*----------------------------------------------------------------------------*/
288 
289 void
291  const cs_lnum_t *elt_ids,
292  bool compact,
293  const cs_mesh_t *mesh,
294  const cs_cdo_connect_t *connect,
295  const cs_cdo_quantities_t *quant,
296  cs_real_t time_eval,
297  void *input,
298  cs_real_t *eval);
299 
300 /*----------------------------------------------------------------------------*/
317 /*----------------------------------------------------------------------------*/
318 
319 void
321  const cs_lnum_t *elt_ids,
322  bool compact,
323  const cs_mesh_t *mesh,
324  const cs_cdo_connect_t *connect,
325  const cs_cdo_quantities_t *quant,
326  cs_real_t time_eval,
327  void *input,
328  cs_quadrature_type_t qtype,
329  const int dim,
330  cs_real_t *eval);
331 
332 /*----------------------------------------------------------------------------*/
346 /*----------------------------------------------------------------------------*/
347 
348 void
350  const cs_lnum_t *elt_ids,
351  bool compact,
352  const cs_mesh_t *mesh,
353  const cs_cdo_connect_t *connect,
354  const cs_cdo_quantities_t *quant,
355  cs_real_t time_eval,
356  void *input,
357  cs_real_t *eval);
358 
359 /*----------------------------------------------------------------------------*/
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 /*----------------------------------------------------------------------------*/
402 /*----------------------------------------------------------------------------*/
403 
404 void
406  const cs_lnum_t *elt_ids,
407  bool compact,
408  const cs_mesh_t *mesh,
409  const cs_cdo_connect_t *connect,
410  const cs_cdo_quantities_t *quant,
411  cs_real_t time_eval,
412  void *input,
413  cs_real_t *eval);
414 
415 /*----------------------------------------------------------------------------*/
429 /*----------------------------------------------------------------------------*/
430 
431 void
433  const cs_lnum_t *elt_ids,
434  bool compact,
435  const cs_mesh_t *mesh,
436  const cs_cdo_connect_t *connect,
437  const cs_cdo_quantities_t *quant,
438  cs_real_t time_eval,
439  void *input,
440  cs_real_t *eval);
441 
442 /*----------------------------------------------------------------------------*/
458 /*----------------------------------------------------------------------------*/
459 
460 void
462  const cs_lnum_t *elt_ids,
463  bool compact,
464  const cs_mesh_t *mesh,
465  const cs_cdo_connect_t *connect,
466  const cs_cdo_quantities_t *quant,
467  cs_real_t time_eval,
468  void *input,
469  cs_real_t *eval);
470 
471 /*----------------------------------------------------------------------------*/
485 /*----------------------------------------------------------------------------*/
486 
487 void
489  const cs_lnum_t *elt_ids,
490  bool compact,
491  const cs_mesh_t *mesh,
492  const cs_cdo_connect_t *connect,
493  const cs_cdo_quantities_t *quant,
494  cs_real_t time_eval,
495  void *input,
496  cs_real_t *eval);
497 
498 /*----------------------------------------------------------------------------*/
499 
501 
502 #endif /* __CS_XDEF_EVAL_H__ */
cs_quadrature.h
cs_xdef_eval_scalar_at_cells_by_time_func
void cs_xdef_eval_scalar_at_cells_by_time_func(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 with only a time-dependent variation for a list of elements.
Definition: cs_xdef_eval.c:268
input
static int input(void)
cs_xdef_eval_scalar_by_val
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:93
cs_xdef_eval_cell_by_field
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:1134
cs_xdef_eval_tensor_by_val
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:202
cs_xdef_eval_scalar_at_cells_by_array
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:699
cs_xdef_eval_vector_at_cells_by_time_func
void cs_xdef_eval_vector_at_cells_by_time_func(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 with only a time-dependent variation for a list of elements.
Definition: cs_xdef_eval.c:323
END_C_DECLS
#define END_C_DECLS
Definition: cs_defs.h:468
cs_xdef_eval_at_cells_by_analytic
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:436
cs_xdef_eval_avg_at_b_faces_by_analytic
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:520
cs_xdef_eval_at_vertices_by_array
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:909
cs_real_t
double cs_real_t
Floating-point value.
Definition: cs_defs.h:302
BEGIN_C_DECLS
#define BEGIN_C_DECLS
Definition: cs_defs.h:467
cs_cdo_quantities.h
mesh
Definition: mesh.f90:26
cs_mesh.h
cs_xdef.h
cs_xdef_eval_at_vertices_by_analytic
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:658
cs_xdef_eval_t
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
cs_xdef_eval_3_at_all_vertices_by_array
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:1003
cs_cdo_quantities_t
Definition: cs_cdo_quantities.h:94
cs_lnum_t
int cs_lnum_t
local mesh entity id
Definition: cs_defs.h:298
cs_cdo_connect_t
Definition: cs_cdo_connect.h:74
cs_xdef_eval_nd_at_cells_by_array
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:801
cs_xdef_eval_tensor_at_cells_by_time_func
void cs_xdef_eval_tensor_at_cells_by_time_func(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 with only a time-dependent variation for a list of elements.
Definition: cs_xdef_eval.c:380
cs_cdo_connect.h
cs_xdef_eval_at_b_faces_by_analytic
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:477
cs_xdef_eval_vector_by_val
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:144
cs_quadrature_type_t
cs_quadrature_type_t
Definition: cs_quadrature.h:51
cs_mesh_t
Definition: cs_mesh.h:63