26 #ifndef MultiParticle_H
27 #define MultiParticle_H
63 void write(std::ostream& os)
const override
71 void read(std::istream& is)
override;
73 std::string
getName()
const override;
212 std::vector <Vec3D> globalPos;
264 return "DzhanibekovParticle";
266 return "VerticallyOriented";
double Mdouble
Definition: GeneralDefine.h:34
virtual const Vec3D & getAngularVelocity() const
Returns the angular velocity of this interactable.
Definition: BaseInteractable.cc:341
virtual const Vec3D & getVelocity() const
Returns the velocity of this interactable.
Definition: BaseInteractable.cc:329
const Vec3D & getPosition() const
Returns the position of this BaseInteractable.
Definition: BaseInteractable.h:218
void write(std::ostream &os) const override
Particle print function, which accepts an std::ostream as input.
Definition: BaseParticle.cc:336
bool isClump_
The particle is pebble.
Definition: BaseParticle.h:748
MatrixSymmetric3D getInertia() const
Definition: BaseParticle.h:331
BaseParticle * clumpParticle
Function that updates necessary quantities of a clump particle after adding a pebble.
Definition: BaseParticle.h:744
bool isPebble_
pointer to a clump particle (for a pebble)
Definition: BaseParticle.h:746
Mdouble invMass_
Particle radius_.
Definition: BaseParticle.h:685
Definition: ClumpParticle.h:41
Mdouble getKineticEnergy() const override
Definition: ClumpParticle.h:185
void setPrincipalDirections_e1(Vec3D e)
Definition: ClumpParticle.h:138
int nPebble_
Definition: ClumpParticle.h:283
Vec3D getInitPrincipalDirections_e1() const
Definition: ClumpParticle.h:109
void angularAccelerateClumpIterative(double timeStep)
Definition: ClumpParticle.cc:358
void updatePebblesVelPos()
Definition: ClumpParticle.cc:251
ClumpParticle * copy() const override
Definition: ClumpParticle.cc:97
bool isSphericalParticle() const override
Definition: ClumpParticle.h:75
void setPebble(int kPebble, ClumpParticle *pPebble)
Definition: ClumpParticle.h:162
MatrixSymmetric3D clumpInitInertia_
Definition: ClumpParticle.h:297
bool getDzhanibekovParticle()
Definition: ClumpParticle.h:227
bool DzhanibekovParticle_
Definition: ClumpParticle.h:285
Mdouble clumpMass_
Definition: ClumpParticle.h:291
std::vector< Mdouble > getPebbleRadii()
Definition: ClumpParticle.h:222
ClumpParticle()
Basic Particle constructor, creates a particle at (0,0,0) with radius, mass and inertia equal to 1.
Definition: ClumpParticle.cc:37
Vec3D getPrincipalDirections_e2() const
Definition: ClumpParticle.h:99
MatrixSymmetric3D MtoS(Matrix3D M)
Definition: ClumpParticle.h:312
MatrixSymmetric3D clumpInertia_
Definition: ClumpParticle.h:295
void integrateAfterForceComputation(double time, double timeStep) override
Definition: ClumpParticle.cc:334
bool getVerticallyOriented()
Definition: ClumpParticle.h:233
std::vector< Mdouble > pebbleRadius_
Definition: ClumpParticle.h:301
Vec3D getInitPrincipalDirections_e2() const
Definition: ClumpParticle.h:113
bool VerticallyOriented_
Definition: ClumpParticle.h:287
std::vector< Vec3D > pebblePos_
Definition: ClumpParticle.h:299
void rotatePrincipalDirections(Vec3D rotation)
Definition: ClumpParticle.cc:151
std::string getName() const override
Definition: ClumpParticle.cc:103
void write(std::ostream &os) const override
Particle print function, which accepts an std::ostream as input.
Definition: ClumpParticle.h:63
Mdouble viscousDamping_
Definition: ClumpParticle.h:293
void setClumpMass(Mdouble mass)
Definition: ClumpParticle.h:173
std::vector< Mdouble > getFieldVTK(unsigned i) const override
Definition: ClumpParticle.h:270
void setInitPrincipalDirections(Matrix3D directions)
Definition: ClumpParticle.cc:145
void computeMass(const ParticleSpecies &s) override
Computes the particle's (inverse) mass and inertia.
Definition: ClumpParticle.cc:391
int NPebble() const
Definition: ClumpParticle.cc:115
void setClump()
Definition: ClumpParticle.cc:120
void actionsAfterAddObject() override
Definition: ClumpParticle.cc:192
void rotateTensorOfInertia()
Definition: ClumpParticle.cc:224
void setInitInertia(MatrixSymmetric3D inertia)
Definition: ClumpParticle.cc:216
Vec3D angularAcceleration_
Definition: ClumpParticle.h:289
std::string getNameVTK(unsigned i) const override
Definition: ClumpParticle.h:261
Vec3D getPrincipalDirections_e3() const
Definition: ClumpParticle.h:103
void setVerticallyOriented(bool d)
Definition: ClumpParticle.h:245
void updateExtraQuantities()
Definition: ClumpParticle.cc:405
Mdouble getRotationalEnergy() const override
Calculates the particle's rotational kinetic energy.
Definition: ClumpParticle.h:194
void integrateBeforeForceComputation(double time, double timeStep) override
Definition: ClumpParticle.cc:287
void setDzhanibekovParticle(bool d)
Definition: ClumpParticle.h:239
~ClumpParticle() override
Destructor, needs to be implemented and checked to see if it is the largest or smallest particle curr...
void setDamping(Mdouble damp)
Definition: ClumpParticle.h:180
Matrix3D StoM(MatrixSymmetric3D M)
Definition: ClumpParticle.h:315
void setPrincipalDirections(Matrix3D directions)
Definition: ClumpParticle.cc:139
void setPrincipalDirections_e3(Vec3D e)
Definition: ClumpParticle.h:150
std::vector< Vec3D > getPebblePositions()
Definition: ClumpParticle.h:211
Matrix3D initPrincipalDirections_
Definition: ClumpParticle.h:305
void setPrincipalDirections_e2(Vec3D e)
Definition: ClumpParticle.h:144
void read(std::istream &is) override
Particle read function, which accepts an std::istream as input.
Definition: ClumpParticle.cc:108
unsigned getNumberOfFieldsVTK() const override
Definition: ClumpParticle.h:250
std::vector< Mdouble > getPebbleRadius() const
Definition: ClumpParticle.h:157
Matrix3D transpose(Matrix3D M)
Definition: ClumpParticle.h:318
void addPebble(Vec3D position, Mdouble radius)
Definition: ClumpParticle.cc:129
std::vector< ClumpParticle * > pebbleParticles_
Definition: ClumpParticle.h:307
std::string getTypeVTK(unsigned i) const override
Definition: ClumpParticle.h:255
Vec3D getInitPrincipalDirections_e3() const
Definition: ClumpParticle.h:117
void setClump(ClumpParticle *master)
Definition: ClumpParticle.h:167
Vec3D getPrincipalDirections_e1() const
Definition: ClumpParticle.h:94
Matrix3D principalDirections_
Definition: ClumpParticle.h:303
Implementation of a 3D matrix.
Definition: Matrix.h:38
Mdouble YX
Definition: Matrix.h:43
Mdouble ZX
Definition: Matrix.h:43
Mdouble XY
Definition: Matrix.h:43
Mdouble YY
Definition: Matrix.h:43
Mdouble ZY
Definition: Matrix.h:43
Mdouble ZZ
Definition: Matrix.h:43
Mdouble YZ
Definition: Matrix.h:43
Mdouble XZ
Definition: Matrix.h:43
Mdouble XX
all nine matrix elements
Definition: Matrix.h:43
Implementation of a 3D symmetric matrix.
Definition: MatrixSymmetric.h:37
Base class for all non-spherical particle types.
Definition: NonSphericalParticle.h:37
Definition: ParticleSpecies.h:37
Mdouble Y
Definition: Vector.h:66
Mdouble Z
Definition: Vector.h:66
static Mdouble getLengthSquared(const Vec3D &a)
Calculates the squared length of a Vec3D: .
Definition: Vector.h:332
Mdouble X
the vector components
Definition: Vector.h:66
static Mdouble getLength(const Vec3D &a)
Calculates the length of a Vec3D: .
Definition: Vector.cc:331
static Mdouble dot(const Vec3D &a, const Vec3D &b)
Calculates the dot product of two Vec3D: .
Definition: Vector.cc:76
const std::complex< Mdouble > i
Definition: ExtendedMath.h:51