|
programmer's documentation
|
Build discrete advection operators for CDO vertex-based schemes. More...
#include "cs_defs.h"#include <stdio.h>#include <stdlib.h>#include <math.h>#include <float.h>#include <limits.h>#include <assert.h>#include <bft_mem.h>#include <bft_printf.h>#include "cs_cdo_scheme_geometry.h"#include "cs_math.h"#include "cs_cdo_advection.h"
Functions | |
| static double | _upwind_weight (double criterion, const cs_param_advection_t adv_info) |
| Compute the value of the weighting function related to upwinding. More... | |
| static short int | _set_fquant (const cs_cell_mesh_t *cm, short int e, short int f, const double *tef, double *wvf) |
| Retrieve the face edge id from a given cell edge id. Compute the weights related to each vertex of face from pre-computed quantities. More... | |
| static void | _build_local_epcd (const cs_cell_mesh_t *cm, const cs_param_advection_t a_info, cs_cdo_adv_t *b) |
| Define the local convection operator between primal edges and dual cells. (Non-conservative formulation) More... | |
| static void | _build_local_vpfd (const cs_cell_mesh_t *cm, const cs_param_advection_t a_info, cs_cdo_adv_t *b) |
| Define the local convection operator between primal vertices and dual faces. (Conservative formulation) More... | |
| static void | _vcb_cellwise_consistent_part (const cs_nvec3_t adv_cell, const cs_cell_mesh_t *cm, const cs_face_mesh_t *fm, cs_cdo_adv_t *b) |
| Compute the consistent part of the convection operator attached to a cell with a CDO vertex+cell-based scheme when the advection is considered as constant inside a cell. More... | |
| static void | _vcb_consistent_part (const cs_adv_field_t *adv_field, const cs_nvec3_t adv_cell, const cs_cell_mesh_t *cm, const cs_face_mesh_t *fm, cs_cdo_adv_t *b) |
| Compute the consistent part of the convection operator attached to a cell with a CDO vertex+cell-based scheme when the advection field is not considered constant inside the current cell. More... | |
| static void | _vcb_stabilization_part1 (const cs_cell_mesh_t *cm, const cs_face_mesh_t *fm, const double stab_coef, cs_cdo_adv_t *b) |
| Compute the stabilization part of the convection operator attached to a cell with a CDO vertex+cell-based scheme (inside pfc) More... | |
| static void | _vcb_stabilization_part2 (const cs_cell_mesh_t *cm, const double stab_coef, cs_cdo_adv_t *b) |
| Compute the stabilization part of the convection operator attached to a cell with a CDO vertex+cell-based scheme (between pfc) More... | |
| void | cs_cdo_advection_set_cip_coef (double new_value) |
| Set the value of the stabilization coefficient used in CIP scheme. More... | |
| double | cs_cdo_advection_get_cip_coef (void) |
| Get the value of the stabilization coefficient used in CIP scheme. More... | |
| cs_cdo_adv_t * | cs_cdo_advection_builder_init (const cs_cdo_connect_t *connect, const cs_equation_param_t *eqp, bool do_diffusion) |
| Initialize a builder structure for the convection operator. More... | |
| cs_cdo_adv_t * | cs_cdo_advection_builder_free (cs_cdo_adv_t *b) |
| Destroy a builder structure for the convection operator. More... | |
| cs_locmat_t * | cs_cdovb_advection_build (const cs_cell_mesh_t *cm, const cs_equation_param_t *eqp, const cs_real_33_t diffmat, cs_cdo_adv_t *b) |
| Compute the convection operator attached to a cell with a CDO vertex-based scheme. More... | |
| cs_locmat_t * | cs_cdovcb_advection_build (const cs_cell_mesh_t *cm, const cs_equation_param_t *eqp, cs_cdo_adv_t *b) |
| Compute the convection operator attached to a cell with a CDO vertex+cell-based scheme. More... | |
| void | cs_cdovb_advection_add_bc (const cs_cell_mesh_t *cm, const cs_equation_param_t *eqp, cs_cdo_adv_t *b, cs_cdo_locsys_t *ls) |
| Compute the BC contribution for the convection operator. More... | |
| void | cs_cdovcb_advection_add_bc (const cs_cell_mesh_t *cm, const cs_equation_param_t *eqp, cs_cdo_adv_t *b, cs_cdo_locsys_t *ls) |
| Compute the BC contribution for the convection operator with CDO V+C schemes. More... | |
| void | cs_cdo_advection_get_upwind_coef_cell (const cs_cdo_quantities_t *cdoq, const cs_param_advection_t a_info, cs_real_t coefval[]) |
| Compute the value in each cell of the upwinding coefficient given a related Peclet number. More... | |
Build discrete advection operators for CDO vertex-based schemes.
|
static |
Define the local convection operator between primal edges and dual cells. (Non-conservative formulation)
| [in] | cm | pointer to a cs_cell_mesh_t structure |
| [in] | a_info | set of parameters related to the advection operator |
| [in,out] | b | pointer to a cs_cdo_adv_t structure |
|
static |
Define the local convection operator between primal vertices and dual faces. (Conservative formulation)
| [in] | cm | pointer to a cs_cell_mesh_t structure |
| [in] | a_info | set of parameters related to the advection operator |
| [in,out] | b | pointer to a cs_cdo_adv_t structure |
|
inlinestatic |
Retrieve the face edge id from a given cell edge id. Compute the weights related to each vertex of face from pre-computed quantities.
| [in] | cm | pointer to a cs_cell_mesh_t structure |
| [in] | e | edge id in the cell numbering |
| [in] | f | face id in the cell numbering |
| [in] | tef | value of the area of the triangles tef |
| [in,out] | wvf | weights of vertices for the current face |
|
inlinestatic |
Compute the value of the weighting function related to upwinding.
(end ignore by Doxygen)
| [in] | criterion | dot product between advection and normal vectors or estimation of a local Peclet number |
| [in] | adv_info | set of options for the computation |
|
static |
Compute the consistent part of the convection operator attached to a cell with a CDO vertex+cell-based scheme when the advection is considered as constant inside a cell.
| [in] | adv_cell | constant vector field inside the current cell |
| [in] | cm | pointer to a cs_cell_mesh_t structure |
| [in] | fm | pointer to a cs_face_mesh_t structure |
| [in,out] | b | pointer to a convection builder structure |
|
static |
Compute the consistent part of the convection operator attached to a cell with a CDO vertex+cell-based scheme when the advection field is not considered constant inside the current cell.
| [in] | adv_field | pointer to a cs_adv_field_t structure |
| [in] | adv_cell | constant vector field inside the current cell |
| [in] | cm | pointer to a cs_cell_mesh_t structure |
| [in] | fm | pointer to a cs_face_mesh_t structure |
| [in,out] | b | pointer to a convection builder structure |
|
static |
Compute the stabilization part of the convection operator attached to a cell with a CDO vertex+cell-based scheme (inside pfc)
| [in] | cm | pointer to a cs_cell_mesh_t structure |
| [in] | fm | pointer to a cs_face_mesh_t structure |
| [in] | stab_coef | default value of the stabilization coefficient |
| [in,out] | b | pointer to a convection builder structure |
|
static |
Compute the stabilization part of the convection operator attached to a cell with a CDO vertex+cell-based scheme (between pfc)
| [in] | cm | pointer to a cs_cell_mesh_t structure |
| [in] | stab_coef | value of the stabilization coefficient |
| [in,out] | b | pointer to a convection builder structure |
| cs_cdo_adv_t* cs_cdo_advection_builder_free | ( | cs_cdo_adv_t * | b | ) |
Destroy a builder structure for the convection operator.
| [in,out] | b | pointer to a cs_cdo_adv_t struct. to free |
| cs_cdo_adv_t* cs_cdo_advection_builder_init | ( | const cs_cdo_connect_t * | connect, |
| const cs_equation_param_t * | eqp, | ||
| bool | do_diffusion | ||
| ) |
Initialize a builder structure for the convection operator.
| [in] | connect | pointer to the connectivity structure |
| [in] | eqp | pointer to a cs_equation_param_t structure |
| [in] | do_diffusion | true is diffusion is activated |
| double cs_cdo_advection_get_cip_coef | ( | void | ) |
Get the value of the stabilization coefficient used in CIP scheme.
| void cs_cdo_advection_get_upwind_coef_cell | ( | const cs_cdo_quantities_t * | cdoq, |
| const cs_param_advection_t | a_info, | ||
| cs_real_t | coefval[] | ||
| ) |
Compute the value in each cell of the upwinding coefficient given a related Peclet number.
| [in] | cdoq | pointer to the cdo quantities structure |
| [in] | a_info | set of options for the advection term |
| [in,out] | coefval | pointer to the pointer of real numbers to fill in: Peclet number in each cell out: value of the upwind coefficient |
| void cs_cdo_advection_set_cip_coef | ( | double | new_value | ) |
Set the value of the stabilization coefficient used in CIP scheme.
| [in] | new_value | value of the stabilization coefficient |
| void cs_cdovb_advection_add_bc | ( | const cs_cell_mesh_t * | cm, |
| const cs_equation_param_t * | eqp, | ||
| cs_cdo_adv_t * | b, | ||
| cs_cdo_locsys_t * | ls | ||
| ) |
Compute the BC contribution for the convection operator.
| [in] | cm | pointer to a cs_cell_mesh_t structure |
| [in] | eqp | pointer to a cs_equation_param_t structure |
| [in,out] | b | pointer to a convection builder structure |
| [in,out] | ls | cell-wise structure sotring the local system |
| cs_locmat_t* cs_cdovb_advection_build | ( | const cs_cell_mesh_t * | cm, |
| const cs_equation_param_t * | eqp, | ||
| const cs_real_33_t | diffmat, | ||
| cs_cdo_adv_t * | b | ||
| ) |
Compute the convection operator attached to a cell with a CDO vertex-based scheme.
| [in] | cm | pointer to a cs_cell_mesh_t structure |
| [in] | eqp | pointer to a cs_equation_param_t structure |
| [in] | diffmat | tensor related to the diffusion property |
| [in,out] | b | pointer to a convection builder structure |
| void cs_cdovcb_advection_add_bc | ( | const cs_cell_mesh_t * | cm, |
| const cs_equation_param_t * | eqp, | ||
| cs_cdo_adv_t * | b, | ||
| cs_cdo_locsys_t * | ls | ||
| ) |
Compute the BC contribution for the convection operator with CDO V+C schemes.
| [in] | cm | pointer to a cs_cell_mesh_t structure |
| [in] | eqp | pointer to a cs_equation_param_t structure |
| [in,out] | b | pointer to a convection builder structure |
| [in,out] | ls | cell-wise structure sotring the local system |
| cs_locmat_t* cs_cdovcb_advection_build | ( | const cs_cell_mesh_t * | cm, |
| const cs_equation_param_t * | eqp, | ||
| cs_cdo_adv_t * | b | ||
| ) |
Compute the convection operator attached to a cell with a CDO vertex+cell-based scheme.
| [in] | cm | pointer to a cs_cell_mesh_t structure |
| [in] | eqp | pointer to a cs_equation_param_t structure |
| [in,out] | b | pointer to a convection builder structure |
1.8.13