RestrictedWall.h
Go to the documentation of this file.
1 // This file is part of the MercuryDPM project (https://www.mercurydpm.org).
2 // Copyright (c), The MercuryDPM Developers Team. All rights reserved.
3 // License: BSD 3-Clause License; see the LICENSE file in the root directory.
4 
9 
10 #ifndef RESTRICTEDWALL_H
11 #define RESTRICTEDWALL_H
12 
13 #include "BaseWall.h"
14 #include "Math/Vector.h"
15 #include "InfiniteWall.h"
16 
21 class RestrictedWall : public BaseWall
22 {
23 public:
24 
29 
34 
35 
39  RestrictedWall(BaseWall* wall, InfiniteWall* restriction);
40 
44  ~RestrictedWall() override;
45 
49  RestrictedWall* copy() const override;
50 
54  void set(BaseWall* wall, InfiniteWall* restriction);
55 
59  bool getDistanceAndNormal(const BaseParticle& p, Mdouble& distance, Vec3D& normal_return) const override;
60 
64  void read(std::istream& is) override;
65 
69  void oldRead(std::istream& is);
70 
74  void write(std::ostream& os) const override;
75 
79  std::string getName() const override;
80 
85  getInteractionWith(BaseParticle* p, unsigned timeStamp, InteractionHandler* interactionHandler) override;
86 
87  void writeVTK(VTKContainer& vtk) const override;
88 
89 private:
95 };
96 
97 #endif
RowVector3d w
Definition: Matrix_resize_int.cpp:3
float * p
Definition: Tutorial_Map_using.cpp:9
Stores information about interactions between two interactable objects; often particles but could be ...
Definition: BaseInteraction.h:39
Definition: BaseParticle.h:33
Basic class for walls.
Definition: BaseWall.h:28
A infinite wall fills the half-space {point: (position_-point)*normal_<=0}.
Definition: InfiniteWall.h:27
Container to store Interaction objects.
Definition: InteractionHandler.h:25
Restriction of a wall to the intersection with another wall.
Definition: RestrictedWall.h:22
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...
Definition: RestrictedWall.cc:71
BaseInteraction * getInteractionWith(BaseParticle *p, unsigned timeStamp, InteractionHandler *interactionHandler) override
Look up the interaction between this wall and a BaseParticle at a certain timeStamp.
Definition: RestrictedWall.cc:149
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: RestrictedWall.cc:103
InfiniteWall * restriction_
Definition: RestrictedWall.h:94
void oldRead(std::istream &is)
Reads RestrictedWall from an old-style restart file.
RestrictedWall * copy() const override
Wall copy method. It calls the copy constructor of this Wall, useful for polymorphism.
Definition: RestrictedWall.cc:59
void write(std::ostream &os) const override
Writes the RestrictedWall to an output stream, usually a restart file.
Definition: RestrictedWall.cc:123
void writeVTK(VTKContainer &vtk) const override
Definition: RestrictedWall.cc:163
void read(std::istream &is) override
Reads RestrictedWall from a restart file.
Definition: RestrictedWall.cc:114
std::string getName() const override
Returns the name of the object, in this case the string "RestrictedWall".
Definition: RestrictedWall.cc:135
RestrictedWall()
Default constructor, the normal is infinitely long.
Definition: RestrictedWall.cc:13
BaseWall * wall_
Definition: RestrictedWall.h:93
~RestrictedWall() override
Default destructor.
Definition: RestrictedWall.cc:41
Definition: Kernel/Math/Vector.h:30
std::string string(const unsigned &i)
Definition: oomph_definitions.cc:286
Definition: BaseWall.h:17