83 {
return "MeshTriangle"; }
88 void read(std::istream& is)
override;
93 void write(std::ostream& os)
const override;
170 void rotate(
const Vec3D& angularVelocity)
override;
236 std::array<MeshTriangle*, 3>
neighbor = {{
nullptr}};
int i
Definition: BiCGSTAB_step_by_step.cpp:9
double Mdouble
Definition: GeneralDefine.h:13
float * p
Definition: Tutorial_Map_using.cpp:9
Matrix< SCALARA, Dynamic, Dynamic, opt_A > A
Definition: bench_gemm.cpp:47
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
Container to store Interaction objects.
Definition: InteractionHandler.h:25
MeshTriangle implements a triangle whose vertex positions are defined by three particles.
Definition: MeshTriangle.h:54
std::array< Vec3D, 3 > getVertices() const
Returns an array of the vertex coordinates.
Definition: MeshTriangle.h:116
void read(std::istream &is) override
Reads an MeshTriangle from an input stream, for example a restart file.
Definition: MeshTriangle.cc:343
std::vector< std::vector< unsigned int > > vertexNeighbors
Definition: MeshTriangle.h:241
std::array< Vec3D, 3 > vertex_
Definition: MeshTriangle.h:259
void checkInteractions(InteractionHandler *interactionHandler, unsigned int timeStamp) override
Checks, if the forces of all interctions should be applied.
Definition: MeshTriangle.cc:89
const Vec3D getVelocityAtContact(const Vec3D &contact) const override
Calculates the local velocity at a specified point.
Definition: MeshTriangle.cc:304
void setMass(Mdouble mass)
Definition: MeshTriangle.cc:668
Vec3D faceNormal_
Definition: MeshTriangle.h:282
void setVertexVelocities(Vec3D A, Vec3D B, Vec3D C)
Sets the velocity of the vertex points.
Definition: MeshTriangle.cc:458
Mdouble getInvMass() const override
Definition: MeshTriangle.cc:658
Mdouble getArea() const
Returns the area of the triangle.
Definition: MeshTriangle.h:126
MeshTriangle(const MeshTriangle &other)=default
Copy constructor.
void handleParticleAddition(unsigned int id, BaseParticle *p) override
Handles the addition of particles to the particle Handler.
Definition: MeshTriangle.cc:532
BaseInteraction * getInteractionWith(BaseParticle *p, unsigned timeStamp, InteractionHandler *interactionHandler) override
Definition: MeshTriangle.cc:27
void setHandler(WallHandler *handler) override
Set the handler.
Definition: MeshTriangle.cc:480
void rotate(const Vec3D &angularVelocity) override
Rotates this BaseInteractable.
Definition: MeshTriangle.cc:331
std::array< unsigned int, 3 > getVertexIds() const
Returns an array containing the ids of the vertex particles.
Definition: MeshTriangle.h:139
void write(std::ostream &os) const override
Writes an MeshTriangle to an output stream, for example a restart file.
Definition: MeshTriangle.cc:390
std::array< MeshTriangle *, 3 > neighbor
Definition: MeshTriangle.h:236
std::array< Vec3D, 3 > vertexVelocity_
Definition: MeshTriangle.h:260
const Vec3D getBaricentricWeight(const Vec3D &contact) const
Calculates the barycentric weight of a specified point.
Definition: MeshTriangle.cc:315
Vec3D vertexMin_
Definition: MeshTriangle.h:266
std::array< unsigned int, 3 > vertexIds_
Definition: MeshTriangle.h:275
bool isActive
Definition: MeshTriangle.h:288
void retrieveVertexParticles()
Tries to get pointers to all vertex particles from the handler.
Definition: MeshTriangle.cc:550
Vec3D vertexMax_
Definition: MeshTriangle.h:267
bool getDistanceNormalOverlapType(const BaseParticle &p, Mdouble &distance, Vec3D &normal, Mdouble &overlap, unsigned int &type) const
Definition: MeshTriangle.cc:223
std::array< double, 3 > edgeLength_
Definition: MeshTriangle.h:276
void applyPressure(Mdouble presure)
Apply a force pointing in normal direction corresponding to the specified pressure.
Definition: MeshTriangle.cc:681
bool isInsideTriangle(const Vec3D &point) const
Determines if a given point is within the triangle.
Definition: MeshTriangle.cc:647
void actionsOnRestart() override
Actions executed on restart.
Definition: MeshTriangle.cc:576
void updateVerticesFromParticles()
Retrieve new positions from updated vertex particles.
Definition: MeshTriangle.cc:497
std::array< Vec3D, 3 > edgeNormal_
Definition: MeshTriangle.h:272
void handleParticleRemoval(unsigned int id) override
Handles the removal of particles to the particle Handler.
Definition: MeshTriangle.cc:512
MeshTriangle * copy() const override
Wall copy method. It calls the copy constructor of this Wall, useful for polymorphism.
Definition: MeshTriangle.h:76
bool isLocal(Vec3D &min, Vec3D &max) const override
Determines if the triangle is considered local.
Definition: MeshTriangle.cc:636
void checkActive()
Check if the triangle is considered active.
Definition: MeshTriangle.cc:568
bool getActive()
Definition: MeshTriangle.h:215
std::array< BaseParticle *, 3 > vertexParticle_
Definition: MeshTriangle.h:261
void actionsAfterParticleGhostUpdate() override
actionsPerformed after the position update of (ghost-) particles.
Definition: MeshTriangle.cc:586
std::string getName() const override
Returns the name of the object, here the string "MeshTriangle".
Definition: MeshTriangle.h:82
void applyForce(Vec3D force)
Apply the given force to the triangle.
Definition: MeshTriangle.cc:700
Mdouble area_
Definition: MeshTriangle.h:283
void setVertices(Vec3D A, Vec3D B, Vec3D C)
Sets member variables such that the wall represents a triangle with vertices A, B,...
Definition: MeshTriangle.cc:443
void updateVertexAndNormal()
Update vertexMin_, vertexMax_ and faceNormal_ for an updated position.
Definition: MeshTriangle.cc:609
~MeshTriangle() override=default
Destructor.
void setVertexIds(unsigned int i, unsigned int j, unsigned int k)
sets the ids of the vertex particles. Calls retrieveVertexParticles.
Definition: MeshTriangle.cc:468
MeshTriangle()=default
Default constructor.
void move(const Vec3D &move) override
Definition: MeshTriangle.cc:597
std::array< Vec3D, 3 > edge_
Definition: MeshTriangle.h:273
Mdouble invMass_
Definition: MeshTriangle.h:286
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: MeshTriangle.cc:197
Vec3D getFaceNormal() const
Returns the face normal.
Definition: MeshTriangle.h:121
void writeVTK(VTKContainer &vtk) const override
Definition: MeshTriangle.cc:425
Definition: Kernel/Math/Vector.h:30
Container to store all BaseWall.
Definition: WallHandler.h:22
Definition: matrices.h:74
#define min(a, b)
Definition: datatypes.h:22
#define max(a, b)
Definition: datatypes.h:23
char char char int int * k
Definition: level2_impl.h:374
void normal(const Vector< double > &x, Vector< double > &normal)
Definition: free_surface_rotation.cc:65
type
Definition: compute_granudrum_aor.py:141
std::string string(const unsigned &i)
Definition: oomph_definitions.cc:286
Definition: BaseWall.h:17
std::ptrdiff_t j
Definition: tut_arithmetic_redux_minmax.cpp:2