29 #include "Matematica.h" 30 #define MAX_JOINT_VERTEX 16 39 double BoundCond[27][3];
77 void SigErr(
int Condition,
const char * s, ...);
79 int PosRet(
const double Pos[3]);
85 int pCella(
const double Pos[3]);
87 void pCella(
const double Pos[3],
int c[4]);
89 int GetCoorNumb(
double *Pos);
91 int GetCellCoord(
int c,
int Coord,
int *NeiList);
93 int GetCellCoord(
double *Pos,
int *NeiList);
95 int GetCellCh(
int c,
int *NeiList);
97 int GetCell(
double *Pos,
int *NeiList);
99 void PrintCell(
const int c);
103 void PrintList(
const int c);
109 void CheckNei(
int p);
111 int SetCutOff(
double CutOffExt);
122 int operator[](
int col);
144 friend void operator+(
DomCell &Dc);
158 DomCell& operator+=(
const int i);
172 int SwapPart(
int p1,
double *Pos1,
int p2,
double *Pos2);
174 void AddPart(
const int p,
double *Pos);
176 void RemPart(
const int p,
double *Pos);
178 void RemPart(
const int p);
180 void AddPart(
const int p,
const int c);
182 void RemPart(
const int p,
const int c);
184 void MovePart(
const int p,
double *OldPos,
double *NewPos);
186 void MovePart(
const int p,
double *NewPos);
188 int PosRet(
const double Pos[3]);
190 int pNPart(
const int c){
return Cella[c].NPart;};
194 int pCell(
const int p){
return Pc[p].Cell;};
196 int First(
const int c){
return Cella[c].First;};
198 int Next(
const int p){
return Pc[p].Next;};
200 int ItCell(
const int c);
202 int IfItCell(
const int c);
204 int IfItCouple(
const int c);
206 int SetCoorNumb(
double *Pos,
int p);
209 return GetCell(Pos,NeiList);
213 void SetCounters(
int c);
215 void Couple(
const int c,
int *p1,
int *p2);
217 void PrintCell(
const int c);
223 void SetCurrGhost(
double *Pos);
227 void NextCurrGhost();
233 void Dist2Curr(
double *DistRel);
235 void Dist2CurrGhost(
double *DistRel);
237 void PrintList(
const int c);
243 void CheckNei(
int p);
245 void IncrCurr(
const int c);
247 void IncrCurrList(
const int c);
249 int FindClosest(
int p1);
276 list <int>::iterator NCurr;
278 list <int>::iterator NCurr2;
281 DdArray(
double EdgeExt[3],
int NPart,
double CutOff);
289 void AddPart(
int p,
double *Pos);
291 void RemPart(
int p,
double *Pos);
293 void MovePart(
int p,
double *OldPos,
double *NewPos);
295 void SwapPart(
int p1,
double *Pos1,
int p2,
double *Pos2);
297 void SetCounters(
int c);
301 void IncrCurr(
int c);
306 return GetCell(Pos,NeiList);
309 void Couple(
const int c,
int *p1,
int *p2);
311 int IfItCouple(
const int c);
313 void IncrCurrList(
const int c);
317 void PrintCell(
const int c);
339 DdFixedSize(
double EdgeExt[3],
int NPart,
double CutOff);
347 void AddPart(
int p,
double *Pos);
349 void RemPart(
int p,
double *Pos);
351 void AddPart(
int p,
int c);
353 void RemPart(
int p1,
int c);
355 void MovePart(
int p,
double *OldPos,
double *NewPos);
357 void SwapPart(
int p1,
double *Pos1,
int p2,
double *Pos2);
359 void SetCounters(
int c);
363 void IncrCurr(
int c);
368 return GetCell(Pos,NeiList);
371 void Couple(
const int c,
int *p1,
int *p2);
373 int IfItCouple(
const int c);
375 void IncrCurrList(
const int c);
377 void PrintCell(
const int c);
392 int SwapPart(
int p1,
double *Pos1,
int p2,
double *Pos2);
394 void AddPart(
const int p,
double *Pos);
396 void RemPart(
const int p,
double *Pos);
398 void RemPart(
const int p);
400 void AddPart(
const int p,
const int c);
402 void RemPart(
const int p,
const int c);
404 void MovePart(
const int p,
double *OldPos,
double *NewPos);
406 void MovePart(
const int p,
double *NewPos);
408 int PosRet(
const double Pos[3]);
410 int pNPart(
const int c){
return Cella[c].NPart;};
414 int pCell(
const int p){
return Pc[p].Cell;};
416 int First(
const int c){
return Cella[c].First;};
418 int Next(
const int p){
return Pc[p].Next;};
420 int ItCell(
const int c);
422 int IfItCell(
const int c);
424 int SetCoorNumb(
double *Pos,
int p);
427 return GetCell(Pos,NeiList);
431 void SetCounters(
int c);
433 void PrintCell(
const int c);
443 void Dist2Curr(
double *DistRel);
445 void PrintList(
const int c);
451 void CheckNei(
int p);
453 void IncrCurr(
const int c);
455 void IncrCurrList(
const int c);
475 int t[MAX_JOINT_VERTEX];
506 NeiVertex(
int NTriaExt,
int NvPtExt,
int NGridExt,
double *EdgeExt);
510 void Add(
int v,
int t,
double *Pos);
512 void Add(
double *Pos,
int t);
514 void Rem(
int v,
int t);
518 void Swap(
int v1,
int v2);
522 void SetCounters(
int v);
526 int GetVertex(
double *Pos);
530 void IncrCurr(
int v);
536 void PosVertex(
int v,
double *Pos);
int Coord
Coordination number.
int NCell
Number of cells.
int GetNei(double *Pos, int *NeiList)
Choose among the different neighbouring lists.
void Clear()
Clear the pairlist.
int cCurr
Cell where the current particle sits.
The array of particles in every cell.
int pNCell()
Print the number of cells.
int pCell(const int p)
Print the cell which the particle belong.
int Next(const int p)
Next linked part.
int pNPart()
part in the class
int Curr1
First pointed particle;.
void Clear()
Clear the pairlist.
int NPart
Total number of particle.
int First(const int c)
First part in the cell.
Connects the triangles by vertices.
int Next(const int p)
Next linked part.
int First
First particle in the cell.
The previuos and consecutive particle in the cell linked list.
int GetNei(double *Pos, int *NeiList)
Choose among the different neighbouring lists.
Stupid double loop to check the other pair loops.
int p1Curr
Reference particle.
double CutOff
Cell CutOff.
int GetNei(double *Pos, int *NeiList)
Choose among the different neighbouring lists.
DomCell * Cella
Number of particles and iterators per cell.
Domain decomposition using arrays.
DdFixCell * Cella
Cell structure.
void Clear()
Clear the pairlist.
DdCell * Cella
Cell structure.
int IfLoopCurr
1 if the loop is over
int * Part
Id of the particle.
int Next
Next particle in the list.
int pNPart(const int c)
part in the cell
int Curr2
Second pointed particle;.
int Last
Last particle in the cell.
DomCell * Cella
Number of particles and iterators per cell.
int NNeiCurr
Number of neighbouring cells.
The array of particles in every cell.
int NTria
Number of triangles connected to the vertex.
All the general functions shared among the different domain decomposition structures.
int Cell
Which cell it's belonging.
list< int > Part
Id of the particle.
int nNeiCurr
Current number of neighbours.
DOMAIN_PART * Pc
List of position of the particles.
int GetNei(double *Pos, int *NeiList)
Choose among the different neighbouring lists.
DOMAIN_PART * Pc
List of position of the particles.
Domain decomposition using arrays.
int NAllocP
Number of allocated part.
int pNPart(const int c)
part in the cell
int First(const int c)
First part in the cell.
For every cube how many particles and which are the first and the last.
int NNeighbour
Number of neighbours.
int NPart
Number of particles in the cell.
int pNPart()
part in the class
void Clear()
Clear the pairlist.
int p2Curr
Current particle.
Domain decomposition as pointer to linked particles.
int Prev
Previous particle in the list.
The previuos and consecutive particle in the cell linked list.
int NPart
How many particles.
int pCell(const int p)
Print the cell which the particle belong.