CellModules
HertzianPhysics::BodyHertzianPhysics< cell_t, plugin_t > Class Template Reference

Class for managing Delaunay triangulation and mass-spring-based physics. More...

#include <BodyHertzianPhysics.hpp>

Inheritance diagram for HertzianPhysics::BodyHertzianPhysics< cell_t, plugin_t >:
MecaCell::Movable BaseBody< plugin_t >

Public Member Functions

 BodyHertzianPhysics ()
 Constructor. More...
 
double getBoundingBoxRadius () const
 Gets the bounding box radius. More...
 
void setRadius (double rad)
 Sets the radius. More...
 
double getVolume () const
 Gets the volume. More...
 
double getRadius () const
 Gets the radius. More...
 
double getBaseRadius () const
 Gets the base radius. More...
 
void setBaseRadius (double _baseRadius)
 Sets the base radius. More...
 
void growth (double delta)
 Increases the radius so that the volume is multiplied by 1 + delta. More...
 
void setDensity (double d)
 Sets the density. More...
 
double getAdhesion () const
 Gets the adhesion coefficient. More...
 
void setTargetOverlap (double _targetOverlap)
 Sets the target overlap. More...
 
double getYoungModulus () const
 Gets the Young's modulus. More...
 
void setYoungModulus (double ym)
 Sets the Young's modulus. More...
 
MecaCell::Vec getPurposeVelocity () const
 Gets the purpose velocity. More...
 
void setPurposeVelocity (MecaCell::Vec pf)
 Sets the purpose velocity. More...
 
double getPoissonNumber () const
 Gets the Poisson's ratio. More...
 
void setPoissonNumber (double pn)
 Sets the Poisson's ratio. More...
 
void moveTo (const MecaCell::Vec &v)
 Moves a cell to position v. More...
 
bool getComputed () const
 Gets the computed flag. More...
 
void setComputed (bool c)
 Sets the computed flag. More...
 
double getGamma () const
 Gets the gamma value. More...
 
void setGammaCoef (double g)
 Sets the gamma coefficient. More...
 
Tensor getStressTensor ()
 Gets the stress tensor. More...
 
void setStressTensor (Tensor st)
 Sets the stress tensor. More...
 
void addStress (Tensor st)
 Adds stress to the stress tensor. More...
 
void divTensor (double div)
 Divides the stress tensor. More...
 
double getPressure () const
 Gets the internal pressure. More...
 
bool isMovementEnabled ()
 
void disableMovement ()
 
void enableMovement ()
 
Vec getPosition () const
 
Vec getPrevposition () const
 
Vec getVelocity () const
 
Vec getForce () const
 
double getMass () const
 
void setPosition (const Vec &p)
 
void setPrevposition (const Vec &p)
 
void setVelocity (const Vec &v)
 
void setForce (const Vec &f)
 
void setMass (const double m)
 
void receiveForce (const double &intensity, const Vec &direction, const bool &compressive)
 
void receiveForce (const Vec &f)
 
void resetVelocity ()
 
void resetForce ()
 
void setCellPlugin (plugin_t *_cellPlugin)
 
void onCellPluginLinking ()
 

Protected Attributes

Vec position = Vec::zero()
 
Vec prevposition = Vec::zero()
 
Vec velocity = Vec::zero()
 
Vec force = Vec::zero()
 
bool movementEnabled = true
 
double mass = Config::DEFAULT_CELL_MASS
 
double totalForce = 0
 
plugin_t * cellPlugin
 

Private Member Functions

void computeAdhesion ()
 Computes the adhesion coefficient based on the different parameters. More...
 

Private Attributes

double baseRadius
 
double radius
 
double volume
 
double density
 
double gammaCoef
 
MecaCell::Vec purposeVelocity
 
double poissonNumber
 
double youngModulus
 
double adhesion
 
double targetOverlap
 
bool computed
 
Tensor stressTensor
 

Detailed Description

template<typename cell_t, class plugin_t>
class HertzianPhysics::BodyHertzianPhysics< cell_t, plugin_t >

Class for managing Delaunay triangulation and mass-spring-based physics.

Template Parameters
cell_tType of the cell.
plugin_tType of the plugin.

