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

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

#include <Cubo.h>

Inheritance diagram for DdDoubleLoop:
DomDecBasics

List of all members.

Public Member Functions

 DdDoubleLoop (double Edge[3], int NPart, double CutOff)
 Allocate.
void Erase ()
 Erase the pairlist.
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.
void RemPart (const int p, double *Pos)
 Remove a particle form the cell c.
void RemPart (const int p)
 Remove the particle p.
void AddPart (const int p, const int c)
 Add a particle to the cell c.
void RemPart (const int p, const int c)
 Remove a particle form the cell c.
void MovePart (const int p, double *OldPos, double *NewPos)
 Move a particle form the cell c1 to the cell c2.
void MovePart (const int p, double *NewPos)
 Move a particle form the cell c1 to the cell c2.
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.
int SetCoorNumb (double *Pos, int p)
 Stop the loop and set the counter to zero.
int GetNei (double *Pos, int *NeiList)
 Choose among the different neighbouring lists.
void SetCounters (int c)
 Set the counters to the initial position.
void PrintCell (const int c)
 Print the particles in a cell.
void PrintCells ()
 Print the the particles in the cells.
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.
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.
void IncrCurrList (const int c)
 Increment the current iterators in the cell.

Public Attributes

DomCellCella
 Number of particles and iterators per cell.
DOMAIN_PARTPc
 List of position of the particles.

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 
)

Member Function Documentation

void Erase ( )

Erase the pairlist.

Empty the records of the cells.

Definition at line 878 of file Cubo.cpp.

References DOMAIN_PART::Cell, Cella, DomCell::Last, DomDecBasics::NCell, DOMAIN_PART::Next, DomDecBasics::NPart, DomCell::NPart, Pc, and DOMAIN_PART::Prev.

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.

References Pc.

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.

Referenced by RemPart().

void RemPart ( const int  p)

Remove the particle p.

Remove a part to the correspondent cell.

Definition at line 931 of file Cubo.cpp.

References RemPart().

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 DOMAIN_PART::Cell, Cella, DomCell::Last, DOMAIN_PART::Next, DomDecBasics::NPart, DomCell::NPart, and Pc.

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 DOMAIN_PART::Cell, Cella, DomCell::First, DomCell::Last, DOMAIN_PART::Next, DomDecBasics::NPart, DomCell::NPart, Pc, and DOMAIN_PART::Prev.

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.

Referenced by PrintCell().

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 DOMAIN_PART::Coord, DomDecBasics::GetCoorNumb(), and Pc.

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.

Referenced by PrintCell().

void PrintCell ( const int  c)

Print the particles in a cell.

Print the content of the cell.

Reimplemented from DomDecBasics.

Definition at line 969 of file Cubo.cpp.

References Cella, IfItCell(), IncrCurr(), ItCell(), Next(), DomDecBasics::NPart, Pc, and SetCounters().

Referenced by PrintCells().

void PrintCells ( )

Print the the particles in the cells.

Print the content of all cells.

Reimplemented from DomDecBasics.

Definition at line 976 of file Cubo.cpp.

References DomDecBasics::NCell, and 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, DomDecBasics::p2Curr, Pc, and DOMAIN_PART::Pos.

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.

Referenced by PrintCell().


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