7.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-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_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
158 cs_xdef_cw_eval_scalar_by_val(const cs_cell_mesh_t *cm,
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
182 cs_xdef_cw_eval_vector_by_val(const cs_cell_mesh_t *cm,
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
210 cs_xdef_cw_eval_symtens_by_val(const cs_cell_mesh_t *cm,
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
235 cs_xdef_cw_eval_tensor_by_val(const cs_cell_mesh_t *cm,
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
265 cs_xdef_cw_eval_vector_at_xyz_by_val(const cs_cell_mesh_t *cm,
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[2*i + 2] = constant_val[2];
282  }
283 }
284 
285 
286 /*----------------------------------------------------------------------------*/
298 /*----------------------------------------------------------------------------*/
299 
300 static inline void
301 cs_xdef_cw_eval_flux_by_val(const cs_cell_mesh_t *cm,
302  short int f,
303  cs_real_t time_eval,
304  void *input,
305  cs_real_t *eval)
306 {
307  CS_UNUSED(time_eval);
308 
309  /* Sanity check */
310  assert(cs_eflag_test(cm->flag, CS_FLAG_COMP_PFQ));
311 
312  const cs_real_t *flux = (cs_real_t *)input;
313  const cs_quant_t fq = cm->face[f];
314 
315  eval[f] = fq.meas * _dp3(fq.unitv, flux);
316 }
317 
318 /*----------------------------------------------------------------------------*/
330 /*----------------------------------------------------------------------------*/
331 
332 static inline void
333 cs_xdef_cw_eval_tensor_flux_by_val(const cs_cell_mesh_t *cm,
334  short int f,
335  cs_real_t time_eval,
336  void *input,
337  cs_real_t *eval)
338 {
339  CS_UNUSED(time_eval);
340 
341  cs_real_t *flux = (cs_real_t *)input;
342  const cs_quant_t fq = cm->face[f];
343 
344  cs_math_33_3_product((const cs_real_t (*)[3])flux, fq.unitv, eval);
345  for (int k = 0; k < 3; k++)
346  eval[3*f+k] *= fq.meas;
347 }
348 
349 /*----------------------------------------------------------------------------*/
362 /*----------------------------------------------------------------------------*/
363 
364 static inline void
365 cs_xdef_cw_eval_scalar_face_avg_by_value(const cs_cell_mesh_t *cm,
366  short int f,
367  cs_real_t t_eval,
368  void *input,
369  cs_quadrature_type_t qtype,
370  cs_real_t *eval)
371 {
372  CS_UNUSED(cm);
373  CS_UNUSED(t_eval);
374  CS_UNUSED(f);
375  CS_UNUSED(qtype);
376 
377  if (eval == NULL)
378  bft_error(__FILE__, __LINE__, 0,
379  " %s: Array storing the evaluation should be allocated before"
380  " the call to this function.", __func__);
381  assert(input != NULL);
382 
383  eval[0] = ((const cs_real_t *)input)[0];
384 }
385 
386 /*----------------------------------------------------------------------------*/
399 /*----------------------------------------------------------------------------*/
400 
401 static inline void
402 cs_xdef_cw_eval_scalar_face_avg_by_array(const cs_cell_mesh_t *cm,
403  short int f,
404  cs_real_t t_eval,
405  void *input,
406  cs_quadrature_type_t qtype,
407  cs_real_t *eval)
408 {
409  CS_UNUSED(t_eval);
410  CS_UNUSED(qtype);
411 
412  if (eval == NULL)
413  bft_error(__FILE__, __LINE__, 0,
414  " %s: Array storing the evaluation should be allocated before"
415  " the call to this function.", __func__);
416 
417  const cs_xdef_array_context_t *array_input
418  = (const cs_xdef_array_context_t *)input;
419 
420  assert(input != NULL);
421  assert(cs_flag_test(array_input->loc, cs_flag_primal_face));
422 
423  eval[0] = array_input->values[cm->f_ids[f]];
424 }
425 
426 /*----------------------------------------------------------------------------*/
441 /*----------------------------------------------------------------------------*/
442 
443 static inline void
444 cs_xdef_cw_eval_face_drhm_by_analytic(const cs_cell_mesh_t *cm,
445  short int f,
446  cs_real_t t_eval,
447  void *input,
448  cs_quadrature_type_t qtype,
449  cs_real_t *eval)
450 {
451  CS_UNUSED(qtype);
453 
454  anai->func(t_eval, 1, NULL, cm->face[f].center, false, anai->input, eval);
455 }
456 
457 /*----------------------------------------------------------------------------*/
470 /*----------------------------------------------------------------------------*/
471 
472 static inline void
473 cs_xdef_cw_eval_vector_face_avg_by_value(const cs_cell_mesh_t *cm,
474  short int f,
475  cs_real_t t_eval,
476  void *input,
477  cs_quadrature_type_t qtype,
478  cs_real_t *eval)
479 {
480  CS_UNUSED(cm);
481  CS_UNUSED(f);
482  CS_UNUSED(t_eval);
483  CS_UNUSED(qtype);
484 
485  if (eval == NULL)
486  bft_error(__FILE__, __LINE__, 0,
487  " %s: Array storing the evaluation should be allocated before"
488  " the call to this function.", __func__);
489 
490  assert(input != NULL);
491 
492  memcpy(eval, (const cs_real_t *)input, 3*sizeof(cs_real_t));
493 }
494 
495 /*----------------------------------------------------------------------------*/
508 /*----------------------------------------------------------------------------*/
509 
510 static inline void
511 cs_xdef_cw_eval_vector_face_avg_by_array(const cs_cell_mesh_t *cm,
512  short int f,
513  cs_real_t t_eval,
514  void *input,
515  cs_quadrature_type_t qtype,
516  cs_real_t *eval)
517 {
518  CS_UNUSED(t_eval);
519  CS_UNUSED(qtype);
520 
521  if (eval == NULL)
522  bft_error(__FILE__, __LINE__, 0,
523  " %s: Array storing the evaluation should be allocated before"
524  " the call to this function.", __func__);
525 
526  const cs_xdef_array_context_t *array_input
527  = (const cs_xdef_array_context_t *)input;
528 
529  assert(input != NULL);
530  assert(cs_flag_test(array_input->loc, cs_flag_primal_face));
531 
532  memcpy(eval, array_input->values + 3*cm->f_ids[f], 3*sizeof(cs_real_t));
533 }
534 
535 /*----------------------------------------------------------------------------*/
548 /*----------------------------------------------------------------------------*/
549 
550 static inline void
551 cs_xdef_cw_eval_tensor_face_avg_by_value(const cs_cell_mesh_t *cm,
552  short int f,
553  cs_real_t t_eval,
554  void *input,
555  cs_quadrature_type_t qtype,
556  cs_real_t *eval)
557 {
558  CS_UNUSED(cm);
559  CS_UNUSED(f);
560  CS_UNUSED(t_eval);
561  CS_UNUSED(qtype);
562 
563  assert(input != NULL);
564  if (eval == NULL)
565  bft_error(__FILE__, __LINE__, 0,
566  " %s: Array storing the evaluation should be allocated before"
567  " the call to this function.", __func__);
568 
569  const cs_real_3_t *constant_val = (const cs_real_3_t *)input;
570  for (int ki = 0; ki < 3; ki++)
571  for (int kj = 0; kj < 3; kj++)
572  eval[3*ki+kj] = constant_val[ki][kj];
573 }
574 
575 /*----------------------------------------------------------------------------*/
588 /*----------------------------------------------------------------------------*/
589 
590 static inline void
591 cs_xdef_cw_eval_tensor_face_avg_by_array(const cs_cell_mesh_t *cm,
592  short int f,
593  cs_real_t t_eval,
594  void *input,
595  cs_quadrature_type_t qtype,
596  cs_real_t *eval)
597 {
598  CS_UNUSED(t_eval);
599  CS_UNUSED(qtype);
600 
601  if (eval == NULL)
602  bft_error(__FILE__, __LINE__, 0,
603  " %s: Array storing the evaluation should be allocated before"
604  " the call to this function.", __func__);
605 
606  const cs_xdef_array_context_t *array_input
607  = (const cs_xdef_array_context_t *)input;
608 
609  assert(input != NULL);
610  assert(cs_flag_test(array_input->loc, cs_flag_primal_face));
611 
612  memcpy(eval, array_input->values + 9*cm->f_ids[f], 9*sizeof(cs_real_t));
613 }
614 
615 /*============================================================================
616  * Public function prototypes
617  *============================================================================*/
618 
619 /*----------------------------------------------------------------------------*/
631 /*----------------------------------------------------------------------------*/
632 
633 void
635  double t_eval,
636  short int f,
637  cs_analytic_func_t *ana,
638  void *input,
640  cs_real_t *eval);
641 
642 /*----------------------------------------------------------------------------*/
653 /*----------------------------------------------------------------------------*/
654 
655 void
657  double t_eval,
658  cs_analytic_func_t *ana,
659  void *input,
661  cs_real_t *eval);
662 
663 /*----------------------------------------------------------------------------*/
677 /*----------------------------------------------------------------------------*/
678 
679 void
681  cs_real_t t_eval,
682  cs_analytic_func_t *ana,
683  void *input,
684  const short int dim,
687  cs_real_t *c_int,
688  cs_real_t *f_int);
689 
690 /*----------------------------------------------------------------------------*/
703 /*----------------------------------------------------------------------------*/
704 
705 void
707  short int f,
708  cs_real_t time_eval,
709  void *input,
710  cs_quadrature_type_t qtype,
711  cs_real_t *eval);
712 
713 /*----------------------------------------------------------------------------*/
726 /*----------------------------------------------------------------------------*/
727 
728 void
730  short int f,
731  cs_real_t t_eval,
732  void *context,
733  cs_quadrature_type_t qtype,
734  cs_real_t *eval);
735 
736 /*----------------------------------------------------------------------------*/
749 /*----------------------------------------------------------------------------*/
750 
751 void
753  short int f,
754  cs_real_t t_eval,
755  void *context,
756  cs_quadrature_type_t qtype,
757  cs_real_t *eval);
758 
759 /*----------------------------------------------------------------------------*/
772 /*----------------------------------------------------------------------------*/
773 
774 void
776  cs_real_t t_eval,
777  void *context,
778  cs_quadrature_type_t qtype,
779  cs_real_t *eval);
780 
781 /*----------------------------------------------------------------------------*/
795 /*----------------------------------------------------------------------------*/
796 
797 void
799  cs_real_t t_eval,
800  void *context,
801  cs_quadrature_type_t qtype,
802  cs_real_t *eval);
803 
804 /*----------------------------------------------------------------------------*/
818 /*----------------------------------------------------------------------------*/
819 
820 void
822  cs_real_t t_eval,
823  void *context,
824  cs_quadrature_type_t qtype,
825  cs_real_t *eval);
826 
827 /*----------------------------------------------------------------------------*/
837 /*----------------------------------------------------------------------------*/
838 
839 void
841  cs_real_t time_eval,
842  void *context,
843  cs_real_t *eval);
844 
845 /*----------------------------------------------------------------------------*/
855 /*----------------------------------------------------------------------------*/
856 
857 void
859  cs_real_t time_eval,
860  void *context,
861  cs_real_t *eval);
862 
863 /*----------------------------------------------------------------------------*/
874 /*----------------------------------------------------------------------------*/
875 
876 void
878  cs_real_t time_eval,
879  void *context,
880  cs_real_t *eval);
881 
882 /*----------------------------------------------------------------------------*/
892 /*----------------------------------------------------------------------------*/
893 
894 void
896  cs_real_t time_eval,
897  void *context,
898  cs_real_t *eval);
899 
900 /*----------------------------------------------------------------------------*/
913 /*----------------------------------------------------------------------------*/
914 
915 void
917  cs_lnum_t n_points,
918  const cs_real_t *xyz,
919  cs_real_t time_eval,
920  void *context,
921  cs_real_t *eval);
922 
923 /*----------------------------------------------------------------------------*/
937 /*----------------------------------------------------------------------------*/
938 
939 void
941  cs_lnum_t n_points,
942  const cs_real_t *xyz,
943  cs_real_t time_eval,
944  void *context,
945  cs_real_t *eval);
946 
947 /*----------------------------------------------------------------------------*/
961 /*----------------------------------------------------------------------------*/
962 
963 void
965  cs_lnum_t n_points,
966  const cs_real_t *xyz,
967  cs_real_t time_eval,
968  void *context,
969  cs_real_t *eval);
970 
971 /*----------------------------------------------------------------------------*/
984 /*----------------------------------------------------------------------------*/
985 
986 void
988  short int f,
989  cs_real_t time_eval,
990  void *context,
991  cs_real_t *eval);
992 
993 /*----------------------------------------------------------------------------*/
1007 /*----------------------------------------------------------------------------*/
1008 
1009 void
1011  short int f,
1012  cs_real_t time_eval,
1013  void *context,
1014  cs_quadrature_type_t qtype,
1015  cs_real_t *eval);
1016 
1017 /*----------------------------------------------------------------------------*/
1030 /*----------------------------------------------------------------------------*/
1031 
1032 void
1034  short int f,
1035  cs_real_t time_eval,
1036  void *context,
1037  cs_quadrature_type_t qtype,
1038  cs_real_t *eval);
1039 
1040 /*----------------------------------------------------------------------------*/
1054 /*----------------------------------------------------------------------------*/
1055 
1056 void
1058  short int f,
1059  cs_real_t time_eval,
1060  void *context,
1061  cs_quadrature_type_t qtype,
1062  cs_real_t *eval);
1063 
1064 /*----------------------------------------------------------------------------*/
1079 /*----------------------------------------------------------------------------*/
1080 
1081 void
1083  cs_real_t t_eval,
1084  void *context,
1085  cs_quadrature_type_t qtype,
1086  cs_real_t *eval);
1087 
1088 /*----------------------------------------------------------------------------*/
1103 /*----------------------------------------------------------------------------*/
1104 
1105 void
1107  cs_real_t t_eval,
1108  void *context,
1109  cs_quadrature_type_t qtype,
1110  cs_real_t *eval);
1111 
1112 /*----------------------------------------------------------------------------*/
1113 
1114 #undef _dp3
1115 
1117 
1118 #endif /* __CS_XDEF_CW_EVAL_H__ */
Definition: cs_field_pointer.h:70
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
cs_analytic_func_t * func
Definition: cs_xdef.h:256
void cs_xdef_cw_eval_flux_at_vtx_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 flux of a quantity defined by analytic function...
Definition: cs_xdef_cw_eval.c:1038
double center[3]
Definition: cs_cdo_quantities.h:125
cs_lnum_t * f_ids
Definition: cs_cdo_local.h:234
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
Definition: cs_flag.h:205
#define _dp3
Definition: cs_xdef_cw_eval.h:50
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:743
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:458
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:912
cs_real_t * values
Definition: cs_xdef.h:235
#define BEGIN_C_DECLS
Definition: cs_defs.h:510
#define CS_UNUSED(x)
Definition: cs_defs.h:496
double meas
Definition: cs_cdo_quantities.h:123
Set of local quantities and connectivities related to a mesh cell.
Definition: cs_cdo_local.h:202
void cs_xdef_cw_eval_tensor_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 flux of a quantity defined by analytic function...
Definition: cs_xdef_cw_eval.c:1521
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. Variation using a cs_cell_mesh_t structure.
Definition: cs_xdef_cw_eval.c:684
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:590
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 *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.c:372
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
double cs_real_t
Floating-point value.
Definition: cs_defs.h:322
Context structure when a definition by analytic function is used.
Definition: cs_xdef.h:246
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:831
cs_quadrature_type_t
Definition: cs_quadrature.h:52
const cs_flag_t cs_flag_primal_face
Definition: cs_flag.c:55
cs_flag_t loc
Definition: cs_xdef.h:234
cs_eflag_t flag
Definition: cs_cdo_local.h:204
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:100
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:545
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
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:159
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 defined using an analytic function by a cellwise process (usage of a cs_cell_mesh...
Definition: cs_xdef_cw_eval.c:656
void cs_xdef_cw_eval_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 flux of a quantity defined by analytic function...
Definition: cs_xdef_cw_eval.c:1344
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
void * input
Definition: cs_xdef.h:262
cs_quant_t * face
Definition: cs_cdo_local.h:238
cs_real_t cs_real_3_t[3]
vector of 3 floating-point values
Definition: cs_defs.h:335
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_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
Definition: cs_cdo_quantities.h:121
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:1759
int cs_lnum_t
local mesh entity id
Definition: cs_defs.h:316
double unitv[3]
Definition: cs_cdo_quantities.h:124
#define END_C_DECLS
Definition: cs_defs.h:511
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:502
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:796
Context structure when an array is used for the definition.
Definition: cs_xdef.h:207
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:631
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_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:1705
void cs_xdef_cw_eval_flux_at_vtx_by_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 of a quantity defined by values. The normal flux is t...
Definition: cs_xdef_cw_eval.c:977
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:103
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