UCFD_SPARSE  v1.0
Documentation
Loading...
Searching...
No Matches
pbutils.h File Reference
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

void make_nei_ele (const int m, const int n, const int l, int **nei_ele)
 Computes neighbor cell elements array. More...
 
int searcharr (int val, int *arr, int size)
 Search element in the given array. If element exists, return 1. More...
 
void make_reordering (const int nele, const int nface, int **nei_ele, int *mapping, int *unmapping)
 Reverse Cuthill-McKee algorithm using neighbor elements. More...
 
void make_coloring (const int m, const int n, const int l, int *icolor, int *lcolor)
 Coloring algorithm for unstructured grid. More...
 

Function Documentation

◆ make_coloring()

void make_coloring ( const int  m,
const int  n,
const int  l,
int *  icolor,
int *  lcolor 
)

Coloring algorithm for unstructured grid.

Note
In this function, original multi-coloring algorithm is simplified into Red-Black coloring (checkerboard) scheme due to the properties of hexahedral mesh.
Parameters
mnumber of elements in x-direction
nnumber of elements in y-direction
lnumber of elements in z-direction
icolorColor Index of each cell
lcolorColor level of each cell

Definition at line 153 of file pbutils.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ make_nei_ele()

void make_nei_ele ( const int  m,
const int  n,
const int  l,
int **  nei_ele 
)

Computes neighbor cell elements array.

Parameters
mnumber of elements in x-direction
nnumber of elements in y-direction
lnumber of elements in z-direction
nei_elearray storing neighbor elements

Definition at line 36 of file pbutils.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ make_reordering()

void make_reordering ( const int  nele,
const int  nface,
int **  nei_ele,
int *  mapping,
int *  unmapping 
)

Reverse Cuthill-McKee algorithm using neighbor elements.

Parameters
neleNumber of element cells
nfaceNumber of faces depends on element type
nei_eleIndices for neighbor cells [nface, neles]
mappingReordered index by Reverse Cuthill-McKee algorithm [neles]
unmappingOriginal index before Reverse Cuthill-McKee algorithm [neles]

Queue data structure

Last element index

Indexing variables

Definition at line 99 of file pbutils.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ searcharr()

int searcharr ( int  val,
int *  arr,
int  size 
)

Search element in the given array. If element exists, return 1.

Parameters
valValue for searching
arrObject array
sizeSize of array

Definition at line 78 of file pbutils.c.

Here is the caller graph for this function: