80 void read(std::istream& is)
override;
90 void write(std::ostream& os)
const override;
95 std::string
getName()
const final;
97 void writeVTK (std::string filename)
const;
99 void getTriangulation (std::vector<Vec3D>& vertex, std::vector<std::array<unsigned,3>>& face,
unsigned nr=5,
unsigned nz=15)
const;
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...
void getTriangulation(std::vector< Vec3D > &vertex, std::vector< std::array< unsigned, 3 >> &face, unsigned nr=5, unsigned nz=15) const
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.
std::string getName() const final
Returns the name of the object, here the string "Screw".
void writeVTK(std::string filename) const
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.
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.
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...