59 logger(
DEBUG,
"Coil(const Coil&) copy constructor finished");
81 logger(
DEBUG,
"Coil(params) constructor with parameters finished.");
106 n_ = numberOfRevelations;
117 return new Coil(*
this);
173 }
while (fabs(dd / ddd) > 1e-14);
194 distance = sqrt(distanceSquared) -
thickness_;
199 normal_return /= normal_return.
getLength();
235 >> dummy >>
r_ >> dummy >>
n_
249 <<
" Revolutions " <<
n_
Vec3D start_
The centre of the lower end of the Coil.
Mdouble X
the vector components
Logger< MERCURY_LOGLEVEL > logger("MercuryKernel")
void setZero()
Sets all elements to zero.
void set(Vec3D Start, Mdouble length, Mdouble radius, Mdouble numberOfRevelations, Mdouble omega, Mdouble thickness)
Set all parameters of this Coil.
const Vec3D & getPosition() const
Returns the position of this BaseInteractable.
~Coil()
Default destructor.
static Mdouble getLength(const Vec3D &a)
Calculates the length of a Vec3D: .
Mdouble getWallInteractionRadius() const
Returns the interaction radius for interaction with walls. See also BaseParticle::getInteractionRadiu...
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.
void write(std::ostream &os) const
Function that writes a BaseWall to an output stream, usually a restart file.
This class defines a coil in the z-direction from a (constant) starting point, a (constant) length L...
void read(std::istream &is)
Function that reads a BaseWall from an input stream, usually a restart file.
std::string getName() const override
Returns the name of the object, in this case the string "Coil".