8.1
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-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_local.h"
36 #include "cs_cdo_quantities.h"
37 #include "cs_mesh.h"
38 #include "cs_quadrature.h"
39 #include "cs_xdef.h"
40 
41 /*----------------------------------------------------------------------------*/
42 
44 
45 /*=============================================================================
46  * Local macro definition (unset at the end of file)
47  *============================================================================*/
48 
49 /* Redefined the name of functions from cs_math to get shorter names */
50 #define _dp3 cs_math_3_dot_product
51 
52 /*============================================================================
53  * Function pointer type definitions
54  *============================================================================*/
55 
56 /*----------------------------------------------------------------------------*/
67 /*----------------------------------------------------------------------------*/
68 
69 typedef void
71  cs_real_t time_eval,
72  void *input,
73  cs_real_t *eval);
74 
75 /*----------------------------------------------------------------------------*/
88 /*----------------------------------------------------------------------------*/
89 
90 typedef void
92  cs_lnum_t n_points,
93  const cs_real_t *xyz,
94  cs_real_t time_eval,
95  void *input,
96  cs_real_t *eval);
97 
98 /*----------------------------------------------------------------------------*/
110 /*----------------------------------------------------------------------------*/
111 
112 typedef void
114  cs_real_t time_eval,
115  void *input,
116  cs_quadrature_type_t qtype,
117  cs_real_t *eval);
118 
119 /*----------------------------------------------------------------------------*/
132 /*----------------------------------------------------------------------------*/
133 
134 typedef void
136  short int f,
137  cs_real_t time_eval,
138  void *input,
139  cs_quadrature_type_t qtype,
140  cs_real_t *eval);
141 
142 /*============================================================================
143  * Static inline public function prototypes
144  *============================================================================*/
145 
146 /*----------------------------------------------------------------------------*/
155 /*----------------------------------------------------------------------------*/
156 
157 static inline void
159  cs_real_t time_eval,
160  void *input,
161  cs_real_t *eval)
162 {
163  CS_UNUSED(cm);
164  CS_UNUSED(time_eval);
165 
166  cs_real_t *constant_val = (cs_real_t *)input;
167  *eval = constant_val[0];
168 }
169 
170 /*----------------------------------------------------------------------------*/
179 /*----------------------------------------------------------------------------*/
180 
181 static inline void
183  cs_real_t time_eval,
184  void *input,
185  cs_real_t *eval)
186 {
187  CS_UNUSED(cm);
188  CS_UNUSED(time_eval);
189 
190  const cs_real_t *constant_val = (cs_real_t *)input;
191 
192  eval[0] = constant_val[0];
193  eval[1] = constant_val[1];
194  eval[2] = constant_val[2];
195 }
196 
197 /*----------------------------------------------------------------------------*/
207 /*----------------------------------------------------------------------------*/
208 
209 static inline void
211  cs_real_t time_eval,
212  void *input,
213  cs_real_t *eval)
214 {
215  CS_UNUSED(cm);
216  CS_UNUSED(time_eval);
217 
218  const cs_real_t *constant_val = (const cs_real_t *)input;
219  for (int k = 0; k < 6; k++)
220  eval[k] = constant_val[k];
221 }
222 
223 /*----------------------------------------------------------------------------*/
232 /*----------------------------------------------------------------------------*/
233 
234 static inline void
236  cs_real_t time_eval,
237  void *input,
238  cs_real_t *eval)
239 {
240  CS_UNUSED(cm);
241  CS_UNUSED(time_eval);
242 
243  const cs_real_3_t *constant_val = (const cs_real_3_t *)input;
244  for (int ki = 0; ki < 3; ki++)
245  for (int kj = 0; kj < 3; kj++)
246  eval[3*ki+kj] = constant_val[ki][kj];
247 }
248 
249 /*----------------------------------------------------------------------------*/
262 /*----------------------------------------------------------------------------*/
263 
264 static inline void
266  cs_lnum_t n_points,
267  const cs_real_t *xyz,
268  cs_real_t time_eval,
269  void *input,
270  cs_real_t *eval)
271 {
272  CS_UNUSED(cm);
273  CS_UNUSED(xyz);
274  CS_UNUSED(time_eval);
275 
276  const cs_real_t *constant_val = (cs_real_t *)input;
277 
278  for (int i = 0; i < n_points; i++) {
279  eval[3*i ] = constant_val[0];
280  eval[3*i + 1] = constant_val[1];
281  eval[3*i + 2] = constant_val[2];
282  }
283 }
284 
285 /*----------------------------------------------------------------------------*/
297 /*----------------------------------------------------------------------------*/
298 
299 static inline void
301  short int f,
302  cs_real_t time_eval,
303  void *input,
304  cs_real_t *eval)
305 {
306  CS_UNUSED(time_eval);
307  assert(cs_eflag_test(cm->flag, CS_FLAG_COMP_PFQ));
308 
309  const cs_real_t *flux = (cs_real_t *)input;
310  const cs_quant_t fq = cm->face[f];
311 
312  eval[f] = fq.meas * _dp3(fq.unitv, flux);
313 }
314 
315 /*----------------------------------------------------------------------------*/
327 /*----------------------------------------------------------------------------*/
328 
329 static inline void
331  short int f,
332  cs_real_t time_eval,
333  void *input,
334  cs_real_t *eval)
335 {
336  CS_UNUSED(time_eval);
337 
338  cs_real_t *flux = (cs_real_t *)input;
339  const cs_quant_t fq = cm->face[f];
340 
341  cs_math_33_3_product((const cs_real_t (*)[3])flux, fq.unitv, eval);
342  for (int k = 0; k < 3; k++)
343  eval[3*f+k] *= fq.meas;
344 }
345 
346 /*----------------------------------------------------------------------------*/
359 /*----------------------------------------------------------------------------*/
360 
361 static inline void
363  short int f,
364  cs_real_t t_eval,
365  void *input,
366  cs_quadrature_type_t qtype,
367  cs_real_t *eval)
368 {
369  CS_UNUSED(cm);
370  CS_UNUSED(t_eval);
371  CS_UNUSED(f);
372  CS_UNUSED(qtype);
373 
374  if (eval == NULL)
375  bft_error(__FILE__, __LINE__, 0,
376  " %s: Array storing the evaluation should be allocated before"
377  " the call to this function.", __func__);
378  assert(input != NULL);
379 
380  eval[0] = ((const cs_real_t *)input)[0];
381 }
382 
383 /*----------------------------------------------------------------------------*/
396 /*----------------------------------------------------------------------------*/
397 
398 static inline void
400  short int f,
401  cs_real_t t_eval,
402  void *input,
403  cs_quadrature_type_t qtype,
404  cs_real_t *eval)
405 {
406  CS_UNUSED(t_eval);
407  CS_UNUSED(qtype);
408 
409  if (eval == NULL)
410  bft_error(__FILE__, __LINE__, 0,
411  " %s: Array storing the evaluation should be allocated before"
412  " the call to this function.", __func__);
413 
414  const cs_xdef_array_context_t *cx = (const cs_xdef_array_context_t *)input;
415 
416  assert(input != NULL);
418 
419  eval[0] = cx->values[cm->f_ids[f]];
420 }
421 
422 /*----------------------------------------------------------------------------*/
437 /*----------------------------------------------------------------------------*/
438 
439 static inline void
441  short int f,
442  cs_real_t t_eval,
443  void *input,
444  cs_quadrature_type_t qtype,
445  cs_real_t *eval)
446 {
447  CS_UNUSED(qtype);
449 
450  anai->func(t_eval, 1, NULL, cm->face[f].center, false, anai->input, eval);
451 }
452 
453 /*----------------------------------------------------------------------------*/
466 /*----------------------------------------------------------------------------*/
467 
468 static inline void
470  short int f,
471  cs_real_t t_eval,
472  void *input,
473  cs_quadrature_type_t qtype,
474  cs_real_t *eval)
475 {
476  CS_UNUSED(cm);
477  CS_UNUSED(f);
478  CS_UNUSED(t_eval);
479  CS_UNUSED(qtype);
480 
481  if (eval == NULL)
482  bft_error(__FILE__, __LINE__, 0,
483  " %s: Array storing the evaluation should be allocated before"
484  " the call to this function.", __func__);
485 
486  assert(input != NULL);
487 
488  memcpy(eval, (const cs_real_t *)input, 3*sizeof(cs_real_t));
489 }
490 
491 /*----------------------------------------------------------------------------*/
504 /*----------------------------------------------------------------------------*/
505 
506 static inline void
508  short int f,
509  cs_real_t t_eval,
510  void *input,
511  cs_quadrature_type_t qtype,
512  cs_real_t *eval)
513 {
514  CS_UNUSED(t_eval);
515  CS_UNUSED(qtype);
516 
517  if (eval == NULL)
518  bft_error(__FILE__, __LINE__, 0,
519  " %s: Array storing the evaluation should be allocated before"
520  " the call to this function.", __func__);
521 
522  const cs_xdef_array_context_t *cx = (const cs_xdef_array_context_t *)input;
523 
524  assert(input != NULL);
526 
527  memcpy(eval, cx->values + 3*cm->f_ids[f], 3*sizeof(cs_real_t));
528 }
529 
530 /*----------------------------------------------------------------------------*/
543 /*----------------------------------------------------------------------------*/
544 
545 static inline void
547  short int f,
548  cs_real_t t_eval,
549  void *input,
550  cs_quadrature_type_t qtype,
551  cs_real_t *eval)
552 {
553  CS_UNUSED(cm);
554  CS_UNUSED(f);
555  CS_UNUSED(t_eval);
556  CS_UNUSED(qtype);
557 
558  assert(input != NULL);
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_real_3_t *constant_val = (const cs_real_3_t *)input;
565  for (int ki = 0; ki < 3; ki++)
566  for (int kj = 0; kj < 3; kj++)
567  eval[3*ki+kj] = constant_val[ki][kj];
568 }
569 
570 /*----------------------------------------------------------------------------*/
583 /*----------------------------------------------------------------------------*/
584 
585 static inline void
587  short int f,
588  cs_real_t t_eval,
589  void *input,
590  cs_quadrature_type_t qtype,
591  cs_real_t *eval)
592 {
593  CS_UNUSED(t_eval);
594  CS_UNUSED(qtype);
595 
596  if (eval == NULL)
597  bft_error(__FILE__, __LINE__, 0,
598  " %s: Array storing the evaluation should be allocated before"
599  " the call to this function.", __func__);
600 
601  const cs_xdef_array_context_t *cx = (const cs_xdef_array_context_t *)input;
602 
603  assert(input != NULL);
605 
606  memcpy(eval, cx->values + 9*cm->f_ids[f], 9*sizeof(cs_real_t));
607 }
608 
609 /*============================================================================
610  * Public function prototypes
611  *============================================================================*/
612 
613 /*----------------------------------------------------------------------------*/
625 /*----------------------------------------------------------------------------*/
626 
627 void
629  double t_eval,
630  short int f,
631  cs_analytic_func_t *ana,
632  void *input,
634  cs_real_t *eval);
635 
636 /*----------------------------------------------------------------------------*/
647 /*----------------------------------------------------------------------------*/
648 
649 void
651  double t_eval,
652  cs_analytic_func_t *ana,
653  void *input,
655  cs_real_t *eval);
656 
657 /*----------------------------------------------------------------------------*/
671 /*----------------------------------------------------------------------------*/
672 
673 void
675  cs_real_t t_eval,
676  cs_analytic_func_t *ana,
677  void *input,
678  const short int dim,
681  cs_real_t *c_int,
682  cs_real_t *f_int);
683 
684 /*----------------------------------------------------------------------------*/
697 /*----------------------------------------------------------------------------*/
698 
699 void
701  short int f,
702  cs_real_t time_eval,
703  void *context,
704  cs_quadrature_type_t qtype,
705  cs_real_t *eval);
706 
707 /*----------------------------------------------------------------------------*/
720 /*----------------------------------------------------------------------------*/
721 
722 void
724  short int f,
725  cs_real_t t_eval,
726  void *context,
727  cs_quadrature_type_t qtype,
728  cs_real_t *eval);
729 
730 /*----------------------------------------------------------------------------*/
743 /*----------------------------------------------------------------------------*/
744 
745 void
747  short int f,
748  cs_real_t t_eval,
749  void *context,
750  cs_quadrature_type_t qtype,
751  cs_real_t *eval);
752 
753 /*----------------------------------------------------------------------------*/
766 /*----------------------------------------------------------------------------*/
767 
768 void
770  cs_real_t t_eval,
771  void *context,
772  cs_quadrature_type_t qtype,
773  cs_real_t *eval);
774 
775 /*----------------------------------------------------------------------------*/
789 /*----------------------------------------------------------------------------*/
790 
791 void
793  cs_real_t t_eval,
794  void *context,
795  cs_quadrature_type_t qtype,
796  cs_real_t *eval);
797 
798 /*----------------------------------------------------------------------------*/
812 /*----------------------------------------------------------------------------*/
813 
814 void
816  cs_real_t t_eval,
817  void *context,
818  cs_quadrature_type_t qtype,
819  cs_real_t *eval);
820 
821 /*----------------------------------------------------------------------------*/
831 /*----------------------------------------------------------------------------*/
832 
833 void
835  cs_real_t time_eval,
836  void *context,
837  cs_real_t *eval);
838 
839 /*----------------------------------------------------------------------------*/
850 /*----------------------------------------------------------------------------*/
851 
852 void
854  cs_real_t time_eval,
855  void *context,
856  cs_real_t *eval);
857 
858 /*----------------------------------------------------------------------------*/
869 /*----------------------------------------------------------------------------*/
870 
871 void
873  cs_real_t time_eval,
874  void *context,
875  cs_real_t *eval);
876 
877 /*----------------------------------------------------------------------------*/
887 /*----------------------------------------------------------------------------*/
888 
889 void
891  cs_real_t time_eval,
892  void *context,
893  cs_real_t *eval);
894 
895 /*----------------------------------------------------------------------------*/
908 /*----------------------------------------------------------------------------*/
909 
910 void
912  cs_lnum_t n_points,
913  const cs_real_t *xyz,
914  cs_real_t time_eval,
915  void *context,
916  cs_real_t *eval);
917 
918 /*----------------------------------------------------------------------------*/
932 /*----------------------------------------------------------------------------*/
933 
934 void
936  cs_lnum_t n_points,
937  const cs_real_t *xyz,
938  cs_real_t time_eval,
939  void *context,
940  cs_real_t *eval);
941 
942 /*----------------------------------------------------------------------------*/
956 /*----------------------------------------------------------------------------*/
957 
958 void
960  cs_lnum_t n_points,
961  const cs_real_t *xyz,
962  cs_real_t time_eval,
963  void *context,
964  cs_real_t *eval);
965 
966 /*----------------------------------------------------------------------------*/
979 /*----------------------------------------------------------------------------*/
980 
981 void
983  short int f,
984  cs_real_t time_eval,
985  void *context,
986  cs_real_t *eval);
987 
988 /*----------------------------------------------------------------------------*/
1001 /*----------------------------------------------------------------------------*/
1002 
1003 void
1005  short int f,
1006  cs_real_t time_eval,
1007  void *context,
1008  cs_real_t *eval);
1009 
1010 /*----------------------------------------------------------------------------*/
1025 /*----------------------------------------------------------------------------*/
1026 
1027 void
1029  short int f,
1030  cs_real_t time_eval,
1031  void *context,
1032  cs_quadrature_type_t qtype,
1033  cs_real_t *eval);
1034 
1035 /*----------------------------------------------------------------------------*/
1050 /*----------------------------------------------------------------------------*/
1051 
1052 void
1054  short int f,
1055  cs_real_t time_eval,
1056  void *context,
1057  cs_quadrature_type_t qtype,
1058  cs_real_t *eval);
1059 
1060 /*----------------------------------------------------------------------------*/
1073 /*----------------------------------------------------------------------------*/
1074 
1075 void
1077  short int f,
1078  cs_real_t time_eval,
1079  void *context,
1080  cs_quadrature_type_t qtype,
1081  cs_real_t *eval);
1082 
1083 /*----------------------------------------------------------------------------*/
1096 /*----------------------------------------------------------------------------*/
1097 
1098 void
1100  short int f,
1101  cs_real_t time_eval,
1102  void *context,
1103  cs_quadrature_type_t qtype,
1104  cs_real_t *eval);
1105 
1106 /*----------------------------------------------------------------------------*/
1120 /*----------------------------------------------------------------------------*/
1121 
1122 void
1124  short int f,
1125  cs_real_t time_eval,
1126  void *context,
1127  cs_quadrature_type_t qtype,
1128  cs_real_t *eval);
1129 
1130 /*----------------------------------------------------------------------------*/
1145 /*----------------------------------------------------------------------------*/
1146 
1147 void
1149  cs_real_t t_eval,
1150  void *context,
1151  cs_quadrature_type_t qtype,
1152  cs_real_t *eval);
1153 
1154 /*----------------------------------------------------------------------------*/
1169 /*----------------------------------------------------------------------------*/
1170 
1171 void
1173  cs_real_t t_eval,
1174  void *context,
1175  cs_quadrature_type_t qtype,
1176  cs_real_t *eval);
1177 
1178 /*----------------------------------------------------------------------------*/
1179 
1180 #undef _dp3
1181 
1183 
1184 #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.c:193
#define BEGIN_C_DECLS
Definition: cs_defs.h:514
double cs_real_t
Floating-point value.
Definition: cs_defs.h:319
cs_real_t cs_real_3_t[3]
vector of 3 floating-point values
Definition: cs_defs.h:334
#define CS_UNUSED(x)
Definition: cs_defs.h:500
#define END_C_DECLS
Definition: cs_defs.h:515
int cs_lnum_t
local mesh entity id
Definition: cs_defs.h:313
@ k
Definition: cs_field_pointer.h:70
const cs_flag_t cs_flag_primal_face
Definition: cs_flag.c:57
static bool cs_flag_test(cs_flag_t flag_to_check, cs_flag_t reference)
Check if a two flag share the same pattern Return true if the flag to check has at least the pattern ...
Definition: cs_flag.h:321
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:369
@ CS_FLAG_COMP_PFQ
Definition: cs_flag.h:233
static void cs_math_33_3_product(const cs_real_t m[3][3], const cs_real_t v[3], cs_real_t mv[restrict 3])
Compute the product of a matrix of 3x3 real values by a vector of 3 real values.
Definition: cs_math.h:591
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
Definition: cs_quadrature.h:52
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:169
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:196
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.c:1997
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:362
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.c:594
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:210
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:440
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:235
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:182
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.c:371
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.c:2390
#define _dp3
Definition: cs_xdef_cw_eval.h:50
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:113
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.c:1815
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.c:1490
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.c:459
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.c:160
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.c:2169
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.c:851
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:91
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.c: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:265
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.c:1104
static 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:330
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.c:662
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.c: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:70
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.c:105
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:586
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.c:2335
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.c:548
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.c:414
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:158
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.c:504
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.c:799
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:469
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.c: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.c:692
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.c:636
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:399
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.c: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.c:255
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:507
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:546
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:300
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:135
Set of local quantities and connectivities related to a mesh cell.
Definition: cs_cdo_local.h:203
cs_lnum_t * f_ids
Definition: cs_cdo_local.h:240
cs_eflag_t flag
Definition: cs_cdo_local.h:205
cs_quant_t * face
Definition: cs_cdo_local.h:244
Definition: cs_cdo_quantities.h:129
double meas
Definition: cs_cdo_quantities.h:131
double center[3]
Definition: cs_cdo_quantities.h:133
double unitv[3]
Definition: cs_cdo_quantities.h:132
Context structure when a definition by analytic function is used.
Definition: cs_xdef.h:292
cs_analytic_func_t * func
Definition: cs_xdef.h:304
void * input
Definition: cs_xdef.h:311
Context structure when an array is used for the definition.
Definition: cs_xdef.h:213
cs_real_t * values
Definition: cs_xdef.h:273
cs_flag_t value_location
Definition: cs_xdef.h:269