7.1
general 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-2021 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 dense_output,
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 *context,
74  cs_real_t *eval);
75 
76 /*============================================================================
77  * Public function prototypes
78  *============================================================================*/
79 
80 /*----------------------------------------------------------------------------*/
96 /*----------------------------------------------------------------------------*/
97 
98 void
100  const cs_lnum_t *elt_ids,
101  bool dense_output,
102  const cs_mesh_t *mesh,
103  const cs_cdo_connect_t *connect,
104  const cs_cdo_quantities_t *quant,
105  cs_real_t time_eval,
106  void *context,
107  cs_real_t *eval);
108 
109 /*----------------------------------------------------------------------------*/
125 /*----------------------------------------------------------------------------*/
126 
127 void
129  const cs_lnum_t *elt_ids,
130  bool dense_output,
131  const cs_mesh_t *mesh,
132  const cs_cdo_connect_t *connect,
133  const cs_cdo_quantities_t *quant,
134  cs_real_t time_eval,
135  void *context,
136  cs_real_t *eval);
137 
138 /*----------------------------------------------------------------------------*/
155 /*----------------------------------------------------------------------------*/
156 
157 void
159  const cs_lnum_t *elt_ids,
160  bool dense_output,
161  const cs_mesh_t *mesh,
162  const cs_cdo_connect_t *connect,
163  const cs_cdo_quantities_t *quant,
164  cs_real_t time_eval,
165  void *context,
166  cs_real_t *eval);
167 
168 /*----------------------------------------------------------------------------*/
184 /*----------------------------------------------------------------------------*/
185 
186 void
188  const cs_lnum_t *elt_ids,
189  bool dense_output,
190  const cs_mesh_t *mesh,
191  const cs_cdo_connect_t *connect,
192  const cs_cdo_quantities_t *quant,
193  cs_real_t time_eval,
194  void *context,
195  cs_real_t *eval);
196 
197 /*----------------------------------------------------------------------------*/
214 /*----------------------------------------------------------------------------*/
215 
216 void
218  const cs_lnum_t *elt_ids,
219  bool dense_output,
220  const cs_mesh_t *mesh,
221  const cs_cdo_connect_t *connect,
222  const cs_cdo_quantities_t *quant,
223  cs_real_t time_eval,
224  void *context,
225  cs_real_t *eval);
226 
227 /*----------------------------------------------------------------------------*/
244 /*----------------------------------------------------------------------------*/
245 
246 void
248  const cs_lnum_t *elt_ids,
249  bool dense_output,
250  const cs_mesh_t *mesh,
251  const cs_cdo_connect_t *connect,
252  const cs_cdo_quantities_t *quant,
253  cs_real_t time_eval,
254  void *context,
255  cs_real_t *eval);
256 
257 /*----------------------------------------------------------------------------*/
274 /*----------------------------------------------------------------------------*/
275 
276 void
278  const cs_lnum_t *elt_ids,
279  bool dense_output,
280  const cs_mesh_t *mesh,
281  const cs_cdo_connect_t *connect,
282  const cs_cdo_quantities_t *quant,
283  cs_real_t time_eval,
284  void *context,
285  cs_real_t *eval);
286 
287 /*----------------------------------------------------------------------------*/
304 /*----------------------------------------------------------------------------*/
305 
306 void
308  const cs_lnum_t *elt_ids,
309  bool dense_output,
310  const cs_mesh_t *mesh,
311  const cs_cdo_connect_t *connect,
312  const cs_cdo_quantities_t *quant,
313  cs_real_t time_eval,
314  void *context,
315  cs_real_t *eval);
316 
317 /*----------------------------------------------------------------------------*/
333 /*----------------------------------------------------------------------------*/
334 
335 void
337  const cs_lnum_t *elt_ids,
338  bool dense_output,
339  const cs_mesh_t *mesh,
340  const cs_cdo_connect_t *connect,
341  const cs_cdo_quantities_t *quant,
342  cs_real_t time_eval,
343  void *context,
344  cs_real_t *eval);
345 
346 /*----------------------------------------------------------------------------*/
363 /*----------------------------------------------------------------------------*/
364 
365 void
367  const cs_lnum_t *elt_ids,
368  bool dense_output,
369  const cs_mesh_t *mesh,
370  const cs_cdo_connect_t *connect,
371  const cs_cdo_quantities_t *quant,
372  cs_real_t time_eval,
373  void *context,
374  cs_real_t *eval);
375 
376 /*----------------------------------------------------------------------------*/
392 /*----------------------------------------------------------------------------*/
393 
394 void
396  const cs_lnum_t *elt_ids,
397  bool dense_output,
398  const cs_mesh_t *mesh,
399  const cs_cdo_connect_t *connect,
400  const cs_cdo_quantities_t *quant,
401  cs_real_t time_eval,
402  void *context,
403  cs_real_t *eval);
404 
405 /*----------------------------------------------------------------------------*/
422 /*----------------------------------------------------------------------------*/
423 
424 void
426  const cs_lnum_t *elt_ids,
427  bool dense_output,
428  const cs_mesh_t *mesh,
429  const cs_cdo_connect_t *connect,
430  const cs_cdo_quantities_t *quant,
431  cs_real_t time_eval,
432  void *context,
433  cs_real_t *eval);
434 
435 /*----------------------------------------------------------------------------*/
452 /*----------------------------------------------------------------------------*/
453 
454 void
456  const cs_lnum_t *elt_ids,
457  bool dense_output,
458  const cs_mesh_t *mesh,
459  const cs_cdo_connect_t *connect,
460  const cs_cdo_quantities_t *quant,
461  cs_real_t time_eval,
462  void *context,
463  cs_real_t *eval);
464 
465 /*----------------------------------------------------------------------------*/
482 /*----------------------------------------------------------------------------*/
483 
484 void
486  const cs_lnum_t *elt_ids,
487  bool dense_output,
488  const cs_mesh_t *mesh,
489  const cs_cdo_connect_t *connect,
490  const cs_cdo_quantities_t *quant,
491  cs_real_t time_eval,
492  void *context,
493  cs_real_t *eval);
494 
495 /*----------------------------------------------------------------------------*/
512 /*----------------------------------------------------------------------------*/
513 
514 void
516  const cs_lnum_t *elt_ids,
517  bool dense_output,
518  const cs_mesh_t *mesh,
519  const cs_cdo_connect_t *connect,
520  const cs_cdo_quantities_t *quant,
521  cs_real_t time_eval,
522  void *context,
523  cs_real_t *eval);
524 
525 /*----------------------------------------------------------------------------*/
542 /*----------------------------------------------------------------------------*/
543 
544 void
546  const cs_lnum_t *elt_ids,
547  bool dense_output,
548  const cs_mesh_t *mesh,
549  const cs_cdo_connect_t *connect,
550  const cs_cdo_quantities_t *quant,
551  cs_real_t time_eval,
552  void *context,
553  cs_real_t *eval);
554 
555 /*----------------------------------------------------------------------------*/
571 /*----------------------------------------------------------------------------*/
572 
573 void
575  const cs_lnum_t *elt_ids,
576  bool dense_output,
577  const cs_mesh_t *mesh,
578  const cs_cdo_connect_t *connect,
579  const cs_cdo_quantities_t *quant,
580  cs_real_t time_eval,
581  void *context,
582  cs_real_t *eval);
583 
584 /*----------------------------------------------------------------------------*/
600 /*----------------------------------------------------------------------------*/
601 
602 void
604  const cs_lnum_t *elt_ids,
605  bool dense_output,
606  const cs_mesh_t *mesh,
607  const cs_cdo_connect_t *connect,
608  const cs_cdo_quantities_t *quant,
609  cs_real_t time_eval,
610  void *context,
611  cs_real_t *eval);
612 
613 /*----------------------------------------------------------------------------*/
630 /*----------------------------------------------------------------------------*/
631 
632 void
634  const cs_lnum_t *elt_ids,
635  bool dense_output,
636  const cs_mesh_t *mesh,
637  const cs_cdo_connect_t *connect,
638  const cs_cdo_quantities_t *quant,
639  cs_real_t time_eval,
640  void *context,
641  cs_quadrature_type_t qtype,
642  int dim,
643  cs_real_t *eval);
644 
645 /*----------------------------------------------------------------------------*/
646 
648 
649 #endif /* __CS_XDEF_EVAL_H__ */
void cs_xdef_eval_at_vertices_by_analytic(cs_lnum_t n_elts, const cs_lnum_t *elt_ids, bool dense_output, const cs_mesh_t *mesh, const cs_cdo_connect_t *connect, const cs_cdo_quantities_t *quant, cs_real_t time_eval, void *context, cs_real_t *eval)
Evaluate a quantity defined at vertices using an analytic function This function complies with the ge...
Definition: cs_xdef_eval.c:693
void cs_xdef_eval_cell_by_field(cs_lnum_t n_elts, const cs_lnum_t *elt_ids, bool dense_output, const cs_mesh_t *mesh, const cs_cdo_connect_t *connect, const cs_cdo_quantities_t *quant, cs_real_t time_eval, void *context, cs_real_t *eval)
Evaluate a quantity inside a cell defined using a field This function complies with the generic funct...
Definition: cs_xdef_eval.c:1203
void cs_xdef_eval_symtens_at_cells_by_time_func(cs_lnum_t n_elts, const cs_lnum_t *elt_ids, bool dense_output, const cs_mesh_t *mesh, const cs_cdo_connect_t *connect, const cs_cdo_quantities_t *quant, cs_real_t time_eval, void *context, cs_real_t *eval)
Evaluate a tensor-valued quantity with a symmetric storage and with only a time-dependent variation f...
Definition: cs_xdef_eval.c:483
void cs_xdef_eval_at_vertices_by_dof_func(cs_lnum_t n_elts, const cs_lnum_t *elt_ids, bool dense_output, const cs_mesh_t *mesh, const cs_cdo_connect_t *connect, const cs_cdo_quantities_t *quant, cs_real_t time_eval, void *context, cs_real_t *eval)
Evaluate a quantity defined at vertices using a function associated to dof (dof = degrees of freedom)...
Definition: cs_xdef_eval.c:797
#define BEGIN_C_DECLS
Definition: cs_defs.h:510
Definition: cs_cdo_connect.h:79
void cs_xdef_eval_nd_at_cells_by_array(cs_lnum_t n_elts, const cs_lnum_t *elt_ids, bool dense_output, const cs_mesh_t *mesh, const cs_cdo_connect_t *connect, const cs_cdo_quantities_t *quant, cs_real_t time_eval, void *context, 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:993
void cs_xdef_eval_at_b_faces_by_analytic(cs_lnum_t n_elts, const cs_lnum_t *elt_ids, bool dense_output, const cs_mesh_t *mesh, const cs_cdo_connect_t *connect, const cs_cdo_quantities_t *quant, cs_real_t time_eval, void *context, cs_real_t *eval)
Evaluate a quantity defined at border faces using an analytic function This function complies with th...
Definition: cs_xdef_eval.c:649
double cs_real_t
Floating-point value.
Definition: cs_defs.h:322
Definition: cs_cdo_quantities.h:129
Definition: cs_mesh.h:84
void cs_xdef_eval_vector_by_val(cs_lnum_t n_elts, const cs_lnum_t *elt_ids, bool dense_output, const cs_mesh_t *mesh, const cs_cdo_connect_t *connect, const cs_cdo_quantities_t *quant, cs_real_t time_eval, void *context, cs_real_t *eval)
Evaluate a vector-valued quantity for a list of elements This function complies with the generic func...
Definition: cs_xdef_eval.c:152
cs_quadrature_type_t
Definition: cs_quadrature.h:52
void cs_xdef_eval_at_vertices_by_array(cs_lnum_t n_elts, const cs_lnum_t *elt_ids, bool dense_output, const cs_mesh_t *mesh, const cs_cdo_connect_t *connect, const cs_cdo_quantities_t *quant, cs_real_t time_eval, void *context, cs_real_t *eval)
Evaluate a quantity defined at vertices using an array This function complies with the generic functi...
Definition: cs_xdef_eval.c:1103
void() cs_xdef_eval_t(cs_lnum_t n_elts, const cs_lnum_t *elt_ids, bool dense_output, const cs_mesh_t *mesh, const cs_cdo_connect_t *connect, const cs_cdo_quantities_t *quant, cs_real_t time_eval, void *context, 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_scalar_at_cells_by_array(cs_lnum_t n_elts, const cs_lnum_t *elt_ids, bool dense_output, const cs_mesh_t *mesh, const cs_cdo_connect_t *connect, const cs_cdo_quantities_t *quant, cs_real_t time_eval, void *context, 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:892
void cs_xdef_eval_tensor_at_cells_by_time_func(cs_lnum_t n_elts, const cs_lnum_t *elt_ids, bool dense_output, const cs_mesh_t *mesh, const cs_cdo_connect_t *connect, const cs_cdo_quantities_t *quant, cs_real_t time_eval, void *context, cs_real_t *eval)
Evaluate a tensor-valued quantity with only a time-dependent variation for a list of elements This fu...
Definition: cs_xdef_eval.c:544
int cs_lnum_t
local mesh entity id
Definition: cs_defs.h:316
#define END_C_DECLS
Definition: cs_defs.h:511
void cs_xdef_eval_scalar_at_cells_by_time_func(cs_lnum_t n_elts, const cs_lnum_t *elt_ids, bool dense_output, const cs_mesh_t *mesh, const cs_cdo_connect_t *connect, const cs_cdo_quantities_t *quant, cs_real_t time_eval, void *context, cs_real_t *eval)
Evaluate a scalar-valued quantity with only a time-dependent variation for a list of elements This fu...
Definition: cs_xdef_eval.c:364
void cs_xdef_eval_symtens_by_val(cs_lnum_t n_elts, const cs_lnum_t *elt_ids, bool dense_output, const cs_mesh_t *mesh, const cs_cdo_connect_t *connect, const cs_cdo_quantities_t *quant, cs_real_t time_eval, void *context, cs_real_t *eval)
Evaluate a tensor-valued quantity for a list of elements with symmetric storage. This function compli...
Definition: cs_xdef_eval.c:225
void cs_xdef_eval_tensor_by_val(cs_lnum_t n_elts, const cs_lnum_t *elt_ids, bool dense_output, const cs_mesh_t *mesh, const cs_cdo_connect_t *connect, const cs_cdo_quantities_t *quant, cs_real_t time_eval, void *context, cs_real_t *eval)
Evaluate a tensor-valued quantity for a list of elements This function complies with the generic func...
Definition: cs_xdef_eval.c:293
void cs_xdef_eval_avg_at_b_faces_by_analytic(cs_lnum_t n_elts, const cs_lnum_t *elt_ids, bool dense_output, const cs_mesh_t *mesh, const cs_cdo_connect_t *connect, const cs_cdo_quantities_t *quant, cs_real_t time_eval, void *context, cs_quadrature_type_t qtype, int dim, cs_real_t *eval)
Evaluate a quantity defined at border faces using an analytic function.
Definition: cs_xdef_eval.c:1326
void cs_xdef_eval_at_cells_by_analytic(cs_lnum_t n_elts, const cs_lnum_t *elt_ids, bool dense_output, const cs_mesh_t *mesh, const cs_cdo_connect_t *connect, const cs_cdo_quantities_t *quant, cs_real_t time_eval, void *context, cs_real_t *eval)
Evaluate a quantity defined at cells using an analytic function This function complies with the gener...
Definition: cs_xdef_eval.c:604
void cs_xdef_eval_at_cells_by_dof_func(cs_lnum_t n_elts, const cs_lnum_t *elt_ids, bool dense_output, const cs_mesh_t *mesh, const cs_cdo_connect_t *connect, const cs_cdo_quantities_t *quant, cs_real_t time_eval, void *context, cs_real_t *eval)
Evaluate a quantity defined at primal cells using a function associated to dof (dof = degrees of free...
Definition: cs_xdef_eval.c:749
void cs_xdef_eval_at_b_faces_by_dof_func(cs_lnum_t n_elts, const cs_lnum_t *elt_ids, bool dense_output, const cs_mesh_t *mesh, const cs_cdo_connect_t *connect, const cs_cdo_quantities_t *quant, cs_real_t time_eval, void *context, cs_real_t *eval)
Evaluate a quantity defined at boundary faces using a function associated to dof (dof = degrees of fr...
Definition: cs_xdef_eval.c:845
void cs_xdef_eval_vector_at_cells_by_time_func(cs_lnum_t n_elts, const cs_lnum_t *elt_ids, bool dense_output, const cs_mesh_t *mesh, const cs_cdo_connect_t *connect, const cs_cdo_quantities_t *quant, cs_real_t time_eval, void *context, cs_real_t *eval)
Evaluate a vector-valued quantity with only a time-dependent variation for a list of elements This fu...
Definition: cs_xdef_eval.c:422
Definition: mesh.f90:26
void cs_xdef_eval_scalar_by_val(cs_lnum_t n_elts, const cs_lnum_t *elt_ids, bool dense_output, const cs_mesh_t *mesh, const cs_cdo_connect_t *connect, const cs_cdo_quantities_t *quant, cs_real_t time_eval, void *context, cs_real_t *eval)
Evaluate a scalar-valued quantity for a list of elements This function complies with the generic func...
Definition: cs_xdef_eval.c:95