Definition at line 33 of file BodyHertzianPhysics.hpp.

Constructor & Destructor Documentation

◆ BodyHertzianPhysics()

template<typename cell_t , class plugin_t >
HertzianPhysics::BodyHertzianPhysics< cell_t, plugin_t >::BodyHertzianPhysics ( )
inline

Constructor.

Initializes the Body to default values.

Definition at line 66 of file BodyHertzianPhysics.hpp.

Member Function Documentation

◆ addStress()

template<typename cell_t , class plugin_t >
void HertzianPhysics::BodyHertzianPhysics< cell_t, plugin_t >::addStress ( Tensor  st)
inline

Adds stress to the stress tensor.

Parameters
stStress tensor.

Definition at line 246 of file BodyHertzianPhysics.hpp.

◆ computeAdhesion()

template<typename cell_t , class plugin_t >
void HertzianPhysics::BodyHertzianPhysics< cell_t, plugin_t >::computeAdhesion ( )
inlineprivate

Computes the adhesion coefficient based on the different parameters.

Definition at line 52 of file BodyHertzianPhysics.hpp.

◆ disableMovement()

void MecaCell::Movable::disableMovement ( )
inlineinherited

Definition at line 24 of file movable.h.

◆ divTensor()

template<typename cell_t , class plugin_t >
void HertzianPhysics::BodyHertzianPhysics< cell_t, plugin_t >::divTensor ( double  div)
inline

Divides the stress tensor.

Parameters
divDivisor.

Definition at line 253 of file BodyHertzianPhysics.hpp.

◆ enableMovement()

void MecaCell::Movable::enableMovement ( )
inlineinherited

Definition at line 25 of file movable.h.

◆ getAdhesion()

template<typename cell_t , class plugin_t >
double HertzianPhysics::BodyHertzianPhysics< cell_t, plugin_t >::getAdhesion ( ) const
inline

Gets the adhesion coefficient.

Returns
Adhesion coefficient.

Definition at line 152 of file BodyHertzianPhysics.hpp.

◆ getBaseRadius()

template<typename cell_t , class plugin_t >
double HertzianPhysics::BodyHertzianPhysics< cell_t, plugin_t >::getBaseRadius ( ) const
inline

Gets the base radius.

Returns
Base radius.

Definition at line 118 of file BodyHertzianPhysics.hpp.

◆ getBoundingBoxRadius()

template<typename cell_t , class plugin_t >
double HertzianPhysics::BodyHertzianPhysics< cell_t, plugin_t >::getBoundingBoxRadius ( ) const
inline

Gets the bounding box radius.

Returns
Radius.

Definition at line 85 of file BodyHertzianPhysics.hpp.

◆ getComputed()

template<typename cell_t , class plugin_t >
bool HertzianPhysics::BodyHertzianPhysics< cell_t, plugin_t >::getComputed ( ) const
inline

Gets the computed flag.

Returns
Computed flag.

Definition at line 209 of file BodyHertzianPhysics.hpp.

◆ getForce()

Vec MecaCell::Movable::getForce ( ) const
inlineinherited

Definition at line 29 of file movable.h.

◆ getGamma()

template<typename cell_t , class plugin_t >
double HertzianPhysics::BodyHertzianPhysics< cell_t, plugin_t >::getGamma ( ) const
inline

Gets the gamma value.

Returns
Gamma value.

Definition at line 221 of file BodyHertzianPhysics.hpp.

◆ getMass()

double MecaCell::Movable::getMass ( ) const
inlineinherited

Definition at line 30 of file movable.h.

◆ getPoissonNumber()

template<typename cell_t , class plugin_t >
double HertzianPhysics::BodyHertzianPhysics< cell_t, plugin_t >::getPoissonNumber ( ) const
inline

Gets the Poisson's ratio.

Returns
Poisson's ratio.

Definition at line 191 of file BodyHertzianPhysics.hpp.

◆ getPosition()

Vec MecaCell::Movable::getPosition ( ) const
inlineinherited

Definition at line 26 of file movable.h.

◆ getPressure()

template<typename cell_t , class plugin_t >
double HertzianPhysics::BodyHertzianPhysics< cell_t, plugin_t >::getPressure ( ) const
inline

