programmer's documentation
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
Macros | Functions
cs_cdo_connect.c File Reference
#include "cs_defs.h"
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <assert.h>
#include "bft_mem.h"
#include "fvm_io_num.h"
#include "cs_cdo.h"
#include "cs_log.h"
#include "cs_order.h"
#include "cs_parall.h"
#include "cs_sort.h"
#include "cs_cdo_connect.h"
Include dependency graph for cs_cdo_connect.c:

Macros

#define CS_CDO_CONNECT_DBG   0
 

Functions

static cs_adjacency_t_build_c2f_connect (const cs_mesh_t *mesh)
 Define the cell -> faces connectivity which is stored in a cs_adjacency_t structure Interior and border faces are both considered. Border face ids are shift by n_i_faces. More...
 
static void _update_v2v_idx (int n_vf, const cs_lnum_t f2v_lst[], cs_lnum_t v2v_idx[])
 Update the v2v index with the data from the given face connectivity. More...
 
static void _update_v2v_lst (int n_vf, const cs_lnum_t f2v_lst[], short int count[], cs_adjacency_t *v2v)
 Update the v2v index with the data from the given face connectivity. More...
 
static cs_adjacency_t_create_edges (const cs_mesh_t *m)
 Allocate and define a cs_adjacency_t structure related to vertex. More...
 
static void _add_f2e_entry (cs_lnum_t shift, cs_lnum_t v1_id, cs_lnum_t v2_id, const cs_adjacency_t *v2v, cs_adjacency_t *f2e)
 Add a entry in the face –> edges connectivity. More...
 
static cs_adjacency_t_build_f2e_connect (const cs_mesh_t *m, const cs_adjacency_t *v2v)
 Define the face -> edges connectivity which is stored in a cs_adjacency_t structure. More...
 
static cs_adjacency_t_build_e2v_connect (const cs_adjacency_t *v2v)
 Define the edge -> vertices connectivity which is stored in a cs_adjacency_t structure. More...
 
static void _compute_max_ent (const cs_mesh_t *m, cs_cdo_connect_t *connect)
 Compute max number of entities by cell and the max range between the min. id and the max.id for edges and vertices. More...
 
static fvm_element_t _get_cell_type (cs_lnum_t c_id, const cs_cdo_connect_t *connect)
 Associate to each cell a type of element (fvm_element_t) More...
 
static void _assign_ifs_rs (const cs_mesh_t *mesh, cs_lnum_t n_faces, int n_face_dofs, cs_interface_set_t **p_ifs, cs_range_set_t **p_rs)
 Allocate and define a cs_range_set_t structure and a cs_interface_set_t structure for schemes with DoFs at faces. More...
 
cs_cdo_connect_tcs_cdo_connect_init (cs_mesh_t *mesh, cs_flag_t scheme_flag)
 Allocate and define a new cs_cdo_connect_t structure Range sets related to vertices and faces are computed inside and set as members of the cs_mesh_t structure. More...
 
cs_cdo_connect_tcs_cdo_connect_free (cs_cdo_connect_t *connect)
 Destroy a cs_cdo_connect_t structure. More...
 
void cs_cdo_connect_summary (const cs_cdo_connect_t *connect)
 Summary of connectivity information. More...
 
void cs_cdo_connect_dump (const cs_cdo_connect_t *connect)
 Dump a cs_cdo_connect_t structure. More...
 

Macro Definition Documentation

#define CS_CDO_CONNECT_DBG   0

Function Documentation

static void _add_f2e_entry ( cs_lnum_t  shift,
cs_lnum_t  v1_id,
cs_lnum_t  v2_id,
const cs_adjacency_t v2v,
cs_adjacency_t f2e 
)
inlinestatic

Add a entry in the face –> edges connectivity.

Parameters
[in]shiftposition where to add the new entry
[in]v1_idid of the first vertex
[in]v2_idid of the second vertex
[in]v2vpointer to a cs_adjacency_t structure
[in,out]f2eface –> edges connectivity
static void _assign_ifs_rs ( const cs_mesh_t mesh,
cs_lnum_t  n_faces,
int  n_face_dofs,
cs_interface_set_t **  p_ifs,
cs_range_set_t **  p_rs 
)
static

