Allink
v0.1
|
Domain decomposition as pointer to linked particles. More...
#include <Cubo.h>
Public Member Functions | |
DdLinkedList (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 | IfItCouple (const int c) |
Stop the loop and set the counter to zero. More... | |
int | SetCoorNumb (double *Pos, int p) |
Set the coordination umber to the part p. 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 | Couple (const int c, int *p1, int *p2) |
Iterates along all couples. 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. More... | |
void | SetCurrGhost (double *Pos) |
Gather information of the neighbouring cells. | |
void | NextCurr () |
Increase the iterator to the next couple. | |
void | NextCurrGhost () |
Increase the iterator to the next couple. | |
int | IfCurr () |
Tell when the curr loop is over. More... | |
int | IfCurrGhost () |
Tell when the curr loop is over. | |
void | Dist2Curr (double *DistRel) |
Retrun the squared current interparticle distance. More... | |
void | Dist2CurrGhost (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. More... | |
int | FindClosest (int p1) |
Find the closest neighbour. | |
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 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 | |
DomCell * | Cella |
Number of particles and iterators per cell. | |
DOMAIN_PART * | Pc |
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. | |
DdLinkedList | ( | double | Edge[3], |
int | NPart, | ||
double | CutOff | ||
) |
Allocate.
Constructor for the domain decomposition with the linked list.
Definition at line 232 of file Cubo.cpp.
References DomDecBasics::Edge, DomDecBasics::InvEdge, DomDecBasics::Mod10, DomDecBasics::NAllocP, DomDecBasics::NCell, DomDecBasics::NPart, DomDecBasics::NSect, DomDecBasics::SetCutOff(), and DomDecBasics::SigErr().
void Erase | ( | ) |
Erase the pairlist.
Empty the records of the cells.
Definition at line 258 of file Cubo.cpp.
References DomDecBasics::NCell, and DomDecBasics::NPart.
Referenced by Forces::Dynamics(), Forces::MinimalNrg(), and Forces::ReOpen().
void AddPart | ( | const int | p, |
double * | Pos | ||
) |
Add a particle to the cell c.
Add a part to the correspondent cell.
Definition at line 276 of file Cubo.cpp.
References DomDecBasics::pCella().
Referenced by Forces::AllocMethod(), VarData::ConnectLineChain(), VarData::ConnectLineChain3(), Forces::ConsiderCh(), Forces::Dynamics(), VarData::FindNeighbours(), Forces::InsertBead(), Forces::InsertChBias(), Forces::MinimalNrg(), Forces::RemoveChBias(), and Forces::ReOpen().
void RemPart | ( | const int | p, |
double * | Pos | ||
) |
Remove a particle form the cell c.
Remove particle from the cell.
Definition at line 307 of file Cubo.cpp.
References DomDecBasics::pCella().
Referenced by Forces::IgnoreCh(), Forces::RemChFromSys(), Forces::RemoveChBias(), Forces::TryInsert(), Forces::TryRemove(), and Forces::WidomInsert().
void RemPart | ( | const int | p | ) |
Remove the particle p.
Remove a part to the correspondent cell.
Definition at line 336 of file Cubo.cpp.
References DomDecBasics::SigErr().
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 285 of file Cubo.cpp.
References DomDecBasics::NAllocP, DomDecBasics::NPart, and DomDecBasics::SigErr().
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 312 of file Cubo.cpp.
References DomDecBasics::NAllocP, DomDecBasics::NPart, and DomDecBasics::SigErr().
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 403 of file Cubo.cpp.
References DomDecBasics::pCella().
Referenced by Forces::TryMove().
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 393 of file Cubo.cpp.
References DomDecBasics::pCella().
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 427 of file Cubo.cpp.
References DomDecBasics::NPart.
Referenced by VarData::FindNeighbours().
int IfItCouple | ( | const int | c | ) |
Stop the loop and set the counter to zero.
Return zero when both iterators are over the loop.
Definition at line 572 of file Cubo.cpp.
References DomDecBasics::NPart.
int SetCoorNumb | ( | double * | Pos, |
int | p | ||
) |
Set the coordination umber to the part p.
Coordination number of the particle in the cell.
Definition at line 271 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 413 of file Cubo.cpp.
References DomDecBasics::NCell, and DomDecBasics::NPart.
Referenced by VarData::FindNeighbours().
void Couple | ( | const int | c, |
int * | p1, | ||
int * | p2 | ||
) |
Iterates along all couples.
Associate the two iterator of the cell to the particles p1 and p2.
Definition at line 565 of file Cubo.cpp.
References DomDecBasics::NAllocP, and DomDecBasics::SigErr().
void PrintCell | ( | const int | c | ) |
Print the particles in a cell.
Print the content of the cell.
Definition at line 439 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 446 of file Cubo.cpp.
References DomDecBasics::NCell, and DomDecBasics::PrintCell().
void SetCurr | ( | int | p | ) |
Gather information of the neighbouring cells.
Set the iterators for the current particle and build the list of neighbouring cells.
Definition at line 453 of file Cubo.cpp.
References DomDecBasics::cCurr, DomDecBasics::IfLoopCurr, DomDecBasics::NeiListCurr, DomDecBasics::NNeiCurr, DomDecBasics::nNeiCurr, DomDecBasics::p1Curr, DomDecBasics::p2Curr, and DomDecBasics::SigErr().
Referenced by Forces::AddDens(), Forces::CalcForcesDensFunc(), Forces::CalcPairwise(), Forces::CalcPairwiseCh(), Forces::CalcTens(), Forces::CheckDomDec(), Forces::CheckPairList(), VarData::ConnectLineChain(), VarData::ConnectLineChain3(), Forces::DensFuncNrgChInternal(), Forces::DensFuncNrgGhostInternal(), Forces::MinimalNrg(), Forces::NrgStep(), Forces::NrgStepCh(), Forces::RemDens(), and Forces::SumForcesMD().
int IfCurr | ( | ) |
Tell when the curr loop is over.
Set the iterators for the current ghost particle and build the list of neighbouring cells.
Definition at line 498 of file Cubo.cpp.
References DomDecBasics::IfLoopCurr.
Referenced by Forces::AddDens(), Forces::CalcForcesDensFunc(), Forces::CalcPairwise(), Forces::CalcPairwiseCh(), Forces::CalcTens(), Forces::CheckDomDec(), Forces::CheckPairList(), VarData::ConnectLineChain(), VarData::ConnectLineChain3(), Forces::DensFuncNrgChInternal(), Forces::DensFuncNrgGhostInternal(), Forces::MinimalNrg(), Forces::NrgStep(), Forces::NrgStepCh(), Forces::RemDens(), and Forces::SumForcesMD().
void Dist2Curr | ( | double * | DistRel | ) |
Retrun the squared current interparticle distance.
Iterate one step and return the position.
Definition at line 502 of file Cubo.cpp.
References DomDecBasics::Edge, DomDecBasics::InvEdge, DomDecBasics::p1Curr, and DomDecBasics::p2Curr.
Referenced by Forces::AddDens(), Forces::CalcForcesDensFunc(), Forces::CalcPairwise(), Forces::CalcPairwiseCh(), Forces::CalcTens(), Forces::CheckDomDec(), Forces::CheckPairList(), VarData::ConnectLineChain3(), Forces::DensFuncNrgChInternal(), Forces::DensFuncNrgGhostInternal(), Forces::MinimalNrg(), Forces::NrgStep(), Forces::NrgStepCh(), Forces::RemDens(), and Forces::SumForcesMD().
void Dist2CurrGhost | ( | double * | DistRel | ) |
Retrun the squared current interparticle distance.
Iterate one step and return the position.
Definition at line 554 of file Cubo.cpp.
References DomDecBasics::Edge, DomDecBasics::InvEdge, DomDecBasics::p2Curr, and DomDecBasics::PosCurr.
Referenced by Forces::DensFuncNrgGhost().
void IncrCurr | ( | const int | c | ) |
Increment the current part in the cell.
Increment the iterator to the next particle.
Definition at line 435 of file Cubo.cpp.
Referenced by VarData::FindNeighbours().
void IncrCurrList | ( | const int | c | ) |
Increment the current iterators in the cell.
Increment the second iterator and the first when the second is over the loop.
Definition at line 582 of file Cubo.cpp.
References DomDecBasics::NAllocP, and DomDecBasics::SigErr().