26 #ifndef AngledPeriodicBoundary_H
27 #define AngledPeriodicBoundary_H
29 #include "../BaseBoundary.h"
30 #include "../Particles/TangentialSpringParticle.h"
31 #include "../Particles/BaseParticle.h"
43 #ifdef CONSTUCTOR_OUTPUT
44 std::cerr <<
"virtual AngledPeriodicBoundary* copy() const finished" << std::endl;
60 normal_left = normal_left_ / GetLength(normal_left_);
93 if (distance_left<distance_right) {
100 return distance_right;
182 void print(std::ostream& os)
const {
183 os <<
"AngledPeriodicBoundary normal_left " <<
normal_left
213 normalDistance = Dot(it->RollingSpring,
normal_left);
216 normalDistance = Dot(it->TorsionSpring,
normal_left);
Vec3D normal_right
outward unit normal vector for right wall
Vec3D radialAxis_right
outward unit normal vector for right wall
BaseParticle * getLargestParticle() const
Gets a pointer to the largest BaseParticle (by interactionRadius) in this ParticleHandler.
void reverseTangentialSprings()
const Vec3D & get_Velocity() const
void print(std::ostream &os) const
outputs wall
Mdouble get_InteractionRadius() const
void rotate(const Vec3D &_new)
int createPeriodicParticles(BaseParticle *P, ParticleHandler &pH)
bool left_wall
true if closest wall is the left wall
Defines a pair of periodic walls that are angled around the origin.
virtual AngledPeriodicBoundary * copy() const
BaseBoundary copy method.
BaseParticle * get_PeriodicFromParticle() const
bool checkBoundaryAfterParticleMoved(BaseParticle *P, ParticleHandler &pH UNUSED)
Matrix3D Cross(const Vec3D &A, const Matrix3D &B)
void read(std::istream &is)
reads wall
Mdouble distance(const Vec3D &P)
Vec3D normal_left
outward unit normal vector for left wall
void set(Vec3D normal_left_, Vec3D normal_right_, Vec3D origin_)
Defines a periodic wall, given a normal vector s.t.
Vec3D origin
common point of both walls
CTangentialSprings & get_TangentialSprings()
void set_periodicFromParticle(BaseParticle *_new)
Mdouble distance(BaseParticle &P)
Returns the distance of the wall to the particle, and sets left_wall = true, if the left wall is the ...
virtual void addObject(BaseParticle *P)
Adds a BaseParticle to the ParticleHandler.
void move(const Vec3D &_new)
const Vec3D & get_Position() const
Container to store all BaseParticle.
Vec3D radialAxis_left
outward unit normal vector for left wall
const Vec3D & get_Angle() const
Implementation of a 3D vector (by Vitaliy).
void accelerate(const Vec3D &_new)
virtual BaseParticle * copy() const
Particle copy method. It calls to copy contrustor of this Particle, usefull for polymorfism.
void shift_position(BaseParticle *P)
shifts the particle (after distance set the left_wall value)