programmer's documentation
Macros | Functions
cs_equation_bc.c File Reference
#include "cs_defs.h"
#include <assert.h>
#include <string.h>
#include <bft_mem.h>
#include "cs_boundary_zone.h"
#include "cs_xdef.h"
#include "cs_equation_bc.h"
Include dependency graph for cs_equation_bc.c:

Macros

#define CS_EQUATION_BC_DBG   0
 

Functions

void cs_equation_vb_set_cell_bc (cs_lnum_t bf_id, short int f, cs_flag_t face_flag, const cs_cell_mesh_t *cm, const cs_cdo_connect_t *connect, const cs_cdo_quantities_t *quant, const cs_time_step_t *time_step, const cs_equation_param_t *eqp, const cs_real_t dir_values[], const short int neu_tags[], 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_fb_set_cell_bc (cs_lnum_t bf_id, short int f, cs_flag_t face_flag, const cs_cell_mesh_t *cm, const cs_cdo_connect_t *connect, const cs_cdo_quantities_t *quant, const cs_time_step_t *time_step, const cs_equation_param_t *eqp, const cs_real_t dir_values[], const short int neu_tags[], 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...
 
cs_real_tcs_equation_compute_dirichlet_vb (const cs_mesh_t *mesh, const cs_cdo_quantities_t *quant, const cs_cdo_connect_t *connect, const cs_time_step_t *time_step, const cs_equation_param_t *eqp, const cs_cdo_bc_list_t *dir, cs_cell_builder_t *cb)
 Compute the values of the Dirichlet BCs when DoFs are attached to vertices. More...
 
cs_real_tcs_equation_compute_dirichlet_fb (const cs_mesh_t *mesh, const cs_cdo_quantities_t *quant, const cs_cdo_connect_t *connect, const cs_time_step_t *time_step, const cs_equation_param_t *eqp, const cs_cdo_bc_list_t *dir, cs_cell_builder_t *cb)
 Compute the values of the Dirichlet BCs when DoFs are attached to CDO face-based schemes. More...
 
short int * cs_equation_tag_neumann_face (const cs_cdo_quantities_t *quant, const cs_equation_param_t *eqp)
 Tag each face related to a Neumann BC with its definition id. Default tag is -1 (not a Neumann face) More...
 
void cs_equation_compute_neumann_sv (short int def_id, short int f, const cs_cdo_quantities_t *quant, const cs_time_step_t *time_step, 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 (short int def_id, short int f, const cs_cdo_quantities_t *quant, const cs_time_step_t *time_step, 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...
 

Macro Definition Documentation

◆ CS_EQUATION_BC_DBG

#define CS_EQUATION_BC_DBG   0

Function Documentation

◆ cs_equation_compute_dirichlet_fb()

cs_real_t* cs_equation_compute_dirichlet_fb ( const cs_mesh_t mesh,
const cs_cdo_quantities_t quant,
const cs_cdo_connect_t connect,
const cs_time_step_t time_step,
const cs_equation_param_t eqp,
const cs_cdo_bc_list_t dir,
cs_cell_builder_t cb 
)

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]time_steppointer to a time step structure
[in]eqppointer to a cs_equation_param_t
[in]dirpointer to a cs_cdo_bc_list_t structure
[in,out]cbpointer to a cs_cell_builder_t structure
Returns
a pointer to a new allocated array storing the dirichlet values

◆ cs_equation_compute_dirichlet_vb()

cs_real_t* cs_equation_compute_dirichlet_vb ( const cs_mesh_t mesh,
const cs_cdo_quantities_t quant,
const cs_cdo_connect_t connect,
const cs_time_step_t time_step,
const cs_equation_param_t eqp,
const cs_cdo_bc_list_t dir,
cs_cell_builder_t cb 
)

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

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]time_steppointer to a time step structure
[in]eqppointer to a cs_equation_param_t
[in]dirpointer to a cs_cdo_bc_list_t structure
[in,out]cbpointer to a cs_cell_builder_t structure
Returns
a pointer to a new allocated array storing the dirichlet values

◆ cs_equation_compute_neumann_fb()

void cs_equation_compute_neumann_fb ( short int  def_id,
short int  f,
const cs_cdo_quantities_t quant,
const cs_time_step_t time_step,
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]def_idid of the definition for setting the Neumann BC
[in]flocal face number in the cs_cell_mesh_t
[in]quantpointer to a cs_cdo_quantities_t structure
[in]time_steppointer to a time step structure
[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 ( short int  def_id,
short int  f,
const cs_cdo_quantities_t quant,
const cs_time_step_t time_step,
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]def_idid of the definition for setting the Neumann BC
[in]flocal face number in the cs_cell_mesh_t
[in]quantpointer to a cs_cdo_quantities_t structure
[in]time_steppointer to a time step structure
[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_fb_set_cell_bc()

void cs_equation_fb_set_cell_bc ( cs_lnum_t  bf_id,
short int  f,
cs_flag_t  face_flag,
const cs_cell_mesh_t cm,
const cs_cdo_connect_t connect,
const cs_cdo_quantities_t quant,
const cs_time_step_t time_step,
const cs_equation_param_t eqp,
const cs_real_t  dir_values[],
const short int  neu_tags[],
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]bf_idid of the border face
[in]fid of the current face in a cellwise numbering
[in]face_flagmetadata about the current face
[in]cmpointer to a cellwise view of the mesh
[in]connectpointer to a cs_cdo_connect_t struct.
[in]quantpointer to a cs_cdo_quantities_t structure
[in]time_steppointer to a time step structure
[in]eqppointer to a cs_equation_param_t structure
[in]dir_valuesDirichlet values associated to each vertex
[in]neu_tagsDefinition id related to each Neumann face
[in,out]csyspointer to a cellwise view of the system
[in,out]cbpointer to a cellwise builder

◆ cs_equation_tag_neumann_face()

short int* cs_equation_tag_neumann_face ( const cs_cdo_quantities_t quant,
const cs_equation_param_t eqp 
)

Tag each face related to a Neumann BC with its definition id. Default tag is -1 (not a Neumann face)

Parameters
[in]quantpointer to a cs_cdo_quantities_t structure
[in]eqppointer to a cs_equation_param_t
Returns
an array with prescribed tags

◆ cs_equation_vb_set_cell_bc()

void cs_equation_vb_set_cell_bc ( cs_lnum_t  bf_id,
short int  f,
cs_flag_t  face_flag,
const cs_cell_mesh_t cm,
const cs_cdo_connect_t connect,
const cs_cdo_quantities_t quant,
const cs_time_step_t time_step,
const cs_equation_param_t eqp,
const cs_real_t  dir_values[],
const short int  neu_tags[],
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]bf_idid of the border face
[in]fid of the current face in a cellwise numbering
[in]face_flagmetadata about the current face
[in]cmpointer to a cellwise view of the mesh
[in]connectpointer to a cs_cdo_connect_t struct.
[in]quantpointer to a cs_cdo_quantities_t structure
[in]time_steppointer to a time step structure
[in]eqppointer to a cs_equation_param_t structure
[in]dir_valuesDirichlet values associated to each vertex
[in]neu_tagsDefinition id related to each Neumann face
[in,out]csyspointer to a cellwise view of the system
[in,out]cbpointer to a cellwise builder