26 #ifndef BASEINTERACTABLE_H
27 #define BASEINTERACTABLE_H
76 void read(std::istream& is)
override;
82 void write(std::ostream& os)
const override;
271 virtual void rotate(
const Vec3D& angularVelocityDt);
Defines the basic properties that a interactable object can have.
Definition: BaseInteractable.h:55
void setPrescribedOrientation(const std::function< Quaternion(double)> &prescribedOrientation)
Allows the orientation of the infinite mass interactbale to be prescribed.
Definition: BaseInteractable.cc:474
const Quaternion & getOrientation() const
Returns the orientation of this BaseInteractable.
Definition: BaseInteractable.h:230
unsigned int indSpecies_
Definition: BaseInteractable.h:497
const Vec3D & getForce() const
Returns the force on this BaseInteractable.
Definition: BaseInteractable.h:126
virtual const Vec3D & getAngularVelocity() const
Returns the angular velocity of this interactable.
Definition: BaseInteractable.cc:341
void sumForceTorqueOMP()
Definition: BaseInteractable.cc:162
void applyPrescribedAngularVelocity(double time)
Computes the angular velocity from the user defined prescribed angular velocity.
Definition: BaseInteractable.cc:512
virtual void setOrientation(const Quaternion &orientation)
Sets the orientation of this BaseInteractable.
Definition: BaseInteractable.h:260
~BaseInteractable() override
Destructor, it simply destructs the BaseInteractable and all the objects it contains.
Definition: BaseInteractable.cc:97
void setAngularVelocity(const Vec3D &angularVelocity)
set the angular velocity of the BaseInteractble.
Definition: BaseInteractable.cc:360
void copyInteractionsForPeriodicParticles(const BaseInteractable &p)
Copies interactions to this BaseInteractable whenever a periodic copy made.
Definition: BaseInteractable.cc:386
void setForce(const Vec3D &force)
Sets the force on this BaseInteractable.
Definition: BaseInteractable.h:149
void setOrientationViaNormal(Vec3D normal)
Sets the orientation of this BaseInteractable by defining the vector that results from the rotation o...
Definition: BaseInteractable.cc:199
std::vector< Vec3D > torqueOMP_
Definition: BaseInteractable.h:486
void addTorque(const Vec3D &addTorque)
Adds an amount to the torque on this BaseInteractable.
Definition: BaseInteractable.cc:132
void addAngularVelocity(const Vec3D &angularVelocity)
add an increment to the angular velocity.
Definition: BaseInteractable.cc:370
std::function< Vec3D(double)> prescribedAngularVelocity_
Definition: BaseInteractable.h:442
std::function< Vec3D(double)> prescribedVelocity_
Definition: BaseInteractable.h:430
void addVelocity(const Vec3D &velocity)
adds an increment to the velocity.
Definition: BaseInteractable.h:312
virtual void resetForceTorque(int numberOfOMPthreads)
Definition: BaseInteractable.cc:141
const ParticleSpecies * species_
Definition: BaseInteractable.h:492
void applyPrescribedPosition(double time)
Computes the position from the user defined prescribed position function.
Definition: BaseInteractable.cc:423
virtual const Vec3D & getVelocity() const
Returns the velocity of this interactable.
Definition: BaseInteractable.cc:329
std::function< Vec3D(double)> prescribedPosition_
Definition: BaseInteractable.h:424
void setVelocity(const Vec3D &velocity)
set the velocity of the BaseInteractable.
Definition: BaseInteractable.cc:350
void setSpecies(const ParticleSpecies *species)
Sets the species of this BaseInteractable.
Definition: BaseInteractable.cc:185
void applyPrescribedVelocity(double time)
Computes the velocity from the user defined prescribed velocity function.
Definition: BaseInteractable.cc:454
virtual BaseInteraction * getInteractionWith(BaseParticle *P, unsigned timeStamp, InteractionHandler *interactionHandler)=0
Returns the interaction between this object and a given BaseParticle.
void setTorque(const Vec3D &torque)
Sets the torque on this BaseInteractable.
Definition: BaseInteractable.h:161
BaseInteractable()
Default BaseInteractable constructor.
Definition: BaseInteractable.cc:42
std::vector< Vec3D > forceOMP_
Definition: BaseInteractable.h:481
void setOrientationViaEuler(Vec3D eulerAngle)
Sets the orientation of this BaseInteractable by defining the euler angles.
Definition: BaseInteractable.cc:204
bool removeInteraction(BaseInteraction *I)
Removes an interaction from this BaseInteractable.
Definition: BaseInteractable.cc:308
Vec3D position_
Definition: BaseInteractable.h:448
void applyPrescribedOrientation(double time)
Computes the orientation from the user defined prescribed orientation function.
Definition: BaseInteractable.cc:485
void setPrescribedAngularVelocity(const std::function< Vec3D(double)> &prescribedAngularVelocity)
Allows the angular velocity of the infinite mass interactable to be prescribed.
Definition: BaseInteractable.cc:501
void addInteraction(BaseInteraction *I)
Adds an interaction to this BaseInteractable.
Definition: BaseInteractable.cc:292
void write(std::ostream &os) const override
Write a BaseInteractable to an output stream.
Definition: BaseInteractable.cc:274
virtual Mdouble getCurvature(const Vec3D &labFixedCoordinates) const
Definition: BaseInteractable.h:414
virtual bool isFixed() const =0
void read(std::istream &is) override
Reads a BaseInteractable from an input stream.
Definition: BaseInteractable.cc:244
virtual void setPosition(const Vec3D &position)
Sets the position of this BaseInteractable.
Definition: BaseInteractable.h:239
void integrateAfterForceComputation(double time, double timeStep)
This is part of the integration routine for objects with infinite mass.
Definition: BaseInteractable.cc:611
std::vector< BaseInteraction * > interactions_
Definition: BaseInteractable.h:507
virtual bool isFaceContact(const Vec3D &normal) const
Definition: BaseInteractable.h:417
const std::vector< BaseInteraction * > & getInteractions() const
Returns a list of interactions which belong to this interactable.
Definition: BaseInteractable.h:277
const ParticleSpecies * getSpecies() const
Returns a pointer to the species of this BaseInteractable.
Definition: BaseInteractable.h:108
void setPrescribedPosition(const std::function< Vec3D(double)> &prescribedPosition)
Allows the position of an infinite mass interactable to be prescribed.
Definition: BaseInteractable.cc:413
void integrateBeforeForceComputation(double time, double timeStep)
This is part of integrate routine for objects with infinite mass.
Definition: BaseInteractable.cc:538
virtual Mdouble getInvMass() const
Definition: BaseInteractable.h:408
virtual void move(const Vec3D &move)
Moves this BaseInteractable by adding an amount to the position.
Definition: BaseInteractable.cc:215
const Vec3D & getTorque() const
Returns the torque on this BaseInteractable.
Definition: BaseInteractable.h:138
virtual void rotate(const Vec3D &angularVelocityDt)
Rotates this BaseInteractable.
Definition: BaseInteractable.cc:230
const Vec3D & getPosition() const
Returns the position of this BaseInteractable.
Definition: BaseInteractable.h:218
void setPrescribedVelocity(const std::function< Vec3D(double)> &prescribedVelocity)
Allows the velocity of an infinite mass interactable to be prescribed.
Definition: BaseInteractable.cc:444
Vec3D velocity_
Definition: BaseInteractable.h:502
Quaternion orientation_
Definition: BaseInteractable.h:454
void addForce(const Vec3D &addForce)
Adds an amount to the force on this BaseInteractable.
Definition: BaseInteractable.cc:116
virtual void setIndSpecies(unsigned int indSpecies)
Sets the index of the Species of this BaseInteractable.
Definition: BaseInteractable.h:98
Vec3D torque_
Definition: BaseInteractable.h:469
Vec3D angularVelocity_
Definition: BaseInteractable.h:459
virtual const Vec3D getVelocityAtContact(const Vec3D &contact) const
Returns the velocity at the contact point, use by many force laws.
Definition: BaseInteractable.cc:375
unsigned int getIndSpecies() const
Returns the index of the species associated with the interactable object.
Definition: BaseInteractable.h:88
std::function< Quaternion(double)> prescribedOrientation_
Definition: BaseInteractable.h:436
Vec3D force_
Definition: BaseInteractable.h:464
Stores information about interactions between two interactable objects; often particles but could be ...
Definition: BaseInteraction.h:60
It is an abstract base class due to the purely virtual functions declared below. Even if the function...
Definition: BaseObject.h:51
Definition: BaseParticle.h:54
Container to store Interaction objects.
Definition: InteractionHandler.h:45
Definition: ParticleSpecies.h:37
This class contains the 4 components of a quaternion and the standard operators and functions needed ...
Definition: Quaternion.h:63
double P
Uniform pressure.
Definition: TwenteMeshGluing.cpp:73