My Project
programmer's documentation
Data Structures | Macros | Functions | Variables
cs_mesh_adjacencies.h File Reference
#include "cs_base.h"
#include "cs_halo.h"
#include "cs_mesh.h"
Include dependency graph for cs_mesh_adjacencies.h:

Go to the source code of this file.

Data Structures

struct  cs_mesh_adjacencies_t
 
struct  cs_adjacency_t
 

Macros

#define CS_ADJACENCY_SHARED   (1 << 0)
 
#define CS_ADJACENCY_STRIDE   (1 << 1)
 
#define CS_ADJACENCY_SIGNED   (1 << 2)
 

Functions

void cs_mesh_adjacencies_initialize (void)
 Initialize mesh adjacencies helper API. More...
 
void cs_mesh_adjacencies_finalize (void)
 Finalize mesh adjacencies helper API. More...
 
void cs_mesh_adjacencies_update_mesh (void)
 Update mesh adjacencies helper API relative to mesh. More...
 
void cs_mesh_adjacencies_update_cell_cells_e (void)
 Update extended cell -> cell connectivites in mesh adjacencies helper API relative to mesh. More...
 
cs_adjacency_tcs_adjacency_create (cs_flag_t flag, int stride, cs_lnum_t n_elts)
 Create a cs_adjacency_t structure of size n_elts. More...
 
cs_adjacency_tcs_adjacency_create_from_s_arrays (cs_lnum_t n_elts, int stride, cs_lnum_t *ids, short int *sgn)
 Create a cs_adjacency_t structure sharing arrays scanned with a stride. More...
 
cs_adjacency_tcs_adjacency_create_from_i_arrays (cs_lnum_t n_elts, cs_lnum_t *idx, cs_lnum_t *ids, short int *sgn)
 Create a cs_adjacency_t structure sharing arrays scanned with an index. More...
 
void cs_adjacency_destroy (cs_adjacency_t **p_adj)
 Destroy a cs_adjacency_t structure. More...
 
cs_adjacency_tcs_adjacency_compose (int n_c_elts, const cs_adjacency_t *a2b, const cs_adjacency_t *b2c)
 Create a new cs_adjacency_t structure from the composition of two cs_adjacency_t structures: (1) A -> B and (2) B -> C The resulting structure describes A -> C. It does not rely on a stride and has no sgn member. More...
 
cs_adjacency_tcs_adjacency_transpose (int n_b_elts, const cs_adjacency_t *a2b)
 Create a new cs_adjacency_t structure from a one corresponding to A -> B. The resulting structure deals with B -> A. More...
 
void cs_adjacency_sort (cs_adjacency_t *adj)
 Sort each sub-list related to an entry in a cs_adjacency_t structure. More...
 
void cs_adjacency_remove_self_entries (cs_adjacency_t *adj)
 In an indexed list, remove id(s) corresponding to the current index. Useful for instance in order to prepare a matrix structure in MSR storage. More...
 
void cs_adjacency_dump (const char *name, FILE *_f, cs_adjacency_t *adj)
 Dump a cs_adjacency_t structure to a file or into the standard output. More...
 
cs_adjacency_tcs_mesh_adjacency_c2f (const cs_mesh_t *m, int boundary_order)
 Build a cells to faces adjacency structure. More...
 
cs_adjacency_tcs_mesh_adjacency_v2v (const cs_mesh_t *m)
 

Variables

const cs_mesh_adjacencies_tcs_glob_mesh_adjacencies
 

Function Documentation

◆ cs_adjacency_compose()

cs_adjacency_t* cs_adjacency_compose ( int  n_c_elts,
const cs_adjacency_t a2b,
const cs_adjacency_t b2c 
)

Create a new cs_adjacency_t structure from the composition of two cs_adjacency_t structures: (1) A -> B and (2) B -> C The resulting structure describes A -> C. It does not rely on a stride and has no sgn member.

Parameters
[in]n_c_eltsnumber of elements in C set
[in]a2badjacency A -> B
[in]b2cadjacency B -> C
Returns
a pointer to the cs_adjacency_t structure A -> C

◆ cs_adjacency_create()

cs_adjacency_t* cs_adjacency_create ( cs_flag_t  flag,
int  stride,
cs_lnum_t  n_elts 
)

Create a cs_adjacency_t structure of size n_elts.

Parameters
[in]flagmetadata related to the new cs_adjacency to create
[in]stride> 0 if useful otherwise ignored
[in]n_eltsnumber of entries of the indexed list
Returns
a pointer to a new allocated cs_adjacency_t structure

