VChute.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 VCHUTE_H
6 #define VCHUTE_H
7 
8 #include "BaseWall.h"
9 #include "Math/Vector.h"
10 
11 /* A finite-length V-chute. */
12 
13 class VChute : public BaseWall
14 {
15 public:
16  VChute();
17 
18  VChute(const VChute& other);
19 
20  VChute(Mdouble length, Mdouble width, Mdouble alpha);
21 
22  ~VChute() override;
23 
24  void set(Mdouble length, Mdouble width, Mdouble alpha);
25 
26  VChute* copy() const override;
27 
28  // wheeee virtual mc virty-virtual
29  bool getDistanceAndNormal(const BaseParticle& p, Mdouble& distance, Vec3D& normal_return) const override;
30 
32  getInteractionWith(BaseParticle* p, unsigned timeStamp, InteractionHandler* interactionHandler) override;
33 
34  void read(std::istream& is) override;
35 
36  void write(std::ostream& os) const override;
37 
38  std::string getName() const override;
39 
40 private:
41  Mdouble l_; // length
42  Mdouble w_; // width
43  Mdouble alpha_; // alpha, in radians (V-ness)
44 };
45 
46 #endif
float * p
Definition: Tutorial_Map_using.cpp:9
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: VChute.h:14
BaseInteraction * getInteractionWith(BaseParticle *p, unsigned timeStamp, InteractionHandler *interactionHandler) override
Returns the interaction between this wall and a given particle, nullptr if there is no interaction.
Definition: VChute.cc:127
void write(std::ostream &os) const override
Definition: VChute.cc:160
VChute * copy() const override
Pure virtual function that can be overwritten in inherited classes in order to copy a BaseWall.
Definition: VChute.cc:42
Mdouble l_
Definition: VChute.h:41
void set(Mdouble length, Mdouble width, Mdouble alpha)
Definition: VChute.cc:35
Mdouble w_
Definition: VChute.h:42
std::string getName() const override
Definition: VChute.cc:171
VChute()
Definition: VChute.cc:12
void read(std::istream &is) override
Definition: VChute.cc:148
bool getDistanceAndNormal(const BaseParticle &p, Mdouble &distance, Vec3D &normal_return) const override
Pure virtual function that computes the distance of a BaseParticle to this wall and returns the norma...
Definition: VChute.cc:47
~VChute() override
Mdouble alpha_
Definition: VChute.h:43
Definition: Kernel/Math/Vector.h:30
RealScalar alpha
Definition: level1_cplx_impl.h:151
std::string string(const unsigned &i)
Definition: oomph_definitions.cc:286