programmer's documentation
Functions
cs_cdo_bc.c File Reference
#include "cs_defs.h"
#include <errno.h>
#include <locale.h>
#include <assert.h>
#include "bft_mem.h"
#include "cs_mesh_location.h"
#include "cs_cdo_bc.h"
Include dependency graph for cs_cdo_bc.c:

Functions

static cs_flag_t _get_bc_flag (cs_param_bc_type_t bc_type)
 Convert a cs_param_bc_type_t into a flag (enable multiple type for a same entity as required for vertices and edges) More...
 
static cs_cdo_bc_t_cdo_bc_create (cs_lnum_t n_elts)
 Create a cs_cdo_bc_t structure. More...
 
static void _add_def_to_bc (const short int def_id, const cs_lnum_t n_faces, const cs_lnum_t *elt_ids, cs_lnum_t shift, short int *bc_defs, cs_lnum_t *bc_list)
 Update the cs_cdo_bc_t structure with elements associated to the definition of id def_id. More...
 
cs_cdo_bc_list_tcs_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_tcs_cdo_bc_list_free (cs_cdo_bc_list_t *bcl)
 Free a cs_cdo_bc_list_t structure. More...
 
cs_cdo_bc_tcs_cdo_bc_define (const cs_param_bc_t *param_bc, cs_lnum_t n_b_faces)
 Define the structure which translates the BC definition from the user viewpoint into a ready-to-use structure. More...
 
cs_cdo_bc_tcs_cdo_bc_free (cs_cdo_bc_t *face_bc)
 Free a cs_cdo_bc_t structure. More...
 

Function Documentation

◆ _add_def_to_bc()

static void _add_def_to_bc ( const short int  def_id,
const cs_lnum_t  n_faces,
const cs_lnum_t elt_ids,
cs_lnum_t  shift,
short int *  bc_defs,
cs_lnum_t bc_list 
)
inlinestatic

Update the cs_cdo_bc_t structure with elements associated to the definition of id def_id.

Parameters
[in]def_idid of the definition to add
[in]n_facesnumber of border faces to specify
[in]elt_idslist of border faces related to this def. (or NULL)
[in]shiftshift to apply before adding new entries
[in,out]bc_defspointer to the list of definitions
[in,out]bc_listpointer to the list dedicated to a specific type of boundary condition

◆ _cdo_bc_create()

static cs_cdo_bc_t* _cdo_bc_create ( cs_lnum_t  n_elts)
static

Create a cs_cdo_bc_t structure.

Parameters
[in]n_eltsnumber of elements
Returns
a new allocated pointer to a cs_cdo_bc_t structure

◆ _get_bc_flag()

static cs_flag_t _get_bc_flag ( cs_param_bc_type_t  bc_type)
inlinestatic

Convert a cs_param_bc_type_t into a flag (enable multiple type for a same entity as required for vertices and edges)

Parameters
[in]bc_typepredefined type of boundary condition
Returns
a flag corresponding to the given type of boundary condition

◆ cs_cdo_bc_define()

cs_cdo_bc_t* cs_cdo_bc_define ( const cs_param_bc_t param_bc,
cs_lnum_t  n_b_faces 
)

Define the structure which translates the BC definition from the user viewpoint into a ready-to-use structure.

  • Prepare the treatment of the boundary conditions.
  • Compile the information detailed in a cs_param_bc_t structure
Parameters
[in]param_bcpointer to the parameters related to BCs of an eq.
[in]n_b_facesnumber of border faces
Returns
a pointer to a new allocated cs_cdo_bc_t structure

◆ cs_cdo_bc_free()

cs_cdo_bc_t* cs_cdo_bc_free ( cs_cdo_bc_t face_bc)

Free a cs_cdo_bc_t structure.

Parameters
[in,out]face_bcpointer to a cs_cdo_bc_t structure
Returns
a NULL pointer

◆ cs_cdo_bc_list_create()

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.

Parameters
[in]n_eltsnumber of entries of the list
[in]n_nhmg_eltsnumber of elements attached to a homogeneous BC
Returns
a new allocated pointer to a cs_cdo_bc_list_t structure

◆ cs_cdo_bc_list_free()

cs_cdo_bc_list_t* cs_cdo_bc_list_free ( cs_cdo_bc_list_t bcl)

Free a cs_cdo_bc_list_t structure.

Parameters
[in]bclpointer to the cs_cdo_bc_list_t structure to free
Returns
a NULL pointer