31 #ifndef SphericalWall_H
32 #define SphericalWall_H
102 void read(std::istream& is)
override;
107 void write(std::ostream& os)
const override;
112 std::string
getName()
const override;
virtual void move(const Vec3D &move)
Moves this BaseInteractable by adding an amount to the position.
Definition: BaseInteractable.cc:215
Definition: BaseParticle.h:54
Basic class for walls.
Definition: BaseWall.h:49
Definition: ParticleSpecies.h:37
A infinite wall fills the half-space {point: (position_-point)*normal_<=0}.
Definition: SphericalWall.h:48
std::string getName() const override
Returns the name of the object, in this case the string "SphericalWall".
Definition: SphericalWall.cc:144
void read(std::istream &is) override
Reads SphericalWall from a restart file.
Definition: SphericalWall.cc:125
void write(std::ostream &os) const override
Writes the SphericalWall to an output stream, usually a restart file.
Definition: SphericalWall.cc:135
~SphericalWall() override
Default destructor.
Definition: SphericalWall.cc:57
SphericalWall * copy() const override
Wall copy method. It calls the copy constructor of this Wall, useful for polymorphism.
Definition: SphericalWall.cc:65
void setRadius(Mdouble radius)
Defines a spherical wall with radius r.
Definition: SphericalWall.cc:76
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....
Definition: SphericalWall.cc:111
Mdouble radius_
Definition: SphericalWall.h:119
SphericalWall()
Default constructor, the normal is infinitely long.
Definition: SphericalWall.cc:34
Mdouble getDistance(const Vec3D &otherPosition) const
Returns the distance of the wall to the particle.
Definition: SphericalWall.cc:86
Mdouble getRadius() const
Returns the distance of the wall to the particle.
Definition: SphericalWall.cc:94