My Project
programmer's 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-2019 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 /*----------------------------------------------------------------------------*/
206 /*----------------------------------------------------------------------------*/
207 
208 static inline void
210  cs_real_t time_eval,
211  void *input,
212  cs_real_t *eval)
213 {
214  CS_UNUSED(cm);
215  CS_UNUSED(time_eval);
216 
217  const cs_real_3_t *constant_val = (const cs_real_3_t *)input;
218  for (int ki = 0; ki < 3; ki++)
219  for (int kj = 0; kj < 3; kj++)
220  eval[3*ki+kj] = constant_val[ki][kj];
221 }
222 
223 /*----------------------------------------------------------------------------*/
236 /*----------------------------------------------------------------------------*/
237 
238 static inline void
240  cs_lnum_t n_points,
241  const cs_real_t *xyz,
242  cs_real_t time_eval,
243  void *input,
244  cs_real_t *eval)
245 {
246  CS_UNUSED(cm);
247  CS_UNUSED(xyz);
248  CS_UNUSED(time_eval);
249 
250  const cs_real_t *constant_val = (cs_real_t *)input;
251 
252  for (int i = 0; i < n_points; i++) {
253  eval[3*i ] = constant_val[0];
254  eval[3*i + 1] = constant_val[1];
255  eval[2*i + 2] = constant_val[2];
256  }
257 }
258 
259 
260 /*----------------------------------------------------------------------------*/
272 /*----------------------------------------------------------------------------*/
273 
274 static inline void
276  short int f,
277  cs_real_t time_eval,
278  void *input,
279  cs_real_t *eval)
280 {
281  CS_UNUSED(time_eval);
282 
283  /* Sanity check */
284  assert(cs_flag_test(cm->flag, CS_FLAG_COMP_PFQ));
285 
286  const cs_real_t *flux = (cs_real_t *)input;
287  const cs_quant_t fq = cm->face[f];
288 
289  eval[f] = fq.meas * _dp3(fq.unitv, flux);
290 }
291 
292 /*----------------------------------------------------------------------------*/
304 /*----------------------------------------------------------------------------*/
305 
306 static inline void
308  short int f,
309  cs_real_t time_eval,
310  void *input,
311  cs_real_t *eval)
312 {
313  CS_UNUSED(time_eval);
314 
315  cs_real_t *flux = (cs_real_t *)input;
316  const cs_quant_t fq = cm->face[f];
317 
318  cs_math_33_3_product((const cs_real_t (*)[3])flux, fq.unitv, eval);
319  for (int k = 0; k < 3; k++)
320  eval[3*f+k] *= fq.meas;
321 }
322 
323 /*----------------------------------------------------------------------------*/
336 /*----------------------------------------------------------------------------*/
337 
338 static inline void
340  short int f,
341  cs_real_t t_eval,
342  void *input,
343  cs_quadrature_type_t qtype,
344  cs_real_t *eval)
345 {
346  CS_UNUSED(cm);
347  CS_UNUSED(t_eval);
348  CS_UNUSED(f);
349  CS_UNUSED(qtype);
350 
351  if (eval == NULL)
352  bft_error(__FILE__, __LINE__, 0,
353  " %s: Array storing the evaluation should be allocated before"
354  " the call to this function.", __func__);
355  assert(input != NULL);
356 
357  eval[0] = ((const cs_real_t *)input)[0];
358 }
359 
360 /*----------------------------------------------------------------------------*/
373 /*----------------------------------------------------------------------------*/
374 
375 static inline void
377  short int f,
378  cs_real_t t_eval,
379  void *input,
380  cs_quadrature_type_t qtype,
381  cs_real_t *eval)
382 {
383  CS_UNUSED(t_eval);
384  CS_UNUSED(qtype);
385 
386  if (eval == NULL)
387  bft_error(__FILE__, __LINE__, 0,
388  " %s: Array storing the evaluation should be allocated before"
389  " the call to this function.", __func__);
390 
391  const cs_xdef_array_input_t *array_input
392  = (const cs_xdef_array_input_t *)input;
393 
394  assert(input != NULL);
395  assert(cs_flag_test(array_input->loc, cs_flag_primal_face));
396 
397  eval[0] = array_input->values[cm->f_ids[f]];
398 }
399 
400 /*----------------------------------------------------------------------------*/
415 /*----------------------------------------------------------------------------*/
416 
417 static inline void
419  short int f,
420  cs_real_t t_eval,
421  void *input,
422  cs_quadrature_type_t qtype,
423  cs_real_t *eval)
424 {
425  CS_UNUSED(qtype);
427 
428  anai->func(t_eval, 1, NULL, cm->face[f].center, false, anai->input, eval);
429 }
430 
431 /*----------------------------------------------------------------------------*/
444 /*----------------------------------------------------------------------------*/
445 
446 static inline void
448  short int f,
449  cs_real_t t_eval,
450  void *input,
451  cs_quadrature_type_t qtype,
452  cs_real_t *eval)
453 {
454  CS_UNUSED(cm);
455  CS_UNUSED(f);
456  CS_UNUSED(t_eval);
457  CS_UNUSED(qtype);
458 
459  if (eval == NULL)
460  bft_error(__FILE__, __LINE__, 0,
461  " %s: Array storing the evaluation should be allocated before"
462  " the call to this function.", __func__);
463 
464  assert(input != NULL);
465 
466  memcpy(eval, (const cs_real_t *)input, 3*sizeof(cs_real_t));
467 }
468 
469 /*----------------------------------------------------------------------------*/
482 /*----------------------------------------------------------------------------*/
483 
484 static inline void
486  short int f,
487  cs_real_t t_eval,
488  void *input,
489  cs_quadrature_type_t qtype,
490  cs_real_t *eval)
491 {
492  CS_UNUSED(t_eval);
493  CS_UNUSED(qtype);
494 
495  if (eval == NULL)
496  bft_error(__FILE__, __LINE__, 0,
497  " %s: Array storing the evaluation should be allocated before"
498  " the call to this function.", __func__);
499 
500  const cs_xdef_array_input_t *array_input
501  = (const cs_xdef_array_input_t *)input;
502 
503  assert(input != NULL);
504  assert(cs_flag_test(array_input->loc, cs_flag_primal_face));
505 
506  memcpy(eval, array_input->values + 3*cm->f_ids[f], 3*sizeof(cs_real_t));
507 }
508 
509 /*----------------------------------------------------------------------------*/
522 /*----------------------------------------------------------------------------*/
523 
524 static inline void
526  short int f,
527  cs_real_t t_eval,
528  void *input,
529  cs_quadrature_type_t qtype,
530  cs_real_t *eval)
531 {
532  CS_UNUSED(cm);
533  CS_UNUSED(f);
534  CS_UNUSED(t_eval);
535  CS_UNUSED(qtype);
536 
537  assert(input != NULL);
538  if (eval == NULL)
539  bft_error(__FILE__, __LINE__, 0,
540  " %s: Array storing the evaluation should be allocated before"
541  " the call to this function.", __func__);
542 
543  const cs_real_3_t *constant_val = (const cs_real_3_t *)input;
544  for (int ki = 0; ki < 3; ki++)
545  for (int kj = 0; kj < 3; kj++)
546  eval[3*ki+kj] = constant_val[ki][kj];
547 }
548 
549 /*----------------------------------------------------------------------------*/
562 /*----------------------------------------------------------------------------*/
563 
564 static inline void
566  short int f,
567  cs_real_t t_eval,
568  void *input,
569  cs_quadrature_type_t qtype,
570  cs_real_t *eval)
571 {
572  CS_UNUSED(t_eval);
573  CS_UNUSED(qtype);
574 
575  if (eval == NULL)
576  bft_error(__FILE__, __LINE__, 0,
577  " %s: Array storing the evaluation should be allocated before"
578  " the call to this function.", __func__);
579 
580  const cs_xdef_array_input_t *array_input
581  = (const cs_xdef_array_input_t *)input;
582 
583  assert(input != NULL);
584  assert(cs_flag_test(array_input->loc, cs_flag_primal_face));
585 
586  memcpy(eval, array_input->values + 9*cm->f_ids[f], 9*sizeof(cs_real_t));
587 }
588 
589 /*============================================================================
590  * Public function prototypes
591  *============================================================================*/
592 
593 /*----------------------------------------------------------------------------*/
604 /*----------------------------------------------------------------------------*/
605 
606 void
608  double t_eval,
609  short int f,
610  cs_analytic_func_t *ana,
611  void *input,
613  cs_real_t *eval);
614 
615 /*----------------------------------------------------------------------------*/
626 /*----------------------------------------------------------------------------*/
627 
628 void
630  double t_eval,
631  cs_analytic_func_t *ana,
632  void *input,
634  cs_real_t *eval);
635 
636 /*----------------------------------------------------------------------------*/
650 /*----------------------------------------------------------------------------*/
651 
652 void
654  cs_real_t t_eval,
655  cs_analytic_func_t *ana,
656  void *input,
657  const short int dim,
660  cs_real_t *c_int,
661  cs_real_t *f_int);
662 
663 /*----------------------------------------------------------------------------*/
676 /*----------------------------------------------------------------------------*/
677 
678 void
680  short int f,
681  cs_real_t time_eval,
682  void *input,
683  cs_quadrature_type_t qtype,
684  cs_real_t *eval);
685 
686 /*----------------------------------------------------------------------------*/
699 /*----------------------------------------------------------------------------*/
700 
701 void
703  short int f,
704  cs_real_t t_eval,
705  void *input,
706  cs_quadrature_type_t qtype,
707  cs_real_t *eval);
708 
709 /*----------------------------------------------------------------------------*/
722 /*----------------------------------------------------------------------------*/
723 
724 void
726  short int f,
727  cs_real_t t_eval,
728  void *input,
729  cs_quadrature_type_t qtype,
730  cs_real_t *eval);
731 
732 /*----------------------------------------------------------------------------*/
745 /*----------------------------------------------------------------------------*/
746 
747 void
749  cs_real_t t_eval,
750  void *input,
751  cs_quadrature_type_t qtype,
752  cs_real_t *eval);
753 
754 /*----------------------------------------------------------------------------*/
768 /*----------------------------------------------------------------------------*/
769 
770 void
772  cs_real_t t_eval,
773  void *input,
774  cs_quadrature_type_t qtype,
775  cs_real_t *eval);
776 
777 /*----------------------------------------------------------------------------*/
791 /*----------------------------------------------------------------------------*/
792 
793 void
795  cs_real_t t_eval,
796  void *input,
797  cs_quadrature_type_t qtype,
798  cs_real_t *eval);
799 
800 /*----------------------------------------------------------------------------*/
810 /*----------------------------------------------------------------------------*/
811 
812 void
814  cs_real_t time_eval,
815  void *input,
816  cs_real_t *eval);
817 
818 /*----------------------------------------------------------------------------*/
828 /*----------------------------------------------------------------------------*/
829 
830 void
832  cs_real_t time_eval,
833  void *input,
834  cs_real_t *eval);
835 
836 /*----------------------------------------------------------------------------*/
847 /*----------------------------------------------------------------------------*/
848 
849 void
851  cs_real_t time_eval,
852  void *input,
853  cs_real_t *eval);
854 
855 /*----------------------------------------------------------------------------*/
865 /*----------------------------------------------------------------------------*/
866 
867 void
869  cs_real_t time_eval,
870  void *input,
871  cs_real_t *eval);
872 
873 /*----------------------------------------------------------------------------*/
886 /*----------------------------------------------------------------------------*/
887 
888 void
890  cs_lnum_t n_points,
891  const cs_real_t *xyz,
892  cs_real_t time_eval,
893  void *input,
894  cs_real_t *eval);
895 
896 /*----------------------------------------------------------------------------*/
910 /*----------------------------------------------------------------------------*/
911 
912 void
914  cs_lnum_t n_points,
915  const cs_real_t *xyz,
916  cs_real_t time_eval,
917  void *input,
918  cs_real_t *eval);
919 
920 /*----------------------------------------------------------------------------*/
934 /*----------------------------------------------------------------------------*/
935 
936 void
938  cs_lnum_t n_points,
939  const cs_real_t *xyz,
940  cs_real_t time_eval,
941  void *input,
942  cs_real_t *eval);
943 
944 /*----------------------------------------------------------------------------*/
957 /*----------------------------------------------------------------------------*/
958 
959 void
961  short int f,
962  cs_real_t time_eval,
963  void *input,
964  cs_real_t *eval);
965 
966 /*----------------------------------------------------------------------------*/
980 /*----------------------------------------------------------------------------*/
981 
982 void
984  short int f,
985  cs_real_t time_eval,
986  void *input,
987  cs_quadrature_type_t qtype,
988  cs_real_t *eval);
989 
990 /*----------------------------------------------------------------------------*/
1003 /*----------------------------------------------------------------------------*/
1004 
1005 void
1007  short int f,
1008  cs_real_t time_eval,
1009  void *input,
1010  cs_quadrature_type_t qtype,
1011  cs_real_t *eval);
1012 
1013 /*----------------------------------------------------------------------------*/
1027 /*----------------------------------------------------------------------------*/
1028 
1029 void
1031  short int f,
1032  cs_real_t time_eval,
1033  void *input,
1034  cs_quadrature_type_t qtype,
1035  cs_real_t *eval);
1036 
1037 /*----------------------------------------------------------------------------*/
1052 /*----------------------------------------------------------------------------*/
1053 
1054 void
1056  cs_real_t t_eval,
1057  void *input,
1058  cs_quadrature_type_t qtype,
1059  cs_real_t *eval);
1060 
1061 /*----------------------------------------------------------------------------*/
1076 /*----------------------------------------------------------------------------*/
1077 
1078 void
1080  cs_real_t t_eval,
1081  void *input,
1082  cs_quadrature_type_t qtype,
1083  cs_real_t *eval);
1084 
1085 /*----------------------------------------------------------------------------*/
1086 
1087 #undef _dp3
1088 
1090 
1091 #endif /* __CS_XDEF_CW_EVAL_H__ */
cs_quadrature.h
input
static int input(void)
cs_cell_mesh_t::flag
cs_flag_t flag
Definition: cs_cdo_local.h:148
cs_xdef_cw_eval_face_t
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
cs_xdef_cw_eval_vector_at_xyz_by_array
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 *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.c:833
cs_xdef_cw_eval_flux_at_vtx_by_analytic
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 *input, 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:1048
cs_xdef_cw_eval_vector_at_xyz_by_val
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:239
cs_xdef_cw_eval_vector_by_val
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
cs_xdef_cw_eval_tensor_avg_by_analytic
void cs_xdef_cw_eval_tensor_avg_by_analytic(const cs_cell_mesh_t *cm, cs_real_t t_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.c:590
cs_xdef_analytic_input_t::func
cs_analytic_func_t * func
Definition: cs_xdef.h:223
cs_xdef_cw_eval_fc_int_by_analytic
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
cs_xdef_cw_eval_tensor_face_avg_by_array
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:565
cs_real_3_t
cs_real_t cs_real_3_t[3]
vector of 3 floating-point values
Definition: cs_defs.h:315
cs_xdef_cw_eval_vect_avg_reduction_by_analytic
void cs_xdef_cw_eval_vect_avg_reduction_by_analytic(const cs_cell_mesh_t *cm, cs_real_t t_eval, void *input, 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:1764
cs_xdef_cw_eval_tensor_by_val
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:209
cs_quant_t::center
double center[3]
Definition: cs_cdo_quantities.h:90
cs_xdef_analytic_input_t
Input structure when an analytic function is used for the definition.
Definition: cs_xdef.h:212
cs_xdef_cw_eval_scalar_face_avg_by_array
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:376
END_C_DECLS
#define END_C_DECLS
Definition: cs_defs.h:468
cs_xdef_cw_eval_xyz_t
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
cs_xdef_cw_eval_by_field
void cs_xdef_cw_eval_by_field(const cs_cell_mesh_t *cm, cs_real_t time_eval, void *input, 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:744
cs_xdef_cw_eval_flux_by_val
static void cs_xdef_cw_eval_flux_by_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:275
cs_xdef_cw_eval_tensor_flux_by_analytic
void cs_xdef_cw_eval_tensor_flux_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 normal flux of a quantity defined by analytic function....
Definition: cs_xdef_cw_eval.c:1530
cs_quant_t::meas
double meas
Definition: cs_cdo_quantities.h:88
cs_xdef_cw_eval_scalar_avg_by_analytic
void cs_xdef_cw_eval_scalar_avg_by_analytic(const cs_cell_mesh_t *cm, cs_real_t t_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.c:502
cs_xdef_cw_eval_t
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
cs_real_t
double cs_real_t
Floating-point value.
Definition: cs_defs.h:302
cs_xdef_cw_eval_tensor_face_avg_by_analytic
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 *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.c:458
cs_xdef_cw_eval_vector_face_avg_by_analytic
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 *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.c:414
cs_flag_primal_face
const cs_flag_t cs_flag_primal_face
Definition: cs_flag.c:54
cs_xdef_cw_eval_int_t
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
BEGIN_C_DECLS
#define BEGIN_C_DECLS
Definition: cs_defs.h:467
cs_xdef_analytic_input_t::input
void * input
Definition: cs_xdef.h:218
cs_xdef_cw_eval_tensor_flux_by_val
static void cs_xdef_cw_eval_tensor_flux_by_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:307
cs_xdef_cw_eval_vector_face_avg_by_value
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:447
cs_cdo_quantities.h
cs_xdef_cw_eval_flux_by_analytic
void cs_xdef_cw_eval_flux_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 normal flux of a quantity defined by analytic function....
Definition: cs_xdef_cw_eval.c:1354
cs_xdef_cw_eval_f_int_by_analytic
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
cs_xdef_cw_eval_tensor_face_avg_by_value
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:525
bft_error
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
cs_mesh.h
cs_xdef_cw_eval_at_xyz_by_analytic
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 *input, 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:797
cs_xdef.h
cs_xdef_array_input_t::loc
cs_flag_t loc
Definition: cs_xdef.h:200
cs_xdef_cw_eval_by_analytic
void cs_xdef_cw_eval_by_analytic(const cs_cell_mesh_t *cm, cs_real_t time_eval, void *input, 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
cs_xdef_cw_eval_scal_avg_reduction_by_analytic
void cs_xdef_cw_eval_scal_avg_reduction_by_analytic(const cs_cell_mesh_t *cm, cs_real_t t_eval, void *input, 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:1710
cs_quadrature_tria_integral_t
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:168
cs_quant_t::unitv
double unitv[3]
Definition: cs_cdo_quantities.h:89
cs_quadrature_tetra_integral_t
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:195
cs_xdef_cw_eval_face_drhm_by_analytic
static void cs_xdef_cw_eval_face_drhm_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:418
_dp3
#define _dp3
Definition: cs_xdef_cw_eval.h:50
cs_lnum_t
int cs_lnum_t
local mesh entity id
Definition: cs_defs.h:298
cs_analytic_func_t
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 compact, void *input, cs_real_t *retval)
Generic function pointer for an analytic function elt_ids is optional. If not NULL,...
Definition: cs_param.h:66
cs_xdef_cw_eval_by_time_func
void cs_xdef_cw_eval_by_time_func(const cs_cell_mesh_t *cm, cs_real_t time_eval, void *input, cs_real_t *eval)
Evaluate a quantity by a cellwise process using a definition by time function.
Definition: cs_xdef_cw_eval.c:631
cs_xdef_cw_eval_scalar_by_val
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
cs_cdo_connect.h
cs_xdef_cw_eval_vector_at_xyz_by_field
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 *input, 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:918
cs_cell_mesh_t::face
cs_quant_t * face
Definition: cs_cdo_local.h:182
CS_UNUSED
#define CS_UNUSED(x)
Definition: cs_defs.h:453
cs_xdef_cw_eval_vector_face_avg_by_array
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:485
cs_xdef_cw_eval_flux_at_vtx_by_val
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 *input, 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:987
cs_xdef_cw_eval_scalar_face_avg_by_analytic
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
cs_xdef_array_input_t::values
cs_real_t * values
Definition: cs_xdef.h:201
cs_math_33_3_product
static void cs_math_33_3_product(const cs_real_t m[3][3], const cs_real_t v[3], cs_real_3_t mv)
Compute the product of a matrix of 3x3 real values by a vector of 3 real values.
Definition: cs_math.h:497
cs_xdef_cw_eval_by_array
void cs_xdef_cw_eval_by_array(const cs_cell_mesh_t *cm, cs_real_t time_eval, void *input, 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:685
cs_flag_test
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:188
cs_quant_t
Definition: cs_cdo_quantities.h:86
cs_cell_mesh_t::f_ids
cs_lnum_t * f_ids
Definition: cs_cdo_local.h:177
cs_xdef_cw_eval_c_int_by_analytic
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
cs_xdef_cw_eval_vector_avg_by_analytic
void cs_xdef_cw_eval_vector_avg_by_analytic(const cs_cell_mesh_t *cm, cs_real_t t_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.c:545
cs_quadrature_type_t
cs_quadrature_type_t
Definition: cs_quadrature.h:51
cs_cell_mesh_t
Set of local quantities and connectivities related to a mesh cell This is a key structure for all cel...
Definition: cs_cdo_local.h:146
cs_xdef_array_input_t
Input structure when an array is used for the definition.
Definition: cs_xdef.h:178
CS_FLAG_COMP_PFQ
#define CS_FLAG_COMP_PFQ
Definition: cs_flag.h:137
k
Definition: cs_field_pointer.h:70
cs_cdo_local.h
cs_xdef_cw_eval_scalar_face_avg_by_value
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:339