Gets the internal pressure.

Computes the internal pressure based on the stress tensor in ng/(µm.s²).

Returns
Internal pressure.

Definition at line 262 of file BodyHertzianPhysics.hpp.

◆ getPrevposition()

Vec MecaCell::Movable::getPrevposition ( ) const
inlineinherited

Definition at line 27 of file movable.h.

◆ getPurposeVelocity()

template<typename cell_t , class plugin_t >
MecaCell::Vec HertzianPhysics::BodyHertzianPhysics< cell_t, plugin_t >::getPurposeVelocity ( ) const
inline

Gets the purpose velocity.

Returns
Purpose velocity.

Definition at line 179 of file BodyHertzianPhysics.hpp.

◆ getRadius()

template<typename cell_t , class plugin_t >
double HertzianPhysics::BodyHertzianPhysics< cell_t, plugin_t >::getRadius ( ) const
inline

Gets the radius.

Returns
Radius.

Definition at line 111 of file BodyHertzianPhysics.hpp.

◆ getStressTensor()

template<typename cell_t , class plugin_t >
Tensor HertzianPhysics::BodyHertzianPhysics< cell_t, plugin_t >::getStressTensor ( )
inline

Gets the stress tensor.

Returns
Stress tensor.

Definition at line 233 of file BodyHertzianPhysics.hpp.

◆ getVelocity()

Vec MecaCell::Movable::getVelocity ( ) const
inlineinherited

Definition at line 28 of file movable.h.

◆ getVolume()

template<typename cell_t , class plugin_t >
double HertzianPhysics::BodyHertzianPhysics< cell_t, plugin_t >::getVolume ( ) const
inline

Gets the volume.

Returns
Volume.

Definition at line 105 of file BodyHertzianPhysics.hpp.

◆ getYoungModulus()

template<typename cell_t , class plugin_t >
double HertzianPhysics::BodyHertzianPhysics< cell_t, plugin_t >::getYoungModulus ( ) const
inline

Gets the Young's modulus.

Returns
Young's modulus.

Definition at line 167 of file BodyHertzianPhysics.hpp.

◆ growth()

template<typename cell_t , class plugin_t >
void HertzianPhysics::BodyHertzianPhysics< cell_t, plugin_t >::growth ( double  delta)
inline

Increases the radius so that the volume is multiplied by 1 + delta.

Parameters
deltaVolume augmentation ratio.

Definition at line 132 of file BodyHertzianPhysics.hpp.

◆ isMovementEnabled()

bool MecaCell::Movable::isMovementEnabled ( )
inlineinherited

Definition at line 23 of file movable.h.

◆ moveTo()

template<typename cell_t , class plugin_t >
void HertzianPhysics::BodyHertzianPhysics< cell_t, plugin_t >::moveTo ( const MecaCell::Vec v)
inline

Moves a cell to position v.

Parameters
vPosition vector.

Definition at line 203 of file BodyHertzianPhysics.hpp.

◆ onCellPluginLinking()

void BaseBody< plugin_t >::onCellPluginLinking ( )
inlineinherited

Definition at line 15 of file BaseBody.hpp.

◆ receiveForce() [1/2]

void MecaCell::Movable::receiveForce ( const double &  intensity,
const Vec direction,
const bool &  compressive 
)
inlineinherited

Definition at line 39 of file movable.h.

◆ receiveForce() [2/2]

void MecaCell::Movable::receiveForce ( const Vec f)
inlineinherited

Definition at line 44 of file movable.h.

◆ resetForce()

void MecaCell::Movable::resetForce ( )
inlineinherited

Definition at line 46 of file movable.h.

◆ resetVelocity()

void MecaCell::Movable::resetVelocity ( )
inlineinherited

Definition at line 45 of file movable.h.

◆ setBaseRadius()

template<typename cell_t , class plugin_t >
void HertzianPhysics::BodyHertzianPhysics< cell_t, plugin_t >::setBaseRadius ( double  _baseRadius)
inline

Sets the base radius.

Parameters
_baseRadiusBase radius.

Definition at line 125 of file BodyHertzianPhysics.hpp.

◆ setCellPlugin()

