Allink
v0.1
|
All the general functions shared among the different domain decomposition structures. More...
#include <Cubo.h>
Public Member Functions | |
DomDecBasics () | |
Allocate. More... | |
void | SigErr (int Condition, const char *s,...) |
Handle errors. More... | |
int | PosRet (const double Pos[3]) |
Relative position in the cell. | |
int | pNPart () |
part in the classMore... | |
int | pNCell () |
Print the number of cells. More... | |
int | pCella (const double Pos[3]) |
(x,y,z)->n More... | |
void | pCella (const double Pos[3], int c[4]) |
(x,y,z)->(cx,cy,cz,cTot) More... | |
int | GetCoorNumb (double *Pos) |
Get the coordination number. More... | |
int | GetCellCoord (int c, int Coord, int *NeiList) |
Get the number of the neighbouring cells for the particles close to a wall. More... | |
int | GetCellCoord (double *Pos, int *NeiList) |
Get the number of the neighbouring cells for the particles close to a wall. More... | |
int | GetCellCh (int c, int *NeiList) |
Get the number of the neighbouring cells. More... | |
int | GetCell (double *Pos, int *NeiList) |
Get the number of the neighbouring cells for a ghost particle. More... | |
void | PrintCell (const int c) |
Print the content of a cell. | |
void | PrintCells () |
Print the the particles in the cells. | |
void | PrintList (const int c) |
Print the the particle list in the cells. | |
void | PrintLists () |
Print the the particle list in the cells. | |
void | CheckList () |
Check the list. | |
void | CheckNei (int p) |
Check the neighbours. | |
int | SetCutOff (double CutOffExt) |
Set the CutOff. More... | |
Public Attributes | |
double | BoundCond [27][3] |
Boundary condition for the cell consider. | |
int | cCurr |
Cell where the current particle sits. | |
int | NeiListCurr [27] |
Neighbouring list. | |
int | NNeiCurr |
Number of neighbouring cells. | |
int | nNeiCurr |
Current number of neighbours. | |
int | p1Curr |
Reference particle. | |
int | p2Curr |
Current particle. | |
int | IfLoopCurr |
1 if the loop is over | |
int | Mod10 [3] |
Module 10 (nx,ny,nz) -> nc. | |
int | NCell |
Number of cells. | |
int | NSect [3] |
Number of cells per direction. | |
double | Edge [3] |
Box sizes. | |
double | InvEdge [3] |
Inverse box size. | |
double | CutOff |
Cell CutOff. | |
double | PosCurr [3] |
Position of the current particle. | |
int | NAllocP |
Number of allocated part. | |
int | NPart |
Total number of particle. | |
int | NNeighbour |
Number of neighbours. | |
All the general functions shared among the different domain decomposition structures.
DomDecBasics | ( | ) |
void SigErr | ( | int | Condition, |
const char * | s, | ||
... | |||
) |
Handle errors.
Signal an error and exit.
Definition at line 24 of file Cubo.cpp.
Referenced by DdLinkedList::AddPart(), DdLinkedList::Couple(), DdDoubleLoop::DdDoubleLoop(), DdLinkedList::DdLinkedList(), GetCellCh(), GetCellCoord(), DdLinkedList::IncrCurrList(), DdLinkedList::ItCell(), pCella(), DdLinkedList::RemPart(), NeiVertex::Reorder(), DdLinkedList::SetCurr(), and DdLinkedList::SetCurrGhost().
int pNPart | ( | ) |
int pNCell | ( | ) |
int pCella | ( | const double | Pos[3] | ) |
(x,y,z)->n
Return the unique cell identification number for the given position.
Definition at line 192 of file Cubo.cpp.
References Edge, InvEdge, Mod10, NCell, NSect, and SigErr().
Referenced by DdLinkedList::AddPart(), DdArray::AddPart(), DdFixedSize::AddPart(), GetCell(), GetCellCoord(), DdLinkedList::MovePart(), DdArray::MovePart(), DdFixedSize::MovePart(), DdLinkedList::RemPart(), DdArray::RemPart(), DdFixedSize::RemPart(), DdLinkedList::SetCurrGhost(), DdArray::SwapPart(), and DdFixedSize::SwapPart().
void pCella | ( | const double | Pos[3], |
int | c[4] | ||
) |
int GetCoorNumb | ( | double * | Pos | ) |
Get the coordination number.
Retrun the coordination number for the given position.
Definition at line 212 of file Cubo.cpp.
References CutOff, Edge, and NSect.
Referenced by GetCellCoord(), DdLinkedList::SetCoorNumb(), and DdDoubleLoop::SetCoorNumb().
int GetCellCoord | ( | int | c, |
int | Coord, | ||
int * | NeiList | ||
) |
Get the number of the neighbouring cells for the particles close to a wall.
Coordination number of the particle in the cell, every particle has a flag which tells to which cell border is close to.
Saves computational time.
Definition at line 121 of file Cubo.cpp.
References BoundCond, Mod10, NSect, and SigErr().
Referenced by GetCellCoord().
int GetCellCoord | ( | double * | Pos, |
int * | NeiList | ||
) |
Get the number of the neighbouring cells for the particles close to a wall.
Coordination number of the particle in the cell.
Definition at line 115 of file Cubo.cpp.
References GetCellCoord(), GetCoorNumb(), and pCella().
int GetCellCh | ( | int | c, |
int * | NeiList | ||
) |
int GetCell | ( | double * | Pos, |
int * | NeiList | ||
) |
Get the number of the neighbouring cells for a ghost particle.
Return the list of neighbouring cells.
Definition at line 59 of file Cubo.cpp.
References GetCellCh(), and pCella().
int SetCutOff | ( | double | CutOffExt | ) |
Set the CutOff.
Set the cut off of the grid spacing, the cut off should be much smaller than the box size.
Definition at line 40 of file Cubo.cpp.
References CutOff, Edge, and NSect.
Referenced by DdDoubleLoop::DdDoubleLoop(), and DdLinkedList::DdLinkedList().