Allink
v0.1
|
Stupid double loop to check the other pair loops. More...
#include <Cubo.h>
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 | |
DomCell * | Cella |
Number of particles and iterators per cell. | |
DOMAIN_PART * | Pc |
List of position of the particles. |
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 Cella, DomDecBasics::Edge, DomCell::First, DomDecBasics::InvEdge, DomCell::Last, DomDecBasics::Mod10, DomDecBasics::NAllocP, DomDecBasics::NCell, DomDecBasics::NPart, DomCell::NPart, DomDecBasics::NSect, Pc, DomDecBasics::SetCutOff(), and DomDecBasics::SigErr().
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 | ||
) |
void RemPart | ( | const int | p, |
double * | Pos | ||
) |
void RemPart | ( | const int | p | ) |
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 | ||
) |
void MovePart | ( | const int | p, |
double * | NewPos | ||
) |
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().