8.3
general documentation
cs_equation_bc.h File Reference
#include "cs_cdo_bc.h"
#include "cs_cdo_connect.h"
#include "cs_cdo_local.h"
#include "cs_cdo_quantities.h"
#include "cs_equation_param.h"
#include "cs_macfb_builder.h"
#include "cs_time_step.h"
#include "cs_xdef_eval.h"
+ Include dependency graph for cs_equation_bc.h:

Go to the source code of this file.

Typedefs

typedef void() cs_cdo_apply_boundary_t(short int f, const cs_equation_param_t *eqp, const cs_cell_mesh_t *cm, const cs_property_data_t *pty, cs_cell_builder_t *cb, cs_cell_sys_t *csys)
 Apply a boundary condition for a given face (inlet, outlet, wall, sliding wall, symmetry...) More...
 
typedef void() cs_cdo_enforce_bc_t(const cs_equation_param_t *eqp, const cs_cell_mesh_t *cm, cs_face_mesh_t *fm, cs_hodge_t *hodge, cs_cell_builder_t *cb, cs_cell_sys_t *csys)
 Enforcement of a boundary condition (Dirichlet, Robin, sliding...) More...
 

Functions

void cs_equation_bc_init_boundary_flux (cs_real_t t_eval, const cs_cdo_quantities_t *cdoq, const cs_equation_param_t *eqp, cs_real_t *values)
 Set the values for the normal boundary flux stemming from the Neumann boundary conditions (zero is left where a Dirichlet is set. This can be updated later on) More...
 
void cs_equation_bc_set_cw_vb (const cs_cell_mesh_t *cm, const cs_equation_param_t *eqp, const cs_cdo_bc_face_t *face_bc, const cs_flag_t vtx_bc_flag[], const cs_real_t dir_values[], cs_real_t t_eval, cs_cell_sys_t *csys, cs_cell_builder_t *cb)
 Set the BC into a cellwise view of the current system. Case of vertex-based schemes. More...
 
void cs_equation_bc_set_cw_eb (const cs_cell_mesh_t *cm, const cs_equation_param_t *eqp, const cs_cdo_bc_face_t *face_bc, const cs_real_t dir_values[], cs_cell_sys_t *csys, cs_cell_builder_t *cb)
 Set the BC into a cellwise view of the current system. Case of edge-based schemes. More...
 
void cs_equation_bc_set_cw_fb (const cs_cell_mesh_t *cm, const cs_equation_param_t *eqp, const cs_cdo_bc_face_t *face_bc, const cs_real_t dir_values[], cs_cell_sys_t *csys, cs_cell_builder_t *cb)
 Set the BC into a cellwise view of the current system. Case of CDO Face-based schemes. More...
 
void cs_equation_bc_set_cw_macfb (const cs_cell_mesh_t *cm, const cs_equation_param_t *eqp, const cs_cdo_bc_face_t *face_bc, const cs_real_t dir_values[], cs_macfb_builder_t *macb, cs_cell_sys_t *csys)
 Set the BC into a cellwise view of the current system. Case of MAC Face-based schemes. More...
 
void cs_equation_bc_set_cw_cb (const cs_cell_mesh_t *cm, const cs_equation_param_t *eqp, const cs_cdo_bc_face_t *face_bc, const cs_real_t dir_values[], cs_cell_sys_t *csys, cs_cell_builder_t *cb)
 Set the BC into a cellwise view of the current system. Case of Face-based schemes. More...
 
void cs_equation_bc_set_vertex_flag (const cs_cdo_connect_t *connect, const cs_cdo_bc_face_t *face_bc, cs_flag_t *vflag)
 Define an array of flags for each vertex collecting the flags of associated boundary faces. More...
 
void cs_equation_bc_set_edge_flag (const cs_cdo_connect_t *connect, const cs_cdo_bc_face_t *face_bc, cs_flag_t *edge_flag)
 Define an array of flags for each edge collecting the flags of associated boundary faces. More...
 
