36 factor_ = std::numeric_limits<double>::quiet_NaN();
37 logger(
DEBUG,
"InfiniteWall::InfiniteWall ) finished");
50 logger(
DEBUG,
"InfiniteWall::InfiniteWall(const InfiniteWall &p) finished");
62 logger(
DEBUG,
"InfiniteWall::~InfiniteWall finished");
102 logger(
WARN,
"InfiniteWall::set(Vec3D, Mdouble) is deprecated. Use set(Vec3D, Vec3D) instead.");
103 set(normal, positionInNormalDirection*normal);
112 logger(
WARN,
"InfiniteWall::move(Mdouble) is deprecated. Use move(Vec3D) instead.");
165 is >> dummy >>
normal_ >> dummy >> position >> dummy >> velocity;
185 return "InfiniteWall";
218 myPoints.push_back(
Vec3D(p.
X-((min.
Y-p.
Y)*n.
Y+(min.
Z-p.
Z)*n.
Z)/n.
X,min.
Y,min.
Z));
219 myPoints.push_back(
Vec3D(p.
X-((min.
Y-p.
Y)*n.
Y+(max.
Z-p.
Z)*n.
Z)/n.
X,min.
Y,max.
Z));
220 myPoints.push_back(
Vec3D(p.
X-((max.
Y-p.
Y)*n.
Y+(max.
Z-p.
Z)*n.
Z)/n.
X,max.
Y,max.
Z));
221 myPoints.push_back(
Vec3D(p.
X-((max.
Y-p.
Y)*n.
Y+(min.
Z-p.
Z)*n.
Z)/n.
X,max.
Y,min.
Z));
224 }
else if (fabs(n.
Y)>0.5) {
226 myPoints.push_back(
Vec3D(min.
X,p.
Y-((min.
X-p.
X)*n.
X+(min.
Z-p.
Z)*n.
Z)/n.
Y,min.
Z));
227 myPoints.push_back(
Vec3D(min.
X,p.
Y-((min.
X-p.
X)*n.
X+(max.
Z-p.
Z)*n.
Z)/n.
Y,max.
Z));
228 myPoints.push_back(
Vec3D(max.
X,p.
Y-((max.
X-p.
X)*n.
X+(max.
Z-p.
Z)*n.
Z)/n.
Y,max.
Z));
229 myPoints.push_back(
Vec3D(max.
X,p.
Y-((max.
X-p.
X)*n.
X+(min.
Z-p.
Z)*n.
Z)/n.
Y,min.
Z));
234 myPoints.push_back(
Vec3D(min.
X,min.
Y,p.
Z-((min.
Y-p.
Y)*n.
Y+(min.
X-p.
X)*n.
X)/n.
Z));
235 myPoints.push_back(
Vec3D(min.
X,max.
Y,p.
Z-((max.
Y-p.
Y)*n.
Y+(min.
X-p.
X)*n.
X)/n.
Z));
236 myPoints.push_back(
Vec3D(max.
X,max.
Y,p.
Z-((max.
Y-p.
Y)*n.
Y+(max.
X-p.
X)*n.
X)/n.
Z));
237 myPoints.push_back(
Vec3D(max.
X,min.
Y,p.
Z-((min.
Y-p.
Y)*n.
Y+(max.
X-p.
X)*n.
X)/n.
Z));
245 std::vector<Vec3D> points;
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...
Mdouble X
the vector components
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")
Mdouble getDistance(const Vec3D &otherPosition) const
Returns the distance of the wall to the particle.
void createVTK(std::vector< Vec3D > &myPoints) const
Vec3D getMin() const
Return the "bottom left" corner of the domain, a vector with xMin_, yMin_ and zMin_.
Vec3D getNormal() const
Access function for normal.
static void addToVTK(const std::vector< Vec3D > &points, VTKContainer &vtk)
void intersectVTK(std::vector< Vec3D > &points, const Vec3D normal, const Vec3D position) const
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.
const Vec3D & getPosition() const
Returns the position of this BaseInteractable.
void writeVTK(VTKContainer &vtk) const override
Mdouble getWallInteractionRadius() const
Returns the interaction radius for interaction with walls. See also BaseParticle::getInteractionRadiu...
WallHandler * getHandler() const
A function which returns the WallHandler that handles this BaseWall.
InfiniteWall()
Default constructor, the normal is infinitely long.
InfiniteWall * copy() const override
Wall copy method. It calls the copy constructor of this Wall, useful for polymorphism.
Vec3D getMax() const
Return the "upper right" corner of the domain, a vector with xMin_, yMin_ and zMin_.
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 read(std::istream &is) override
Reads InfiniteWall from a restart file.
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 override
Writes the InfiniteWall to an output stream, usually a restart file.
DPMBase * getDPMBase()
Gets the problem that is solved using this handler.
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.
void setSpecies(const ParticleSpecies *species)
Define the species of this wall.