8.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-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_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
66 (cs_xdef_eval_t) (cs_lnum_t n_elts,
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 /*----------------------------------------------------------------------------*/
393 /*----------------------------------------------------------------------------*/
394 
395 void
397  const cs_lnum_t *elt_ids,
398  bool dense_output,
399  const cs_mesh_t *mesh,
400  const cs_cdo_connect_t *connect,
401  const cs_cdo_quantities_t *quant,
402  cs_real_t time_eval,
403  void *context,
404  cs_real_t *eval);
405 
406 /*----------------------------------------------------------------------------*/
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 /*----------------------------------------------------------------------------*/
572 /*----------------------------------------------------------------------------*/
573 
574 void
576  const cs_lnum_t *elt_ids,
577  bool dense_output,
578  const cs_mesh_t *mesh,
579  const cs_cdo_connect_t *connect,
580  const cs_cdo_quantities_t *quant,
581  cs_real_t time_eval,
582  void *context,
583  cs_real_t *eval);
584 
585 /*----------------------------------------------------------------------------*/
601 /*----------------------------------------------------------------------------*/
602 
603 void
605  const cs_lnum_t *elt_ids,
606  bool dense_output,
607  const cs_mesh_t *mesh,
608  const cs_cdo_connect_t *connect,
609  const cs_cdo_quantities_t *quant,
610  cs_real_t time_eval,
611  void *context,
612  cs_real_t *eval);
613 
614 /*----------------------------------------------------------------------------*/
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_real_t *eval);
642 
643 /*----------------------------------------------------------------------------*/
659 /*----------------------------------------------------------------------------*/
660 
661 void
663  const cs_lnum_t *elt_ids,
664  bool dense_output,
665  const cs_mesh_t *mesh,
666  const cs_cdo_connect_t *connect,
667  const cs_cdo_quantities_t *quant,
668  cs_real_t time_eval,
669  void *context,
670  cs_real_t *eval);
671 
672 /*----------------------------------------------------------------------------*/
689 /*----------------------------------------------------------------------------*/
690 
691 void
693  const cs_lnum_t *elt_ids,
694  bool dense_output,
695  const cs_mesh_t *mesh,
696  const cs_cdo_connect_t *connect,
697  const cs_cdo_quantities_t *quant,
698  cs_real_t time_eval,
699  void *context,
700  cs_quadrature_type_t qtype,
701  int dim,
702  cs_real_t *eval);
703 
704 /*----------------------------------------------------------------------------*/
705 
707 
708 #endif /* __CS_XDEF_EVAL_H__ */
#define BEGIN_C_DECLS
Definition: cs_defs.h:514
double cs_real_t
Floating-point value.
Definition: cs_defs.h:319
#define END_C_DECLS
Definition: cs_defs.h:515
int cs_lnum_t
local mesh entity id
Definition: cs_defs.h:313
cs_quadrature_type_t
Definition: cs_quadrature.h:52
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:190
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:715
void cs_xdef_eval_at_b_faces_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 boundary faces using an array This function complies with the generic ...
Definition: cs_xdef_eval.c:1092
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:761
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:669
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:477
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:906
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:568
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:1252
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:143
void cs_xdef_eval_tensor_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:427
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:807
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:1019
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:97
void cs_xdef_eval_symtens_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:379
void cs_xdef_eval_scalar_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:283
void cs_xdef_eval_at_i_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 interior faces using an analytic function. This function complies with...
Definition: cs_xdef_eval.c:521
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:236
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:1174
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:614
void cs_xdef_eval_vector_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....
Definition: cs_xdef_eval.c:331
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
Definition: mesh.f90:26
Definition: cs_cdo_connect.h:61
Definition: cs_cdo_quantities.h:137
Definition: cs_mesh.h:85