80 void read(std::istream& is)
override;
90 void write(std::ostream& os)
const override;
95 std::string
getName()
const final;
void read(std::istream &is) override
Reads a Screw from an input stream, for example a restart file.
Mdouble maxR_
The outer radius of the Screw.
This function defines an Archimedes' screw in the z-direction from a (constant) starting point...
bool getDistanceAndNormal(const BaseParticle &P, Mdouble &distance, Vec3D &normal_return) const final
Compute the distance from the Screw for a given BaseParticle and return if there is a collision...
~Screw()
Default destructor.
void move_time(Mdouble dt)
Rotate the Screw for a period dt, so that the offset_ changes with omega_*dt.
Stores information about interactions between two interactable objects; often particles but could be ...
std::string getName() const final
Returns the name of the object, here the string "Screw".
Vec3D start_
The centre of the lower end of the screw.
Mdouble offset_
The angle that describes how much the Screw has turned, going from 0 to 1 for a rotation.
Container to store Interaction objects.
Mdouble l_
The length of the Screw.
Screw * copy() const final
Copy this screw and return a pointer to the copy.
void write(std::ostream &os) const override
Writes this Screw to an output stream, for example a restart file.
BaseInteraction * getInteractionWith(BaseParticle *p, Mdouble timeStamp, InteractionHandler *interactionHandler) final
Get the interaction between this Screw and given BaseParticle at a given time.
Mdouble n_
The number of revelations.
Screw()
Default constructor: make a screw with default parameters.
Mdouble thickness_
The thickness of the Screw.
Mdouble omega_
Rotation speed in rev/s.
Implementation of a 3D vector (by Vitaliy).
void oldRead(std::istream &is)
Reads a Screw in the old style from an input stream, for example a restart file old style...