34 factor_ = std::numeric_limits<double>::quiet_NaN();
35 logger(
DEBUG,
"InfiniteWall::InfiniteWall ) finished");
48 logger(
DEBUG,
"InfiniteWall::InfiniteWall(const InfiniteWall &p) finished");
53 logger(
DEBUG,
"InfiniteWall::~InfiniteWall finished");
93 logger(
WARN,
"InfiniteWall::set(Vec3D, Mdouble) is deprecated. Use set(Vec3D, Vec3D) instead.");
94 set(normal, positionInNormalDirection*normal);
103 logger(
WARN,
"InfiniteWall::move(Mdouble) is deprecated. Use move(Vec3D) instead.");
156 is >> dummy >>
normal_ >> dummy >> position >> dummy >> velocity;
176 return "InfiniteWall";
197 if (distance < p->getWallInteractionRadius())
void write(std::ostream &os) const
Writes the InfiniteWall to an output stream, usually a restart file.
MERCURY_DEPRECATED void move(Mdouble position)
Move the wall to a new position by giving the new position in the direction of the unit normal vector...
void read(std::istream &is)
Reads InfiniteWall from a restart file.
void setNormal(Vec3D normal)
Sets the normal vector between the two interacting objects.
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 setVelocity(const Vec3D &velocity)
set the velocity of the BaseInteractable.
std::string getName() const override
Returns the name of the object, in this case the string "InfiniteWall".
Logger< MERCURY_LOGLEVEL > logger("MercuryKernel")
void setOverlap(Mdouble overlap)
Set the overlap between the two interacting object.
Mdouble getDistance(const Vec3D &otherPosition) const
Returns the distance of the wall to the particle.
BaseInteraction * getInteractionWith(BaseParticle *p, Mdouble timeStamp, InteractionHandler *interactionHandler)
Look up the interaction between this wall and a BaseParticle at a certain timeStamp.
BaseInteraction * getInteraction(BaseInteractable *P, BaseInteractable *I, Mdouble timeStamp)
Returns the Interaction between the BaseInteractable's P and I.
Vec3D getNormal() const
Access function for normal.
void setContactPoint(Vec3D contactPoint)
Set the location of the contact point between the two interacting objects.
static Mdouble dot(const Vec3D &a, const Vec3D &b)
Calculates the dot product of two Vec3D: .
void oldRead(std::istream &is)
Reads InfiniteWall from an old-style restart file.
void setDistance(Mdouble distance)
Sets the interaction distance between the two interacting objects.
const Vec3D & getPosition() const
Returns the position of this BaseInteractable.
Stores information about interactions between two interactable objects; often particles but could be ...
Mdouble getWallInteractionRadius() const
Returns the interaction radius for interaction with walls. See also BaseParticle::getInteractionRadiu...
InfiniteWall()
Default constructor, the normal is infinitely long.
Container to store Interaction objects.
const Vec3D & getNormal() const
Gets the normal vector between the two interacting objects.
Mdouble getRadius() const
Returns the particle's radius_.
InfiniteWall * copy() const override
Wall copy method. It calls the copy constructor of this Wall, useful for polymorphism.
Mdouble getOverlap() const
Returns a Mdouble with the current overlap between the two interacting objects.
void setNormal(const Vec3D normal)
Changes the normal of the InfiniteWall.
void setPosition(const Vec3D &position)
Sets the position of this BaseInteractable.
Mdouble getLength() const
Calculates the length of this Vec3D: .
void set(Vec3D normal, Vec3D point)
Defines a standard wall, given an outward normal vector s.t. normal*x=normal*point for all x of the w...
This is a class defining walls.
Implementation of a 3D vector (by Vitaliy).
void write(std::ostream &os) const
Function that writes a BaseWall to an output stream, usually a restart file.
void read(std::istream &is)
Function that reads a BaseWall from an input stream, usually a restart file.
virtual ~InfiniteWall()
Default destructor.