void cs_equation_bc_dirichlet_at_vertices (cs_real_t t_eval, const cs_mesh_t *mesh, const cs_cdo_quantities_t *quant, const cs_cdo_connect_t *connect, const cs_equation_param_t *eqp, const cs_cdo_bc_face_t *face_bc, cs_flag_t *bcflag, cs_real_t *values)
 Compute the values of the Dirichlet BCs when DoFs are attached to vertices. More...
 
void cs_equation_bc_dirichlet_at_faces (const cs_mesh_t *mesh, const cs_cdo_quantities_t *quant, const cs_cdo_connect_t *connect, const cs_equation_param_t *eqp, const cs_cdo_bc_face_t *face_bc, cs_real_t t_eval, cs_real_t *values)
 Compute the values of the Dirichlet BCs at boundary faces. This can be applied to CDO face-based schemes (DoFs are attached to primal faces), to CDO cell-based schemes or even to FV schemes. More...
 
void cs_equation_compute_neumann_svb (cs_real_t t_eval, short int def_id, short int f, const cs_equation_param_t *eqp, const cs_cell_mesh_t *cm, double *neu_values)
 Compute the values of the Neumann BCs when DoFs are scalar-valued and attached to a vertex-based schemes (Vb or VCb) Case of the Neumann BCs i.e. Neumann is defined by a scalar. More...
 
void cs_equation_compute_full_neumann_svb (cs_real_t t_eval, short int def_id, short int f, const cs_equation_param_t *eqp, const cs_cell_mesh_t *cm, double *neu_values)
 Compute the values of the Neumann BCs when DoFs are scalar-valued and attached to a vertex-based schemes (Vb or VCb) Case of the full Neumann BCs i.e. Neumann is defined by a vector. More...
 
void cs_equation_compute_neumann_sfb (cs_real_t t_eval, short int def_id, short int f, const cs_equation_param_t *eqp, const cs_cell_mesh_t *cm, double *neu_values)
 Compute the values of the Neumann BCs when DoFs are attached to the face f. Case of scalar-valued equation (not full Neumann BCs) More...
 
void cs_equation_compute_full_neumann_sfb (cs_real_t t_eval, short int def_id, short int f, const cs_equation_param_t *eqp, const cs_cell_mesh_t *cm, double *neu_values)
 Compute the values of the Neumann BCs when DoFs are attached to the face f. Case of scalar-valued equation with a full Neumann BC definition. More...
 
void cs_equation_compute_neumann_vfb (cs_real_t t_eval, short int def_id, short int f, const cs_equation_param_t *eqp, const cs_cell_mesh_t *cm, double *neu_values)
 Compute the values of the Neumann BCs at the face f when DoFs are attached to faces. Case of vector-valued equation (not the full Neumann) More...
 
void cs_equation_bc_cw_robin (cs_real_t t_eval, short int def_id, short int f, const cs_equation_param_t *eqp, const cs_cell_mesh_t *cm, double *rob_values)
 Compute the values of the Robin BCs for a face (cell-wise compute relying on the cs_cell_mesh_t structure) More...
 
void cs_equation_bc_circulation_at_edges (cs_real_t t_eval, const cs_mesh_t *mesh, const cs_cdo_quantities_t *quant, const cs_cdo_connect_t *connect, const cs_equation_param_t *eqp, cs_real_t *values)
 Compute the values of the circulation along primal edges lying on the domain boundary (the integral of the tangential component of vector-valued field). This is used for CDO edge-based schemes where DoFs are attached to (primal) edge-based schemes. More...
 
void cs_equation_bc_update_for_increment (cs_cell_sys_t *csys)
 Update the boundary conditions to fullfill the constraint when an incremental solve is set. More...
 

Typedef Documentation

◆ cs_cdo_apply_boundary_t

typedef void() cs_cdo_apply_boundary_t(short int f, const cs_equation_param_t *eqp, const cs_cell_mesh_t *cm, const cs_property_data_t *pty, cs_cell_builder_t *cb, cs_cell_sys_t *csys)

Apply a boundary condition for a given face (inlet, outlet, wall, sliding wall, symmetry...)

