86 void read(std::istream& is)
override;
99 void write(std::ostream& os)
const override;
104 std::string
getName()
const override;
Vec3D start_
The centre of the lower end of the Coil.
void set(Vec3D Start, Mdouble length, Mdouble radius, Mdouble numberOfRevelations, Mdouble omega, Mdouble thickness)
Set all parameters of this Coil.
~Coil()
Default destructor.
#define MERCURY_DEPRECATED
void read(std::istream &is) override
Reads a Coil from an input stream, for example a restart file.
void write(std::ostream &os) const override
Writes a Coil to an output stream, for example a restart file.
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...
Mdouble l_
The length of the Coil.
void move_time(Mdouble dt)
Rotate the Coil for a period dt, so that the offset_ changes with omega_*dt.
Coil * copy() const override
Copy this Coil and return a pointer to the copy, useful for polymorphism.
Coil()
Default constructor, sets a coil with default parameters.
Implementation of a 3D vector (by Vitaliy).
MERCURY_DEPRECATED void oldRead(std::istream &is)
Reads an old-style Coil from an input stream, for example an old restart file.
This class defines a coil in the z-direction from a (constant) starting point, a (constant) length L...
std::string getName() const override
Returns the name of the object, in this case the string "Coil".