|
My Project
programmer's documentation
|
Go to the documentation of this file. 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];
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];
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];
319 for (
int k = 0;
k < 3;
k++)
320 eval[3*f+
k] *= fq.
meas;
353 " %s: Array storing the evaluation should be allocated before"
354 " the call to this function.", __func__);
355 assert(
input != NULL);
388 " %s: Array storing the evaluation should be allocated before"
389 " the call to this function.", __func__);
394 assert(
input != NULL);
461 " %s: Array storing the evaluation should be allocated before"
462 " the call to this function.", __func__);
464 assert(
input != NULL);
497 " %s: Array storing the evaluation should be allocated before"
498 " the call to this function.", __func__);
503 assert(
input != NULL);
537 assert(
input != NULL);
540 " %s: Array storing the evaluation should be allocated before"
541 " the call to this function.", __func__);
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];
577 " %s: Array storing the evaluation should be allocated before"
578 " the call to this function.", __func__);
583 assert(
input != NULL);
cs_flag_t flag
Definition: cs_cdo_local.h:148
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
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
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
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
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_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
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_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_t cs_real_3_t[3]
vector of 3 floating-point values
Definition: cs_defs.h:315
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
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
double center[3]
Definition: cs_cdo_quantities.h:90
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
#define END_C_DECLS
Definition: cs_defs.h:468
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_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
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
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
double meas
Definition: cs_cdo_quantities.h:88
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
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
double cs_real_t
Floating-point value.
Definition: cs_defs.h:302
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
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
const cs_flag_t cs_flag_primal_face
Definition: cs_flag.c:54
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
#define BEGIN_C_DECLS
Definition: cs_defs.h:467
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
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
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
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
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
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
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
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
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
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
double unitv[3]
Definition: cs_cdo_quantities.h:89
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
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
#define _dp3
Definition: cs_xdef_cw_eval.h:50
int cs_lnum_t
local mesh entity id
Definition: cs_defs.h:298
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
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
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_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_quant_t * face
Definition: cs_cdo_local.h:182
#define CS_UNUSED(x)
Definition: cs_defs.h:453
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
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
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
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
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
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
Definition: cs_cdo_quantities.h:86
cs_lnum_t * f_ids
Definition: cs_cdo_local.h:177
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_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
Definition: cs_quadrature.h:51
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
#define CS_FLAG_COMP_PFQ
Definition: cs_flag.h:137
Definition: cs_field_pointer.h:70
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