Parameters
[in]fface id in the cell mesh numbering
[in]eqppointer to a cs_equation_param_t struct.
[in]cmpointer to a cs_cell_mesh_t structure
[in]ptypointer to a cs_property_data_t structure
[in,out]cbpointer to a cs_cell_builder_t structure
[in,out]csysstructure storing the cell-wise system

◆ cs_cdo_enforce_bc_t

typedef void() cs_cdo_enforce_bc_t(const cs_equation_param_t *eqp, const cs_cell_mesh_t *cm, cs_face_mesh_t *fm, cs_hodge_t *hodge, cs_cell_builder_t *cb, cs_cell_sys_t *csys)

Enforcement of a boundary condition (Dirichlet, Robin, sliding...)

Parameters
[in]eqppointer to a cs_equation_param_t struct.
[in]cmpointer to a cs_cell_mesh_t structure
[in,out]fmpointer to a cs_face_mesh_t structure
[in,out]hodgepointer to a cs_hodge_t structure
[in,out]cbpointer to a cs_cell_builder_t structure
[in,out]csysstructure storing the cell-wise system

Function Documentation

◆ cs_equation_bc_circulation_at_edges()

void cs_equation_bc_circulation_at_edges ( cs_real_t  t_eval,
const cs_mesh_t mesh,
const cs_cdo_quantities_t quant,
const cs_cdo_connect_t connect,
const cs_equation_param_t eqp,
cs_real_t values 
)

Compute the values of the circulation along primal edges lying on the domain boundary (the integral of the tangential component of vector-valued field). This is used for CDO edge-based schemes where DoFs are attached to (primal) edge-based schemes.

Parameters
[in]t_evaltime at which one evaluates the boundary cond.
[in]meshpointer to a cs_mesh_t structure
[in]quantpointer to a cs_cdo_quantities_t structure
[in]connectpointer to a cs_cdo_connect_t struct.
[in]eqppointer to a cs_equation_param_t
[in,out]valuespointer to the array of values to set

◆ cs_equation_bc_cw_robin()

void cs_equation_bc_cw_robin ( cs_real_t  t_eval,
short int  def_id,
short int  f,
const cs_equation_param_t eqp,
const cs_cell_mesh_t cm,
double *  rob_values 
)

Compute the values of the Robin BCs for a face (cell-wise compute relying on the cs_cell_mesh_t structure)

Parameters
[in]t_evaltime at which one performs the evaluation
[in]def_idid of the definition for setting the Neumann BC
[in]flocal face number in the cs_cell_mesh_t
[in]eqppointer to a cs_equation_param_t
[in]cmpointer to a cs_cell_mesh_t structure
[in,out]rob_valuesarray storing Robin values to use

◆ cs_equation_bc_dirichlet_at_faces()

void cs_equation_bc_dirichlet_at_faces ( const cs_mesh_t mesh,
const cs_cdo_quantities_t quant,
const cs_cdo_connect_t connect,
const cs_equation_param_t eqp,
const cs_cdo_bc_face_t face_bc,
cs_real_t  t_eval,
cs_real_t values 
)

Compute the values of the Dirichlet BCs at boundary faces. This can be applied to CDO face-based schemes (DoFs are attached to primal faces), to CDO cell-based schemes or even to FV schemes.

Parameters
[in]meshpointer to a cs_mesh_t structure
[in]quantpointer to a cs_cdo_quantities_t structure
[in]connectpointer to a cs_cdo_connect_t struct.
[in]eqppointer to a cs_equation_param_t
[in]face_bcpointer to a cs_cdo_bc_face_t structure
[in]t_evaltime at which one evaluates the boundary cond.
[in,out]valuespointer to the array of values to set

◆ cs_equation_bc_dirichlet_at_vertices()

void cs_equation_bc_dirichlet_at_vertices ( cs_real_t  t_eval,
const cs_mesh_t mesh,
const cs_cdo_quantities_t quant,
const cs_cdo_connect_t connect,
const cs_equation_param_t eqp,
const cs_cdo_bc_face_t face_bc,
cs_flag_t bcflag,
cs_real_t values 
)

