|
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_evaluate.h"#include "cs_cdovb_advection.h"
Functions | |
| static cs_real_t | _upwind_weight (cs_real_t criterion, const cs_param_advection_t adv_info) |
| Compute the value of the weighting function related to upwinding. More... | |
| static void | _init_with_diffusion (cs_lnum_t c_id, const cs_cdo_connect_t *connect, const cs_cdo_quantities_t *quant, const cs_real_33_t matpty, cs_cdovb_adv_t *b) |
| Initialize the builder structure and the local matrix related to the convection operator when diffusion is also activated. More... | |
| static void | _init (cs_lnum_t c_id, const cs_cdo_connect_t *connect, const cs_cdo_quantities_t *quant, cs_cdovb_adv_t *b) |
| Initialize the builder structure and the local matrix related to the convection operator. More... | |
| static void | _build_local_epcd (cs_lnum_t c_id, const cs_connect_index_t *c2e, const cs_sla_matrix_t *e2v, const cs_lnum_t *loc_ids, cs_cdovb_adv_t *builder) |
| Define the local EpCd convection operator. More... | |
| static void | _build_local_vpfd (cs_lnum_t c_id, const cs_connect_index_t *c2e, const cs_sla_matrix_t *e2v, const cs_lnum_t *loc_ids, cs_cdovb_adv_t *builder) |
| Define the local VpCd convection operator. More... | |
| cs_cdovb_adv_t * | cs_cdovb_advection_builder_init (const cs_cdo_connect_t *connect, const cs_adv_field_t *adv, const cs_param_advection_t a_info, bool do_diffusion) |
| Initialize a builder structure for the convection operator. More... | |
| cs_cdovb_adv_t * | cs_cdovb_advection_builder_free (cs_cdovb_adv_t *b) |
| Destroy a builder structure for the convection operator. More... | |
| cs_locmat_t * | cs_cdovb_advection_build_local (cs_lnum_t c_id, const cs_cdo_connect_t *connect, const cs_cdo_quantities_t *quant, const cs_lnum_t *loc_ids, const cs_real_33_t diffmat, cs_cdovb_adv_t *builder) |
| Compute the convection operator for pure convection. More... | |
| void | cs_cdovb_advection_add_bc (const cs_cdo_connect_t *connect, const cs_cdo_quantities_t *quant, const cs_real_t *dir_vals, cs_cdovb_adv_t *builder, cs_real_t rhs_contrib[], cs_real_t diag_contrib[]) |
| Compute the convection operator for pure convection. More... | |
| void | cs_cdovb_advection_get_peclet_cell (const cs_cdo_quantities_t *cdoq, const cs_adv_field_t *adv, const cs_property_t *diff_property, const cs_real_3_t dir_vect, cs_real_t *p_peclet[]) |
| Compute the Peclet number in each cell in a given direction. More... | |
| void | cs_cdovb_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 EpCd convection operator.
| [in] | c_id | cell id |
| [in] | c2e | cell -> edges connectivity structure |
| [in] | e2v | edge -> vertices connectivity structure |
| [in] | loc_ids | store the value of the local id for each entity |
| [in,out] | builder | pointer to a builder structure |
|
static |
Define the local VpCd convection operator.
| [in] | c_id | cell id |
| [in] | c2e | cell -> edges connectivity structure |
| [in] | e2v | edge -> vertices connectivity structure |
| [in] | loc_ids | store the value of the local id for each entity |
| [in,out] | builder | pointer to a builder structure |
|
static |
Initialize the builder structure and the local matrix related to the convection operator.
| [in] | c_id | cell id |
| [in] | connect | pointer to the connectivity structure |
| [in] | quant | pointer to the cdo quantities structure |
| [in,out] | b | pointer to a convection builder structure |
|
static |
Initialize the builder structure and the local matrix related to the convection operator when diffusion is also activated.
| [in] | c_id | cell id |
| [in] | connect | pointer to the connectivity structure |
| [in] | quant | pointer to the cdo quantities structure |
| [in] | matpty | tensor related to the diffusion property |
| [in,out] | b | pointer to a convection builder structure |
|
static |
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 |
| void cs_cdovb_advection_add_bc | ( | const cs_cdo_connect_t * | connect, |
| const cs_cdo_quantities_t * | quant, | ||
| const cs_real_t * | dir_vals, | ||
| cs_cdovb_adv_t * | builder, | ||
| cs_real_t | rhs_contrib[], | ||
| cs_real_t | diag_contrib[] | ||
| ) |
Compute the convection operator for pure convection.
| [in] | connect | pointer to the connectivity structure |
| [in] | quant | pointer to the cdo quantities structure |
| [in] | dir_vals | values of the Dirichlet boundary condition |
| [in,out] | builder | pointer to a convection builder structure |
| [in,out] | rhs_contrib | array storing the rhs contribution |
| [in,out] | diag_contrib | array storing the diagonal contribution |
| cs_locmat_t* cs_cdovb_advection_build_local | ( | cs_lnum_t | c_id, |
| const cs_cdo_connect_t * | connect, | ||
| const cs_cdo_quantities_t * | quant, | ||
| const cs_lnum_t * | loc_ids, | ||
| const cs_real_33_t | diffmat, | ||
| cs_cdovb_adv_t * | builder | ||
| ) |
Compute the convection operator for pure convection.
| [in] | c_id | cell id |
| [in] | connect | pointer to the connectivity structure |
| [in] | quant | pointer to the cdo quantities structure |
| [in] | loc_ids | store the local entity ids for this cell |
| [in] | diffmat | tensor related to the diffusion property |
| [in,out] | builder | pointer to a convection builder structure |
| cs_cdovb_adv_t* cs_cdovb_advection_builder_free | ( | cs_cdovb_adv_t * | b | ) |
Destroy a builder structure for the convection operator.
| [in,out] | b | pointer to a cs_cdovb_adv_t struct. to free |
| cs_cdovb_adv_t* cs_cdovb_advection_builder_init | ( | const cs_cdo_connect_t * | connect, |
| const cs_adv_field_t * | adv, | ||
| const cs_param_advection_t | a_info, | ||
| bool | do_diffusion | ||
| ) |
Initialize a builder structure for the convection operator.
| [in] | connect | pointer to the connectivity structure |
| [in] | adv_field | pointer to a cs_adv_field_t structure |
| [in] | a_info | set of options for the advection term |
| [in] | do_diffusion | true is diffusion is activated |
| void cs_cdovb_advection_get_peclet_cell | ( | const cs_cdo_quantities_t * | cdoq, |
| const cs_adv_field_t * | adv, | ||
| const cs_property_t * | diff_property, | ||
| const cs_real_3_t | dir_vect, | ||
| cs_real_t * | p_peclet[] | ||
| ) |
Compute the Peclet number in each cell in a given direction.
| [in] | cdoq | pointer to the cdo quantities structure |
| [in] | adv | pointer to the advection field struct. |
| [in] | diff_property | pointer to the diffusion property struct. |
| [in] | dir_vect | direction for estimating the Peclet number |
| [in,out] | peclet | pointer to the pointer of real numbers to fill |
| void cs_cdovb_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 |
1.8.9.1