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)
virtual void actionsOnRestart()
No implementation but can be overidden in its derived classes.
const Vec3D getAxis() const
virtual Vec3D getFurthestPointSuperQuadric(const Vec3D &normalBodyFixed, const Vec3D &axes, Mdouble eps1, Mdouble eps2) const
void intersectVTK(std::vector< Vec3D > &points, Vec3D normal, Vec3D position) const
virtual void writeVTK(VTKContainer &vtk) const
virtual void actionsAfterParticleGhostUpdate()
No implementation but can be overidden in its derived classes.
void renderWall(VTKContainer &vtk)
const std::complex< Mdouble > i
virtual bool isLocal(Vec3D &min, Vec3D &max) const
virtual void setHandler(WallHandler *handler)
A function which sets the WallHandler for this BaseWall.
bool isFixed() const override
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...
void write(std::ostream &os) const override
Function that writes a BaseWall to an output stream, usually a restart file.
void setVelocityControl(Vec3D forceGoal, Vec3D gainFactor, Vec3D baseVelocity)
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...
Stores information about interactions between two interactable objects; often particles but could be ...
WallHandler * getHandler() const
A function which returns the WallHandler that handles this BaseWall.
virtual void handleParticleRemoval(unsigned int id)
Handles the addition of particles to the particleHandler.
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...
std::vector< std::vector< double > > triangleStrips
Container to store Interaction objects.
bool getVTKVisibility() const
bool isInsideWallVTK(const Vec3D &point, const Vec3D &normal, const Vec3D &position) const
virtual bool getDistanceNormalOverlapSuperquadric(const SuperQuadricParticle &p, Mdouble &distance, Vec3D &normal_return, Mdouble &overlap) const
BaseWall()
Default constructor.
void setVTKVisibility(bool vtkVisibility)
virtual void checkInteractions(InteractionHandler *interactionHandler, unsigned int timeStamp)
Check if all interactions are valid.
BaseWall * getRenderedWall(size_t i) const
void read(std::istream &is) override
Function that reads a BaseWall from an input stream, usually a restart file.
~BaseWall() override
Default destructor.
virtual BaseInteraction * getInteractionWithSuperQuad(SuperQuadricParticle *p, unsigned timeStamp, InteractionHandler *interactionHandler)
void getVTK(std::vector< Vec3D > &points, std::vector< std::vector< double >> &triangleStrips)
std::vector< BaseWall * > renderedWalls_
Container to store all BaseWall.
std::vector< Vec3D > points
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 ...
void setIndSpecies(unsigned int indSpecies) override
Define the species of this wall using the index of the species in the SpeciesHandler in this DPMBase...
Defines the basic properties that a interactable object can have.
void removeRenderedWalls()
virtual void handleParticleAddition(unsigned int id, BaseParticle *p)
Handles the addition of particles to the particleHandler.
void projectOntoWallVTK(Vec3D &point0, const Vec3D &point1, const Vec3D &normal, const Vec3D &position) const
bool getLinePlaneIntersect(Vec3D &intersect, const Vec3D &p0, const Vec3D &p1, const Vec3D &n, const Vec3D &p)
virtual BaseWall * copy() const =0
Pure virtual function that can be overwritten in inherited classes in order to copy a BaseWall...
virtual bool getDistanceNormalOverlap(const BaseParticle &P, Mdouble &distance, Vec3D &normal_return, Mdouble &overlap) const
void addParticlesAtWall(unsigned numElements=50)
void setSpecies(const ParticleSpecies *species)
Defines the species of the current wall.
void addRenderedWall(BaseWall *w)