MercuryDPM
Beta
|
Class that describes a possible contact between two BaseParticle. More...
#include <PossibleContact.h>
Public Member Functions | |
PossibleContact () | |
Default constructor, sets all pointers to nullptr. More... | |
PossibleContact (BaseParticle *P1, BaseParticle *P2) | |
Constructor that takes two BaseParticle and sets them to be the BaseParticle associated with this PossibleContact. More... | |
PossibleContact (BaseParticle *P1, BaseParticle *P2, PossibleContact *Next) | |
Constructor that takes two BaseParticle and the next global PossibleContact in the list and constructs a PossibleContact from that. More... | |
PossibleContact (BaseParticle *P1, BaseParticle *P2, PossibleContact *Next, PossibleContact *Next1, PossibleContact *Next2) | |
Constructor that should be used, takes all required information as parameters and sets it in the data-members. More... | |
BaseParticle * | getP1 () |
Gets a pointer to the first BaseParticle in this PossibleContact. More... | |
BaseParticle * | getP2 () |
Gets a pointer to the second BaseParticle in this PossibleContact. More... | |
BaseParticle * | getOtherParticle (BaseParticle *P) |
Given one BaseParticle of the interacting pair, this function gets the other. More... | |
PossibleContact * | getNext () |
Gets the next PossibleContact in the general linked list of PossibleContact. More... | |
PossibleContact * | getNext (BaseParticle *P) |
Gets the next PossibleContact in the linked list of PossibleContact of the given particle. More... | |
PossibleContact * | getPrevious () |
Gets the previous PossibleContact in the general linked list of PossibleContact. More... | |
PossibleContact * | getPrevious (BaseParticle *P) |
Gets the previous PossibleContact in the linked list of PossibleContact of the given particle. More... | |
PossibleContact * | getNext1 () |
Gets the next PossibleContact in the linked list of PossibleContact of the first particle in this PossibleContact. More... | |
PossibleContact * | getPrevious1 () |
Gets the previous PossibleContact in the linked list of PossibleContact of the first particle in this PossibleContact. More... | |
PossibleContact * | getNext2 () |
Gets the next PossibleContact in the linked list of PossibleContact of the second particle in this PossibleContact. More... | |
PossibleContact * | getPrevious2 () |
Gets the previous PossibleContact in the linked list of PossibleContact of the second particle in this PossibleContact. More... | |
int | getIndex () |
Gets the index of this PossibleContact. More... | |
void | setP1 (BaseParticle *P1) |
Sets the first particle in this PossibleContact. More... | |
void | setP2 (BaseParticle *P2) |
Sets the second particle in this PossibleContact. More... | |
void | setNextPosition (PossibleContact *Next) |
Sets the next PossibleContact in the linked list of PossibleContac. More... | |
void | setNextPosition (BaseParticle *P, PossibleContact *Next) |
Sets the next PossibleContact in the linked list of PossibleContact of the given particle. More... | |
void | setPreviousPosition (PossibleContact *Prev) |
Sets the previous PossibleContact in the linked list of PossibleContact of the given particle. More... | |
void | setPreviousPosition (BaseParticle *P, PossibleContact *Prev) |
Sets the previous PossibleContact in the linked list of PossibleContact of the given particle. More... | |
void | setNextPosition1 (PossibleContact *Next1) |
Sets the next PossibleContact in the linked list of PossibleContact of the first particle in this PossibleContact. More... | |
void | setPreviousPosition1 (PossibleContact *Prev1) |
Sets the previous PossibleContact in the linked list of PossibleContact of the first particle in this PossibleContact. More... | |
void | setNextPosition2 (PossibleContact *Next2) |
Sets the next PossibleContact in the linked list of PossibleContact of the second particle in this PossibleContact. More... | |
void | setPreviousPosition2 (PossibleContact *Prev2) |
Sets the previous PossibleContact in the linked list of PossibleContact of the second particle in this PossibleContact. More... | |
Private Attributes | |
int | index_ |
The index of this PossibleContact. More... | |
BaseParticle * | P1_ |
A pointer to the first BaseParticle in this PossibleContact. More... | |
BaseParticle * | P2_ |
A pointer to the second BaseParticle in this PossibleContact. More... | |
PossibleContact * | Next_ |
A pointer to the PossibleContact that comes after this one in the linked list. More... | |
PossibleContact * | Prev_ |
A pointer to the PossibleContact that comes before this one in the linked list. More... | |
PossibleContact * | Next1_ |
A pointer to the PossibleContact that comes after this one in the linked list associated with the first BaseParticle of this PossibleContact. More... | |
PossibleContact * | Prev1_ |
A pointer to the PossibleContact that comes before this one in the linked list associated with the first BaseParticle of this PossibleContact. More... | |
PossibleContact * | Next2_ |
A pointer to the PossibleContact that comes after this one in the linked list associated with the second BaseParticle of this PossibleContact. More... | |
PossibleContact * | Prev2_ |
A pointer to the PossibleContact that comes before this one in the linked list associated with the second BaseParticle of this PossibleContact. More... | |
Friends | |
std::ostream & | operator<< (std::ostream &os, const PossibleContact &o) |
Writes the index of this PossibleContact and the indices of the BaseParticle of this PossibleContact to the given ostream. More... | |
Class that describes a possible contact between two BaseParticle.
In this class that describes a possible contact two BaseParticle we save both of these BaseParticle, the index of this PossibleContact and the PossibleContact that comes before and after this one in the linked list, both for the general list and the list for each of the particles.
Definition at line 41 of file PossibleContact.h.
|
inline |
Default constructor, sets all pointers to nullptr.
Definition at line 47 of file PossibleContact.h.
References index_, Next1_, Next2_, Next_, P1_, P2_, Prev1_, Prev2_, and Prev_.
|
inline |
Constructor that takes two BaseParticle and sets them to be the BaseParticle associated with this PossibleContact.
[in] | P1 | A pointer to the first BaseParticle in this PossibleContact. |
[in] | P2 | A pointer to the second BaseParticle in this PossibleContact. |
Definition at line 65 of file PossibleContact.h.
References index_, Next1_, Next2_, Next_, P1_, P2_, Prev1_, Prev2_, and Prev_.
|
inline |
Constructor that takes two BaseParticle and the next global PossibleContact in the list and constructs a PossibleContact from that.
[in] | P1 | A pointer to the first BaseParticle in this PossibleContact. |
[in] | P2 | A pointer to the second BaseParticle in this PossibleContact. |
[in] | Next | A pointer to the PossibleContact that comes after this one in the linked list. |
Definition at line 84 of file PossibleContact.h.
References getIndex(), index_, Next1_, Next2_, Next_, P1_, P2_, Prev1_, Prev2_, and Prev_.
|
inline |
Constructor that should be used, takes all required information as parameters and sets it in the data-members.
[in] | P1 | A pointer to the first BaseParticle in this PossibleContact. |
[in] | P2 | A pointer to the second BaseParticle in this PossibleContact. |
[in] | Next | A pointer to the PossibleContact that comes after this one in the linked list. |
[in] | Next1 | A pointer to the PossibleContact that comes after this one in the linked list associated with the first BaseParticle of this PossibleContact. |
[in] | Next2 | A pointer to the PossibleContact that comes after this one in the linked list associated with the second BaseParticle of this PossibleContact. |
Definition at line 109 of file PossibleContact.h.
References getIndex(), index_, Next1_, Next2_, Next_, P1_, P2_, Prev1_, Prev2_, and Prev_.
|
inline |
Gets the index of this PossibleContact.
Definition at line 255 of file PossibleContact.h.
References index_.
Referenced by PossibleContact(), and PossibleContactList::remove_ParticlePosibleContacts().
|
inline |
Gets the next PossibleContact in the general linked list of PossibleContact.
Definition at line 165 of file PossibleContact.h.
References Next_.
Referenced by PossibleContactList::add_PossibleContact(), DPMBase::computeAllForces(), PossibleContactList::remove_ParticlePosibleContacts(), and PossibleContactList::write().
|
inline |
Gets the next PossibleContact in the linked list of PossibleContact of the given particle.
[in] | P | A pointer to the BaseParticle for which we want to have the next contact of. |
Definition at line 175 of file PossibleContact.h.
References BaseObject::getIndex(), logger, Next1_, Next2_, P1_, P2_, and WARN.
|
inline |
Gets the next PossibleContact in the linked list of PossibleContact of the first particle in this PossibleContact.
Definition at line 219 of file PossibleContact.h.
References Next1_.
Referenced by PossibleContactList::add_PossibleContact().
|
inline |
Gets the next PossibleContact in the linked list of PossibleContact of the second particle in this PossibleContact.
Definition at line 237 of file PossibleContact.h.
References Next2_.
Referenced by PossibleContactList::add_PossibleContact().
|
inline |
Given one BaseParticle of the interacting pair, this function gets the other.
[in] | P | A pointer to one of the BaseParticle of this PossibleContact. |
Definition at line 148 of file PossibleContact.h.
References BaseObject::getIndex(), P1_, and P2_.
Referenced by PossibleContactList::remove_ParticlePosibleContacts().
|
inline |
Gets a pointer to the first BaseParticle in this PossibleContact.
Definition at line 129 of file PossibleContact.h.
References P1_.
Referenced by DPMBase::computeAllForces(), and PossibleContactList::remove_ParticlePosibleContacts().
|
inline |
Gets a pointer to the second BaseParticle in this PossibleContact.
Definition at line 138 of file PossibleContact.h.
References P2_.
Referenced by DPMBase::computeAllForces(), and PossibleContactList::remove_ParticlePosibleContacts().
|
inline |
Gets the previous PossibleContact in the general linked list of PossibleContact.
Definition at line 192 of file PossibleContact.h.
References Prev_.
Referenced by PossibleContactList::remove_ParticlePosibleContacts().
|
inline |
Gets the previous PossibleContact in the linked list of PossibleContact of the given particle.
[in] | P | A pointer to the BaseParticle we want to know the previous PossibleContact for. |
Definition at line 202 of file PossibleContact.h.
References BaseObject::getIndex(), logger, P1_, P2_, Prev1_, Prev2_, and WARN.
|
inline |
Gets the previous PossibleContact in the linked list of PossibleContact of the first particle in this PossibleContact.
Definition at line 228 of file PossibleContact.h.
References Prev1_.
|
inline |
Gets the previous PossibleContact in the linked list of PossibleContact of the second particle in this PossibleContact.
Definition at line 246 of file PossibleContact.h.
References Prev2_.
|
inline |
Sets the next PossibleContact in the linked list of PossibleContac.
[in] | Next | A pointer to the PossibleContact which is the next PossibleContact in the linked list of PossibleContact |
Definition at line 282 of file PossibleContact.h.
References Next_.
Referenced by PossibleContactList::remove_ParticlePosibleContacts().
|
inline |
Sets the next PossibleContact in the linked list of PossibleContact of the given particle.
[in] | P | A pointer to the BaseParticle for which the next PossibleContact in the linked list must be set for. |
[in] | Next | A pointer to the PossibleContact which is the next PossibleContact for the given BaseParticle. |
Definition at line 292 of file PossibleContact.h.
References BaseObject::getIndex(), logger, Next1_, Next2_, P1_, P2_, and WARN.
|
inline |
Sets the next PossibleContact in the linked list of PossibleContact of the first particle in this PossibleContact.
[in] | Next1 | A pointer to the PossibleContact which is the next PossibleContact for the first BaseParticle. |
Definition at line 330 of file PossibleContact.h.
References Next1_.
|
inline |
Sets the next PossibleContact in the linked list of PossibleContact of the second particle in this PossibleContact.
[in] | Next2 | A pointer to the PossibleContact which is the next PossibleContact for the second BaseParticle. |
Definition at line 348 of file PossibleContact.h.
References Next2_.
|
inline |
Sets the first particle in this PossibleContact.
[in] | P1 | A pointer to the BaseParticle that must be set as the first BaseParticle. |
Definition at line 264 of file PossibleContact.h.
References P1_.
|
inline |
Sets the second particle in this PossibleContact.
[in] | P2 | A pointer to the BaseParticle that must be set as the second BaseParticle. |
Definition at line 273 of file PossibleContact.h.
References P2_.
|
inline |
Sets the previous PossibleContact in the linked list of PossibleContact of the given particle.
[in] | Prev | A pointer to the PossibleContact which is the previous PossibleContact in the linked list of PossibleContact |
Definition at line 306 of file PossibleContact.h.
References Prev_.
Referenced by PossibleContactList::add_PossibleContact(), and PossibleContactList::remove_ParticlePosibleContacts().
|
inline |
Sets the previous PossibleContact in the linked list of PossibleContact of the given particle.
[in] | P | A pointer to the BaseParticle for which the previous PossibleContact in the linked list must be set for. |
[in] | Prev | A pointer to the PossibleContact which is the previous PossibleContact for the given BaseParticle. |
Definition at line 316 of file PossibleContact.h.
References BaseObject::getIndex(), logger, P1_, P2_, Prev1_, Prev2_, and WARN.
|
inline |
Sets the previous PossibleContact in the linked list of PossibleContact of the first particle in this PossibleContact.
[in] | Prev1 | A pointer to the PossibleContact which is the previous PossibleContact for the first BaseParticle. |
Definition at line 339 of file PossibleContact.h.
References Prev1_.
|
inline |
Sets the previous PossibleContact in the linked list of PossibleContact of the second particle in this PossibleContact.
[in] | Prev2 | A pointer to the PossibleContact which is the previous PossibleContact for the second BaseParticle. |
Definition at line 357 of file PossibleContact.h.
References Prev2_.
|
friend |
Writes the index of this PossibleContact and the indices of the BaseParticle of this PossibleContact to the given ostream.
[in,out] | os | The output stream to which this PossibleContact must be written. |
[in] | o | The PossibleContact that must be written. |
Definition at line 368 of file PossibleContact.h.
|
private |
The index of this PossibleContact.
Definition at line 378 of file PossibleContact.h.
Referenced by getIndex(), and PossibleContact().
|
private |
A pointer to the PossibleContact that comes after this one in the linked list associated with the first BaseParticle of this PossibleContact.
Definition at line 398 of file PossibleContact.h.
Referenced by getNext(), getNext1(), PossibleContact(), setNextPosition(), and setNextPosition1().
|
private |
A pointer to the PossibleContact that comes after this one in the linked list associated with the second BaseParticle of this PossibleContact.
Definition at line 406 of file PossibleContact.h.
Referenced by getNext(), getNext2(), PossibleContact(), setNextPosition(), and setNextPosition2().
|
private |
A pointer to the PossibleContact that comes after this one in the linked list.
Definition at line 390 of file PossibleContact.h.
Referenced by getNext(), PossibleContact(), and setNextPosition().
|
private |
A pointer to the first BaseParticle in this PossibleContact.
Definition at line 382 of file PossibleContact.h.
Referenced by getNext(), getOtherParticle(), getP1(), getPrevious(), PossibleContact(), setNextPosition(), setP1(), and setPreviousPosition().
|
private |
A pointer to the second BaseParticle in this PossibleContact.
Definition at line 386 of file PossibleContact.h.
Referenced by getNext(), getOtherParticle(), getP2(), getPrevious(), PossibleContact(), setNextPosition(), setP2(), and setPreviousPosition().
|
private |
A pointer to the PossibleContact that comes before this one in the linked list associated with the first BaseParticle of this PossibleContact.
Definition at line 402 of file PossibleContact.h.
Referenced by getPrevious(), getPrevious1(), PossibleContact(), setPreviousPosition(), and setPreviousPosition1().
|
private |
A pointer to the PossibleContact that comes before this one in the linked list associated with the second BaseParticle of this PossibleContact.
Definition at line 410 of file PossibleContact.h.
Referenced by getPrevious(), getPrevious2(), PossibleContact(), setPreviousPosition(), and setPreviousPosition2().
|
private |
A pointer to the PossibleContact that comes before this one in the linked list.
Definition at line 394 of file PossibleContact.h.
Referenced by getPrevious(), PossibleContact(), and setPreviousPosition().