|
programmer's documentation
|
#include "cs_defs.h"#include <errno.h>#include <locale.h>#include <assert.h>#include <bft_mem.h>#include <bft_printf.h>#include "cs_mesh_location.h"#include "cs_cdo_bc.h"
Macros | |
| #define | CS_BC_FLAG_HMG (1 << 0) /* 1: homogeneous (i.e. 0) */ |
| #define | CS_BC_FLAG_CONST (1 << 1) /* 2: constant value */ |
| #define | CS_BC_FLAG_DIRI (1 << 2) /* 4: Dirichlet BC*/ |
| #define | CS_BC_FLAG_NEUM (1 << 3) /* 8: Neumann BC */ |
| #define | CS_BC_FLAG_ROBIN (1 << 4) /* 16: Robin BC*/ |
| #define | CS_BC_FLAG_SCAL (1 << 5) /* 32: scalar-valued */ |
| #define | CS_BC_FLAG_VECT (1 << 6) /* 64: vector-valued */ |
| #define | CS_BC_FLAG_TENS (1 << 7) /* 128: tensor-valued */ |
| #define | CS_BC_FLAG_TANG (1 << 8) /* 256: tangential component */ |
| #define | CS_BC_FLAG_NORM (1 << 9) /* 512: normal component */ |
| #define | CS_BC_FLAG_VTX (1 << 10) /* 1024: on vertices */ |
| #define | CS_BC_FLAG_EDGE (1 << 11) /* 2048: on edges */ |
| #define | CS_BC_FLAG_FACE (1 << 12) /* 4096: on faces */ |
| #define | CS_BC_FLAG_CELL (1 << 13) /* 8192: on cells */ |
| #define | CS_BC_FLAG_PRIM (1 << 14) /* 16384: on primal mesh */ |
| #define | CS_BC_FLAG_DUAL (1 << 15) /* 32768: on dual mesh */ |
Functions | |
| cs_cdo_bc_list_t * | cs_cdo_bc_list_create (cs_lnum_t n_elts, cs_lnum_t n_nhmg_elts) |
| Create a cs_cdo_bc_list_t structure. More... | |
| cs_cdo_bc_list_t * | cs_cdo_bc_list_free (cs_cdo_bc_list_t *bcl) |
| Free a cs_cdo_bc_list_t structure. More... | |
| cs_cdo_bc_t * | cs_cdo_bc_init (const cs_param_bc_t *param_bc, cs_lnum_t n_b_faces) |
| Prepare the treatment of the boundary conditions. Compile the information detailed in a cs_param_bc_t structure into the structure cs_cdo_bc_t (based on border faces). This is a primilary step to be ready to set the values of the BC. More... | |
| cs_cdo_bc_t * | cs_cdo_bc_free (cs_cdo_bc_t *face_bc) |
| Free a cs_cdo_bc_t structure. More... | |
| cs_cdo_bc_list_t * | cs_cdo_bc_vtx_dir_create (const cs_mesh_t *m, const cs_cdo_bc_t *face_bc) |
| Build cs_cdo_bc_list_t structures for Dirichlet BC on primal vertices. When there is a choice between homogeneous or non homogeneous BCs, we always set the homogeneous condition for Dirichlet BCs. More... | |
| void | cs_cdo_bc_dirichlet_set (cs_flag_t dof_flag, double tcur, const void *geom, const cs_param_bc_t *bc, const cs_cdo_bc_list_t *ent_dir, double *dir_val) |
| Set the Dirichlet values to enforce on the corresponding entities. More... | |
| #define CS_BC_FLAG_CELL (1 << 13) /* 8192: on cells */ |
| #define CS_BC_FLAG_CONST (1 << 1) /* 2: constant value */ |
| #define CS_BC_FLAG_DIRI (1 << 2) /* 4: Dirichlet BC*/ |
| #define CS_BC_FLAG_DUAL (1 << 15) /* 32768: on dual mesh */ |
| #define CS_BC_FLAG_EDGE (1 << 11) /* 2048: on edges */ |
| #define CS_BC_FLAG_FACE (1 << 12) /* 4096: on faces */ |
| #define CS_BC_FLAG_HMG (1 << 0) /* 1: homogeneous (i.e. 0) */ |
| #define CS_BC_FLAG_NEUM (1 << 3) /* 8: Neumann BC */ |
| #define CS_BC_FLAG_NORM (1 << 9) /* 512: normal component */ |
| #define CS_BC_FLAG_PRIM (1 << 14) /* 16384: on primal mesh */ |
| #define CS_BC_FLAG_ROBIN (1 << 4) /* 16: Robin BC*/ |
| #define CS_BC_FLAG_SCAL (1 << 5) /* 32: scalar-valued */ |
| #define CS_BC_FLAG_TANG (1 << 8) /* 256: tangential component */ |
| #define CS_BC_FLAG_TENS (1 << 7) /* 128: tensor-valued */ |
| #define CS_BC_FLAG_VECT (1 << 6) /* 64: vector-valued */ |
| #define CS_BC_FLAG_VTX (1 << 10) /* 1024: on vertices */ |
| void cs_cdo_bc_dirichlet_set | ( | cs_flag_t | dof_flag, |
| double | tcur, | ||
| const void * | geom, | ||
| const cs_param_bc_t * | bc, | ||
| const cs_cdo_bc_list_t * | ent_dir, | ||
| double * | dir_val | ||
| ) |
Set the Dirichlet values to enforce on the corresponding entities.
| [in] | dof_flag | information about the corresponding DoF to treat |
| [in] | tcur | current physical time of the simulation |
| [in] | stride | 1, 3, 6, 9 (depend on the type of equation) |
| [in] | geom | structure storing geometric information |
| [in] | bc | pointer to a cs_param_bc_t structure |
| [in] | ent_dir | pointer to a cs_cdo_bc_list_t |
| [in,out] | dir_val | array used to store Dirichlet values |
| cs_cdo_bc_t* cs_cdo_bc_free | ( | cs_cdo_bc_t * | face_bc | ) |
Free a cs_cdo_bc_t structure.
| [in,out] | face_bc | pointer to a cs_cdo_bc_t structure |
| cs_cdo_bc_t* cs_cdo_bc_init | ( | const cs_param_bc_t * | param_bc, |
| cs_lnum_t | n_b_faces | ||
| ) |
Prepare the treatment of the boundary conditions. Compile the information detailed in a cs_param_bc_t structure into the structure cs_cdo_bc_t (based on border faces). This is a primilary step to be ready to set the values of the BC.
| [in] | param_bc | pointer to the parameters related to BCs |
| [in] | n_b_faces | number of border faces |
| cs_cdo_bc_list_t* cs_cdo_bc_list_create | ( | cs_lnum_t | n_elts, |
| cs_lnum_t | n_nhmg_elts | ||
| ) |
Create a cs_cdo_bc_list_t structure.
| [in] | n_elts | number of entries of the list |
| [in] | n_hmg_elts | number of elements attached to a homogeneous BC |
| cs_cdo_bc_list_t* cs_cdo_bc_list_free | ( | cs_cdo_bc_list_t * | bcl | ) |
Free a cs_cdo_bc_list_t structure.
| [in] | bcl | pointer to the cs_cdo_bc_list_t structure to free |
| cs_cdo_bc_list_t* cs_cdo_bc_vtx_dir_create | ( | const cs_mesh_t * | m, |
| const cs_cdo_bc_t * | face_bc | ||
| ) |
Build cs_cdo_bc_list_t structures for Dirichlet BC on primal vertices. When there is a choice between homogeneous or non homogeneous BCs, we always set the homogeneous condition for Dirichlet BCs.
| [in] | m | pointer to a cs_mesh_t structure |
| [in] | face_bc | pointer to a cs_cdo_bc_t structure |
1.8.7