36 #ifdef DEBUG_CONSTRUCTOR
37 std::cout <<
"AngledPeriodicBoundary::copy() const finished" << std::endl;
62 Matrix3D eye = {1, 0, 0, 0, 1, 0, 0, 0, 1};
63 rotateLeft = eye - vx + vx * vx * ((1 - c) / s / s);
64 rotateRight = eye + vx + vx * vx * ((1 - c) / s / s);
98 if (distance_left < distance_right)
102 return distance_left;
108 return distance_right;
138 if (i->getP()->getIndex() >= P->
getIndex())
162 if (i->getP()->getIndex() >= P->
getIndex())
239 return "AngledPeriodicBoundary";
Vec3D origin_
common point of both walls
BaseParticle * getLargestParticle() const
Gets a pointer to the largest BaseParticle (by interactionRadius) in this ParticleHandler.
unsigned int getIndex() const
Returns the index of the object in the handler.
void rotate(const Vec3D &rotate)
Rotates this BaseInteractable.
AngledPeriodicBoundary * copy() const final
Used to create a copy of the object NB: purely virtual function.
Mdouble X
the vector components
Vec3D differenceRadialAxis_
void shiftPositions(Vec3D &P1, Vec3D &P2)
only needed in StatisticsVector
void write(std::ostream &os) const =0
Adds object's id_ to given ostream NB: purely virtual function.
bool checkBoundaryAfterParticleMoved(BaseParticle *P, ParticleHandler &pH UNUSED)
void read(std::istream &is)
reads wall
Vec3D leftRadialAxis_
outward unit normal vector for left wall
void setPeriodicFromParticle(BaseParticle *p)
Assigns the pointer to the 'original' particle this one's a periodic copy of.
void oldRead(std::istream &is)
virtual const Vec3D & getAngularVelocity() const
Returns the angular velocity of this interactable.
static Mdouble dot(const Vec3D &a, const Vec3D &b)
Calculates the dot product of two Vec3D: .
void accelerate(const Vec3D &vel)
Increases the particle's velocity_ by the given vector.
Mdouble getOpeningAngle()
angle between walls in radians
const Vec3D & getPosition() const
Returns the position of this BaseInteractable.
const Vec3D & getOrientation() const
Returns the orientation of this BaseInteractable.
Stores information about interactions between two interactable objects; often particles but could be ...
BaseParticle * getPeriodicFromParticle() const
Returns the 'original' particle this one's a periodic copy of.
virtual void addObject(BaseParticle *P)
Adds a BaseParticle to the ParticleHandler.
Vec3D commonAxis_
The normalized cross product of the left and right normal vector. This vector points in the direction...
Mdouble distance(const BaseParticle &P)
Returns the distance of the wall to the particle and sets left_wall = true, if the left wall is the w...
void set(Vec3D normalLeft, Vec3D normalRight, Vec3D origin)
Defines a periodic wall.
static Vec3D cross(const Vec3D &a, const Vec3D &b)
Calculates the cross product of two Vec3D: .
void copyInteractionsForPeriodicParticles(const BaseInteractable &p)
Copies interactions to this BaseInteractable whenever a periodic copy made.
Container to store all BaseParticle.
virtual std::string getName() const
Returns the name of the object.
bool leftWall_
true if closest wall is the left wall
Vec3D rightRadialAxis_
outward unit normal vector for right wall
Mdouble getLength() const
Calculates the length of this Vec3D: .
Vec3D rightNormal_
outward unit normal vector for right wall
void angularAccelerate(const Vec3D &angVel)
Increases the particle's angularVelocity_ by the given vector.
const std::list< BaseInteraction * > & getInteractions() const
Returns a reference to the list of interactions in this BaseInteractable.
Implementation of a 3D matrix.
virtual const Vec3D & getVelocity() const
Returns the velocity of this interactable.
Implementation of a 3D vector (by Vitaliy).
virtual void move(const Vec3D &move)
Moves this BaseInteractable by adding an amount to the position.
void shiftPosition(BaseParticle *P)
shifts the particle (after distance set the left_wall value)
Mdouble getInteractionRadius() const
Returns the particle's interaction radius, which might be different from radius_ (e.g., when dealing with wet particles)
void createPeriodicParticles(BaseParticle *P, ParticleHandler &pH)
virtual BaseParticle * copy() const
Particle copy method. It calls to copy constructor of this Particle, useful for polymorfism.
void read(std::istream &is)=0
Reads the object's id_ from given istream NB: purely virtual function.
void write(std::ostream &os) const
outputs wall