Allink  v0.1
Public Member Functions | Public Attributes | List of all members
DdDoubleLoop Class Reference

Stupid double loop to check the other pair loops. More...

#include <Cubo.h>

Inheritance diagram for DdDoubleLoop:
DomDecBasics

Public Member Functions

 DdDoubleLoop (double Edge[3], int NPart, double CutOff)
 Allocate. More...
 
void Erase ()
 Erase the pairlist. More...
 
void Clear ()
 Clear the pairlist.
 
int SwapPart (int p1, double *Pos1, int p2, double *Pos2)
 Swap two particles.
 
void AddPart (const int p, double *Pos)
 Add a particle to the cell c. More...
 
void RemPart (const int p, double *Pos)
 Remove a particle form the cell c. More...
 
void RemPart (const int p)
 Remove the particle p. More...
 
void AddPart (const int p, const int c)
 Add a particle to the cell c. More...
 
void RemPart (const int p, const int c)
 Remove a particle form the cell c. More...
 
void MovePart (const int p, double *OldPos, double *NewPos)
 Move a particle form the cell c1 to the cell c2. More...
 
void MovePart (const int p, double *NewPos)
 Move a particle form the cell c1 to the cell c2. More...
 
int PosRet (const double Pos[3])
 Relative position in the cell.
 
int pNPart (const int c)
 

part in the cell


 
int pNPart ()
 

part in the class


 
int pCell (const int p)
 Print the cell which the particle belong.
 
int First (const int c)
 First part in the cell.
 
int Next (const int p)
 Next linked part.
 
int ItCell (const int c)
 Iterate in the cell.
 
int IfItCell (const int c)
 Stop the loop and set the counter to zero. More...
 
int SetCoorNumb (double *Pos, int p)
 Stop the loop and set the counter to zero. More...
 
int GetNei (double *Pos, int *NeiList)
 Choose among the different neighbouring lists.
 
void SetCounters (int c)
 Set the counters to the initial position. More...
 
void PrintCell (const int c)
 Print the particles in a cell. More...
 
void PrintCells ()
 Print the the particles in the cells. More...
 
void SetCurr (int p)
 Gather information of the neighbouring cells.
 
void NextCurr ()
 Increase the iterator to the next couple.
 
int IfCurr ()
 Tell when the curr loop is over.
 
void Dist2Curr (double *DistRel)
 Retrun the squared current interparticle distance. More...
 
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.
 
void IncrCurr (const int c)
 Increment the current part in the cell. More...
 
void IncrCurrList (const int c)
 Increment the current iterators in the cell.
 
- Public Member Functions inherited from DomDecBasics
 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 class

More...
 
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

DomCellCella
 Number of particles and iterators per cell.
 
DOMAIN_PARTPc
 List of position of the particles.
 
- Public Attributes inherited from DomDecBasics
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

Stupid double loop to check the other pair loops.

Definition at line 382 of file Cubo.h.

Constructor & Destructor Documentation

DdDoubleLoop ( double  Edge[3],
int  NPart,
double  CutOff 
)

Allocate.

Constructor for the domain decomposition with the linked list.

Definition at line 855 of file Cubo.cpp.

References DomDecBasics::Edge, DomDecBasics::InvEdge, DomDecBasics::Mod10, DomDecBasics::NAllocP, DomDecBasics::NCell, DomDecBasics::NPart, DomDecBasics::NSect, DomDecBasics::SetCutOff(), and DomDecBasics::SigErr().

Member Function Documentation

void Erase ( )

Erase the pairlist.

Empty the records of the cells.

Definition at line 878 of file Cubo.cpp.

References DomDecBasics::NCell, and DomDecBasics::NPart.

void AddPart ( const int  p,
double *  Pos 
)

Add a particle to the cell c.

Add a part to the correspondent cell.

Definition at line 896 of file Cubo.cpp.

void RemPart ( const int  p,
double *  Pos 
)

Remove a particle form the cell c.

Remove particle from the cell.

Definition at line 909 of file Cubo.cpp.

void RemPart ( const int  p)

Remove the particle p.

Remove a part to the correspondent cell.

Definition at line 931 of file Cubo.cpp.

void AddPart ( const int  p,
const int  c 
)

Add a particle to the cell c.

Add a part to the correspondent cell.

Definition at line 901 of file Cubo.cpp.

References DomDecBasics::NPart.

void RemPart ( const int  p,
const int  c 
)

Remove a particle form the cell c.

Remove a part to the correspondent cell.

Definition at line 913 of file Cubo.cpp.

References DomDecBasics::NPart.

void MovePart ( const int  p,
double *  OldPos,
double *  NewPos 
)

Move a particle form the cell c1 to the cell c2.

Shift a particle from one position to its new.

Definition at line 943 of file Cubo.cpp.

void MovePart ( const int  p,
double *  NewPos 
)

Move a particle form the cell c1 to the cell c2.

Shift a particle from one position to its new.

Definition at line 939 of file Cubo.cpp.

int IfItCell ( const int  c)

Stop the loop and set the counter to zero.

Return 0 when the loop inside the cell is over.

Definition at line 956 of file Cubo.cpp.

References DomDecBasics::NPart, and DomDecBasics::p1Curr.

int SetCoorNumb ( double *  Pos,
int  p 
)

Stop the loop and set the counter to zero.

Coordination number of the particle in the cell.

Definition at line 891 of file Cubo.cpp.

References DomDecBasics::GetCoorNumb().

void SetCounters ( int  c)

Set the counters to the initial position.

Set the counters to the first particle of the cell c1 for the first loop.

Definition at line 947 of file Cubo.cpp.

References DomDecBasics::cCurr, DomDecBasics::p1Curr, and DomDecBasics::p2Curr.

void PrintCell ( const int  c)

Print the particles in a cell.

Print the content of the cell.

Definition at line 969 of file Cubo.cpp.

References DomDecBasics::NPart.

void PrintCells ( )

Print the the particles in the cells.

Print the content of all cells.

Definition at line 976 of file Cubo.cpp.

References DomDecBasics::NCell, and DomDecBasics::PrintCell().

void Dist2Curr ( double *  DistRel)

Retrun the squared current interparticle distance.

Iterate one step and return the position.

Definition at line 994 of file Cubo.cpp.

References DomDecBasics::Edge, DomDecBasics::InvEdge, DomDecBasics::p1Curr, and DomDecBasics::p2Curr.

void IncrCurr ( const int  c)

Increment the current part in the cell.

Increment the iterator to the next particle.

Definition at line 961 of file Cubo.cpp.

References DomDecBasics::NPart, DomDecBasics::p1Curr, and DomDecBasics::p2Curr.


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