Compute the values of the Dirichlet BCs when DoFs are attached to vertices.

Parameters
[in]t_evaltime at which one performs the evaluation
[in]meshpointer to a cs_mesh_t structure
[in]quantpointer to a cs_cdo_quantities_t structure
[in]connectpointer to a cs_cdo_connect_t struct.
[in]eqppointer to a cs_equation_param_t
[in]face_bcpointer to a cs_cdo_bc_face_t structure
[in,out]bcflagpointer to an array storing type of BC
[in,out]valuespointer to the array of values to set

Compute the values of the Dirichlet BCs when DoFs are attached to vertices.

Parameters
[in]t_evaltime at which one performs the evaluation
[in]meshpointer to a cs_mesh_t structure
[in]quantpointer to a cs_cdo_quantities_t structure
[in]connectpointer to a cs_cdo_connect_t struct.
[in]eqppointer to a cs_equation_param_t
[in]face_bcpointer to a cs_cdo_bc_face_t structure
[in,out]bcflagpointer to an array storing type of BC
[in,out]valuespointer to the array of values to set

◆ cs_equation_bc_init_boundary_flux()

void cs_equation_bc_init_boundary_flux ( cs_real_t  t_eval,
const cs_cdo_quantities_t cdoq,
const cs_equation_param_t eqp,
cs_real_t values 
)

Set the values for the normal boundary flux stemming from the Neumann boundary conditions (zero is left where a Dirichlet is set. This can be updated later on)

Parameters
[in]t_evaltime at which one performs the evaluation
[in]cdoqpointer to a cs_cdo_quantities_t structure
[in]eqppointer to a cs_equation_param_t structure
[in,out]valuespointer to the array of values to set

◆ cs_equation_bc_set_cw_cb()

void cs_equation_bc_set_cw_cb ( const cs_cell_mesh_t cm,
const cs_equation_param_t eqp,
const cs_cdo_bc_face_t face_bc,
const cs_real_t  dir_values[],
cs_cell_sys_t csys,
cs_cell_builder_t cb 
)

Set the BC into a cellwise view of the current system. Case of Face-based schemes.

Parameters
[in]cmpointer to a cellwise view of the mesh
[in]eqppointer to a cs_equation_param_t structure
[in]face_bcpointer to a cs_cdo_bc_face_t structure
[in]dir_valuesDirichlet values associated to each face
[in,out]csyspointer to a cellwise view of the system
[in,out]cbpointer to a cellwise builder

Set the BC into a cellwise view of the current system. Case of Face-based schemes.

Parameters
[in]cmpointer to a cellwise view of the mesh
[in]eqppointer to a cs_equation_param_t structure
[in]face_bcpointer to a cs_cdo_bc_face_t structure
[in]dir_valuesDirichlet values associated to each vertex
[in,out]csyspointer to a cellwise view of the system
[in,out]cbpointer to a cellwise builder

◆ cs_equation_bc_set_cw_eb()

void cs_equation_bc_set_cw_eb ( const cs_cell_mesh_t cm,
const cs_equation_param_t eqp,
const cs_cdo_bc_face_t face_bc,
const cs_real_t  dir_values[],
cs_cell_sys_t csys,
cs_cell_builder_t cb 
)

Set the BC into a cellwise view of the current system. Case of edge-based schemes.

Parameters
[in]cmpointer to a cellwise view of the mesh
[in]eqppointer to a cs_equation_param_t structure
[in]face_bcpointer to a cs_cdo_bc_face_t structure
[in]dir_valuesDirichlet values associated to each vertex
[in,out]csyspointer to a cellwise view of the system
[in,out]cbpointer to a cellwise builder

◆ cs_equation_bc_set_cw_fb()

void cs_equation_bc_set_cw_fb ( const cs_cell_mesh_t cm,
const cs_equation_param_t eqp,
const cs_cdo_bc_face_t face_bc,
const cs_real_t  dir_values[],
cs_cell_sys_t csys,
cs_cell_builder_t cb 
)

