MercuryDPM
0.10
|
Defines a pair of periodic walls that are angled around the origin. More...
#include <AngledPeriodicBoundary.h>
Public Member Functions | |
virtual AngledPeriodicBoundary * | copy () const |
BaseBoundary copy method. More... | |
void | set (Vec3D normal_left_, Vec3D normal_right_, Vec3D origin_) |
Defines a periodic wall, given a normal vector s.t. More... | |
Mdouble | distance (BaseParticle &P) |
Returns the distance of the wall to the particle, and sets left_wall = true, if the left wall is the wall closest to the particle. More... | |
Mdouble | distance (const Vec3D &P) |
void | shift_position (BaseParticle *P) |
shifts the particle (after distance set the left_wall value) More... | |
void | read (std::istream &is) |
reads wall More... | |
void | print (std::ostream &os) const |
outputs wall More... | |
Vec3D & | get_normal () |
int | createPeriodicParticles (BaseParticle *P, ParticleHandler &pH) |
bool | checkBoundaryAfterParticleMoved (BaseParticle *P, ParticleHandler &pH UNUSED) |
![]() | |
virtual | ~BaseBoundary () |
virtual int | createPeriodicParticles (BaseParticle *P UNUSED, ParticleHandler &pH UNUSED) |
virtual bool | checkBoundaryAfterParticleMoved (BaseParticle *P UNUSED, ParticleHandler &pH UNUSED) |
virtual void | checkBoundaryActionsBeforeTimeStep (ParticleHandler &pH UNUSED, WallHandler &wH UNUSED, RNG &random UNUSED) |
void | set_Index (int index) |
void | set_Id (int id) |
void | setHandler (BoundaryHandler *handler) |
virtual void | read (std::istream &is UNUSED)=0 |
reads boundary More... | |
virtual void | print (std::ostream &os UNUSED) const =0 |
outputs boundary More... | |
virtual void | moveInHandler (int newPos) |
Private Attributes | |
Vec3D | normal_left |
outward unit normal vector for left wall More... | |
Vec3D | normal_right |
outward unit normal vector for right wall More... | |
Vec3D | origin |
common point of both walls More... | |
bool | left_wall |
true if closest wall is the left wall More... | |
Vec3D | radialAxis_left |
outward unit normal vector for left wall More... | |
Vec3D | radialAxis_right |
outward unit normal vector for right wall More... | |
Vec3D | diff_radial |
Vec3D | diff_normal |
Vec3D | common_axis |
Vec3D | angularShift |
Defines a pair of periodic walls that are angled around the origin.
The particles are in {x: normal_left*(x-origin)>0 && normal_right*(x-origin)<0, with normal* being the unit normal vector of the walls. If a particle moves outside these boundaries, it will be shifted.
Definition at line 38 of file AngledPeriodicBoundary.h.
|
inline |
Definition at line 247 of file AngledPeriodicBoundary.h.
References distance(), and shift_position().
|
inlinevirtual |
BaseBoundary copy method.
It calls the copy constructor of this BaseBoundary, useful for polymorphism todo{Does this work correctly?}
Implements BaseBoundary.
Definition at line 41 of file AngledPeriodicBoundary.h.
|
inline |
Definition at line 194 of file AngledPeriodicBoundary.h.
References ParticleHandler::addObject(), BaseParticle::copy(), diff_normal, diff_radial, distance(), BaseParticle::get_InteractionRadius(), BaseParticle::get_PeriodicFromParticle(), TangentialSpringParticle::get_TangentialSprings(), ParticleHandler::getLargestParticle(), left_wall, normal_left, normal_right, radialAxis_left, radialAxis_right, TangentialSpringParticle::reverseTangentialSprings(), BaseParticle::set_periodicFromParticle(), and shift_position().
|
inline |
Returns the distance of the wall to the particle, and sets left_wall = true, if the left wall is the wall closest to the particle.
Since this function should be called before calculating any Particle-Wall interactions, it can also be used to set the shift vector in case of curved walls.
Definition at line 83 of file AngledPeriodicBoundary.h.
References BaseParticle::get_Position().
Referenced by checkBoundaryAfterParticleMoved(), and createPeriodicParticles().
Definition at line 88 of file AngledPeriodicBoundary.h.
References left_wall, normal_left, normal_right, and origin.
|
inline |
Definition at line 188 of file AngledPeriodicBoundary.h.
References left_wall, normal_left, and normal_right.
|
inline |
outputs wall
Definition at line 182 of file AngledPeriodicBoundary.h.
References normal_left, normal_right, and origin.
|
inline |
reads wall
Definition at line 176 of file AngledPeriodicBoundary.h.
References normal_left, normal_right, and origin.
Defines a periodic wall, given a normal vector s.t.
all particles are within {x: position_left<=normal*x<position_right}. The shift vector is set assuming that the domain is rectangular (shift parallel to normal).
Definition at line 58 of file AngledPeriodicBoundary.h.
References common_axis, Cross(), diff_normal, diff_radial, normal_left, normal_right, origin, radialAxis_left, and radialAxis_right.
|
inline |
shifts the particle (after distance set the left_wall value)
Definition at line 106 of file AngledPeriodicBoundary.h.
References BaseParticle::accelerate(), diff_normal, diff_radial, BaseParticle::get_Angle(), BaseParticle::get_Position(), BaseParticle::get_Velocity(), left_wall, BaseParticle::move(), normal_left, normal_right, origin, radialAxis_left, radialAxis_right, and BaseParticle::rotate().
Referenced by checkBoundaryAfterParticleMoved(), and createPeriodicParticles().
|
private |
Definition at line 267 of file AngledPeriodicBoundary.h.
|
private |
Definition at line 266 of file AngledPeriodicBoundary.h.
Referenced by set().
|
private |
Definition at line 265 of file AngledPeriodicBoundary.h.
Referenced by createPeriodicParticles(), set(), and shift_position().
|
private |
Definition at line 264 of file AngledPeriodicBoundary.h.
Referenced by createPeriodicParticles(), set(), and shift_position().
|
private |
true if closest wall is the left wall
Definition at line 261 of file AngledPeriodicBoundary.h.
Referenced by createPeriodicParticles(), distance(), get_normal(), and shift_position().
|
private |
outward unit normal vector for left wall
Definition at line 257 of file AngledPeriodicBoundary.h.
Referenced by createPeriodicParticles(), distance(), get_normal(), print(), read(), set(), and shift_position().
|
private |
outward unit normal vector for right wall
Definition at line 258 of file AngledPeriodicBoundary.h.
Referenced by createPeriodicParticles(), distance(), get_normal(), print(), read(), set(), and shift_position().
|
private |
common point of both walls
Definition at line 259 of file AngledPeriodicBoundary.h.
Referenced by distance(), print(), read(), set(), and shift_position().
|
private |
outward unit normal vector for left wall
Definition at line 262 of file AngledPeriodicBoundary.h.
Referenced by createPeriodicParticles(), set(), and shift_position().
|
private |
outward unit normal vector for right wall
Definition at line 263 of file AngledPeriodicBoundary.h.
Referenced by createPeriodicParticles(), set(), and shift_position().