Coil.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 COIL_H
6 #define COIL_H
7 
8 #include "BaseWall.h"
9 #include "Math/Vector.h"
10 
19 class Coil : public BaseWall
20 {
21 public:
25  Coil();
26 
30  Coil(const Coil& other);
31 
35  Coil(Vec3D Start, Mdouble L, Mdouble r, Mdouble N, Mdouble omega, Mdouble thickness);
36 
40  ~Coil() override;
41 
45  void
46  set(Vec3D Start, Mdouble length, Mdouble radius, Mdouble numberOfRevelations, Mdouble omega, Mdouble thickness);
47 
51  Coil* copy() const override;
52 
56  bool getDistanceAndNormal(const BaseParticle& P, Mdouble& distance, Vec3D& normal_return) const override;
57 
61  void move_time(Mdouble dt);
62 
66  void read(std::istream& is) override;
67 
74  void oldRead(std::istream& is);
75 
79  void write(std::ostream& os) const override;
80 
84  std::string getName() const override;
85 
86 private:
91 
96 
101 
106 
111 
116 
121 };
122 
123 #endif
#define MERCURYDPM_DEPRECATED
Definition: GeneralDefine.h:16
MatrixXd L
Definition: LLT_example.cpp:6
Definition: BaseParticle.h:33
Basic class for walls.
Definition: BaseWall.h:28
This class defines a coil in the z-direction from a (constant) starting point, a (constant) length L,...
Definition: Coil.h:20
bool getDistanceAndNormal(const BaseParticle &P, Mdouble &distance, Vec3D &normal_return) const override
Compute the distance from the Coil for a given BaseParticle and return if there is a collision....
Definition: Coil.cc:111
Coil()
Default constructor, sets a coil with default parameters.
Definition: Coil.cc:14
void write(std::ostream &os) const override
Writes a Coil to an output stream, for example a restart file.
Definition: Coil.cc:230
Coil * copy() const override
Copy this Coil and return a pointer to the copy, useful for polymorphism.
Definition: Coil.cc:95
MERCURYDPM_DEPRECATED void oldRead(std::istream &is)
Reads an old-style Coil from an input stream, for example an old restart file.
Definition: Coil.cc:217
Mdouble n_
Definition: Coil.h:105
Mdouble thickness_
Definition: Coil.h:120
void set(Vec3D Start, Mdouble length, Mdouble radius, Mdouble numberOfRevelations, Mdouble omega, Mdouble thickness)
Set all parameters of this Coil.
Definition: Coil.cc:81
Mdouble omega_
Definition: Coil.h:110
~Coil() override
Default destructor.
Definition: Coil.cc:63
Mdouble l_
The length of the Coil.
Definition: Coil.h:95
std::string getName() const override
Returns the name of the object, in this case the string "Coil".
Definition: Coil.cc:245
void read(std::istream &is) override
Reads a Coil from an input stream, for example a restart file.
Definition: Coil.cc:201
Mdouble r_
Definition: Coil.h:100
Vec3D start_
The centre of the lower end of the Coil.
Definition: Coil.h:90
void move_time(Mdouble dt)
Rotate the Coil for a period dt, so that the offset_ changes with omega_*dt.
Definition: Coil.cc:193
Mdouble offset_
Definition: Coil.h:115
Definition: Kernel/Math/Vector.h:30
@ N
Definition: constructor.cpp:22
Vector::Scalar omega(const Vector &t, const Vector &s, RealScalar angle)
Definition: IDRS.h:36
double P
Uniform pressure.
Definition: TwenteMeshGluing.cpp:77
r
Definition: UniformPSDSelfTest.py:20
radius
Definition: UniformPSDSelfTest.py:15
std::string string(const unsigned &i)
Definition: oomph_definitions.cc:286