Set the BC into a cellwise view of the current system. Case of CDO Face-based schemes.

Parameters
[in]cmpointer to a cellwise view of the mesh
[in]eqppointer to a cs_equation_param_t structure
[in]face_bcpointer to a cs_cdo_bc_face_t structure
[in]dir_valuesDirichlet values associated to each face
[in,out]csyspointer to a cellwise view of the system
[in,out]cbpointer to a cellwise builder
[in]cmpointer to a cellwise view of the mesh
[in]eqppointer to a cs_equation_param_t structure
[in]face_bcpointer to a cs_cdo_bc_face_t structure
[in]dir_valuesDirichlet values associated to each vertex
[in,out]csyspointer to a cellwise view of the system
[in,out]cbpointer to a cellwise builder

◆ cs_equation_bc_set_cw_macfb()

void cs_equation_bc_set_cw_macfb ( const cs_cell_mesh_t cm,
const cs_equation_param_t eqp,
const cs_cdo_bc_face_t face_bc,
const cs_real_t  dir_values[],
cs_macfb_builder_t macb,
cs_cell_sys_t csys 
)

Set the BC into a cellwise view of the current system. Case of MAC Face-based schemes.

Parameters
[in]cmpointer to a cellwise view of the mesh
[in]eqppointer to a cs_equation_param_t structure
[in]face_bcpointer to a cs_cdo_bc_face_t structure
[in]dir_valuesDirichlet values associated to each face
[in,out]macbpointer to a cs_macfb_builder_t strucuture
[in,out]csyspointer to a cellwise view of the system
[in]cmpointer to a cellwise view of the mesh
[in]eqppointer to a cs_equation_param_t structure
[in]face_bcpointer to a cs_cdo_bc_face_t structure
[in]dir_valuesDirichlet values associated to each faces
[in,out]macbpointer to a cs_macfb_builder_t strucuture
[in,out]csyspointer to a cellwise view of the system

◆ cs_equation_bc_set_cw_vb()

void cs_equation_bc_set_cw_vb ( const cs_cell_mesh_t cm,
const cs_equation_param_t eqp,
const cs_cdo_bc_face_t face_bc,
const cs_flag_t  vtx_bc_flag[],
const cs_real_t  dir_values[],
cs_real_t  t_eval,
cs_cell_sys_t csys,
cs_cell_builder_t cb 
)

Set the BC into a cellwise view of the current system. Case of vertex-based schemes.

Parameters
[in]cmpointer to a cellwise view of the mesh
[in]eqppointer to a cs_equation_param_t structure
[in]face_bcpointer to a cs_cdo_bc_face_t structure
[in]vtx_bc_flagBC flags associated to vertices
[in]dir_valuesDirichlet values associated to each vertex
[in]t_evaltime at which one performs the evaluation
[in,out]csyspointer to a cellwise view of the system
[in,out]cbpointer to a cellwise builder

◆ cs_equation_bc_set_edge_flag()

void cs_equation_bc_set_edge_flag ( const cs_cdo_connect_t connect,
const cs_cdo_bc_face_t face_bc,
cs_flag_t edge_flag 
)

Define an array of flags for each edge collecting the flags of associated boundary faces.

Parameters
[in]connectpointer to a cs_cdo_connect_t struct.
[in]face_bcpointer to a structure collecting boundary conditions applied to faces
[in,out]edge_flagBC flag on edges to define

◆ cs_equation_bc_set_vertex_flag()

void cs_equation_bc_set_vertex_flag ( const cs_cdo_connect_t connect,
const cs_cdo_bc_face_t face_bc,
cs_flag_t vflag 
)

Define an array of flags for each vertex collecting the flags of associated boundary faces.

Parameters
[in]connectpointer to a cs_cdo_connect_t struct.
[in]face_bcpointer to a structure collecting boundary conditions applied to faces
[in,out]vflagBC flag on vertices to define

◆ cs_equation_bc_update_for_increment()

void cs_equation_bc_update_for_increment ( cs_cell_sys_t csys)