void BaseBody< plugin_t >::setCellPlugin ( plugin_t *  _cellPlugin)
inlineinherited

Definition at line 14 of file BaseBody.hpp.

◆ setComputed()

template<typename cell_t , class plugin_t >
void HertzianPhysics::BodyHertzianPhysics< cell_t, plugin_t >::setComputed ( bool  c)
inline

Sets the computed flag.

Parameters
cComputed flag.

Definition at line 215 of file BodyHertzianPhysics.hpp.

◆ setDensity()

template<typename cell_t , class plugin_t >
void HertzianPhysics::BodyHertzianPhysics< cell_t, plugin_t >::setDensity ( double  d)
inline

Sets the density.

Changes the mass knowing the current radius.

Parameters
dDensity.

Definition at line 143 of file BodyHertzianPhysics.hpp.

◆ setForce()

void MecaCell::Movable::setForce ( const Vec f)
inlineinherited

Definition at line 34 of file movable.h.

◆ setGammaCoef()

template<typename cell_t , class plugin_t >
void HertzianPhysics::BodyHertzianPhysics< cell_t, plugin_t >::setGammaCoef ( double  g)
inline

Sets the gamma coefficient.

Parameters
gGamma coefficient.

Definition at line 227 of file BodyHertzianPhysics.hpp.

◆ setMass()

void MecaCell::Movable::setMass ( const double  m)
inlineinherited

Definition at line 35 of file movable.h.

◆ setPoissonNumber()

template<typename cell_t , class plugin_t >
void HertzianPhysics::BodyHertzianPhysics< cell_t, plugin_t >::setPoissonNumber ( double  pn)
inline

Sets the Poisson's ratio.

Parameters
pnPoisson's ratio.

Definition at line 197 of file BodyHertzianPhysics.hpp.

◆ setPosition()

void MecaCell::Movable::setPosition ( const Vec p)
inlineinherited

Definition at line 31 of file movable.h.

◆ setPrevposition()

void MecaCell::Movable::setPrevposition ( const Vec p)
inlineinherited

Definition at line 32 of file movable.h.

◆ setPurposeVelocity()

template<typename cell_t , class plugin_t >
void HertzianPhysics::BodyHertzianPhysics< cell_t, plugin_t >::setPurposeVelocity ( MecaCell::Vec  pf)
inline

Sets the purpose velocity.

Parameters
pfPurpose velocity.

Definition at line 185 of file BodyHertzianPhysics.hpp.

◆ setRadius()

template<typename cell_t , class plugin_t >
void HertzianPhysics::BodyHertzianPhysics< cell_t, plugin_t >::setRadius ( double  rad)
inline

Sets the radius.

Changes the mass knowing the current density.

Parameters
radRadius.

Definition at line 94 of file BodyHertzianPhysics.hpp.

◆ setStressTensor()

template<typename cell_t , class plugin_t >
void HertzianPhysics::BodyHertzianPhysics< cell_t, plugin_t >::setStressTensor ( Tensor  st)
inline

Sets the stress tensor.

Parameters
stStress tensor.

Definition at line 239 of file BodyHertzianPhysics.hpp.

◆ setTargetOverlap()

template<typename cell_t , class plugin_t >
void HertzianPhysics::BodyHertzianPhysics< cell_t, plugin_t >::setTargetOverlap ( double  _targetOverlap)
inline

Sets the target overlap.

Parameters
overlapTarget overlap.

Definition at line 158 of file BodyHertzianPhysics.hpp.

◆ setVelocity()

void MecaCell::Movable::setVelocity ( const Vec v)
inlineinherited

Definition at line 33 of file movable.h.

◆ setYoungModulus()

template<typename cell_t , class plugin_t >
void HertzianPhysics::BodyHertzianPhysics< cell_t, plugin_t >::setYoungModulus ( double  ym)
inline

Sets the Young's modulus.

Parameters
ymYoung's modulus.

Definition at line 173 of file BodyHertzianPhysics.hpp.

Member Data Documentation

◆ adhesion

template<typename cell_t , class plugin_t >
double HertzianPhysics::BodyHertzianPhysics< cell_t, plugin_t >::adhesion
private

