ArcWall.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 ARCWALL_H
6 #define ARCWALL_H
7 
8 #include "Walls/BaseWall.h"
9 #include <cmath>
10 
11 class WallHandler;
12 
13 class BaseParticle;
14 
15 class BaseWall;
16 
30 class ArcWall : public BaseWall
31 {
32 public:
36  ArcWall();
37 
41  ArcWall(const ArcWall& aw);
42 
46  ~ArcWall() override = default;
47 
61  void set(Vec3D axis, Vec3D pos, Mdouble radius, Vec3D centreline, Mdouble semiangle);
62 
63  ArcWall* copy() const override;
64 
66  Mdouble& distance,
67  Vec3D& normal) const override;
68 
70  unsigned timeStamp,
71  InteractionHandler* interactionHandler) override;
72 
73  void read(std::istream& is) override;
74 
75  void write(std::ostream& os) const override;
76 
77  std::string getName() const override;
78 
79 private:
85 };
86 
87 #endif
float * p
Definition: Tutorial_Map_using.cpp:9
A wall that is the inside (concave side) of an arc of a cylinder, like a pipe or half-pipe.
Definition: ArcWall.h:31
Mdouble radius_
Definition: ArcWall.h:82
Vec3D pos_
Definition: ArcWall.h:81
~ArcWall() override=default
Default destructor.
std::string getName() const override
A purely virtual function.
Definition: ArcWall.cc:113
Vec3D centreline_
Definition: ArcWall.h:83
void write(std::ostream &os) const override
Write a BaseInteractable to an output stream.
Definition: ArcWall.cc:103
Mdouble semiangle_
Definition: ArcWall.h:84
void set(Vec3D axis, Vec3D pos, Mdouble radius, Vec3D centreline, Mdouble semiangle)
Set parameters of the ArcWall.
Definition: ArcWall.cc:28
void read(std::istream &is) override
Reads a BaseInteractable from an input stream.
Definition: ArcWall.cc:92
Vec3D axis_
Definition: ArcWall.h:80
BaseInteraction * getInteractionWith(BaseParticle *p, unsigned timeStamp, InteractionHandler *interactionHandler) override
Returns the interaction between this object and a given BaseParticle.
Definition: ArcWall.cc:72
ArcWall * copy() const override
Pure virtual function that can be overwritten in inherited classes in order to copy a BaseWall.
Definition: ArcWall.cc:42
ArcWall()
Default constructor.
Definition: ArcWall.cc:10
bool getDistanceAndNormal(const BaseParticle &p, Mdouble &distance, Vec3D &normal) const override
Pure virtual function that computes the distance of a BaseParticle to this wall and returns the norma...
Definition: ArcWall.cc: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
Definition: Kernel/Math/Vector.h:30
Container to store all BaseWall.
Definition: WallHandler.h:22
radius
Definition: UniformPSDSelfTest.py:15
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