1 #ifndef __CS_XDEF_CW_EVAL_H__ 2 #define __CS_XDEF_CW_EVAL_H__ 50 #define _dp3 cs_math_3_dot_product 167 *eval = constant_val[0];
192 eval[0] = constant_val[0];
193 eval[1] = constant_val[1];
194 eval[2] = constant_val[2];
219 for (
int k = 0;
k < 6;
k++)
220 eval[
k] = constant_val[
k];
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];
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];
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;
365 cs_xdef_cw_eval_scalar_face_avg_by_value(
const cs_cell_mesh_t *cm,
379 " %s: Array storing the evaluation should be allocated before" 380 " the call to this function.", __func__);
381 assert(input != NULL);
402 cs_xdef_cw_eval_scalar_face_avg_by_array(
const cs_cell_mesh_t *cm,
414 " %s: Array storing the evaluation should be allocated before" 415 " the call to this function.", __func__);
420 assert(input != NULL);
473 cs_xdef_cw_eval_vector_face_avg_by_value(
const cs_cell_mesh_t *cm,
487 " %s: Array storing the evaluation should be allocated before" 488 " the call to this function.", __func__);
490 assert(input != NULL);
511 cs_xdef_cw_eval_vector_face_avg_by_array(
const cs_cell_mesh_t *cm,
523 " %s: Array storing the evaluation should be allocated before" 524 " the call to this function.", __func__);
529 assert(input != NULL);
551 cs_xdef_cw_eval_tensor_face_avg_by_value(
const cs_cell_mesh_t *cm,
563 assert(input != NULL);
566 " %s: Array storing the evaluation should be allocated before" 567 " the call to this function.", __func__);
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];
591 cs_xdef_cw_eval_tensor_face_avg_by_array(
const cs_cell_mesh_t *cm,
603 " %s: Array storing the evaluation should be allocated before" 604 " the call to this function.", __func__);
609 assert(input != NULL);
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