programmer's documentation
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
Typedefs | Functions
cs_cdo_diffusion.h File Reference
#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"
Include dependency graph for cs_cdo_diffusion.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_sdm_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_sdm_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_sdm_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_sdm_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_cdo_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 Documentation

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.

Parameters
[in]cmpointer to a cs_face_mesh_t structure
[in]potvalues of the potential fields at vertices
[in,out]cbauxiliary structure for computing the flux
[in,out]flxflux 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.

Parameters
[in]h_infocs_param_hodge_t structure for diffusion
[in]cbcpointer to a cs_cell_bc_t structure
[in]cmpointer to a cs_cell_mesh_t structure
[in]flux_opfunction pointer to the flux trace operator
[in,out]fmpointer to a cs_face_mesh_t structure
[in,out]cbpointer to a cs_cell_builder_t structure
[in,out]csysstructure 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_sdm_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.

Parameters
[in]fmpointer to a cs_face_mesh_t structure
[in]cmpointer to a cs_cell_mesh_t structure
[in]mnuproperty tensor times the face normal
[in]betavalue of the stabilization coef. or zero if not used
[in,out]cbpointer to a cell builder structure
[in,out]ntrgrdlocal matrix related to the normal trace op. i.e. the flux operator

Function Documentation

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})

Parameters
[in]fmpointer to a cs_face_mesh_t structure
[in]pty_tens3x3 matrix related to the diffusion property
[in]p_varray of values attached to face vertices
[in]p_fvalue attached to the face
[in]p_cvalue attached to the cell
[in,out]diffauxiliary structure dedicated to diffusion
Returns
the value of the diffusive flux across the current face
Parameters
[in]fmpointer to a cs_face_mesh_t structure
[in]pty_tens3x3 matrix related to the diffusion property
[in]p_varray of values attached to face vertices
[in]p_fvalue attached to the face
[in]p_cvalue attached to the cell
[in,out]cbauxiliary structure dedicated to diffusion
Returns
the value of the diffusive flux across the current face
void cs_cdo_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.

Parameters
[in]h_infocs_param_hodge_t structure for diffusion
[in]cbcpointer to a cs_cell_bc_t structure
[in]cmpointer to a cs_cell_mesh_t structure
[in]flux_opfunction pointer to the flux trace operator
[in,out]fmpointer to a cs_face_mesh_t structure
[in,out]cbpointer to a cs_cell_builder_t structure
[in,out]csysstructure storing the cell-wise system

Take into account Dirichlet BCs by a weak enforcement using Nitsche technique (symmetrized or not) or penalization.

Parameters
[in]h_infocs_param_hodge_t structure for diffusion
[in]cbcpointer to a cs_cell_bc_t structure
[in]cmpointer to a cs_cell_mesh_t structure
[in]flux_opfunction pointer to the flux trace operator
[in,out]fmpointer to a cs_face_mesh_t structure
[in,out]cbpointer to a cs_cell_builder_t structure
[in,out]csysstructure storing the cell-wise system
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)

Parameters
[in]cmpointer to a cs_cell_mesh_t structure
[in]potvalues of the potential fields at specific locations
[in,out]cbauxiliary structure for computing the flux
[in,out]flxvalues 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)

Parameters
[in]cmpointer to a cs_cell_mesh_t structure
[in]potvalues of the potential fields at specific locations
[in,out]cbauxiliary structure for computing the flux
[in,out]flxvalues 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}.

Parameters
[in]cmpointer to a cs_cell_mesh_t structure
[in]potvalues of the potential fields at vertices
[in,out]cbauxiliary structure for computing the flux
[in,out]flxflux 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}.

Parameters
[in]cmpointer to a cs_cell_mesh_t structure
[in]potvalues of the potential fields at vertices
[in,out]cbauxiliary structure for computing the flux
[in,out]flxflux 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_sdm_t *  ntrgrd 
)

Compute the normal trace operator for a given border face when a COST algo. is used for reconstructing the degrees of freedom.

Parameters
[in]fmpointer to a cs_face_mesh_t structure
[in]cmpointer to a cs_cell_mesh_t structure
[in]mnuproperty tensor times the face normal
[in]betavalue of the stabilizarion coef. related to reco.
[in,out]cbpointer to a cell builder structure
[in,out]ntrgrdlocal matrix related to the normal trace op. i.e. the flux operator
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_sdm_t *  ntrgrd 
)

Compute the normal trace operator for a given border face when a WBS algo. is used for reconstructing the degrees of freedom.

Parameters
[in]fmpointer to a cs_face_mesh_t structure
[in]cmpointer to a cs_cell_mesh_t structure
[in]pty_nufproperty tensor times the face normal
[in]betanot useful here (prototype of function pointer)
[in,out]cbpointer to a cell builder structure
[in,out]ntrgrdlocal 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.

Parameters
[in]h_infocs_param_hodge_t structure for diffusion
[in]cbcpointer to a cs_cell_bc_t structure
[in]cmpointer to a cs_cell_mesh_t structure
[in]flux_opfunction pointer to the flux trace operator
[in,out]fmpointer to a cs_face_mesh_t structure
[in,out]cbpointer to a cs_cell_builder_t structure
[in,out]csysstructure 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.

Parameters
[in]h_infocs_param_hodge_t structure for diffusion
[in]cbcpointer to a cs_cell_bc_t structure
[in]cmpointer to a cs_cell_mesh_t structure
[in]flux_opfunction pointer to the flux trace operator
[in,out]fmpointer to a cs_face_mesh_t structure
[in,out]cbpointer to a cs_cell_builder_t structure
[in,out]csysstructure 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_sdm_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.

Parameters
[in]fmpointer to a cs_face_mesh_t structure
[in]cmpointer to a cs_cell_mesh_t structure
[in]pty_nufproperty tensor times the face normal
[in]betanot useful here (prototype of function pointer)
[in,out]cbpointer to a cell builder structure
[in,out]ntrgrdlocal matrix related to the normal trace op. i.e. the flux operator