![]() |
programmer's documentation
|
#include "cs_cdo.h"
#include "cs_cdo_bc.h"
#include "cs_cdo_connect.h"
#include "cs_cdo_local.h"
#include "cs_cdo_quantities.h"
#include "cs_hodge.h"
#include "cs_param.h"
Go to the source code of this file.
Typedefs | |
typedef void() | cs_cdo_diffusion_flux_trace_t(const cs_face_mesh_t *fm, const cs_cell_mesh_t *cm, const cs_real_3_t mnu, double beta, cs_cell_builder_t *cb, cs_locmat_t *ntrgrd) |
Compute the diffusion flux operator which corresponds to the normal trace operator for a given border face. Different algorithm can be used to reconstruct this flux. More... | |
typedef void() | cs_cdo_cellwise_diffusion_flux_t(const cs_cell_mesh_t *cm, const cs_real_t *pot, cs_cell_builder_t *cb, cs_real_t *flx) |
Cellwise computation of the diffusive flux. More... | |
typedef void() | cs_cdo_diffusion_enforce_dir_t(const cs_param_hodge_t h_info, const cs_cell_bc_t *cbc, const cs_cell_mesh_t *cm, cs_cdo_diffusion_flux_trace_t *flux_op, cs_face_mesh_t *fm, cs_cell_builder_t *cb, cs_cell_sys_t *csys) |
Take into account Dirichlet BCs by a weak enforcement using Nitsche technique (symmetrized or not) or penalization. More... | |
Functions | |
void | cs_cdovcb_diffusion_flux_op (const cs_face_mesh_t *fm, const cs_cell_mesh_t *cm, const cs_real_3_t pty_nuf, double beta, cs_cell_builder_t *cb, cs_locmat_t *ntrgrd) |
Compute the normal trace operator for a given border face when a WBS algo. is used for reconstructing the degrees of freedom Specific to CDO-V+C schemes. More... | |
void | cs_cdovb_diffusion_wbs_flux_op (const cs_face_mesh_t *fm, const cs_cell_mesh_t *cm, const cs_real_3_t pty_nuf, double beta, cs_cell_builder_t *cb, cs_locmat_t *ntrgrd) |
Compute the normal trace operator for a given border face when a WBS algo. is used for reconstructing the degrees of freedom. More... | |
void | cs_cdovb_diffusion_cost_flux_op (const cs_face_mesh_t *fm, const cs_cell_mesh_t *cm, const cs_real_3_t mnu, double beta, cs_cell_builder_t *cb, cs_locmat_t *ntrgrd) |
Compute the normal trace operator for a given border face when a COST algo. is used for reconstructing the degrees of freedom. More... | |
void | cs_cdovb_diffusion_pena_dirichlet (const cs_param_hodge_t h_info, const cs_cell_bc_t *cbc, const cs_cell_mesh_t *cm, cs_cdo_diffusion_flux_trace_t *flux_op, cs_face_mesh_t *fm, cs_cell_builder_t *cb, cs_cell_sys_t *csys) |
Take into account Dirichlet BCs by a weak enforcement using Nitsche technique (symmetrized or not) or penalization. More... | |
void | cs_cdovb_diffusion_wsym_dirichlet (const cs_param_hodge_t h_info, const cs_cell_bc_t *cbc, const cs_cell_mesh_t *cm, cs_cdo_diffusion_flux_trace_t *flux_op, cs_face_mesh_t *fm, cs_cell_builder_t *cb, cs_cell_sys_t *csys) |
Take into account Dirichlet BCs by a weak enforcement using Nitsche technique plus a symmetric treatment. More... | |
void | cs_cdovb_diffusion_weak_dirichlet (const cs_param_hodge_t h_info, const cs_cell_bc_t *cbc, const cs_cell_mesh_t *cm, cs_cdo_diffusion_flux_trace_t *flux_op, cs_face_mesh_t *fm, cs_cell_builder_t *cb, cs_cell_sys_t *csys) |
Take into account Dirichlet BCs by a weak enforcement using Nitsche technique. More... | |
void | cs_cdo_diffusion_vcost_get_dfbyc_flux (const cs_cell_mesh_t *cm, const double *pot, cs_cell_builder_t *cb, double *flx) |
Compute the diffusive flux across dual faces for a given cell Use the COST algo. for computing the discrete Hodge op. This function is dedicated to vertex-based schemes. Flux = -Hdg * GRAD(pot) More... | |
void | cs_cdo_diffusion_vcost_get_pc_flux (const cs_cell_mesh_t *cm, const double *pot, cs_cell_builder_t *cb, double *flx) |
Compute the diffusive flux inside a (primal) cell Use the COST algo. for computing the discrete Hodge op. This function is dedicated to vertex-based schemes. Flux = -Hdg * GRAD(pot) More... | |
void | cs_cdo_diffusion_wbs_get_dfbyc_flux (const cs_cell_mesh_t *cm, const cs_real_t *pot, cs_cell_builder_t *cb, cs_real_t *flx) |
Compute the diffusive flux across dual faces for a given cell Use the WBS algo. for approximating the gradient The computation takes into account a subdivision into tetrahedra of the current cell based on p_{ef,c}. More... | |
void | cs_cdo_diffusion_wbs_get_pc_flux (const cs_cell_mesh_t *cm, const cs_real_t *pot, cs_cell_builder_t *cb, cs_real_t *flx) |
Compute the diffusive flux inside a given primal cell Use the WBS algo. for approximating the gradient The computation takes into account a subdivision into tetrahedra of the current cell based on p_{ef,c}. More... | |
double | cs_cdo_diffusion_face_flux (const cs_face_mesh_t *fm, const cs_real_t pty_tens[3][3], const double *p_v, const double p_f, const double p_c, cs_cell_builder_t *cb) |
Compute the diffusive flux across a face (based on a subdivision into tetrahedra of the volume p_{f,c}) More... | |
typedef void() cs_cdo_cellwise_diffusion_flux_t(const cs_cell_mesh_t *cm, const cs_real_t *pot, cs_cell_builder_t *cb, cs_real_t *flx) |
Cellwise computation of the diffusive flux.
[in] | cm | pointer to a cs_face_mesh_t structure |
[in] | pot | values of the potential fields at vertices |
[in,out] | cb | auxiliary structure for computing the flux |
[in,out] | flx | flux across dual faces inside this cell |
typedef void() cs_cdo_diffusion_enforce_dir_t(const cs_param_hodge_t h_info, const cs_cell_bc_t *cbc, const cs_cell_mesh_t *cm, cs_cdo_diffusion_flux_trace_t *flux_op, cs_face_mesh_t *fm, cs_cell_builder_t *cb, cs_cell_sys_t *csys) |
Take into account Dirichlet BCs by a weak enforcement using Nitsche technique (symmetrized or not) or penalization.
[in] | h_info | cs_param_hodge_t structure for diffusion |
[in] | cbc | pointer to a cs_cell_bc_t structure |
[in] | cm | pointer to a cs_cell_mesh_t structure |
[in] | flux_op | function pointer to the flux trace operator |
[in,out] | fm | pointer to a cs_face_mesh_t structure |
[in,out] | cb | pointer to a cs_cell_builder_t structure |
[in,out] | csys | structure storing the cell-wise system |
typedef void() cs_cdo_diffusion_flux_trace_t(const cs_face_mesh_t *fm, const cs_cell_mesh_t *cm, const cs_real_3_t mnu, double beta, cs_cell_builder_t *cb, cs_locmat_t *ntrgrd) |
Compute the diffusion flux operator which corresponds to the normal trace operator for a given border face. Different algorithm can be used to reconstruct this flux.
[in] | fm | pointer to a cs_face_mesh_t structure |
[in] | cm | pointer to a cs_cell_mesh_t structure |
[in] | mnu | property tensor times the face normal |
[in] | beta | value of the stabilization coef. or zero if not used |
[in,out] | cb | pointer to a cell builder structure |
[in,out] | ntrgrd | local matrix related to the normal trace op. i.e. the flux operator |
double cs_cdo_diffusion_face_flux | ( | const cs_face_mesh_t * | fm, |
const cs_real_t | pty_tens[3][3], | ||
const double * | p_v, | ||
const double | p_f, | ||
const double | p_c, | ||
cs_cell_builder_t * | cb | ||
) |
Compute the diffusive flux across a face (based on a subdivision into tetrahedra of the volume p_{f,c})
[in] | fm | pointer to a cs_face_mesh_t structure |
[in] | pty_tens | 3x3 matrix related to the diffusion property |
[in] | p_v | array of values attached to face vertices |
[in] | p_f | value attached to the face |
[in] | p_c | value attached to the cell |
[in,out] | diff | auxiliary structure dedicated to diffusion |
[in] | fm | pointer to a cs_face_mesh_t structure |
[in] | pty_tens | 3x3 matrix related to the diffusion property |
[in] | p_v | array of values attached to face vertices |
[in] | p_f | value attached to the face |
[in] | p_c | value attached to the cell |
[in,out] | cb | auxiliary structure dedicated to diffusion |
void cs_cdo_diffusion_vcost_get_dfbyc_flux | ( | const cs_cell_mesh_t * | cm, |
const double * | pot, | ||
cs_cell_builder_t * | cb, | ||
double * | flx | ||
) |
Compute the diffusive flux across dual faces for a given cell Use the COST algo. for computing the discrete Hodge op. This function is dedicated to vertex-based schemes. Flux = -Hdg * GRAD(pot)
[in] | cm | pointer to a cs_cell_mesh_t structure |
[in] | pot | values of the potential fields at specific locations |
[in,out] | cb | auxiliary structure for computing the flux |
[in,out] | flx | values of the flux across specific entities |
void cs_cdo_diffusion_vcost_get_pc_flux | ( | const cs_cell_mesh_t * | cm, |
const double * | pot, | ||
cs_cell_builder_t * | cb, | ||
double * | flx | ||
) |
Compute the diffusive flux inside a (primal) cell Use the COST algo. for computing the discrete Hodge op. This function is dedicated to vertex-based schemes. Flux = -Hdg * GRAD(pot)
[in] | cm | pointer to a cs_cell_mesh_t structure |
[in] | pot | values of the potential fields at specific locations |
[in,out] | cb | auxiliary structure for computing the flux |
[in,out] | flx | values of the flux across specific entities |
void cs_cdo_diffusion_wbs_get_dfbyc_flux | ( | const cs_cell_mesh_t * | cm, |
const cs_real_t * | pot, | ||
cs_cell_builder_t * | cb, | ||
cs_real_t * | flx | ||
) |
Compute the diffusive flux across dual faces for a given cell Use the WBS algo. for approximating the gradient The computation takes into account a subdivision into tetrahedra of the current cell based on p_{ef,c}.
[in] | cm | pointer to a cs_cell_mesh_t structure |
[in] | pot | values of the potential fields at vertices |
[in,out] | cb | auxiliary structure for computing the flux |
[in,out] | flx | flux across dual faces inside this cell |
void cs_cdo_diffusion_wbs_get_pc_flux | ( | const cs_cell_mesh_t * | cm, |
const cs_real_t * | pot, | ||
cs_cell_builder_t * | cb, | ||
cs_real_t * | flx | ||
) |
Compute the diffusive flux inside a given primal cell Use the WBS algo. for approximating the gradient The computation takes into account a subdivision into tetrahedra of the current cell based on p_{ef,c}.
[in] | cm | pointer to a cs_cell_mesh_t structure |
[in] | pot | values of the potential fields at vertices |
[in,out] | cb | auxiliary structure for computing the flux |
[in,out] | flx | flux vector inside this cell |
void cs_cdovb_diffusion_cost_flux_op | ( | const cs_face_mesh_t * | fm, |
const cs_cell_mesh_t * | cm, | ||
const cs_real_3_t | mnu, | ||
double | beta, | ||
cs_cell_builder_t * | cb, | ||
cs_locmat_t * | ntrgrd | ||
) |
Compute the normal trace operator for a given border face when a COST algo. is used for reconstructing the degrees of freedom.
[in] | fm | pointer to a cs_face_mesh_t structure |
[in] | cm | pointer to a cs_cell_mesh_t structure |
[in] | mnu | property tensor times the face normal |
[in] | beta | value of the stabilizarion coef. related to reco. |
[in,out] | cb | pointer to a cell builder structure |
[in,out] | ntrgrd | local matrix related to the normal trace op. i.e. the flux operator |
void cs_cdovb_diffusion_pena_dirichlet | ( | const cs_param_hodge_t | h_info, |
const cs_cell_bc_t * | cbc, | ||
const cs_cell_mesh_t * | cm, | ||
cs_cdo_diffusion_flux_trace_t * | flux_op, | ||
cs_face_mesh_t * | fm, | ||
cs_cell_builder_t * | cb, | ||
cs_cell_sys_t * | csys | ||
) |
Take into account Dirichlet BCs by a weak enforcement using Nitsche technique (symmetrized or not) or penalization.
[in] | h_info | cs_param_hodge_t structure for diffusion |
[in] | cbc | pointer to a cs_cell_bc_t structure |
[in] | cm | pointer to a cs_cell_mesh_t structure |
[in] | flux_op | function pointer to the flux trace operator |
[in,out] | fm | pointer to a cs_face_mesh_t structure |
[in,out] | cb | pointer to a cs_cell_builder_t structure |
[in,out] | csys | structure storing the cell-wise system |
void cs_cdovb_diffusion_wbs_flux_op | ( | const cs_face_mesh_t * | fm, |
const cs_cell_mesh_t * | cm, | ||
const cs_real_3_t | pty_nuf, | ||
double | beta, | ||
cs_cell_builder_t * | cb, | ||
cs_locmat_t * | ntrgrd | ||
) |
Compute the normal trace operator for a given border face when a WBS algo. is used for reconstructing the degrees of freedom.
[in] | fm | pointer to a cs_face_mesh_t structure |
[in] | cm | pointer to a cs_cell_mesh_t structure |
[in] | pty_nuf | property tensor times the face normal |
[in] | beta | not useful here (prototype of function pointer) |
[in,out] | cb | pointer to a cell builder structure |
[in,out] | ntrgrd | local matrix related to the normal trace op. i.e. the flux operator |
void cs_cdovb_diffusion_weak_dirichlet | ( | const cs_param_hodge_t | h_info, |
const cs_cell_bc_t * | cbc, | ||
const cs_cell_mesh_t * | cm, | ||
cs_cdo_diffusion_flux_trace_t * | flux_op, | ||
cs_face_mesh_t * | fm, | ||
cs_cell_builder_t * | cb, | ||
cs_cell_sys_t * | csys | ||
) |
Take into account Dirichlet BCs by a weak enforcement using Nitsche technique.
[in] | h_info | cs_param_hodge_t structure for diffusion |
[in] | cbc | pointer to a cs_cell_bc_t structure |
[in] | cm | pointer to a cs_cell_mesh_t structure |
[in] | flux_op | function pointer to the flux trace operator |
[in,out] | fm | pointer to a cs_face_mesh_t structure |
[in,out] | cb | pointer to a cs_cell_builder_t structure |
[in,out] | csys | structure storing the cellwise system |
void cs_cdovb_diffusion_wsym_dirichlet | ( | const cs_param_hodge_t | h_info, |
const cs_cell_bc_t * | cbc, | ||
const cs_cell_mesh_t * | cm, | ||
cs_cdo_diffusion_flux_trace_t * | flux_op, | ||
cs_face_mesh_t * | fm, | ||
cs_cell_builder_t * | cb, | ||
cs_cell_sys_t * | csys | ||
) |
Take into account Dirichlet BCs by a weak enforcement using Nitsche technique plus a symmetric treatment.
[in] | h_info | cs_param_hodge_t structure for diffusion |
[in] | cbc | pointer to a cs_cell_bc_t structure |
[in] | cm | pointer to a cs_cell_mesh_t structure |
[in] | flux_op | function pointer to the flux trace operator |
[in,out] | fm | pointer to a cs_face_mesh_t structure |
[in,out] | cb | pointer to a cs_cell_builder_t structure |
[in,out] | csys | structure storing the cell-wise system |
void cs_cdovcb_diffusion_flux_op | ( | const cs_face_mesh_t * | fm, |
const cs_cell_mesh_t * | cm, | ||
const cs_real_3_t | pty_nuf, | ||
double | beta, | ||
cs_cell_builder_t * | cb, | ||
cs_locmat_t * | ntrgrd | ||
) |
Compute the normal trace operator for a given border face when a WBS algo. is used for reconstructing the degrees of freedom Specific to CDO-V+C schemes.
[in] | fm | pointer to a cs_face_mesh_t structure |
[in] | cm | pointer to a cs_cell_mesh_t structure |
[in] | pty_nuf | property tensor times the face normal |
[in] | beta | not useful here (prototype of function pointer) |
[in,out] | cb | pointer to a cell builder structure |
[in,out] | ntrgrd | local matrix related to the normal trace op. i.e. the flux operator |