5 #ifndef BASEINTERACTABLE_H
6 #define BASEINTERACTABLE_H
55 void read(std::istream& is)
override;
61 void write(std::ostream& os)
const override;
250 virtual void rotate(
const Vec3D& angularVelocityDt);
float * p
Definition: Tutorial_Map_using.cpp:9
Defines the basic properties that a interactable object can have.
Definition: BaseInteractable.h:34
void setPrescribedOrientation(const std::function< Quaternion(double)> &prescribedOrientation)
Allows the orientation of the infinite mass interactbale to be prescribed.
Definition: BaseInteractable.cc:452
const Quaternion & getOrientation() const
Returns the orientation of this BaseInteractable.
Definition: BaseInteractable.h:209
unsigned int indSpecies_
Definition: BaseInteractable.h:476
const Vec3D & getForce() const
Returns the force on this BaseInteractable.
Definition: BaseInteractable.h:105
virtual const Vec3D & getAngularVelocity() const
Returns the angular velocity of this interactable.
Definition: BaseInteractable.cc:319
void sumForceTorqueOMP()
Definition: BaseInteractable.cc:140
void applyPrescribedAngularVelocity(double time)
Computes the angular velocity from the user defined prescribed angular velocity.
Definition: BaseInteractable.cc:490
virtual void setOrientation(const Quaternion &orientation)
Sets the orientation of this BaseInteractable.
Definition: BaseInteractable.h:239
~BaseInteractable() override
Destructor, it simply destructs the BaseInteractable and all the objects it contains.
Definition: BaseInteractable.cc:75
void setAngularVelocity(const Vec3D &angularVelocity)
set the angular velocity of the BaseInteractble.
Definition: BaseInteractable.cc:338
void copyInteractionsForPeriodicParticles(const BaseInteractable &p)
Copies interactions to this BaseInteractable whenever a periodic copy made.
Definition: BaseInteractable.cc:364
void setForce(const Vec3D &force)
Sets the force on this BaseInteractable.
Definition: BaseInteractable.h:128
void setOrientationViaNormal(Vec3D normal)
Sets the orientation of this BaseInteractable by defining the vector that results from the rotation o...
Definition: BaseInteractable.cc:177
std::vector< Vec3D > torqueOMP_
Definition: BaseInteractable.h:465
void addTorque(const Vec3D &addTorque)
Adds an amount to the torque on this BaseInteractable.
Definition: BaseInteractable.cc:110
void addAngularVelocity(const Vec3D &angularVelocity)
add an increment to the angular velocity.
Definition: BaseInteractable.cc:348
std::function< Vec3D(double)> prescribedAngularVelocity_
Definition: BaseInteractable.h:421
std::function< Vec3D(double)> prescribedVelocity_
Definition: BaseInteractable.h:409
void addVelocity(const Vec3D &velocity)
adds an increment to the velocity.
Definition: BaseInteractable.h:291
virtual void resetForceTorque(int numberOfOMPthreads)
Definition: BaseInteractable.cc:119
const ParticleSpecies * species_
Definition: BaseInteractable.h:471
void applyPrescribedPosition(double time)
Computes the position from the user defined prescribed position function.
Definition: BaseInteractable.cc:401
virtual const Vec3D & getVelocity() const
Returns the velocity of this interactable.
Definition: BaseInteractable.cc:307
std::function< Vec3D(double)> prescribedPosition_
Definition: BaseInteractable.h:403
void setVelocity(const Vec3D &velocity)
set the velocity of the BaseInteractable.
Definition: BaseInteractable.cc:328
void setSpecies(const ParticleSpecies *species)
Sets the species of this BaseInteractable.
Definition: BaseInteractable.cc:163
void applyPrescribedVelocity(double time)
Computes the velocity from the user defined prescribed velocity function.
Definition: BaseInteractable.cc:432
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:140
BaseInteractable()
Default BaseInteractable constructor.
Definition: BaseInteractable.cc:20
std::vector< Vec3D > forceOMP_
Definition: BaseInteractable.h:460
void setOrientationViaEuler(Vec3D eulerAngle)
Sets the orientation of this BaseInteractable by defining the euler angles.
Definition: BaseInteractable.cc:182
bool removeInteraction(BaseInteraction *I)
Removes an interaction from this BaseInteractable.
Definition: BaseInteractable.cc:286
Vec3D position_
Definition: BaseInteractable.h:427
void applyPrescribedOrientation(double time)
Computes the orientation from the user defined prescribed orientation function.
Definition: BaseInteractable.cc:463
void setPrescribedAngularVelocity(const std::function< Vec3D(double)> &prescribedAngularVelocity)
Allows the angular velocity of the infinite mass interactable to be prescribed.
Definition: BaseInteractable.cc:479
void addInteraction(BaseInteraction *I)
Adds an interaction to this BaseInteractable.
Definition: BaseInteractable.cc:270
void write(std::ostream &os) const override
Write a BaseInteractable to an output stream.
Definition: BaseInteractable.cc:252
virtual Mdouble getCurvature(const Vec3D &labFixedCoordinates) const
Definition: BaseInteractable.h:393
virtual bool isFixed() const =0
void read(std::istream &is) override
Reads a BaseInteractable from an input stream.
Definition: BaseInteractable.cc:222
virtual void setPosition(const Vec3D &position)
Sets the position of this BaseInteractable.
Definition: BaseInteractable.h:218
void integrateAfterForceComputation(double time, double timeStep)
This is part of the integration routine for objects with infinite mass.
Definition: BaseInteractable.cc:589
std::vector< BaseInteraction * > interactions_
Definition: BaseInteractable.h:486
virtual bool isFaceContact(const Vec3D &normal) const
Definition: BaseInteractable.h:396
const std::vector< BaseInteraction * > & getInteractions() const
Returns a list of interactions which belong to this interactable.
Definition: BaseInteractable.h:256
const ParticleSpecies * getSpecies() const
Returns a pointer to the species of this BaseInteractable.
Definition: BaseInteractable.h:87
void setPrescribedPosition(const std::function< Vec3D(double)> &prescribedPosition)
Allows the position of an infinite mass interactable to be prescribed.
Definition: BaseInteractable.cc:391
void integrateBeforeForceComputation(double time, double timeStep)
This is part of integrate routine for objects with infinite mass.
Definition: BaseInteractable.cc:516
virtual Mdouble getInvMass() const
Definition: BaseInteractable.h:387
virtual void move(const Vec3D &move)
Moves this BaseInteractable by adding an amount to the position.
Definition: BaseInteractable.cc:193
const Vec3D & getTorque() const
Returns the torque on this BaseInteractable.
Definition: BaseInteractable.h:117
virtual void rotate(const Vec3D &angularVelocityDt)
Rotates this BaseInteractable.
Definition: BaseInteractable.cc:208
const Vec3D & getPosition() const
Returns the position of this BaseInteractable.
Definition: BaseInteractable.h:197
void setPrescribedVelocity(const std::function< Vec3D(double)> &prescribedVelocity)
Allows the velocity of an infinite mass interactable to be prescribed.
Definition: BaseInteractable.cc:422
Vec3D velocity_
Definition: BaseInteractable.h:481
Quaternion orientation_
Definition: BaseInteractable.h:433
void addForce(const Vec3D &addForce)
Adds an amount to the force on this BaseInteractable.
Definition: BaseInteractable.cc:94
virtual void setIndSpecies(unsigned int indSpecies)
Sets the index of the Species of this BaseInteractable.
Definition: BaseInteractable.h:77
Vec3D torque_
Definition: BaseInteractable.h:448
Vec3D angularVelocity_
Definition: BaseInteractable.h:438
virtual const Vec3D getVelocityAtContact(const Vec3D &contact) const
Returns the velocity at the contact point, use by many force laws.
Definition: BaseInteractable.cc:353
unsigned int getIndSpecies() const
Returns the index of the species associated with the interactable object.
Definition: BaseInteractable.h:67
std::function< Quaternion(double)> prescribedOrientation_
Definition: BaseInteractable.h:415
Vec3D force_
Definition: BaseInteractable.h:443
Stores information about interactions between two interactable objects; often particles but could be ...
Definition: BaseInteraction.h:39
It is an abstract base class due to the purely virtual functions declared below. Even if the function...
Definition: BaseObject.h:30
Definition: BaseParticle.h:33
Container to store Interaction objects.
Definition: InteractionHandler.h:25
Definition: ParticleSpecies.h:16
This class contains the 4 components of a quaternion and the standard operators and functions needed ...
Definition: Kernel/Math/Quaternion.h:42
Definition: Kernel/Math/Vector.h:30
#define I
Definition: main.h:127
double P
Uniform pressure.
Definition: TwenteMeshGluing.cpp:77
double velocity(const double &t)
Angular velocity as function of time t.
Definition: jeffery_orbit.cc:107
void normal(const Vector< double > &x, Vector< double > &normal)
Definition: free_surface_rotation.cc:65