Allocate and define a cs_range_set_t structure and a cs_interface_set_t structure for schemes with DoFs at faces.

Parameters
[in]meshpointer to a cs_mesh_t structure
[in]n_facesnumber of faces (interior + border)
[in]n_face_dofsnumber of DoFs per face
[in,out]p_ifspointer of pointer to a cs_interface_set_t
[in,out]p_ifspointer of pointer to a cs_interface_set_t
static cs_adjacency_t* _build_c2f_connect ( const cs_mesh_t mesh)
static

Define the cell -> faces connectivity which is stored in a cs_adjacency_t structure Interior and border faces are both considered. Border face ids are shift by n_i_faces.

Parameters
[in]meshpointer to a cs_mesh_t structure
Returns
a pointer to a new allocated cs_adjacency_t structure
static cs_adjacency_t* _build_e2v_connect ( const cs_adjacency_t v2v)
static

Define the edge -> vertices connectivity which is stored in a cs_adjacency_t structure.

Parameters
[in]v2vpointer to a cs_adjacency_t structure
Returns
a pointer to a new allocated cs_adjacency_t structure
static cs_adjacency_t* _build_f2e_connect ( const cs_mesh_t m,
const cs_adjacency_t v2v 
)
static

Define the face -> edges connectivity which is stored in a cs_adjacency_t structure.

Parameters
[in]mpointer to a cs_mesh_t structure
[in]v2vpointer to the cs_adjacency_t structure
Returns
a pointer to a new allocated cs_adjacency_t structure
static void _compute_max_ent ( const cs_mesh_t m,
cs_cdo_connect_t connect 
)
static

Compute max number of entities by cell and the max range between the min. id and the max.id for edges and vertices.

Parameters
[in]mpointer to a cs_mesh_t structure
[in,out]connectpointer to the cs_cdo_connect_t struct.
static cs_adjacency_t* _create_edges ( const cs_mesh_t m)
static

Allocate and define a cs_adjacency_t structure related to vertex.

Parameters
[in]mpointer to the cs_mesh_t structure
Returns
a pointer to a new allocated _edge_builder_t structure
static fvm_element_t _get_cell_type ( cs_lnum_t  c_id,
const cs_cdo_connect_t connect 
)
static

Associate to each cell a type of element (fvm_element_t)

Parameters
[in]c_idcell id
[in]connectpointer to a cs_cdo_connect_t struct.
Returns
type of element for this cell
static void _update_v2v_idx ( int  n_vf,
const cs_lnum_t  f2v_lst[],
cs_lnum_t  v2v_idx[] 
)
inlinestatic

Update the v2v index with the data from the given face connectivity.

Parameters
[in]n_vfnumber of vertices for this face
[in]f2v_lstface -> vertices list
[in,out]v2v_idxindex to update
static void _update_v2v_lst ( int  n_vf,
const cs_lnum_t  f2v_lst[],
short int  count[],
cs_adjacency_t v2v 
)
inlinestatic

Update the v2v index with the data from the given face connectivity.

Parameters
[in]n_vfnumber of vertices for this face
[in]f2v_lstface -> vertices list
[in,out]countarray to known where to place the new elements
[in,out]v2vstructure to update
void cs_cdo_connect_dump ( const cs_cdo_connect_t connect)

Dump a cs_cdo_connect_t structure.

Parameters
[in]connectpointer to cs_cdo_connect_t structure
cs_cdo_connect_t* cs_cdo_connect_free ( cs_cdo_connect_t connect)

Destroy a cs_cdo_connect_t structure.

Parameters
[in]connectpointer to the cs_cdo_connect_t struct. to destroy
Returns
a NULL pointer
cs_cdo_connect_t* cs_cdo_connect_init ( cs_mesh_t mesh,
cs_flag_t  scheme_flag 
)

Allocate and define a new cs_cdo_connect_t structure Range sets related to vertices and faces are computed inside and set as members of the cs_mesh_t structure.

Parameters
[in,out]meshpointer to a cs_mesh_t structure
[in]scheme_flagflag storing requested space schemes
Returns
a pointer to a cs_cdo_connect_t structure
void cs_cdo_connect_summary ( const cs_cdo_connect_t connect)

Summary of connectivity information.

Parameters
[in]connectpointer to cs_cdo_connect_t structure