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();
262 >> dummy >>
r_ >> dummy >>
n_
276 <<
" Revolutions " <<
n_
Vec3D start_
The centre of the lower end of the Coil.
void setNormal(Vec3D normal)
Sets the normal vector between the two interacting objects.
Mdouble X
the vector components
Logger< MERCURY_LOGLEVEL > logger("MercuryKernel")
void setOverlap(Mdouble overlap)
Set the overlap between the two interacting object.
BaseInteraction * getInteraction(BaseInteractable *P, BaseInteractable *I, Mdouble timeStamp)
Returns the Interaction between the BaseInteractable's P and I.
void setZero()
Sets all elements to zero.
void setContactPoint(Vec3D contactPoint)
Set the location of the contact point between the two interacting objects.
void set(Vec3D Start, Mdouble length, Mdouble radius, Mdouble numberOfRevelations, Mdouble omega, Mdouble thickness)
Set all parameters of this Coil.
void setDistance(Mdouble distance)
Sets the interaction distance between the two interacting objects.
const Vec3D & getPosition() const
Returns the position of this BaseInteractable.
Stores information about interactions between two interactable objects; often particles but could be ...
~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...
Container to store Interaction objects.
const Vec3D & getNormal() const
Gets the normal vector between the two interacting objects.
Mdouble getRadius() const
Returns the particle's radius_.
Mdouble getOverlap() const
Returns a Mdouble with the current overlap between the two interacting objects.
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.
BaseInteraction * getInteractionWith(BaseParticle *P, Mdouble timeStamp, InteractionHandler *interactionHandler)
Get the interaction between this Coil and given BaseParticle at a given time.
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".