InfiniteWallWithHole.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 INFINITEWALLWITHHOLE_H
6 #define INFINITEWALLWITHHOLE_H
7 
13 #include "BaseWall.h"
14 #include "Math/Vector.h"
15 
17 {
18 public:
19 
24 
28  InfiniteWallWithHole(Vec3D normal, Mdouble position, Mdouble holeRadius);
29 
34 
38  InfiniteWallWithHole* copy() const override;
39 
43  void set(Vec3D normal, Mdouble position, Mdouble holeRadius);
44 
48  void moveTo(Mdouble position);
49 
50 // /*!
51 // * \brief Allows the wall to be moved to a new position (also orthogonal to the normal), and setting the velocity
52 // * note: I commented this function out as it does not add new functionality (instead, BaseInteractable::move(velocity*dt) can be used),
53 // * and it hides the virtual function BaseInteractable::move. If this is really needed, please add it again. \author weinhartt
54 // */
55 // void move(Vec3D velocity, Mdouble dt);
56 
60  void move_time(Mdouble dt);
61 
65  Mdouble getWallDistance(const Vec3D& position) const;
66 
70  Mdouble getHoleDistance(const Vec3D& position) const;
71 
75  bool getDistanceAndNormal(const BaseParticle& P, Mdouble& distance, Vec3D& normal_return) const override;
76 
80  void read(std::istream& is) override;
81 
85  void oldRead(std::istream& is);
86 
90  void write(std::ostream& os) const override;
91 
95  std::string getName() const override;
96 
100  Vec3D getNormal();
101 
106 
107 private:
118 
119 };
120 
121 #endif
float * p
Definition: Tutorial_Map_using.cpp:9
Definition: BaseParticle.h:33
Basic class for walls.
Definition: BaseWall.h:28
Definition: InfiniteWallWithHole.h:17
Mdouble factor_
Definition: InfiniteWallWithHole.h:115
Mdouble getWallDistance(const Vec3D &position) const
Returns the distance of the wall to the particle.
Definition: InfiniteWallWithHole.cc:82
Mdouble position_
position n*x=p
Definition: InfiniteWallWithHole.h:116
void moveTo(Mdouble position)
Allows the wall to be moved to a new position.
Definition: InfiniteWallWithHole.cc:61
void oldRead(std::istream &is)
reads wall
Definition: InfiniteWallWithHole.cc:146
Mdouble getPosition()
access function for position
Definition: InfiniteWallWithHole.cc:176
Vec3D normal_
Outward normal vector, does not have to be a unit vector.
Definition: InfiniteWallWithHole.h:111
void read(std::istream &is) override
reads wall
Definition: InfiniteWallWithHole.cc:135
bool getDistanceAndNormal(const BaseParticle &P, Mdouble &distance, Vec3D &normal_return) const override
Since this function should be called before calculating any Particle-Wall interactions,...
Definition: InfiniteWallWithHole.cc:93
void move_time(Mdouble dt)
Definition: InfiniteWallWithHole.cc:76
Mdouble holeRadius_
Definition: InfiniteWallWithHole.h:117
Vec3D getNormal()
access function for normal
Definition: InfiniteWallWithHole.cc:170
InfiniteWallWithHole * copy() const override
Wall copy method. It calls the copy contrustor of this Wall, usefull for polymorfism.
Definition: InfiniteWallWithHole.cc:44
std::string getName() const override
Returns the name of the object.
Definition: InfiniteWallWithHole.cc:164
Mdouble getHoleDistance(const Vec3D &position) const
Definition: InfiniteWallWithHole.cc:87
void set(Vec3D normal, Mdouble position, Mdouble holeRadius)
Defines a standard wall, given an outward normal vector s. t. normal*x=position.
Definition: InfiniteWallWithHole.cc:51
InfiniteWallWithHole()
default constructor
Definition: InfiniteWallWithHole.cc:11
void write(std::ostream &os) const override
outputs wall
Definition: InfiniteWallWithHole.cc:155
Definition: Kernel/Math/Vector.h:30
double P
Uniform pressure.
Definition: TwenteMeshGluing.cpp:77
void normal(const Vector< double > &x, Vector< double > &normal)
Definition: free_surface_rotation.cc:65
std::string string(const unsigned &i)
Definition: oomph_definitions.cc:286