Allink  v0.1
Public Member Functions | Public Attributes
DomDecBasics Class Reference

All the general functions shared among the different domain decomposition structures. More...

#include <Cubo.h>

Inheritance diagram for DomDecBasics:
DdArray DdDoubleLoop DdFixedSize DdLinkedList

List of all members.

Public Member Functions

 DomDecBasics ()
 Allocate.
void SigErr (int Condition, const char *s,...)
 Handle errors.
int PosRet (const double Pos[3])
 Relative position in the cell.
int pNPart ()
 # part in the class
int pNCell ()
 Print the number of cells.
int pCella (const double Pos[3])
 (x,y,z)->n
void pCella (const double Pos[3], int c[4])
 (x,y,z)->(cx,cy,cz,cTot)
int GetCoorNumb (double *Pos)
 Get the coordination number.
int GetCellCoord (int c, int Coord, int *NeiList)
 Get the number of the neighbouring cells for the particles close to a wall.
int GetCellCoord (double *Pos, int *NeiList)
 Get the number of the neighbouring cells for the particles close to a wall.
int GetCellCh (int c, int *NeiList)
 Get the number of the neighbouring cells.
int GetCell (double *Pos, int *NeiList)
 Get the number of the neighbouring cells for a ghost particle.
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.

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.

Detailed Description

All the general functions shared among the different domain decomposition structures.

Definition at line 35 of file Cubo.h.


Constructor & Destructor Documentation

Allocate.

Allocator of the general structure.

Definition at line 17 of file Cubo.cpp.


Member Function Documentation

void SigErr ( int  Condition,
const char *  s,
  ... 
)
int pNPart ( )

# part in the class

Number of particles.

Reimplemented in DdDoubleLoop, and DdLinkedList.

Definition at line 51 of file Cubo.cpp.

References NPart.

int pNCell ( )

Print the number of cells.

Number of cells.

Reimplemented in DdArray.

Definition at line 55 of file Cubo.cpp.

References NCell.

int pCella ( const double  Pos[3])
void pCella ( const double  Pos[3],
int  c[4] 
)

(x,y,z)->(cx,cy,cz,cTot)

Return the unique cell identification number for the given position.

Definition at line 203 of file Cubo.cpp.

References Edge, Mod10, NCell, NSect, and SigErr().

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 
)

Get the number of the neighbouring cells.

Neighbouring cells with periodic boundary conditions.

Definition at line 64 of file Cubo.cpp.

References BoundCond, Mod10, NCell, NSect, and SigErr().

Referenced by GetCell().

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().


The documentation for this class was generated from the following files: