MercuryDPM  Alpha
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
LiquidFilmParticle Class Reference

#include <LiquidFilmParticle.h>

+ Inheritance diagram for LiquidFilmParticle:

Public Member Functions

 LiquidFilmParticle ()
 Basic Particle constructor, creates an Particle at (0,0,0) with radius, mass and inertia equal to 1. More...
 
 LiquidFilmParticle (const LiquidFilmParticle &p)
 Particle copy constructor, which accepts as input a reference to a Particle. It creates a copy of this Particle and all it's information. Usually it is better to use the copy() function for polymorfism. More...
 
virtual ~LiquidFilmParticle ()
 Particle destructor, needs to be implemented and checked if it removes tangential spring information. More...
 
virtual LiquidFilmParticlecopy () const
 Particle copy method. It calls to copy constructor of this Particle, useful for polymorfism. More...
 
void write (std::ostream &os) const
 
std::string getName () const
 
void read (std::istream &is)
 
Mdouble getLiquidVolume () const
 
void setLiquidVolume (Mdouble liquidVolume)
 
void addLiquidVolume (Mdouble liquidVolume)
 
unsigned getNumberOfFieldsVTK () const
 
std::string getTypeVTK (unsigned i) const
 
std::string getNameVTK (unsigned i) const
 
std::vector< MdoublegetFieldVTK (unsigned i) const
 
- Public Member Functions inherited from BaseParticle
 BaseParticle ()
 Basic Particle constructor, creates an Particle at (0,0,0) with radius, mass and inertia equal to 1. More...
 
 BaseParticle (const BaseParticle &p)
 Particle copy constructor, which accepts as input a reference to a Particle. It creates a copy of this Particle and all it's information. Usually it is better to use the copy() function for polymorfism. More...
 
virtual ~BaseParticle ()
 Particle destructor, needs to be implemented and checked if it removes tangential spring information. More...
 
Mdouble getVolume () const
 Get Particle volume function, which required a reference to the Species vector. It returns the volume of the Particle. More...
 
void fixParticle ()
 Fix Particle function. It fixes a Particle by setting its inverse mass and inertia and velocities to zero. More...
 
bool isFixed () const
 Is fixed Particle function. It returns whether a Particle is fixed or not, by checking its inverse Mass. More...
 
void unfix ()
 Unfix Particle function, which required a reference to the Species vector. It unfixes a Particle by computing the Particles mass and inertia. More...
 
virtual MERCURY_DEPRECATED void oldRead (std::istream &is)
 deprecated version of the read function. More...
 
void printHGrid (std::ostream &os) const
 Adds particle's HGrid level and cell coordinates to an ostream. More...
 
unsigned int getHGridLevel () const
 Returns particle's HGrid level. More...
 
BaseParticlegetHGridNextObject () const
 Returns pointer to next object in particle's HGrid level & cell. More...
 
BaseParticlegetHGridPrevObject () const
 Returns pointer to previous object in particle's HGrid level & cell. More...
 
int getHGridX () const
 Returns particle's HGrid cell X-coordinate. More...
 
int getHGridY () const
 Returns particle's HGrid cell Y-coordinate. More...
 
int getHGridZ () const
 Returns particle's HGrid cell Z-coordinate. More...
 
Mdouble getInertia () const
 Returns the particle's inertia_. More...
 
Mdouble getInvInertia () const
 Returns the particle's invInertia_. More...
 
Mdouble getInvMass () const
 Returns the particle's invMass_. More...
 
Mdouble getKineticEnergy () const
 Calculates the particle's kinetic energy. More...
 
Mdouble getMass () const
 Returns the particle's mass_. More...
 
BaseParticlegetPeriodicFromParticle () const
 Returns the 'original' particle this one's a periodic copy of. More...
 
Mdouble getRadius () const
 Returns the particle's radius_. More...
 
Mdouble getInteractionRadius () const
 Returns the particle's interaction radius, which might be different from radius_ (e.g., when dealing with wet particles) More...
 
Mdouble getWallInteractionRadius () const
 Returns the interaction radius for interaction with walls. See also BaseParticle::getInteractionRadius(). More...
 
const Vec3DgetDisplacement () const
 Returns the particle's displacement relative to the previous time step. More...
 
const Vec3DgetPreviousPosition () const
 Returns the particle's position in the previous time step. More...
 
const Vec3D getDisplacement2 (Mdouble xmin, Mdouble xmax, Mdouble ymin, Mdouble ymax, Mdouble zmin, Mdouble zmax, Mdouble t) const
 
void setInertia (const Mdouble newInertia)
 Sets the particle's inertia_ (and adjusts invInertia_ accordingly) More...
 
void setInfiniteInertia ()
 Sets the particle's inertia_ to 'infinite' (1e20) and its invInertia_ to 0. More...
 
void setPeriodicFromParticle (BaseParticle *p)
 Assigns the pointer to the 'original' particle this one's a periodic copy of. More...
 
void setHGridX (const int x)
 Sets the particle's HGrid cell X-coordinate. More...
 
void setHGridY (const int y)
 Sets the particle's HGrid cell Y-coordinate. More...
 
void setHGridZ (const int z)
 Sets the particle's HGrid cell Z-coordinate. More...
 
void setHGridLevel (const unsigned int level)
 Sets the particle's HGrid level. More...
 
void setHGridNextObject (BaseParticle *p)
 Sets the pointer to the next object in the particle's HGrid cell & level. More...
 
void setHGridPrevObject (BaseParticle *p)
 Sets the pointer to the previous object in the particle's HGrid cell & level. More...
 
void setRadius (const Mdouble radius)
 Sets the particle's radius_ (and adjusts the mass_ accordingly, based on the particle's species) More...
 
MERCURY_DEPRECATED void setMass (const Mdouble mass)
 Sets the particle's mass. More...
 
void setMassForP3Statistics (const Mdouble mass)
 Sets the particle's mass This function should not be used, but is necessary to extend the CG toolbox to non-spherical particles. More...
 
void setDisplacement (const Vec3D &disp)
 Sets the particle's displacement (= difference between current position and that of the previous time step) More...
 
void setPreviousPosition (const Vec3D &pos)
 Sets the particle's position in the previous time step. More...
 
void movePrevious (const Vec3D &posMove)
 Adds a vector to the particle's previousPosition_. More...
 
void accelerate (const Vec3D &vel)
 Increases the particle's velocity_ by the given vector. More...
 
void angularAccelerate (const Vec3D &angVel)
 Increases the particle's angularVelocity_ by the given vector. More...
 
void addDisplacement (const Vec3D &addDisp)
 Adds a vector to the particle's displacement_. More...
 
void setHandler (ParticleHandler *handler)
 Sets the pointer to the particle's ParticleHandler. More...
 
ParticleHandlergetHandler () const
 Returns pointer to the particle's ParticleHandler. More...
 
std::vector< BaseInteraction * > getInteractionWith (BaseParticle *P, Mdouble timeStamp, InteractionHandler *interactionHandler)
 Checks if particle is in interaction with given particle P, and if so, returns pointer to the associated BaseInteraction object (else returns 0). More...
 
void integrateBeforeForceComputation (double time, double timeStep)
 First step of Velocity Verlet integration. More...
 
void integrateAfterForceComputation (double time, double timeStep)
 Second step of Velocity Verlet integration. More...
 
unsigned int getParticleDimensions () const
 Returns the particle's dimensions (either 2 or 3). More...
 
MERCURY_DEPRECATED void setIndSpecies (unsigned int indSpecies)
 
void setSpecies (const ParticleSpecies *species)
 
- Public Member Functions inherited from BaseInteractable
 BaseInteractable ()
 Default BaseInteractable constructor, it simply creates an empty BaseInteractable. More...
 
 BaseInteractable (const BaseInteractable &p)
 Copy constructor. It copies the BaseInteractable and all objects it contains. More...
 
virtual ~BaseInteractable ()
 Destructor, it simply destructs the BaseInteractable and all the objects it contains. More...
 
unsigned int getIndSpecies () const
 Returns the index of the Species of this BaseInteractable. More...
 
const ParticleSpeciesgetSpecies () const
 Returns a pointer to the species of this BaseInteractable. More...
 
void setSpecies (const ParticleSpecies *species)
 Sets the species of this BaseInteractable. More...
 
const Vec3DgetForce () const
 Returns the force on this BaseInteractable. More...
 
const Vec3DgetTorque () const
 Returns the torque on this BaseInteractable. More...
 
void setForce (const Vec3D &force)
 Sets the force on this BaseInteractable. More...
 
void setTorque (const Vec3D &torque)
 Sets the torque on this BaseInteractable. More...
 
void addForce (const Vec3D &addForce)
 Adds an amount to the force on this BaseInteractable. More...
 
void addTorque (const Vec3D &addTorque)
 Adds an amount to the torque on this BaseInteractable. More...
 
const Vec3DgetPosition () const
 Returns the position of this BaseInteractable. More...
 
const Vec3DgetOrientation () const
 Returns the orientation of this BaseInteractable. More...
 
void setPosition (const Vec3D &position)
 Sets the position of this BaseInteractable. More...
 
void setOrientation (const Vec3D &orientation)
 Sets the orientation of this BaseInteractable. More...
 
virtual void move (const Vec3D &move)
 Moves this BaseInteractable by adding an amount to the position. More...
 
void rotate (const Vec3D &rotate)
 Rotates this BaseInteractable. More...
 
const std::list
< BaseInteraction * > & 
getInteractions () const
 Returns a reference to the list of interactions in this BaseInteractable. More...
 
void addInteraction (BaseInteraction *I)
 Adds an interaction to this BaseInteractable. More...
 
bool removeInteraction (BaseInteraction *I)
 Removes an interaction from this BaseInteractable. More...
 
void copyInteractionsForPeriodicParticles (const BaseInteractable &p)
 Copies interactions to this BaseInteractable whenever a periodic copy made. More...
 
void setVelocity (const Vec3D &velocity)
 set the velocity of the BaseInteractable. More...
 
void setAngularVelocity (const Vec3D &angularVelocity)
 set the angular velocity of the BaseInteractble. More...
 
void addVelocity (const Vec3D &velocity)
 adds an increment to the velocity. More...
 
void addAngularVelocity (const Vec3D &angularVelocity)
 add an increment to the angular velocity. More...
 
virtual const Vec3DgetVelocity () const
 Returns the velocity of this interactable. More...
 
virtual const Vec3DgetAngularVelocity () const
 Returns the angular velocity of this interactable. More...
 
void setPrescribedPosition (const std::function< Vec3D(double)> &prescribedPosition)
 Allows the position of an infinite mass interactable to be prescribed. More...
 
void applyPrescribedPosition (double time)
 Computes the position from the user defined prescribed position function. More...
 
void setPrescribedVelocity (const std::function< Vec3D(double)> &prescribedVelocity)
 Allows the velocity of an infinite mass interactable to be prescribed. More...
 
void applyPrescribedVelocity (double time)
 Computes the velocity from the user defined prescribed velocity function. More...
 
void setPrescribedOrientation (const std::function< Vec3D(double)> &prescribedOrientation)
 Allows the orientation of the infinite mass interactbale to be prescribed. More...
 
void applyPrescribedOrientation (double time)
 Computes the orientation from the user defined prescribed orientation function. More...
 
void setPrescribedAngularVelocity (const std::function< Vec3D(double)> &prescribedAngularVelocity)
 Allows the angular velocity of the infinite mass interactable to be prescribed. More...
 
void applyPrescribedAngularVelocity (double time)
 Computes the angular velocity from the user defined prescribed angular velocity. More...
 
virtual const Vec3D getVelocityAtContact (const Vec3D &contact) const
 Returns the velocity at the contact point, use by many force laws. More...
 
void integrateBeforeForceComputation (double time, double timeStep)
 This is part of integrate routine for objects with infinite mass. More...
 
void integrateAfterForceComputation (double time, double timeStep)
 This is part of the integration routine for objects with infinite mass. More...
 
- Public Member Functions inherited from BaseObject
 BaseObject ()
 Default constructor. More...
 
 BaseObject (const BaseObject &p)
 Copy constructor, copies all the objects BaseObject contains. More...
 
virtual ~BaseObject ()
 virtual destructor More...
 
virtual void moveInHandler (const unsigned int index)
 Except that it is virtual, it does the same thing as setIndex() does. More...
 
void setIndex (const unsigned int index)
 Allows one to assign an index to an object in the handler/container. More...
 
void setId (const unsigned int id)
 Assigns a unique identifier to each object in the handler (container) which remains constant even after the object is deleted from the container/handler. More...
 
unsigned int getIndex () const
 Returns the index of the object in the handler. More...
 
unsigned int getId () const
 Returns the unique identifier of any particular object. More...
 

Private Attributes

Mdouble liquidVolume_
 

Detailed Description

Definition at line 34 of file LiquidFilmParticle.h.

Constructor & Destructor Documentation

LiquidFilmParticle::LiquidFilmParticle ( )

Basic Particle constructor, creates an Particle at (0,0,0) with radius, mass and inertia equal to 1.

default constructor, creates an Particle at (0,0,0) with radius, mass and inertia equal to 1

Definition at line 38 of file LiquidFilmParticle.cc.

References liquidVolume_.

Referenced by copy().

39 {
40  liquidVolume_ = 0;
41 }
LiquidFilmParticle::LiquidFilmParticle ( const LiquidFilmParticle p)

Particle copy constructor, which accepts as input a reference to a Particle. It creates a copy of this Particle and all it's information. Usually it is better to use the copy() function for polymorfism.

Constructor that copies most of the properties of the given particle. Please note that not everything is copied, for example the position in the HGrid is not determined yet by the end of this constructor. It also does not copy the interactions and the pointer to the handler that handles this particle. Use with care.

Parameters
[in,out]pReference to the LiquidFilmParticle this one should become a copy of.

Definition at line 51 of file LiquidFilmParticle.cc.

References liquidVolume_.

52  : BaseParticle(p)
53 {
55 }
BaseParticle()
Basic Particle constructor, creates an Particle at (0,0,0) with radius, mass and inertia equal to 1...
Definition: BaseParticle.cc:38
LiquidFilmParticle::~LiquidFilmParticle ( )
virtual

Particle destructor, needs to be implemented and checked if it removes tangential spring information.

Destructor. It asks the ParticleHandler to check if this was the smallest or largest particle and adjust itself accordingly.

Definition at line 61 of file LiquidFilmParticle.cc.

62 {
63 }

Member Function Documentation

void LiquidFilmParticle::addLiquidVolume ( Mdouble  liquidVolume)

Definition at line 123 of file LiquidFilmParticle.cc.

References liquidVolume_.

Referenced by LiquidMigrationWilletInteraction::form(), and LiquidMigrationWilletInteraction::rupture().

124 {
125  liquidVolume_+=liquidVolume;
126 }
LiquidFilmParticle * LiquidFilmParticle::copy ( ) const
virtual

Particle copy method. It calls to copy constructor of this Particle, useful for polymorfism.

Copy method. Uses copy constructor to create a copy on the heap. Useful for polymorphism.

Returns
pointer to the particle's copy

Reimplemented from BaseParticle.

Definition at line 70 of file LiquidFilmParticle.cc.

References LiquidFilmParticle().

71 {
72  return new LiquidFilmParticle(*this);
73 }
LiquidFilmParticle()
Basic Particle constructor, creates an Particle at (0,0,0) with radius, mass and inertia equal to 1...
std::vector< Mdouble > LiquidFilmParticle::getFieldVTK ( unsigned  i) const
virtual

Reimplemented from BaseParticle.

Definition at line 142 of file LiquidFilmParticle.cc.

References liquidVolume_.

142  {
143  return std::vector<Mdouble>(1, liquidVolume_);
144 }
Mdouble LiquidFilmParticle::getLiquidVolume ( ) const

Definition at line 113 of file LiquidFilmParticle.cc.

References liquidVolume_.

Referenced by LiquidMigrationWilletInteraction::form(), and LiquidMigrationWilletInteraction::rupture().

114 {
115  return liquidVolume_;
116 }
std::string LiquidFilmParticle::getName ( ) const
virtual

Returns the name of the object; in this case 'LiquidFilmParticle'.

Returns
The object name.

Reimplemented from BaseParticle.

Definition at line 91 of file LiquidFilmParticle.cc.

92 {
93  return "LiquidFilmParticle";
94 }
std::string LiquidFilmParticle::getNameVTK ( unsigned  i) const
virtual

Reimplemented from BaseParticle.

Definition at line 137 of file LiquidFilmParticle.cc.

137  {
138  return "liquidVolume";
139 
140 }
unsigned LiquidFilmParticle::getNumberOfFieldsVTK ( ) const
virtual

Reimplemented from BaseParticle.

Definition at line 129 of file LiquidFilmParticle.cc.

129  {
130  return 1;
131 }
std::string LiquidFilmParticle::getTypeVTK ( unsigned  i) const
virtual

Reimplemented from BaseParticle.

Definition at line 133 of file LiquidFilmParticle.cc.

133  {
134  return "Float32";
135 }
void LiquidFilmParticle::read ( std::istream &  is)
virtual

Particle read function. Has an std::istream as argument, from which it extracts the radius_, invMass_ and invInertia_, respectively. From these the mass_ and inertia_ are deduced. An additional set of properties is read through the call to the parent's method BaseParticle::read().

Parameters
[in,out]isinput stream with particle properties.

Reimplemented from BaseParticle.

Definition at line 106 of file LiquidFilmParticle.cc.

References liquidVolume_, and BaseParticle::read().

107 {
108  BaseParticle::read(is);
109  std::string dummy;
110  is >> dummy >> liquidVolume_;
111 }
virtual void read(std::istream &is)
Particle read function, which accepts an std::istream as input.
void LiquidFilmParticle::setLiquidVolume ( Mdouble  liquidVolume)

Definition at line 118 of file LiquidFilmParticle.cc.

References liquidVolume_.

Referenced by LiquidMigrationWilletInteraction::form(), and LiquidMigrationWilletInteraction::rupture().

119 {
120  liquidVolume_=liquidVolume;
121 }
void LiquidFilmParticle::write ( std::ostream &  os) const
virtual

LiquidFilmParticle print method, which accepts an os std::ostream as input. It prints human readable LiquidFilmParticle information to the std::ostream.

Parameters
[in,out]osstream to which the info is written

Reimplemented from BaseParticle.

Definition at line 81 of file LiquidFilmParticle.cc.

References liquidVolume_, and BaseParticle::write().

82 {
84  os << " liquidVolume " << liquidVolume_;
85 }
virtual void write(std::ostream &os) const
Particle print function, which accepts an std::ostream as input.

Member Data Documentation

Mdouble LiquidFilmParticle::liquidVolume_
private

The documentation for this class was generated from the following files: