WearableNurbsWall.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 
5 #ifndef MERCURYDPM_WEARABLENURBSWALL_H
6 #define MERCURYDPM_WEARABLENURBSWALL_H
7 
8 #include "Walls/NurbsWall.h"
9 
11 {
12 public:
13 
18 
23 
27  WearableNurbsWall(const NurbsSurface& nurbsSurface);
28 
33 
34  WearableNurbsWall(Mdouble lengthU, Mdouble lengthV, Mdouble resolutionU, Mdouble resolutionV, bool periodicU = false, bool periodicV = false);
35 
36  void set(Mdouble lengthU, Mdouble lengthV, Mdouble resolutionU, Mdouble resolutionV, bool periodicU = false, bool periodicV = false);
37 
41  void read(std::istream& is) override;
42 
46  void write(std::ostream& os) const override;
47 
51  std::string getName() const final;
52 
56  WearableNurbsWall* copy() const final;
57 
58  void computeWear() override;
59 
60  void writeWallDetailsVTK(VTKData& data) const override;
61 
62 private:
63  std::vector<std::vector<Mdouble>> localDebris_;
64  void storeDebris(Vec3D P, const Mdouble debris);
65  void processDebris();
66 public: // temp
67  Mdouble getVolumeUnderSurface(const std::vector<Mdouble>& knotsU, const std::vector<Mdouble>& knotsV,
68  const std::vector<std::vector<Vec3D>>& controlPoints, const std::vector<std::vector<Mdouble>>& weights) const;
69  Mdouble getVolumeUnderSurfaceX(const std::vector<Mdouble>& knotsU, const std::vector<Mdouble>& knotsV,
70  const std::vector<std::vector<Vec3D>>& controlPoints, const std::vector<std::vector<Mdouble>>& weights) const;
71  //temp
72 public:
73  void moveControlPoint(unsigned idxU, unsigned idxV, Vec3D dP)
74  {
75  nurbsSurface_.moveControlPoint(idxU, idxV, dP, false);
76  }
78  {
80  }
81 };
82 
83 
84 #endif //MERCURYDPM_WEARABLENURBSWALL_H
int data[]
Definition: Map_placement_new.cpp:1
Definition: NurbsSurface.h:13
const std::vector< std::vector< Vec3D > > & getControlPoints() const
Definition: NurbsSurface.h:120
const std::vector< std::vector< Mdouble > > & getWeights() const
Definition: NurbsSurface.h:123
const std::vector< Mdouble > & getKnotsU() const
Definition: NurbsSurface.h:126
void moveControlPoint(unsigned int indexU, unsigned int indexV, Vec3D dP, bool includingClosedOrPeriodic)
Definition: NurbsSurface.cc:637
const std::vector< Mdouble > & getKnotsV() const
Definition: NurbsSurface.h:129
This function defines a wall via a NurbsSurface.
Definition: NurbsWall.h:16
NurbsSurface nurbsSurface_
Definition: NurbsWall.h:74
Definition: Kernel/VTKWriter/VTKData.h:15
Definition: Kernel/Math/Vector.h:30
Definition: WearableNurbsWall.h:11
void processDebris()
Definition: WearableNurbsWall.cc:229
~WearableNurbsWall()
Default destructor.
Definition: WearableNurbsWall.cc:34
void computeWear() override
Definition: WearableNurbsWall.cc:141
WearableNurbsWall * copy() const final
Copy this wall and return a pointer to the copy.
Definition: WearableNurbsWall.cc:136
void write(std::ostream &os) const override
Writes this wall to an output stream, for example a restart file.
Definition: WearableNurbsWall.cc:122
Mdouble getVolumeUnderSurface()
Definition: WearableNurbsWall.h:77
void moveControlPoint(unsigned idxU, unsigned idxV, Vec3D dP)
Definition: WearableNurbsWall.h:73
void read(std::istream &is) override
Reads this wall from an input stream, for example a restart file.
Definition: WearableNurbsWall.cc:98
void set(Mdouble lengthU, Mdouble lengthV, Mdouble resolutionU, Mdouble resolutionV, bool periodicU=false, bool periodicV=false)
Definition: WearableNurbsWall.cc:44
WearableNurbsWall()
Default constructor: make a wall with default parameters.
Definition: WearableNurbsWall.cc:10
void storeDebris(Vec3D P, const Mdouble debris)
Definition: WearableNurbsWall.cc:181
Mdouble getVolumeUnderSurfaceX(const std::vector< Mdouble > &knotsU, const std::vector< Mdouble > &knotsV, const std::vector< std::vector< Vec3D >> &controlPoints, const std::vector< std::vector< Mdouble >> &weights) const
Definition: WearableNurbsWall.cc:301
std::vector< std::vector< Mdouble > > localDebris_
Definition: WearableNurbsWall.h:63
void writeWallDetailsVTK(VTKData &data) const override
Definition: WearableNurbsWall.cc:345
std::string getName() const final
Returns the name of the object, here the string "WearableNurbsWall".
Definition: WearableNurbsWall.cc:131
double P
Uniform pressure.
Definition: TwenteMeshGluing.cpp:77
list weights
Definition: calibrate.py:94
std::string string(const unsigned &i)
Definition: oomph_definitions.cc:286