WearableTriangleMeshWall.h
Go to the documentation of this file.
1 //Copyright (c) 2013-2023, The MercuryDPM Developers Team. All rights reserved.
2 //For the list of developers, see <http://www.MercuryDPM.org/Team>.
3 //
4 //Redistribution and use in source and binary forms, with or without
5 //modification, are permitted provided that the following conditions are met:
6 // * Redistributions of source code must retain the above copyright
7 // notice, this list of conditions and the following disclaimer.
8 // * Redistributions in binary form must reproduce the above copyright
9 // notice, this list of conditions and the following disclaimer in the
10 // documentation and/or other materials provided with the distribution.
11 // * Neither the name MercuryDPM nor the
12 // names of its contributors may be used to endorse or promote products
13 // derived from this software without specific prior written permission.
14 //
15 //THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
16 //ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
17 //WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
18 //DISCLAIMED. IN NO EVENT SHALL THE MERCURYDPM DEVELOPERS TEAM BE LIABLE FOR ANY
19 //DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
20 //(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
21 //LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
22 //ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
23 //(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
24 //SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
25 
26 #ifndef MERCURYDPM_WEARABLETRIANGLEMESHWALL_H
27 #define MERCURYDPM_WEARABLETRIANGLEMESHWALL_H
28 
29 #include "TriangleMeshWall.h"
30 
32 {
33 public:
34 
39 
46  WearableTriangleMeshWall(const std::vector<Vec3D>& points, const std::vector<std::array<unsigned, 3>>& cells, const ParticleSpecies* species = nullptr);
47 
57  WearableTriangleMeshWall(const Vec3D& P0, const Vec3D& P1, const Vec3D& P, Mdouble resolutionU, Mdouble resolutionV,
58  const ParticleSpecies* species = nullptr, bool periodicInU = false, bool periodicInV = false);
59 
65 
70 
77 
82  WearableTriangleMeshWall* copy() const override;
83 
87  void read(std::istream& is) override;
88 
92  void write(std::ostream& os) const override;
93 
98  std::string getName() const override;
99 
100  void computeWear() override;
101 
105  void setWearCoefficient(Mdouble wearCoefficient);
106 
110  void setHardness(Mdouble hardness);
111 
115  void setWearAcceleration(Mdouble wearAcceleration);
116 
117 private:
125  void storeDebris(const Triangle& triangle, const Vec3D& position, const Vec3D& debris, std::vector<Vec3D>& debrisContainer);
126 
133 };
134 
135 
136 #endif //MERCURYDPM_WEARABLETRIANGLEMESHWALL_H
Definition: ParticleSpecies.h:37
Definition: TriangleMeshWall.h:33
Definition: Vector.h:51
Definition: WearableTriangleMeshWall.h:32
void setWearCoefficient(Mdouble wearCoefficient)
Definition: WearableTriangleMeshWall.cc:172
Mdouble wearCoefficient_
Dimensionless wear coefficient.
Definition: WearableTriangleMeshWall.h:128
WearableTriangleMeshWall()=default
Default constructor.
WearableTriangleMeshWall * copy() const override
Wall copy method.
Definition: WearableTriangleMeshWall.cc:60
void setWearAcceleration(Mdouble wearAcceleration)
Definition: WearableTriangleMeshWall.cc:182
std::string getName() const override
Returns the name of the object.
Definition: WearableTriangleMeshWall.cc:80
void setHardness(Mdouble hardness)
Definition: WearableTriangleMeshWall.cc:177
void read(std::istream &is) override
Reads a WearableTriangleMeshWall from an input stream, for example a restart file.
Definition: WearableTriangleMeshWall.cc:65
void computeWear() override
Definition: WearableTriangleMeshWall.cc:85
void storeDebris(const Triangle &triangle, const Vec3D &position, const Vec3D &debris, std::vector< Vec3D > &debrisContainer)
Proportionally assigns the debris located at a certain position on a triangle to the triangle vertice...
Definition: WearableTriangleMeshWall.cc:127
Mdouble hardness_
Hardness.
Definition: WearableTriangleMeshWall.h:130
Mdouble wearAcceleration_
Accelerates the wear process, to reduce simulation time needed to get results.
Definition: WearableTriangleMeshWall.h:132
void write(std::ostream &os) const override
Writes a WearableTriangleMeshWall to an output stream, for example a restart file.
Definition: WearableTriangleMeshWall.cc:73
WearableTriangleMeshWall & operator=(const WearableTriangleMeshWall &other)
Copy assignment operator.
Definition: WearableTriangleMeshWall.cc:51
~WearableTriangleMeshWall()=default
Destructor.
double P
Uniform pressure.
Definition: TwenteMeshGluing.cpp:73
Definition: TriangleMeshWall.h:220