9.2
general documentation
cs_xdef_cw_eval.h
Go to the documentation of this file.
1#ifndef CS_XDEF_CW_EVAL_H
2#define CS_XDEF_CW_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-2026 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 * Local headers
30 *----------------------------------------------------------------------------*/
31
32#include "cdo/cs_cdo_connect.h"
33#include "cdo/cs_cdo_local.h"
35#include "cdo/cs_quadrature.h"
36#include "cdo/cs_xdef.h"
37#include "mesh/cs_mesh.h"
38
39/*=============================================================================
40 * Local macro definition (unset at the end of file)
41 *============================================================================*/
42
43/* Redefined the name of functions from cs_math to get shorter names */
44#define _dp3 cs_math_3_dot_product
45
46/*============================================================================
47 * Function pointer type definitions
48 *============================================================================*/
49
50/*----------------------------------------------------------------------------*/
61/*----------------------------------------------------------------------------*/
62
63typedef void
65 cs_real_t time_eval,
66 void *input,
67 cs_real_t *eval);
68
69/*----------------------------------------------------------------------------*/
82/*----------------------------------------------------------------------------*/
83
84typedef void
86 cs_lnum_t n_points,
87 const cs_real_t *xyz,
88 cs_real_t time_eval,
89 void *input,
90 cs_real_t *eval);
91
92/*----------------------------------------------------------------------------*/
104/*----------------------------------------------------------------------------*/
105
106typedef void
108 cs_real_t time_eval,
109 void *input,
111 cs_real_t *eval);
112
113/*----------------------------------------------------------------------------*/
126/*----------------------------------------------------------------------------*/
127
128typedef void
130 short int f,
131 cs_real_t time_eval,
132 void *input,
134 cs_real_t *eval);
135
136/*============================================================================
137 * Static inline public function prototypes
138 *============================================================================*/
139
140/*----------------------------------------------------------------------------*/
149/*----------------------------------------------------------------------------*/
150
151static inline void
153 cs_real_t time_eval,
154 void *input,
155 cs_real_t *eval)
156{
157 CS_UNUSED(cm);
158 CS_UNUSED(time_eval);
159
160 cs_real_t *constant_val = (cs_real_t *)input;
161 *eval = constant_val[0];
162}
163
164/*----------------------------------------------------------------------------*/
173/*----------------------------------------------------------------------------*/
174
175static inline void
177 cs_real_t time_eval,
178 void *input,
179 cs_real_t *eval)
180{
181 CS_UNUSED(cm);
182 CS_UNUSED(time_eval);
183
184 const cs_real_t *constant_val = (cs_real_t *)input;
185
186 eval[0] = constant_val[0];
187 eval[1] = constant_val[1];
188 eval[2] = constant_val[2];
189}
190
191/*----------------------------------------------------------------------------*/
201/*----------------------------------------------------------------------------*/
202
203static inline void
205 cs_real_t time_eval,
206 void *input,
207 cs_real_t *eval)
208{
209 CS_UNUSED(cm);
210 CS_UNUSED(time_eval);
211
212 const cs_real_t *constant_val = (const cs_real_t *)input;
213 for (int k = 0; k < 6; k++)
214 eval[k] = constant_val[k];
215}
216
217/*----------------------------------------------------------------------------*/
226/*----------------------------------------------------------------------------*/
227
228static inline void
230 cs_real_t time_eval,
231 void *input,
232 cs_real_t *eval)
233{
234 CS_UNUSED(cm);
235 CS_UNUSED(time_eval);
236
237 const cs_real_3_t *constant_val = (const cs_real_3_t *)input;
238 for (int ki = 0; ki < 3; ki++)
239 for (int kj = 0; kj < 3; kj++)
240 eval[3*ki+kj] = constant_val[ki][kj];
241}
242
243/*----------------------------------------------------------------------------*/
256/*----------------------------------------------------------------------------*/
257
258static inline void
260 cs_lnum_t n_points,
261 const cs_real_t *xyz,
262 cs_real_t time_eval,
263 void *input,
264 cs_real_t *eval)
265{
266 CS_UNUSED(cm);
267 CS_UNUSED(xyz);
268 CS_UNUSED(time_eval);
269
270 const cs_real_t *constant_val = (cs_real_t *)input;
271
272 for (int i = 0; i < n_points; i++) {
273 eval[3*i ] = constant_val[0];
274 eval[3*i + 1] = constant_val[1];
275 eval[3*i + 2] = constant_val[2];
276 }
277}
278
279/*----------------------------------------------------------------------------*/
291/*----------------------------------------------------------------------------*/
292
293static inline void
295 short int f,
296 cs_real_t time_eval,
297 void *input,
298 cs_real_t *eval)
299{
300 CS_UNUSED(time_eval);
301 assert(cs_eflag_test(cm->flag, CS_FLAG_COMP_PFQ));
302
303 const cs_real_t *flux = (cs_real_t *)input;
304 const cs_quant_t fq = cm->face[f];
305
306 eval[f] = fq.meas * _dp3(fq.unitv, flux);
307}
308
309/*----------------------------------------------------------------------------*/
322/*----------------------------------------------------------------------------*/
323
324static inline void
326 short int f,
327 cs_real_t t_eval,
328 void *input,
330 cs_real_t *eval)
331{
332 CS_UNUSED(cm);
333 CS_UNUSED(t_eval);
334 CS_UNUSED(f);
335 CS_UNUSED(qtype);
336
337 if (eval == NULL)
338 bft_error(__FILE__, __LINE__, 0,
339 " %s: Array storing the evaluation should be allocated before"
340 " the call to this function.", __func__);
341 assert(input != NULL);
342
343 eval[0] = ((const cs_real_t *)input)[0];
344}
345
346/*----------------------------------------------------------------------------*/
359/*----------------------------------------------------------------------------*/
360
361static inline void
363 short int f,
364 cs_real_t t_eval,
365 void *input,
367 cs_real_t *eval)
368{
369 CS_UNUSED(t_eval);
370 CS_UNUSED(qtype);
371
372 if (eval == NULL)
373 bft_error(__FILE__, __LINE__, 0,
374 " %s: Array storing the evaluation should be allocated before"
375 " the call to this function.", __func__);
376
377 const cs_xdef_array_context_t *cx = (const cs_xdef_array_context_t *)input;
378
379 assert(input != NULL);
381
382 eval[0] = cx->values[cm->f_ids[f]];
383}
384
385/*----------------------------------------------------------------------------*/
400/*----------------------------------------------------------------------------*/
401
402static inline void
404 short int f,
405 cs_real_t t_eval,
406 void *input,
408 cs_real_t *eval)
409{
410 CS_UNUSED(qtype);
412
413 anai->func(t_eval, 1, NULL, cm->face[f].center, false, anai->input, eval);
414}
415
416/*----------------------------------------------------------------------------*/
429/*----------------------------------------------------------------------------*/
430
431static inline void
433 short int f,
434 cs_real_t t_eval,
435 void *input,
437 cs_real_t *eval)
438{
439 CS_UNUSED(cm);
440 CS_UNUSED(f);
441 CS_UNUSED(t_eval);
442 CS_UNUSED(qtype);
443
444 if (eval == NULL)
445 bft_error(__FILE__, __LINE__, 0,
446 " %s: Array storing the evaluation should be allocated before"
447 " the call to this function.", __func__);
448
449 assert(input != NULL);
450
451 std::memcpy(eval, (const cs_real_t *)input, 3 * sizeof(cs_real_t));
452}
453
454/*----------------------------------------------------------------------------*/
467/*----------------------------------------------------------------------------*/
468
469static inline void
471 short int f,
472 cs_real_t t_eval,
473 void *input,
475 cs_real_t *eval)
476{
477 CS_UNUSED(t_eval);
478 CS_UNUSED(qtype);
479
480 if (eval == NULL)
481 bft_error(__FILE__, __LINE__, 0,
482 " %s: Array storing the evaluation should be allocated before"
483 " the call to this function.", __func__);
484
485 const cs_xdef_array_context_t *cx = (const cs_xdef_array_context_t *)input;
486
487 assert(input != NULL);
489
490 std::memcpy(eval, cx->values + 3 * cm->f_ids[f], 3 * sizeof(cs_real_t));
491}
492
493/*----------------------------------------------------------------------------*/
506/*----------------------------------------------------------------------------*/
507
508static inline void
510 short int f,
511 cs_real_t t_eval,
512 void *input,
514 cs_real_t *eval)
515{
516 CS_UNUSED(cm);
517 CS_UNUSED(f);
518 CS_UNUSED(t_eval);
519 CS_UNUSED(qtype);
520
521 assert(input != NULL);
522 if (eval == NULL)
523 bft_error(__FILE__, __LINE__, 0,
524 " %s: Array storing the evaluation should be allocated before"
525 " the call to this function.", __func__);
526
527 const cs_real_3_t *constant_val = (const cs_real_3_t *)input;
528 for (int ki = 0; ki < 3; ki++)
529 for (int kj = 0; kj < 3; kj++)
530 eval[3*ki+kj] = constant_val[ki][kj];
531}
532
533/*----------------------------------------------------------------------------*/
546/*----------------------------------------------------------------------------*/
547
548static inline void
550 short int f,
551 cs_real_t t_eval,
552 void *input,
554 cs_real_t *eval)
555{
556 CS_UNUSED(t_eval);
557 CS_UNUSED(qtype);
558
559 if (eval == NULL)
560 bft_error(__FILE__, __LINE__, 0,
561 " %s: Array storing the evaluation should be allocated before"
562 " the call to this function.", __func__);
563
564 const cs_xdef_array_context_t *cx = (const cs_xdef_array_context_t *)input;
565
566 assert(input != NULL);
568
569 std::memcpy(eval, cx->values + 9 * cm->f_ids[f], 9 * sizeof(cs_real_t));
570}
571
572/*============================================================================
573 * Public function prototypes
574 *============================================================================*/
575
576/*----------------------------------------------------------------------------*/
588/*----------------------------------------------------------------------------*/
589
590void
592 double t_eval,
593 short int f,
595 void *input,
597 cs_real_t *eval);
598
599/*----------------------------------------------------------------------------*/
610/*----------------------------------------------------------------------------*/
611
612void
614 double t_eval,
616 void *input,
618 cs_real_t *eval);
619
620/*----------------------------------------------------------------------------*/
634/*----------------------------------------------------------------------------*/
635
636void
638 cs_real_t t_eval,
640 void *input,
641 const short int dim,
644 cs_real_t *c_int,
645 cs_real_t *f_int);
646
647/*----------------------------------------------------------------------------*/
660/*----------------------------------------------------------------------------*/
661
662void
664 short int f,
665 cs_real_t time_eval,
666 void *context,
668 cs_real_t *eval);
669
670/*----------------------------------------------------------------------------*/
683/*----------------------------------------------------------------------------*/
684
685void
687 short int f,
688 cs_real_t t_eval,
689 void *context,
691 cs_real_t *eval);
692
693/*----------------------------------------------------------------------------*/
706/*----------------------------------------------------------------------------*/
707
708void
710 short int f,
711 cs_real_t t_eval,
712 void *context,
714 cs_real_t *eval);
715
716/*----------------------------------------------------------------------------*/
729/*----------------------------------------------------------------------------*/
730
731void
733 cs_real_t t_eval,
734 void *context,
736 cs_real_t *eval);
737
738/*----------------------------------------------------------------------------*/
752/*----------------------------------------------------------------------------*/
753
754void
756 cs_real_t t_eval,
757 void *context,
759 cs_real_t *eval);
760
761/*----------------------------------------------------------------------------*/
775/*----------------------------------------------------------------------------*/
776
777void
779 cs_real_t t_eval,
780 void *context,
782 cs_real_t *eval);
783
784/*----------------------------------------------------------------------------*/
794/*----------------------------------------------------------------------------*/
795
796void
798 cs_real_t time_eval,
799 void *context,
800 cs_real_t *eval);
801
802/*----------------------------------------------------------------------------*/
813/*----------------------------------------------------------------------------*/
814
815void
817 cs_real_t time_eval,
818 void *context,
819 cs_real_t *eval);
820
821/*----------------------------------------------------------------------------*/
832/*----------------------------------------------------------------------------*/
833
834void
836 cs_real_t time_eval,
837 void *context,
838 cs_real_t *eval);
839
840/*----------------------------------------------------------------------------*/
850/*----------------------------------------------------------------------------*/
851
852void
854 cs_real_t time_eval,
855 void *context,
856 cs_real_t *eval);
857
858/*----------------------------------------------------------------------------*/
871/*----------------------------------------------------------------------------*/
872
873void
875 cs_lnum_t n_points,
876 const cs_real_t *xyz,
877 cs_real_t time_eval,
878 void *context,
879 cs_real_t *eval);
880
881/*----------------------------------------------------------------------------*/
895/*----------------------------------------------------------------------------*/
896
897void
899 cs_lnum_t n_points,
900 const cs_real_t *xyz,
901 cs_real_t time_eval,
902 void *context,
903 cs_real_t *eval);
904
905/*----------------------------------------------------------------------------*/
919/*----------------------------------------------------------------------------*/
920
921void
923 cs_lnum_t n_points,
924 const cs_real_t *xyz,
925 cs_real_t time_eval,
926 void *context,
927 cs_real_t *eval);
928
929/*----------------------------------------------------------------------------*/
942/*----------------------------------------------------------------------------*/
943
944void
946 short int f,
947 cs_real_t time_eval,
948 void *context,
949 cs_real_t *eval);
950
951/*----------------------------------------------------------------------------*/
964/*----------------------------------------------------------------------------*/
965
966void
968 short int f,
969 cs_real_t time_eval,
970 void *context,
971 cs_real_t *eval);
972
973/*----------------------------------------------------------------------------*/
988/*----------------------------------------------------------------------------*/
989
990void
992 short int f,
993 cs_real_t time_eval,
994 void *context,
996 cs_real_t *eval);
997
998/*----------------------------------------------------------------------------*/
1013/*----------------------------------------------------------------------------*/
1014
1015void
1017 short int f,
1018 cs_real_t time_eval,
1019 void *context,
1021 cs_real_t *eval);
1022
1023/*----------------------------------------------------------------------------*/
1036/*----------------------------------------------------------------------------*/
1037
1038void
1040 short int f,
1041 cs_real_t time_eval,
1042 void *context,
1044 cs_real_t *eval);
1045
1046/*----------------------------------------------------------------------------*/
1059/*----------------------------------------------------------------------------*/
1060
1061void
1063 short int f,
1064 cs_real_t time_eval,
1065 void *context,
1067 cs_real_t *eval);
1068
1069/*----------------------------------------------------------------------------*/
1083/*----------------------------------------------------------------------------*/
1084
1085void
1087 short int f,
1088 cs_real_t time_eval,
1089 void *context,
1091 cs_real_t *eval);
1092
1093/*----------------------------------------------------------------------------*/
1108/*----------------------------------------------------------------------------*/
1109
1110void
1112 cs_real_t t_eval,
1113 void *context,
1115 cs_real_t *eval);
1116
1117/*----------------------------------------------------------------------------*/
1132/*----------------------------------------------------------------------------*/
1133
1134void
1136 cs_real_t t_eval,
1137 void *context,
1139 cs_real_t *eval);
1140
1141/*----------------------------------------------------------------------------*/
1142
1143#undef _dp3
1144
1145/*----------------------------------------------------------------------------*/
1157/*----------------------------------------------------------------------------*/
1158
1159inline void
1161 short int f,
1162 cs_real_t time_eval,
1163 void *input,
1164 cs_real_t *eval)
1165{
1166 CS_UNUSED(time_eval);
1167
1168 cs_real_t *flux = (cs_real_t *)input;
1169 const cs_quant_t fq = cm->face[f];
1170
1171 cs_math_33_3_product((const cs_real_t (*)[3])flux, fq.unitv, eval);
1172 for (int k = 0; k < 3; k++)
1173 eval[3*f+k] *= fq.meas;
1174}
1175
1176#endif /* CS_XDEF_CW_EVAL_H */
void bft_error(const char *const file_name, const int line_num, const int sys_error_code, const char *const format,...)
Calls the error handler (set by bft_error_handler_set() or default).
Definition: bft_error.cpp:187
double cs_real_t
Floating-point value.
Definition: cs_defs.h:332
cs_real_t cs_real_3_t[3]
vector of 3 floating-point values
Definition: cs_defs.h:349
#define CS_UNUSED(x)
Definition: cs_defs.h:518
int cs_lnum_t
local mesh entity id
Definition: cs_defs.h:325
@ k
Definition: cs_field_pointer.h:68
const cs_flag_t cs_flag_primal_face
Definition: cs_flag.cpp:53
static bool cs_flag_test(cs_flag_t flag_to_check, cs_flag_t reference)
Check if two flags share the same pattern Return true if the flag to check has at least the pattern o...
Definition: cs_flag.h:333
static bool cs_eflag_test(cs_eflag_t flag_to_check, cs_eflag_t reference)
Check if a two compute flag share the same pattern Return true if the computed flag to check has at l...
Definition: cs_flag.h:381
@ CS_FLAG_COMP_PFQ
Definition: cs_flag.h:233
CS_F_HOST_DEVICE void cs_math_33_3_product(const T m[3][3], const U v[3], V *restrict mv)
Compute the product of a matrix of 3x3 real values by a vector of 3 real values.
Definition: cs_math.h:389
void() cs_analytic_func_t(cs_real_t time, cs_lnum_t n_elts, const cs_lnum_t *elt_ids, const cs_real_t *coords, bool dense_output, void *input, cs_real_t *retval)
Generic function pointer for an evaluation relying on an analytic function.
Definition: cs_param_types.h:127
cs_quadrature_type_t
Type of quadrature to use when computing an integral quantity. This rationale is used for integrals a...
Definition: cs_quadrature.h:79
void() cs_quadrature_tria_integral_t(double tcur, const cs_real_3_t v1, const cs_real_3_t v2, const cs_real_3_t v3, double area, cs_analytic_func_t *ana, void *input, double results[])
Compute the integral over a triangle based on a specified quadrature rule and add it to results.
Definition: cs_quadrature.h:196
void() cs_quadrature_tetra_integral_t(double tcur, const cs_real_3_t v1, const cs_real_3_t v2, const cs_real_3_t v3, const cs_real_3_t v4, double vol, cs_analytic_func_t *ana, void *input, double results[])
Compute the integral over a tetrahedron based on a specified quadrature rule and add it to results.
Definition: cs_quadrature.h:223
void cs_xdef_cw_eval_flux_by_vector_analytic(const cs_cell_mesh_t *cm, short int f, cs_real_t time_eval, void *context, cs_quadrature_type_t qtype, cs_real_t *eval)
Function pointer for evaluating the (scalar-valued) normal flux of a quantity defined by an analytic ...
Definition: cs_xdef_cw_eval.cpp:2058
static void cs_xdef_cw_eval_scalar_face_avg_by_value(const cs_cell_mesh_t *cm, short int f, cs_real_t t_eval, void *input, cs_quadrature_type_t qtype, cs_real_t *eval)
Function pointer for evaluating the average on a face of a scalar function defined through a descript...
Definition: cs_xdef_cw_eval.h:325
void cs_xdef_cw_eval_tensor_avg_by_analytic(const cs_cell_mesh_t *cm, cs_real_t t_eval, void *context, cs_quadrature_type_t qtype, cs_real_t *eval)
Function pointer for evaluating a quantity defined through a descriptor (cs_xdef_t structure) by a ce...
Definition: cs_xdef_cw_eval.cpp:589
static void cs_xdef_cw_eval_symtens_by_val(const cs_cell_mesh_t *cm, cs_real_t time_eval, void *input, cs_real_t *eval)
Evaluate a tensor-valued quantity with a symmetric storage by a cellwise process.
Definition: cs_xdef_cw_eval.h:204
static void cs_xdef_cw_eval_face_drham_by_analytic(const cs_cell_mesh_t *cm, short int f, cs_real_t t_eval, void *input, cs_quadrature_type_t qtype, cs_real_t *eval)
Function pointer for evaluating at the center of the face a scalar function defined through a descrip...
Definition: cs_xdef_cw_eval.h:403
static void cs_xdef_cw_eval_tensor_by_val(const cs_cell_mesh_t *cm, cs_real_t time_eval, void *input, cs_real_t *eval)
Evaluate a tensor-valued quantity by a cellwise process.
Definition: cs_xdef_cw_eval.h:229
static void cs_xdef_cw_eval_vector_by_val(const cs_cell_mesh_t *cm, cs_real_t time_eval, void *input, cs_real_t *eval)
Evaluate a vector-valued quantity by a cellwise process.
Definition: cs_xdef_cw_eval.h:176
void cs_xdef_cw_eval_scalar_face_avg_by_analytic(const cs_cell_mesh_t *cm, short int f, cs_real_t time_eval, void *context, cs_quadrature_type_t qtype, cs_real_t *eval)
Function pointer for evaluating the average on a face of a scalar function defined through a descript...
Definition: cs_xdef_cw_eval.cpp:366
void cs_xdef_cw_eval_vect_avg_reduction_by_analytic(const cs_cell_mesh_t *cm, cs_real_t t_eval, void *context, cs_quadrature_type_t qtype, cs_real_t *eval)
Function pointer for evaluating the reduction by averages of a analytic function by a cellwise proces...
Definition: cs_xdef_cw_eval.cpp:2480
#define _dp3
Definition: cs_xdef_cw_eval.h:44
void() cs_xdef_cw_eval_int_t(const cs_cell_mesh_t *cm, cs_real_t time_eval, void *input, cs_quadrature_type_t qtype, cs_real_t *eval)
Function pointer for evaluating a quantity defined through a descriptor (cs_xdef_t structure) by a ce...
Definition: cs_xdef_cw_eval.h:107
void cs_xdef_cw_eval_flux_by_scalar_analytic(const cs_cell_mesh_t *cm, short int f, cs_real_t time_eval, void *context, cs_quadrature_type_t qtype, cs_real_t *eval)
Function pointer for evaluating the normal flux of a quantity defined by analytic function (scalar-va...
Definition: cs_xdef_cw_eval.cpp:1863
void cs_xdef_cw_eval_flux_v_by_vector_analytic(const cs_cell_mesh_t *cm, short int f, cs_real_t time_eval, void *context, cs_quadrature_type_t qtype, cs_real_t *eval)
Function pointer for evaluating the normal flux defined by a vector-valued quantities and relying on ...
Definition: cs_xdef_cw_eval.cpp:1514
void cs_xdef_cw_eval_tensor_face_avg_by_analytic(const cs_cell_mesh_t *cm, short int f, cs_real_t t_eval, void *context, cs_quadrature_type_t qtype, cs_real_t *eval)
Function pointer for evaluating the average on a face of a tensor function defined through a descript...
Definition: cs_xdef_cw_eval.cpp:454
void cs_xdef_cw_eval_c_int_by_analytic(const cs_cell_mesh_t *cm, double t_eval, cs_analytic_func_t *ana, void *input, cs_quadrature_tetra_integral_t *qfunc, cs_real_t *eval)
Integrate an analytic function over a cell.
Definition: cs_xdef_cw_eval.cpp:152
void cs_xdef_cw_eval_vector_flux_by_analytic(const cs_cell_mesh_t *cm, short int f, cs_real_t time_eval, void *context, cs_quadrature_type_t qtype, cs_real_t *eval)
Function pointer for evaluating the normal vector-valued flux of a quantity defined by analytic funct...
Definition: cs_xdef_cw_eval.cpp:2244
void cs_xdef_cw_eval_at_xyz_by_analytic(const cs_cell_mesh_t *cm, cs_lnum_t n_points, const cs_real_t *xyz, cs_real_t time_eval, void *context, cs_real_t *eval)
Function pointer for evaluating a quantity defined by analytic function at a precise location (x,...
Definition: cs_xdef_cw_eval.cpp:848
void() cs_xdef_cw_eval_xyz_t(const cs_cell_mesh_t *cm, cs_lnum_t n_points, const cs_real_t *xyz, cs_real_t time_eval, void *input, cs_real_t *eval)
Function pointer for evaluating a quantity at several locations in a cell defined through a descripto...
Definition: cs_xdef_cw_eval.h:85
void cs_xdef_cw_eval_vector_at_xyz_by_field(const cs_cell_mesh_t *cm, cs_lnum_t n_points, const cs_real_t *xyz, cs_real_t time_eval, void *context, cs_real_t *eval)
Function pointer for evaluating a quantity defined by a field at a precise location inside a cell Use...
Definition: cs_xdef_cw_eval.cpp:973
static void cs_xdef_cw_eval_vector_at_xyz_by_val(const cs_cell_mesh_t *cm, cs_lnum_t n_points, const cs_real_t *xyz, cs_real_t time_eval, void *input, cs_real_t *eval)
Function pointer for evaluating a quantity defined by analytic function at a precise location inside ...
Definition: cs_xdef_cw_eval.h:259
void cs_xdef_cw_eval_flux_v_by_vector_val(const cs_cell_mesh_t *cm, short int f, cs_real_t time_eval, void *context, cs_real_t *eval)
Function pointer for evaluating the normal flux defined by vector-valued quantities....
Definition: cs_xdef_cw_eval.cpp:1104
void cs_xdef_cw_eval_by_analytic(const cs_cell_mesh_t *cm, cs_real_t time_eval, void *context, cs_real_t *eval)
Evaluate a quantity at the cell center defined using an analytic function by a cellwise process (usag...
Definition: cs_xdef_cw_eval.cpp:657
void cs_xdef_cw_eval_flux_v_by_scalar_analytic(const cs_cell_mesh_t *cm, short int f, cs_real_t time_eval, void *context, cs_quadrature_type_t qtype, cs_real_t *eval)
Function pointer for evaluating the normal flux defined by a scalar-valued quantities and relying on ...
Definition: cs_xdef_cw_eval.cpp:1172
void() cs_xdef_cw_eval_t(const cs_cell_mesh_t *cm, 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) by a ce...
Definition: cs_xdef_cw_eval.h:64
void cs_xdef_cw_eval_f_int_by_analytic(const cs_cell_mesh_t *cm, double t_eval, short int f, cs_analytic_func_t *ana, void *input, cs_quadrature_tria_integral_t *qfunc, cs_real_t *eval)
Integrate an analytic function over a face.
Definition: cs_xdef_cw_eval.cpp:97
static void cs_xdef_cw_eval_tensor_face_avg_by_array(const cs_cell_mesh_t *cm, short int f, cs_real_t t_eval, void *input, cs_quadrature_type_t qtype, cs_real_t *eval)
Function pointer for evaluating the average on a face of a tensor function defined through a descript...
Definition: cs_xdef_cw_eval.h:549
void cs_xdef_cw_eval_scal_avg_reduction_by_analytic(const cs_cell_mesh_t *cm, cs_real_t t_eval, void *context, cs_quadrature_type_t qtype, cs_real_t *eval)
Function pointer for evaluating the reduction by averages of a analytic function by a cellwise proces...
Definition: cs_xdef_cw_eval.cpp:2425
void cs_xdef_cw_eval_vector_avg_by_analytic(const cs_cell_mesh_t *cm, cs_real_t t_eval, void *context, cs_quadrature_type_t qtype, cs_real_t *eval)
Function pointer for evaluating a quantity defined through a descriptor (cs_xdef_t structure) by a ce...
Definition: cs_xdef_cw_eval.cpp:543
void cs_xdef_cw_eval_vector_face_avg_by_analytic(const cs_cell_mesh_t *cm, short int f, cs_real_t t_eval, void *context, cs_quadrature_type_t qtype, cs_real_t *eval)
Function pointer for evaluating the average on a face of a vector function defined through a descript...
Definition: cs_xdef_cw_eval.cpp:409
static void cs_xdef_cw_eval_scalar_by_val(const cs_cell_mesh_t *cm, cs_real_t time_eval, void *input, cs_real_t *eval)
Evaluate a scalar-valued quantity by a cellwise process.
Definition: cs_xdef_cw_eval.h:152
void cs_xdef_cw_eval_scalar_avg_by_analytic(const cs_cell_mesh_t *cm, cs_real_t t_eval, void *context, cs_quadrature_type_t qtype, cs_real_t *eval)
Function pointer for evaluating a quantity defined through a descriptor (cs_xdef_t structure) by a ce...
Definition: cs_xdef_cw_eval.cpp:499
void cs_xdef_cw_eval_by_field(const cs_cell_mesh_t *cm, cs_real_t time_eval, void *context, cs_real_t *eval)
Evaluate a quantity inside a cell defined using a field Variation using a cs_cell_mesh_t structure.
Definition: cs_xdef_cw_eval.cpp:796
static void cs_xdef_cw_eval_vector_face_avg_by_value(const cs_cell_mesh_t *cm, short int f, cs_real_t t_eval, void *input, cs_quadrature_type_t qtype, cs_real_t *eval)
Function pointer for evaluating the average on a face of a vector function defined through a descript...
Definition: cs_xdef_cw_eval.h:432
void cs_xdef_cw_eval_flux_v_by_scalar_val(const cs_cell_mesh_t *cm, short int f, cs_real_t time_eval, void *context, cs_real_t *eval)
Function pointer for evaluating the normal flux defined by scalar-valued quantities....
Definition: cs_xdef_cw_eval.cpp:1038
void cs_xdef_cw_eval_by_array(const cs_cell_mesh_t *cm, cs_real_t time_eval, void *context, cs_real_t *eval)
Evaluate a quantity at cells defined by an array. Array is assumed to be interlaced....
Definition: cs_xdef_cw_eval.cpp:689
void cs_xdef_cw_eval_by_time_func(const cs_cell_mesh_t *cm, cs_real_t time_eval, void *context, cs_real_t *eval)
Evaluate a quantity by a cellwise process using a definition by time function.
Definition: cs_xdef_cw_eval.cpp:631
static void cs_xdef_cw_eval_scalar_face_avg_by_array(const cs_cell_mesh_t *cm, short int f, cs_real_t t_eval, void *input, cs_quadrature_type_t qtype, cs_real_t *eval)
Function pointer for evaluating the average on a face of a vector function defined through a descript...
Definition: cs_xdef_cw_eval.h:362
void cs_xdef_cw_eval_vector_at_xyz_by_array(const cs_cell_mesh_t *cm, cs_lnum_t n_points, const cs_real_t *xyz, cs_real_t time_eval, void *context, cs_real_t *eval)
Function pointer for evaluating a quantity defined by analytic function at a precise location inside ...
Definition: cs_xdef_cw_eval.cpp:887
void cs_xdef_cw_eval_fc_int_by_analytic(const cs_cell_mesh_t *cm, cs_real_t t_eval, cs_analytic_func_t *ana, void *input, const short int dim, cs_quadrature_tetra_integral_t *q_tet, cs_quadrature_tria_integral_t *q_tri, cs_real_t *c_int, cs_real_t *f_int)
Routine to integrate an analytic function over a cell and its faces.
Definition: cs_xdef_cw_eval.cpp:249
static void cs_xdef_cw_eval_vector_face_avg_by_array(const cs_cell_mesh_t *cm, short int f, cs_real_t t_eval, void *input, cs_quadrature_type_t qtype, cs_real_t *eval)
Function pointer for evaluating the average on a face of a vector function defined through a descript...
Definition: cs_xdef_cw_eval.h:470
static void cs_xdef_cw_eval_tensor_face_avg_by_value(const cs_cell_mesh_t *cm, short int f, cs_real_t t_eval, void *input, cs_quadrature_type_t qtype, cs_real_t *eval)
Function pointer for evaluating the average on a face of a tensor function defined through a descript...
Definition: cs_xdef_cw_eval.h:509
void cs_xdef_cw_eval_flux_by_tensor_val(const cs_cell_mesh_t *cm, short int f, cs_real_t time_eval, void *input, cs_real_t *eval)
Function pointer for evaluating the normal flux of a quantity defined by values. Use of a cs_cell_mes...
Definition: cs_xdef_cw_eval.h:1160
static void cs_xdef_cw_eval_flux_by_vector_val(const cs_cell_mesh_t *cm, short int f, cs_real_t time_eval, void *input, cs_real_t *eval)
Function pointer for evaluating the normal flux of a quantity defined by a vector-valued flux for the...
Definition: cs_xdef_cw_eval.h:294
void() cs_xdef_cw_eval_face_t(const cs_cell_mesh_t *cm, short int f, cs_real_t time_eval, void *input, cs_quadrature_type_t qtype, cs_real_t *eval)
Function pointer for evaluating a quantity defined through a descriptor (cs_xdef_t structure) by a ce...
Definition: cs_xdef_cw_eval.h:129
Set of local quantities and connectivities related to a mesh cell.
Definition: cs_cdo_local.h:242
cs_lnum_t * f_ids
Definition: cs_cdo_local.h:279
cs_eflag_t flag
Definition: cs_cdo_local.h:244
cs_quant_t * face
Definition: cs_cdo_local.h:284
Definition: cs_cdo_quantities.h:134
double meas
Definition: cs_cdo_quantities.h:136
double center[3]
Definition: cs_cdo_quantities.h:138
double unitv[3]
Definition: cs_cdo_quantities.h:137
Context structure when a definition by analytic function is used.
Definition: cs_xdef.h:288
cs_analytic_func_t * func
Definition: cs_xdef.h:300
void * input
Definition: cs_xdef.h:307
Context structure when an array is used for the definition.
Definition: cs_xdef.h:209
cs_real_t * values
Definition: cs_xdef.h:269
cs_flag_t value_location
Definition: cs_xdef.h:265