Adhesion coefficient in ng/(µm².s²)

Definition at line 44 of file BodyHertzianPhysics.hpp.

◆ baseRadius

template<typename cell_t , class plugin_t >
double HertzianPhysics::BodyHertzianPhysics< cell_t, plugin_t >::baseRadius
private

Radius in µm

Definition at line 36 of file BodyHertzianPhysics.hpp.

◆ cellPlugin

plugin_t * BaseBody< plugin_t >::cellPlugin
protectedinherited

Definition at line 9 of file BaseBody.hpp.

◆ computed

template<typename cell_t , class plugin_t >
bool HertzianPhysics::BodyHertzianPhysics< cell_t, plugin_t >::computed
private

Definition at line 46 of file BodyHertzianPhysics.hpp.

◆ density

template<typename cell_t , class plugin_t >
double HertzianPhysics::BodyHertzianPhysics< cell_t, plugin_t >::density
private

Density in ng/µm³

Definition at line 39 of file BodyHertzianPhysics.hpp.

◆ force

Vec MecaCell::Movable::force = Vec::zero()
protectedinherited

Definition at line 11 of file movable.h.

◆ gammaCoef

template<typename cell_t , class plugin_t >
double HertzianPhysics::BodyHertzianPhysics< cell_t, plugin_t >::gammaCoef
private

Damping coefficient in Hz

Definition at line 40 of file BodyHertzianPhysics.hpp.

◆ mass

double MecaCell::Movable::mass = Config::DEFAULT_CELL_MASS
protectedinherited

Definition at line 13 of file movable.h.

◆ movementEnabled

bool MecaCell::Movable::movementEnabled = true
protectedinherited

Definition at line 12 of file movable.h.

◆ poissonNumber

template<typename cell_t , class plugin_t >
double HertzianPhysics::BodyHertzianPhysics< cell_t, plugin_t >::poissonNumber
private

Ratio of deformation

Definition at line 42 of file BodyHertzianPhysics.hpp.

◆ position

Vec MecaCell::Movable::position = Vec::zero()
protectedinherited

Definition at line 8 of file movable.h.

◆ prevposition

Vec MecaCell::Movable::prevposition = Vec::zero()
protectedinherited

Definition at line 9 of file movable.h.

◆ purposeVelocity

template<typename cell_t , class plugin_t >
MecaCell::Vec HertzianPhysics::BodyHertzianPhysics< cell_t, plugin_t >::purposeVelocity
private

Speed vector of a moving cell in µm/s

Definition at line 41 of file BodyHertzianPhysics.hpp.

◆ radius

template<typename cell_t , class plugin_t >
double HertzianPhysics::BodyHertzianPhysics< cell_t, plugin_t >::radius
private

Radius in µm

Definition at line 37 of file BodyHertzianPhysics.hpp.

◆ stressTensor

template<typename cell_t , class plugin_t >
Tensor HertzianPhysics::BodyHertzianPhysics< cell_t, plugin_t >::stressTensor
private

Stress tensor of a cell

Definition at line 47 of file BodyHertzianPhysics.hpp.

◆ targetOverlap

template<typename cell_t , class plugin_t >
double HertzianPhysics::BodyHertzianPhysics< cell_t, plugin_t >::targetOverlap
private

Targeted overlap ratio between cells (used to compute adhesion)

Definition at line 45 of file BodyHertzianPhysics.hpp.

◆ totalForce

double MecaCell::Movable::totalForce = 0
protectedinherited

Definition at line 14 of file movable.h.

◆ velocity

Vec MecaCell::Movable::velocity = Vec::zero()
protectedinherited

Definition at line 10 of file movable.h.

◆ volume

template<typename cell_t , class plugin_t >
double HertzianPhysics::BodyHertzianPhysics< cell_t, plugin_t >::volume
private

Volume in µm³

Definition at line 38 of file BodyHertzianPhysics.hpp.

◆ youngModulus

template<typename cell_t , class plugin_t >
double HertzianPhysics::BodyHertzianPhysics< cell_t, plugin_t >::youngModulus
private

Stiffness in ng/(µm.s²)

Definition at line 43 of file BodyHertzianPhysics.hpp.


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