26 #ifndef TriangulatedWall_H
27 #define TriangulatedWall_H
97 void set(
const std::vector<Vec3D>& points,
const std::vector<std::vector<unsigned>>& cells);
99 void readVTK(std::string filename);
131 void read(std::istream& is)
override;
136 void write(std::ostream& os)
const override;
141 std::string
getName()
const override;
Stores information about interactions between two interactable objects; often particles but could be ...
Definition: BaseInteraction.h:60
Definition: BaseParticle.h:54
Basic class for walls.
Definition: BaseWall.h:49
Container to store Interaction objects.
Definition: InteractionHandler.h:45
Definition: ParticleSpecies.h:37
A TriangulatedWall is a triangulation created from a set of vertices and a n-by-3 connectivity matrix...
Definition: TriangulatedWall.h:52
std::vector< Face > face_
Definition: TriangulatedWall.h:158
~TriangulatedWall() override
Destructor.
Definition: TriangulatedWall.cc:226
TriangulatedWall & operator=(const TriangulatedWall &other)
Definition: TriangulatedWall.cc:234
void read(std::istream &is) override
Reads an TriangulatedWall from an input stream, for example a restart file.
Definition: TriangulatedWall.cc:303
void write(std::ostream &os) const override
Writes an TriangulatedWall to an output stream, for example a restart file.
Definition: TriangulatedWall.cc:312
void readVTK(std::string filename)
Definition: TriangulatedWall.cc:70
void writeVTK(VTKContainer &vtk) const override
Definition: TriangulatedWall.cc:492
std::string getName() const override
Returns the name of the object, here the string "TriangulatedWall".
Definition: TriangulatedWall.cc:342
void move(const Vec3D &move) override
Move the TriangulatedWall to a new position, which is a Vec3D from the old position.
Definition: TriangulatedWall.cc:291
void setNormalsAndNeighbours()
Definition: TriangulatedWall.cc:138
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: TriangulatedWall.cc:268
BaseInteraction * getInteractionWith(BaseParticle *p, unsigned timeStamp, InteractionHandler *interactionHandler) override
Get the interaction between this TriangulatedWall and given BaseParticle at a given time.
Definition: TriangulatedWall.cc:355
TriangulatedWall * copy() const override
Wall copy method. It calls the copy constructor of this Wall, useful for polymorphism.
Definition: TriangulatedWall.cc:247
std::vector< Vec3D > vertex_
Definition: TriangulatedWall.h:153
TriangulatedWall()
Default constructor.
Definition: TriangulatedWall.cc:33
void set(const std::vector< Vec3D > &points, const std::vector< std::vector< unsigned >> &cells)
Definition: TriangulatedWall.cc:117
TriangulatedWall(const std::vector< Vec3D > &points, const std::vector< std::vector< unsigned >> &cells, const ParticleSpecies *species)
Constructor setting values.
Definition: TriangulatedWall.h:60
Mdouble getDistance(const Vec3D &otherPosition) const
computes the signed distance to the face in normal direction
Definition: TriangulatedWall.cc:385
std::array< Face *, 3 > neighbor
For each edge, stores the neighboring face (nullptr if none)
Definition: TriangulatedWall.h:64
std::array< Vec3D, 3 > edgeNormal
For each edge, stores the vector normal to the face normal and the edge direction (vector between the...
Definition: TriangulatedWall.h:66
bool getDistanceAndNormal(const BaseParticle &p, Mdouble &distance, Vec3D &normal_return, Mdouble interactionRadius) const
Returns true if contact with the face exists, false if not. If contact exists, then the distance and ...
Definition: TriangulatedWall.cc:394
Vec3D normal
face normal (vertices are ordered anticlockwise direction around the normal)
Definition: TriangulatedWall.h:68
std::array< Vec3D *, 3 > vertex
defines the three vertices (anticlockwise direction around the normal)
Definition: TriangulatedWall.h:62
Definition: BaseWall.h:38