![]() |
programmer's documentation
|
#include "cs_defs.h"
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <assert.h>
#include <float.h>
#include <bft_mem.h>
#include <bft_printf.h>
#include "cs_math.h"
#include "cs_mesh_location.h"
#include "cs_evaluate.h"
Functions | |
static double | _analytic_quad_tet1 (double tcur, const cs_real_3_t xv, const cs_real_3_t xe, const cs_real_3_t xf, const cs_real_3_t xc, cs_analytic_func_t *ana) |
Compute the integral over a tetrahedron of the barycentric subdiv. using a barycentric quadrature rule. More... | |
static double | _analytic_quad_tet4 (double tcur, const cs_real_3_t xv, const cs_real_3_t xe, const cs_real_3_t xf, const cs_real_3_t xc, cs_analytic_func_t *ana) |
Compute the integral over a tetrahedron of the barycentric subdiv. with a quadrature rule using 4 Gauss points and a unique weight. More... | |
static double | _analytic_quad_tet5 (double tcur, const cs_real_3_t xv, const cs_real_3_t xe, const cs_real_3_t xf, const cs_real_3_t xc, cs_analytic_func_t *ana) |
Compute the integral over a tetrahedron of the barycentric subdiv. with a quadrature rule using 5 Gauss points and 5 weights. More... | |
static void | _dcsd_by_analytic (cs_analytic_func_t *ana, const cs_lnum_t n_elts, const cs_lnum_t *elt_ids, cs_quadra_type_t quad_type, double values[]) |
Compute the integral over dual cells of a scalar density field defined by an analytical function on a selection of (primal) cells. More... | |
static void | _pcsd_by_analytic (cs_analytic_func_t *ana, const cs_lnum_t n_elts, const cs_lnum_t *elt_ids, cs_quadra_type_t quad_type, double values[]) |
Compute the integral over primal cells of a scalar density field defined by an analytical function on a selection of (primal) cells. More... | |
static void | _dcsd_by_value (const double const_val, const cs_lnum_t n_elts, const cs_lnum_t *elt_ids, double values[]) |
Compute the integral over a dual cell (or a portion) of a value defined on a selection of (primal) cells. More... | |
static void | _pcsd_by_value (const double const_val, const cs_lnum_t n_elts, const cs_lnum_t *elt_ids, double values[]) |
Compute the integral over a (primal) cell of a value related to scalar density field. More... | |
static void | _pfsp_by_analytic (cs_analytic_func_t *ana, const cs_lnum_t n_elts, const cs_lnum_t *elt_ids, double values[]) |
Get the values at each primal faces for a scalar potential defined by an analytical function on a selection of (primal) cells. More... | |
static void | _pvsp_by_analytic (cs_analytic_func_t *ana, const cs_lnum_t n_elts, const cs_lnum_t *elt_ids, double values[]) |
Get the values at each primal vertices for a scalar potential defined by an analytical function on a selection of (primal) cells. More... | |
static void | _pfsp_by_value (const double const_val, cs_lnum_t n_elts, const cs_lnum_t *elt_ids, double values[]) |
Get the values at each primal faces for a scalar potential. More... | |
static void | _pvsp_by_qov (const double quantity_val, cs_lnum_t n_elts, const cs_lnum_t *elt_ids, double values[]) |
Define a value to each DoF such that a given quantity is put inside the volume associated to the list of cells. More... | |
static void | _pvsp_by_value (const double const_val, cs_lnum_t n_elts, const cs_lnum_t *elt_ids, double values[]) |
Get the values at each primal vertices for a scalar potential. More... | |
void | cs_evaluate_set_shared_pointers (const cs_cdo_quantities_t *quant, const cs_cdo_connect_t *connect, const cs_time_step_t *time_step) |
Set shared pointers to main domain members. More... | |
void | cs_evaluate_density_from_analytic (cs_flag_t dof_flag, int ml_id, cs_analytic_func_t *ana, cs_quadra_type_t quad_type, double retval[]) |
Compute the value related to each DoF in the case of a density field The value defined by the analytic function is by unity of volume. More... | |
void | cs_evaluate_density_from_value (cs_flag_t dof_flag, int ml_id, cs_get_t get, double retval[]) |
Compute the value related to each DoF in the case of a density field Accessor to the value is by unit of volume. More... | |
void | cs_evaluate_potential_from_analytic (cs_flag_t dof_flag, int ml_id, cs_analytic_func_t *ana, double retval[]) |
Compute the contribution related to a quantity defined by analytic function for all the degrees of freedom. More... | |
void | cs_evaluate_potential_from_qov (cs_flag_t dof_flag, int ml_id, cs_get_t get, double retval[]) |
Define a value to each DoF in the case of a potential field in order to put a given quantity inside the volume associated to ml_id. More... | |
void | cs_evaluate_potential_from_value (cs_flag_t dof_flag, int ml_id, cs_get_t get, double retval[]) |
Store the value related to each DoF in the case of a potential field. More... | |
Variables | |
static const cs_cdo_quantities_t * | cs_cdo_quant |
static const cs_cdo_connect_t * | cs_cdo_connect |
static const cs_time_step_t * | cs_time_step |
static const char | _err_empty_array [] |
static const char | _err_not_handled [] = " This case is not handled yet." |
|
inlinestatic |
Compute the integral over a tetrahedron of the barycentric subdiv. using a barycentric quadrature rule.
[in] | tcur | current physical time of the simulation |
[in] | xv | first point of the tetrahedron |
[in] | xe | second point of the tetrahedron |
[in] | xf | third point of the tetrahedron |
[in] | xc | fourth point of the tetrahedron |
[in] | ana | pointer to the analytic function |
|
inlinestatic |
Compute the integral over a tetrahedron of the barycentric subdiv. with a quadrature rule using 4 Gauss points and a unique weight.
[in] | tcur | current physical time of the simulation |
[in] | xv | first point of the tetrahedron |
[in] | xe | second point of the tetrahedron |
[in] | xf | third point of the tetrahedron |
[in] | xc | fourth point of the tetrahedron |
[in] | ana | pointer to the analytic function |
|
inlinestatic |
Compute the integral over a tetrahedron of the barycentric subdiv. with a quadrature rule using 5 Gauss points and 5 weights.
[in] | tcur | current physical time of the simulation |
[in] | xv | first point of the tetrahedron |
[in] | xe | second point of the tetrahedron |
[in] | xf | third point of the tetrahedron |
[in] | xc | fourth point of the tetrahedron |
[in] | ana | pointer to the analytic function |
|
static |
Compute the integral over dual cells of a scalar density field defined by an analytical function on a selection of (primal) cells.
[in] | ana | pointer to the analytic function |
[in] | n_loc_elts | number of elements to consider |
[in] | elt_ids | pointer to the list od selected ids |
[in] | quad_type | type of quadrature to use |
[in,out] | values | pointer to the computed values |
|
static |
Compute the integral over a dual cell (or a portion) of a value defined on a selection of (primal) cells.
[in] | const_val | constant value |
[in] | n_loc_elts | number of elements to consider |
[in] | elt_ids | pointer to the list od selected ids |
[in,out] | values | pointer to the computed values |
|
static |
Compute the integral over primal cells of a scalar density field defined by an analytical function on a selection of (primal) cells.
[in] | ana | pointer to the analytic function |
[in] | n_loc_elts | number of elements to consider |
[in] | elt_ids | pointer to the list od selected ids |
[in] | quad_type | type of quadrature to use |
[in,out] | values | pointer to the computed values |
|
static |
Compute the integral over a (primal) cell of a value related to scalar density field.
[in] | const_val | constant value |
[in] | n_loc_elts | number of elements to consider |
[in] | elt_ids | pointer to the list od selected ids |
[in,out] | values | pointer to the computed values |
|
static |
Get the values at each primal faces for a scalar potential defined by an analytical function on a selection of (primal) cells.
[in] | ana | pointer to the analytic function |
[in] | n_loc_elts | number of elements to consider |
[in] | elt_ids | pointer to the list od selected ids |
[in,out] | values | pointer to the computed values |
|
static |
Get the values at each primal faces for a scalar potential.
[in] | const_val | constant value |
[in] | n_loc_elts | number of elements to consider |
[in] | elt_ids | pointer to the list od selected ids |
[in,out] | values | pointer to the array storing the values |
|
static |
Get the values at each primal vertices for a scalar potential defined by an analytical function on a selection of (primal) cells.
[in] | ana | pointer to the analytic function |
[in] | n_loc_elts | number of elements to consider |
[in] | elt_ids | pointer to the list od selected ids |
[in,out] | values | pointer to the computed values |
|
static |
Define a value to each DoF such that a given quantity is put inside the volume associated to the list of cells.
[in] | quantity_val | amount of quantity to distribute |
[in] | n_loc_elts | number of elements to consider |
[in] | elt_ids | pointer to the list od selected ids |
[in,out] | values | pointer to the array storing the values |
|
static |
Get the values at each primal vertices for a scalar potential.
[in] | const_val | constant value |
[in] | n_loc_elts | number of elements to consider |
[in] | elt_ids | pointer to the list od selected ids |
[in,out] | values | pointer to the array storing the values |
void cs_evaluate_density_from_analytic | ( | cs_flag_t | dof_flag, |
int | ml_id, | ||
cs_analytic_func_t * | ana, | ||
cs_quadra_type_t | quad_type, | ||
double | retval[] | ||
) |
Compute the value related to each DoF in the case of a density field The value defined by the analytic function is by unity of volume.
[in] | dof_flag | indicate where the evaluation has to be done |
[in] | ml_id | id related to a cs_mesh_location_t structure |
[in] | ana | accessor to values thanks to a function pointer |
[in] | quad_type | type of quadrature (not always used) |
[in,out] | retval | pointer to the computed values |
void cs_evaluate_density_from_value | ( | cs_flag_t | dof_flag, |
int | ml_id, | ||
cs_get_t | get, | ||
double | retval[] | ||
) |
Compute the value related to each DoF in the case of a density field Accessor to the value is by unit of volume.
[in] | dof_flag | indicate where the evaluation has to be done |
[in] | ml_id | id related to a cs_mesh_location_t structure |
[in] | get | accessor to the constant value to set |
[in,out] | retval | pointer to the computed values |
void cs_evaluate_potential_from_analytic | ( | cs_flag_t | dof_flag, |
int | ml_id, | ||
cs_analytic_func_t * | ana, | ||
double | retval[] | ||
) |
Compute the contribution related to a quantity defined by analytic function for all the degrees of freedom.
[in] | dof_flag | indicate where the evaluation has to be done |
[in] | ml_id | id related to a cs_mesh_location_t structure |
[in] | ana | accessor to values thanks to a function pointer |
[in,out] | retval | pointer to the computed values |
void cs_evaluate_potential_from_qov | ( | cs_flag_t | dof_flag, |
int | ml_id, | ||
cs_get_t | get, | ||
double | retval[] | ||
) |
Define a value to each DoF in the case of a potential field in order to put a given quantity inside the volume associated to ml_id.
[in] | dof_flag | indicate where the evaluation has to be done |
[in] | ml_id | id related to a cs_mesh_location_t structure |
[in] | get | accessor to the constant value related to the quantity to put in the volume spanned by ml_id |
[in,out] | retval | pointer to the computed values |
void cs_evaluate_potential_from_value | ( | cs_flag_t | dof_flag, |
int | ml_id, | ||
cs_get_t | get, | ||
double | retval[] | ||
) |
Store the value related to each DoF in the case of a potential field.
[in] | dof_flag | indicate where the evaluation has to be done |
[in] | ml_id | id related to a cs_mesh_location_t structure |
[in] | get | accessor to the constant value to set |
[in,out] | retval | pointer to the computed values |
void cs_evaluate_set_shared_pointers | ( | const cs_cdo_quantities_t * | quant, |
const cs_cdo_connect_t * | connect, | ||
const cs_time_step_t * | time_step | ||
) |
Set shared pointers to main domain members.
[in] | quant | additional mesh quantities struct. |
[in] | connect | pointer to a cs_cdo_connect_t struct. |
[in] | time_step | pointer to a time step structure |
|
static |
|
static |
|
static |
|
static |
|
static |