◆ cs_adjacency_create_from_i_arrays()

cs_adjacency_t* cs_adjacency_create_from_i_arrays ( cs_lnum_t  n_elts,
cs_lnum_t idx,
cs_lnum_t ids,
short int *  sgn 
)

Create a cs_adjacency_t structure sharing arrays scanned with an index.

Parameters
[in]n_eltsnumber of elements
[in]idxarray of size n_elts + 1
[in]idsarray of element ids (size = idx[n_elts])
[in]sgnarray storing the orientation (may be NULL)
Returns
a pointer to a new allocated cs_adjacency_t structure

◆ cs_adjacency_create_from_s_arrays()

cs_adjacency_t* cs_adjacency_create_from_s_arrays ( cs_lnum_t  n_elts,
int  stride,
cs_lnum_t ids,
short int *  sgn 
)

Create a cs_adjacency_t structure sharing arrays scanned with a stride.

Parameters
[in]n_eltsnumber of elements
[in]stridevalue of the stride
[in]idsarray of element ids (size = stride * n_elts)
[in]sgnarray storing the orientation (may be NULL)
Returns
a pointer to a new allocated cs_adjacency_t structure

◆ cs_adjacency_destroy()

void cs_adjacency_destroy ( cs_adjacency_t **  p_adj)

Destroy a cs_adjacency_t structure.

Parameters
[in,out]p_adjpointer of pointer to a cs_adjacency_t structure

◆ cs_adjacency_dump()

void cs_adjacency_dump ( const char *  name,
FILE *  _f,
cs_adjacency_t adj 
)

Dump a cs_adjacency_t structure to a file or into the standard output.

Parameters
[in]namename of the dump file. Can be set to NULL
[in]_fpointer to a FILE structure. Can be set to NULL.
[in]adjpointer to a cs_adjacency_t structure

◆ cs_adjacency_remove_self_entries()

void cs_adjacency_remove_self_entries ( cs_adjacency_t adj)

In an indexed list, remove id(s) corresponding to the current index. Useful for instance in order to prepare a matrix structure in MSR storage.

Parameters
[in,out]adjpointer to the cs_adjacency_t structure to update

◆ cs_adjacency_sort()

void cs_adjacency_sort ( cs_adjacency_t adj)

Sort each sub-list related to an entry in a cs_adjacency_t structure.

Parameters
[in]adjpointer to a cs_adjacency_t structure

◆ cs_adjacency_transpose()

cs_adjacency_t* cs_adjacency_transpose ( int  n_b_elts,
const cs_adjacency_t a2b 
)

Create a new cs_adjacency_t structure from a one corresponding to A -> B. The resulting structure deals with B -> A.

Parameters
[in]n_b_eltssize of the set of B elements
[in]a2bpointer to the A -> B cs_adjacency_t structure
Returns
a new pointer to the cs_adjacency_t structure B -> A

◆ cs_mesh_adjacencies_finalize()

void cs_mesh_adjacencies_finalize ( void  )

Finalize mesh adjacencies helper API.

◆ cs_mesh_adjacencies_initialize()

void cs_mesh_adjacencies_initialize ( void  )

Initialize mesh adjacencies helper API.

◆ cs_mesh_adjacencies_update_cell_cells_e()

void cs_mesh_adjacencies_update_cell_cells_e ( void  )

Update extended cell -> cell connectivites in mesh adjacencies helper API relative to mesh.

◆ cs_mesh_adjacencies_update_mesh()

void cs_mesh_adjacencies_update_mesh ( void  )

Update mesh adjacencies helper API relative to mesh.

◆ cs_mesh_adjacency_c2f()

cs_adjacency_t* cs_mesh_adjacency_c2f ( const cs_mesh_t m,
int  boundary_order 
)

Build a cells to faces adjacency structure.

With the boundary_order option set to 0, boundary faces come first, so interior face ids are shifted by the number of boundary faces. With boundary_order set to 1, boundary faces come last, so face ids are shifted by the number of interior faces.

Parameters
[in]mpointer to a cs_mesh_t structure
[in]boundary_orderboundaries first (0) or last (1)
Returns
a pointer to a new allocated cs_adjacency_t structure

◆ cs_mesh_adjacency_v2v()

cs_adjacency_t* cs_mesh_adjacency_v2v ( const cs_mesh_t m)

Variable Documentation

◆ cs_glob_mesh_adjacencies

const cs_mesh_adjacencies_t* cs_glob_mesh_adjacencies