|
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.
|
inline |
Default constructor, sets all pointers to nullptr.
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. |
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. |
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. |
References getIndex(), index_, Next1_, Next2_, Next_, P1_, P2_, Prev1_, Prev2_, and Prev_.
|
inline |
Gets the index of this PossibleContact.
References index_.
Referenced by PossibleContact(), and PossibleContactList::remove_ParticlePosibleContacts().
|
inline |
Gets the next PossibleContact in the general linked list of PossibleContact.
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. |
References BaseObject::getIndex(), logger, Next1_, Next2_, Global_Physical_Variables::P, P1_, P2_, and WARN.
|
inline |
Gets the next PossibleContact in the linked list of PossibleContact of the first particle in this PossibleContact.
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.
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. |
References BaseObject::getIndex(), logger, Global_Physical_Variables::P, P1_, P2_, and WARN.
Referenced by PossibleContactList::remove_ParticlePosibleContacts().
|
inline |
Gets a pointer to the first BaseParticle in this PossibleContact.
References P1_.
Referenced by DPMBase::computeAllForces(), and PossibleContactList::remove_ParticlePosibleContacts().
|
inline |
Gets a pointer to the second BaseParticle in this PossibleContact.
References P2_.
Referenced by DPMBase::computeAllForces(), and PossibleContactList::remove_ParticlePosibleContacts().
|
inline |
Gets the previous PossibleContact in the general linked list of PossibleContact.
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. |
References BaseObject::getIndex(), logger, Global_Physical_Variables::P, P1_, P2_, Prev1_, Prev2_, and WARN.
|
inline |
Gets the previous PossibleContact in the linked list of PossibleContact of the first particle in this PossibleContact.
References Prev1_.
|
inline |
Gets the previous PossibleContact in the linked list of PossibleContact of the second particle in this PossibleContact.
References Prev2_.
|
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. |
References BaseObject::getIndex(), logger, Next1_, Next2_, Global_Physical_Variables::P, P1_, P2_, and WARN.
|
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 |
References Next_.
Referenced by PossibleContactList::remove_ParticlePosibleContacts().
|
inline |
|
inline |
|
inline |
|
inline |
|
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. |
References BaseObject::getIndex(), logger, Global_Physical_Variables::P, P1_, P2_, Prev1_, Prev2_, and WARN.
|
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 |
References Prev_.
Referenced by PossibleContactList::add_PossibleContact(), and PossibleContactList::remove_ParticlePosibleContacts().
|
inline |
|
inline |
|
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. |
|
private |
The index of this PossibleContact.
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.
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.
Referenced by getNext(), getNext2(), PossibleContact(), setNextPosition(), and setNextPosition2().
|
private |
A pointer to the PossibleContact that comes after this one in the linked list.
Referenced by getNext(), PossibleContact(), and setNextPosition().
|
private |
A pointer to the first BaseParticle in this PossibleContact.
Referenced by getNext(), getOtherParticle(), getP1(), getPrevious(), PossibleContact(), setNextPosition(), setP1(), and setPreviousPosition().
|
private |
A pointer to the second BaseParticle in this PossibleContact.
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.
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.
Referenced by getPrevious(), getPrevious2(), PossibleContact(), setPreviousPosition(), and setPreviousPosition2().
|
private |
A pointer to the PossibleContact that comes before this one in the linked list.
Referenced by getPrevious(), PossibleContact(), and setPreviousPosition().