38 logger(
DEBUG,
"RestrictedWall::RestrictedWall ) finished");
52 logger(
DEBUG,
"RestrictedWall::RestrictedWall(const RestrictedWall &p) finished");
59 set(wall, restriction);
74 logger(
DEBUG,
"RestrictedWall::~RestrictedWall finished");
158 return "RestrictedWall";
191 std::vector<std::vector<double>> myTriangleStrips;
199 for (
const std::vector<double>& myTriangleStrip: myTriangleStrips)
201 unsigned counter = 0;
202 std::vector<double> cell;
204 for (
const double c: myTriangleStrip)
void setIndex(unsigned int index)
Allows one to assign an index to an object in the handler/container.
unsigned int getIndex() const
Returns the index of the object in the handler.
const Vec3D & getPosition() const
Returns the position of this BaseInteractable.
Logger< MERCURY_LOGLEVEL > logger("MercuryKernel")
Definition of different loggers with certain modules. A user can define its own custom logger here...
virtual void writeVTK(VTKContainer &vtk) const
~RestrictedWall() override
Default destructor.
const ParticleSpecies * getSpecies() const
Returns a pointer to the species of this BaseInteractable.
Vec3D getNormal() const
Access function for normal.
void write(std::ostream &os) const override
Function that writes a BaseWall to an output stream, usually a restart file.
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...
This is a class defining walls.
Stores information about interactions between two interactable objects; often particles but could be ...
bool getDistanceAndNormal(const BaseParticle &p, Mdouble &distance, Vec3D &normal_return) const override
Compute the distance from the wall for a given BaseParticle and return if there is a collision...
void read(std::istream &is) override
Reads RestrictedWall from a restart file.
Mdouble getWallInteractionRadius(const BaseWall *wall) const
returns the radius plus the interactionDistance
void write(std::ostream &os) const override
Writes the RestrictedWall to an output stream, usually a restart file.
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.
void set(BaseWall *wall, InfiniteWall *restriction)
Defines a standard wall, given an outward normal vector s.t. normal*x=normal*point for all x of the w...
RestrictedWall * copy() const override
Wall copy method. It calls the copy constructor of this Wall, useful for polymorphism.
InfiniteWall * copy() const override
Wall copy method. It calls the copy constructor of this Wall, useful for polymorphism.
void read(std::istream &is) override
Function that reads a BaseWall from an input stream, usually a restart file.
std::vector< Vec3D > points
void read(std::istream &is) override
Reads InfiniteWall from a restart file.
InfiniteWall * restriction_
std::string getName() const override
Returns the name of the object, in this case the string "RestrictedWall".
This is a class defining walls.
Mdouble getDistance(Vec3D position) const
Returns the distance of the wall to the particle.
RestrictedWall()
Default constructor, the normal is infinitely long.
BaseInteraction * getInteractionWith(BaseParticle *p, unsigned timeStamp, InteractionHandler *interactionHandler) override
Look up the interaction between this wall and a BaseParticle at a certain timeStamp.
void writeVTK(VTKContainer &vtk) const override
virtual BaseWall * copy() const =0
Pure virtual function that can be overwritten in inherited classes in order to copy a BaseWall...
void setSpecies(const ParticleSpecies *species)
Defines the species of the current wall.