38 logger(
DEBUG,
"RestrictedWall::RestrictedWall ) finished");
52 logger(
DEBUG,
"RestrictedWall::RestrictedWall(const RestrictedWall &p) finished");
59 set(wall, restriction);
72 logger(
DEBUG,
"RestrictedWall::~RestrictedWall finished");
154 return "RestrictedWall";
171 return std::vector<BaseInteraction*>();
177 std::vector<std::vector<double>> myTriangleStrips;
184 std::vector<double> cell;
186 for (
auto myTriangleStrip: myTriangleStrips) {
187 unsigned counter = 0;
188 for (
const auto c: myTriangleStrip) {
void setIndex(const 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.
std::vector< BaseInteraction * > getInteractionWith(BaseParticle *p, Mdouble timeStamp, InteractionHandler *interactionHandler) override
Look up the interaction between this wall and a BaseParticle at a certain timeStamp.
Logger< MERCURY_LOGLEVEL > logger("MercuryKernel")
virtual void writeVTK(VTKContainer &vtk) const
Mdouble getDistance(const Vec3D &otherPosition) const
Returns the distance of the wall to the particle.
const ParticleSpecies * getSpecies() const
Returns a pointer to the species of this BaseInteractable.
Vec3D getNormal() const
Access function for normal.
This is a class defining walls.
const Vec3D & getPosition() const
Returns the position of this BaseInteractable.
virtual std::vector< BaseInteraction * > getInteractionWith(BaseParticle *p, Mdouble timeStamp, InteractionHandler *interactionHandler)
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...
Mdouble getWallInteractionRadius() const
Returns the interaction radius for interaction with walls. See also BaseParticle::getInteractionRadiu...
virtual ~RestrictedWall()
Default destructor.
void read(std::istream &is) override
Reads RestrictedWall from a restart file.
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.
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.
RestrictedWall()
Default constructor, the normal is infinitely long.
Implementation of a 3D vector (by Vitaliy).
void write(std::ostream &os) const override
Writes the InfiniteWall to an output stream, usually a restart file.
void writeVTK(VTKContainer &vtk) const override
void write(std::ostream &os) const
Function that writes a BaseWall to an output stream, usually a restart file.
virtual BaseWall * copy() const =0
Pure virtual function that copies a BaseWall.
void read(std::istream &is)
Function that reads a BaseWall from an input stream, usually a restart file.
void setSpecies(const ParticleSpecies *species)
Define the species of this wall.