 |
revision: v0.14
|
Go to the documentation of this file.
74 void read(std::istream& is)
override;
79 void write(std::ostream& os)
const override;
169 void getVTK(std::vector<Vec3D>& points, std::vector<std::vector<double>>& triangleStrips)
BaseWall()
Default constructor.
Definition: BaseWall.cc:36
void setIndSpecies(unsigned int indSpecies) override
Define the species of this wall using the index of the species in the SpeciesHandler in this DPMBase.
Definition: BaseWall.cc:144
unsigned getGroupId() const
Definition: BaseObject.h:137
static void addToVTK(const std::vector< Vec3D > &points, VTKContainer &vtk)
Takes the points provided and adds a triangle strip connecting these points to the vtk container.
Definition: BaseWall.cc:471
Vec3D multiplyElementwise(const Vec3D &a) const
Definition: Vector.h:132
virtual void actionsOnRestart()
No implementation but can be overidden in its derived classes.
Definition: BaseWall.h:183
~BaseWall() override
Default destructor.
Definition: BaseWall.cc:66
Container to store Interaction objects.
Definition: InteractionHandler.h:44
SpeciesHandler * getHandler() const
Returns the pointer to the handler to which this species belongs.
Definition: BaseSpecies.cc:99
virtual std::string getName() const =0
A purely virtual function.
virtual void actionsAfterParticleGhostUpdate()
No implementation but can be overidden in its derived classes.
Definition: BaseWall.h:192
void setPosition(const Vec3D &position)
Sets the position of this BaseInteractable.
Definition: BaseInteractable.h:239
void addTorque(const Vec3D &addTorque)
Adds an amount to the torque on this BaseInteractable.
Definition: BaseInteractable.cc:132
Basic class for walls.
Definition: BaseWall.h:48
Logger< MERCURY_LOGLEVEL > logger("MercuryKernel")
Definition of different loggers with certain modules. A user can define its own custom logger here.
bool vtkVisibility_
Definition: BaseWall.h:249
const Vec3D & getForce() const
Returns the force on this BaseInteractable.
Definition: BaseInteractable.h:126
Mdouble q1
the first component of the quaternion q = (q0,q1,q2,q3)
Definition: Quaternion.h:73
virtual Mdouble getExponentEps2() const
Only ustilised in case of superquadric particles. Had to create a virtual function to allow function ...
Definition: BaseParticle.cc:848
Mdouble X
the vector components
Definition: Vector.h:65
WallHandler * handler_
Definition: BaseWall.h:247
static Mdouble dot(const Vec3D &a, const Vec3D &b)
Calculates the dot product of two Vec3D: .
Definition: Vector.cc:76
void write(std::ostream &os) const override
Function that writes a BaseWall to an output stream, usually a restart file.
Definition: BaseWall.cc:102
std::vector< BaseWall * > renderedWalls_
Definition: BaseWall.h:254
virtual Vec3D getFurthestPointSuperQuadric(const Vec3D &normalBodyFixed, const Vec3D &axes, Mdouble eps1, Mdouble eps2) const
Definition: BaseWall.cc:547
unsigned int getSize() const
Gets the size of the particleHandler (including mpi and periodic particles)
Definition: BaseHandler.h:655
const Quaternion & getOrientation() const
Returns the orientation of this BaseInteractable.
Definition: BaseInteractable.h:230
void setVTKVisibility(bool vtkVisibility)
Definition: BaseWall.cc:518
unsigned int getIndSpecies() const
Returns the index of the species associated with the interactable object.
Definition: BaseInteractable.h:88
LL< Log::INFO > INFO
Info log level.
Definition: Logger.cc:55
Definition: ParticleSpecies.h:37
virtual void setIndSpecies(unsigned int indSpecies)
Sets the index of the Species of this BaseInteractable.
Definition: BaseInteractable.h:98
Defines the basic properties that a interactable object can have.
Definition: BaseInteractable.h:55
std::vector< std::vector< double > > triangleStrips
Definition: BaseWall.h:39
virtual void checkInteractions(InteractionHandler *interactionHandler, unsigned int timeStamp)
Check if all interactions are valid.
Definition: BaseWall.h:219
void setPrescribedVelocity(const std::function< Vec3D(double)> &prescribedVelocity)
Allows the velocity of an infinite mass interactable to be prescribed.
Definition: BaseInteractable.cc:444
virtual void setRadius(Mdouble radius)
Sets the particle's radius_ (and adjusts the mass_ accordingly, based on the particle's species)
Definition: BaseParticle.cc:542
void setDistance(Mdouble distance)
Sets the interaction distance between the two interacting objects.
Definition: BaseInteraction.cc:219
const Vec3D & getContactPoint() const
Gets constant reference to contact point (vector).
Definition: BaseInteraction.h:234
void addRenderedWall(BaseWall *w)
Definition: BaseWall.cc:554
Stores information about interactions between two interactable objects; often particles but could be ...
Definition: BaseInteraction.h:60
Container to store all BaseWall.
Definition: WallHandler.h:43
bool isFixed() const override
Definition: BaseWall.cc:188
virtual BaseWall * copy() const =0
Pure virtual function that can be overwritten in inherited classes in order to copy a BaseWall.
Mdouble getRadius() const
Returns the particle's radius.
Definition: BaseParticle.h:348
virtual Vec3D getAxes() const
Only ustilised in case of superquadric particles. Had to create a virtual function to allow function ...
Definition: BaseParticle.cc:842
Container to store all ParticleSpecies.
Definition: SpeciesHandler.h:37
Vec3D getMax() const
Definition: DPMBase.h:643
LL< Log::ERROR > ERROR
Error log level.
Definition: Logger.cc:53
bool getVTKVisibility() const
Definition: BaseWall.cc:513
void setSpecies(const ParticleSpecies *species)
Definition: BaseParticle.cc:804
const Vec3D getAxis() const
Definition: BaseWall.cc:503
Mdouble getOverlap() const
Returns a Mdouble with the current overlap between the two interacting objects.
Definition: BaseInteraction.h:240
Mdouble getTime() const
Returns the current simulation time.
Definition: DPMBase.cc:805
void projectOntoWallVTK(Vec3D &point0, const Vec3D &point1, const Vec3D &normal, const Vec3D &position) const
Definition: BaseWall.cc:233
const Vec3D & getNormal() const
Gets the normal vector between the two interacting objects.
Definition: BaseInteraction.h:226
void setOverlap(Mdouble overlap)
Set the overlap between the two interacting object.
Definition: BaseInteraction.cc:229
Mdouble q2
the second component of the quaternion q = (q0,q1,q2,q3)
Definition: Quaternion.h:77
LL< Log::WARN > WARN
Warning log level.
Definition: Logger.cc:54
SpeciesHandler speciesHandler
A handler to that stores the species type i.e. LinearViscoelasticSpecies, etc.
Definition: DPMBase.h:1385
void read(std::istream &is) override
Reads a BaseInteractable from an input stream.
Definition: BaseInteractable.cc:244
unsigned int getIndex() const
Returns the index of the object in the handler.
Definition: BaseObject.h:118
void renderWall(VTKContainer &vtk)
Definition: BaseWall.cc:570
void addForce(const Vec3D &addForce)
Adds an amount to the force on this BaseInteractable.
Definition: BaseInteractable.cc:116
A spherical particle is the most simple particle used in MercuryDPM.
Definition: SphericalParticle.h:37
WallHandler wallHandler
An object of the class WallHandler. Contains pointers to all the walls created.
Definition: DPMBase.h:1405
BaseWall * getRenderedWall(size_t i) const
Definition: BaseWall.cc:565
virtual void setHandler(WallHandler *handler)
A function which sets the WallHandler for this BaseWall.
Definition: BaseWall.cc:127
virtual void handleParticleAddition(unsigned int id, BaseParticle *p)
Handles the addition of particles to the particleHandler.
Definition: BaseWall.h:202
Mdouble Y
Definition: Vector.h:65
BaseInteraction * getInteraction(BaseInteractable *P, BaseInteractable *I, unsigned timeStamp)
Returns the Interaction between the BaseInteractable's P and I.
Definition: InteractionHandler.cc:149
Definition: BaseWall.h:37
void setContactPoint(Vec3D contactPoint)
Set the location of the contact point between the two interacting objects.
Definition: BaseInteraction.cc:238
static Vec3D min(const Vec3D &a, const Vec3D &b)
Calculates the pointwise minimum of two Vec3D.
Definition: Vector.cc:102
bool isInsideWallVTK(const Vec3D &point, const Vec3D &normal, const Vec3D &position) const
Definition: BaseWall.cc:222
virtual bool getDistanceNormalOverlapSuperquadric(const SuperQuadricParticle &p, Mdouble &distance, Vec3D &normal_return, Mdouble &overlap) const
Definition: BaseWall.cc:540
std::vector< Vec3D > points
Definition: BaseWall.h:38
const std::complex< Mdouble > i
Definition: ExtendedMath.h:51
void setSpecies(const ParticleSpecies *species)
Defines the species of the current wall.
Definition: BaseWall.cc:171
void setNormal(Vec3D normal)
Sets the normal vector between the two interacting objects.
Definition: BaseInteraction.cc:210
This class contains the 4 components of a quaternion and the standard operators and functions needed ...
Definition: Quaternion.h:63
virtual Mdouble getExponentEps1() const
Only ustilised in case of superquadric particles. Had to create a virtual function to allow function ...
Definition: BaseParticle.cc:845
T * getObject(const unsigned int id)
Gets a pointer to the Object at the specified index in the BaseHandler.
Definition: BaseHandler.h:613
void setForceControl(Vec3D forceGoal, Vec3D gainFactor, Vec3D baseVelocity={0, 0, 0})
Slowly adjusts the force on a wall towards a specified goal, by adjusting (prescribing) the velocity ...
Definition: BaseWall.cc:198
unsigned int getId() const
Returns the unique identifier of any particular object.
Definition: BaseObject.h:125
void intersectVTK(std::vector< Vec3D > &points, Vec3D normal, Vec3D position) const
Definition: BaseWall.cc:243
DPMBase * getDPMBase()
Gets the problem that is solved using this handler.
Definition: BaseHandler.h:725
Definition: BaseParticle.h:54
void setSpecies(const ParticleSpecies *species)
Sets the species of this BaseInteractable.
Definition: BaseInteractable.cc:185
const std::vector< BaseInteraction * > & getInteractions() const
Returns a list of interactions which belong to this interactable.
Definition: BaseInteractable.h:277
void rotateBack(Vec3D &position) const
Definition: Quaternion.cc:592
Vec3D getMin() const
Definition: DPMBase.h:637
const unsigned n
Definition: CG3DPackingUnitTest.cpp:32
virtual void writeVTK(VTKContainer &vtk) const
Definition: BaseWall.cc:466
static Vec3D cross(const Vec3D &a, const Vec3D &b)
Calculates the cross product of two Vec3D: .
Definition: Vector.cc:163
WallHandler * getHandler() const
A function which returns the WallHandler that handles this BaseWall.
Definition: BaseWall.cc:136
Definition: SuperQuadricParticle.h:56
void rotate(Vec3D &position) const
Definition: Quaternion.cc:563
void setVelocityControl(Vec3D forceGoal, Vec3D gainFactor, Vec3D baseVelocity)
Definition: BaseWall.cc:591
Mdouble q3
the third component of the quaternion q = (q0,q1,q2,q3)
Definition: Quaternion.h:81
static BaseWall * createObject(const std::string &type)
Create a new wall, with the type given as a string (required for restarting).
Definition: WallHandler.cc:123
void write(std::ostream &os) const override
Write a BaseInteractable to an output stream.
Definition: BaseInteractable.cc:274
void read(std::istream &is) override
Function that reads a BaseWall from an input stream, usually a restart file.
Definition: BaseWall.cc:80
virtual bool isSphericalParticle() const
Definition: BaseParticle.h:645
ParticleHandler particleHandler
An object of the class ParticleHandler, contains the pointers to all the particles created.
Definition: DPMBase.h:1395
Mdouble Z
Definition: Vector.h:65
virtual bool getDistanceNormalOverlap(const BaseParticle &P, Mdouble &distance, Vec3D &normal_return, Mdouble &overlap) const
Definition: BaseWall.cc:523
virtual void handleParticleRemoval(unsigned int id)
Handles the addition of particles to the particleHandler.
Definition: BaseWall.h:211
virtual bool isLocal(Vec3D &min, Vec3D &max) const
Definition: BaseWall.h:137
void removeRenderedWalls()
Definition: BaseWall.cc:559
bool getLinePlaneIntersect(Vec3D &intersect, const Vec3D &p0, const Vec3D &p1, const Vec3D &n, const Vec3D &p)
Definition: BaseWall.cc:206
void addParticlesAtWall(unsigned numElements=50)
Definition: BaseWall.cc:598
void getVTK(std::vector< Vec3D > &points, std::vector< std::vector< double >> &triangleStrips)
Definition: BaseWall.h:169
BaseInteraction * getInteractionWith(BaseParticle *p, unsigned timeStamp, InteractionHandler *interactionHandler) override
Returns the interaction between this wall and a given particle, nullptr if there is no interaction.
Definition: BaseWall.cc:369
bool isNext(std::istream &is, const std::string name)
Definition: Helpers.cc:957
virtual BaseInteraction * getInteractionWithSuperQuad(SuperQuadricParticle *p, unsigned timeStamp, InteractionHandler *interactionHandler)
Definition: BaseWall.cc:494
const Vec3D & getPosition() const
Returns the position of this BaseInteractable.
Definition: BaseInteractable.h:218
virtual bool getDistanceAndNormal(const BaseParticle &P, Mdouble &distance, Vec3D &normal_return) const =0
Pure virtual function that computes the distance of a BaseParticle to this wall and returns the norma...
The DPMBase header includes quite a few header files, defining all the handlers, which are essential....
Definition: DPMBase.h:76