My Project
programmer's documentation
Typedefs | Functions
cs_equation_bc.h File Reference
#include "cs_cdo_bc.h"
#include "cs_cdo_connect.h"
#include "cs_xdef_eval.h"
#include "cs_cdo_quantities.h"
#include "cs_cdo_local.h"
#include "cs_equation_param.h"
#include "cs_time_step.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, 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_cell_builder_t *cb, cs_cell_sys_t *csys)
 Enforcement of a boundary condition (Dirichlet, Robin, sliding...) More...
 

Functions

void cs_equation_init_boundary_flux_from_bc (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 one) More...
 
void cs_equation_vb_set_cell_bc (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_fb_set_cell_bc (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_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 Face-based schemes. More...
 
void cs_equation_compute_dirichlet_vb (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_cell_builder_t *cb, cs_flag_t *bcflag, cs_real_t *bcvals)
 Compute the values of the Dirichlet BCs when DoFs are attached to vertices. More...
 
void cs_equation_compute_dirichlet_fb (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_cell_builder_t *cb, cs_real_t *values)
 Compute the values of the Dirichlet BCs when DoFs are attached to CDO face-based schemes. More...
 
void cs_equation_set_vertex_bc_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_compute_neumann_sv (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 vertices. More...
 
void cs_equation_compute_neumann_fb (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 faces. More...
 
void cs_equation_compute_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. 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, 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,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_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]cbpointer to a cs_cell_builder_t structure
[in,out]csysstructure storing the cell-wise system

Function Documentation

◆ cs_equation_compute_dirichlet_fb()

void cs_equation_compute_dirichlet_fb ( 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_cell_builder_t cb,
cs_real_t values 
)

Compute the values of the Dirichlet BCs when DoFs are attached to CDO face-based 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]cbpointer to a cs_cell_builder_t structure
[in,out]valuespointer to the array of values to set

◆ cs_equation_compute_dirichlet_vb()

void cs_equation_compute_dirichlet_vb ( 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_cell_builder_t cb,
cs_flag_t bcflag,
cs_real_t bcvals 
)

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]cbpointer to a cs_cell_builder_t structure
[in,out]bcflagpointer to an array storing type of BC
[in,out]valuespointer to the array of values to set

◆ cs_equation_compute_neumann_fb()

void cs_equation_compute_neumann_fb ( 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 faces.

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 to use

◆ cs_equation_compute_neumann_sv()

void cs_equation_compute_neumann_sv ( 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 vertices.

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

◆ cs_equation_compute_robin()

void cs_equation_compute_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.

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_fb_set_cell_bc()

void cs_equation_fb_set_cell_bc ( 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_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 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]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
[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]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_init_boundary_flux_from_bc()

void cs_equation_init_boundary_flux_from_bc ( 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 one)

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

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

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_set_vertex_bc_flag()

void cs_equation_set_vertex_bc_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_vb_set_cell_bc()

void cs_equation_vb_set_cell_bc ( 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