Update the boundary conditions to fullfill the constraint when an incremental solve is set.

Parameters
[in,out]csyspointer to the cell system structure

◆ cs_equation_compute_full_neumann_sfb()

void cs_equation_compute_full_neumann_sfb ( cs_real_t  t_eval,
short int  def_id,
short int  f,
const cs_equation_param_t eqp,
const cs_cell_mesh_t cm,
double *  neu_values 
)

Compute the values of the Neumann BCs when DoFs are attached to the face f. Case of scalar-valued equation with a full Neumann BC definition.

Parameters
[in]t_evaltime at which one performs the evaluation
[in]def_idid of the definition for setting the Neumann BC
[in]flocal face number in the cs_cell_mesh_t
[in]eqppointer to a cs_equation_param_t
[in]cmpointer to a cs_cell_mesh_t structure
[in,out]neu_valuesarray storing Neumann values for all DoFs

◆ cs_equation_compute_full_neumann_svb()

void cs_equation_compute_full_neumann_svb ( cs_real_t  t_eval,
short int  def_id,
short int  f,
const cs_equation_param_t eqp,
const cs_cell_mesh_t cm,
double *  neu_values 
)

Compute the values of the Neumann BCs when DoFs are scalar-valued and attached to a vertex-based schemes (Vb or VCb) Case of the full Neumann BCs i.e. Neumann is defined by a vector.

Parameters
[in]t_evaltime at which one performs the evaluation
[in]def_idid of the definition for setting the Neumann BC
[in]flocal face number in the cs_cell_mesh_t
[in]eqppointer to a cs_equation_param_t
[in]cmpointer to a cs_cell_mesh_t structure
[in,out]neu_valuesarray storing the Neumann values for all DoFs

◆ cs_equation_compute_neumann_sfb()

void cs_equation_compute_neumann_sfb ( cs_real_t  t_eval,
short int  def_id,
short int  f,
const cs_equation_param_t eqp,
const cs_cell_mesh_t cm,
double *  neu_values 
)

Compute the values of the Neumann BCs when DoFs are attached to the face f. Case of scalar-valued equation (not full Neumann BCs)

Parameters
[in]t_evaltime at which one performs the evaluation
[in]def_idid of the definition for setting the Neumann BC
[in]flocal face number in the cs_cell_mesh_t
[in]eqppointer to a cs_equation_param_t
[in]cmpointer to a cs_cell_mesh_t structure
[in,out]neu_valuesarray storing Neumann values for all DoFs

◆ cs_equation_compute_neumann_svb()

void cs_equation_compute_neumann_svb ( cs_real_t  t_eval,
short int  def_id,
short int  f,
const cs_equation_param_t eqp,
const cs_cell_mesh_t cm,
double *  neu_values 
)

Compute the values of the Neumann BCs when DoFs are scalar-valued and attached to a vertex-based schemes (Vb or VCb) Case of the Neumann BCs i.e. Neumann is defined by a scalar.

Parameters
[in]t_evaltime at which one performs the evaluation
[in]def_idid of the definition for setting the Neumann BC
[in]flocal face number in the cs_cell_mesh_t
[in]eqppointer to a cs_equation_param_t
[in]cmpointer to a cs_cell_mesh_t structure
[in,out]neu_valuesarray storing the Neumann values for all DoFs

◆ cs_equation_compute_neumann_vfb()

void cs_equation_compute_neumann_vfb ( cs_real_t  t_eval,
short int  def_id,
short int  f,
const cs_equation_param_t eqp,
const cs_cell_mesh_t cm,
double *  neu_values 
)

Compute the values of the Neumann BCs at the face f when DoFs are attached to faces. Case of vector-valued equation (not the full Neumann)

Parameters
[in]t_evaltime at which one performs the evaluation
[in]def_idid of the definition for setting the Neumann BC
[in]flocal face number in the cs_cell_mesh_t
[in]eqppointer to a cs_equation_param_t
[in]cmpointer to a cs_cell_mesh_t structure
[in,out]neu_valuesarray storing Neumann values at DoFs