programmer's documentation
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
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_boundary_zone.h"
#include "cs_mesh_location.h"
#include "cs_cdo_bc.h"
Include dependency graph for cs_cdo_bc.c:

Functions

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 (cs_param_bc_type_t default_bc, int n_desc, cs_xdef_t **desc, cs_lnum_t n_b_faces)
 Define the structure which translates the BC definition from the user viewpoint into a ready-to-use structure for setting the arrays keeping the values of the boundary condition to set. More...
 
cs_cdo_bc_tcs_cdo_bc_free (cs_cdo_bc_t *face_bc)
 Free a cs_cdo_bc_t structure. More...
 

Function Documentation

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
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
cs_cdo_bc_t* cs_cdo_bc_define ( cs_param_bc_type_t  default_bc,
int  n_desc,
cs_xdef_t **  desc,
cs_lnum_t  n_b_faces 
)

Define the structure which translates the BC definition from the user viewpoint into a ready-to-use structure for setting the arrays keeping the values of the boundary condition to set.

Parameters
[in]default_bctype of boundary condition to set by default
[in]n_descnumber of boundary definitions
[in]desclist of boundary condition definition
[in]n_b_facesnumber of border faces
Returns
a pointer to a new allocated cs_cdo_bc_t structure
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_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_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