Chaste Release::3.1
DiscreteSystemForceCalculator Class Reference

#include <DiscreteSystemForceCalculator.hpp>

Collaboration diagram for DiscreteSystemForceCalculator:

List of all members.

Public Member Functions

 DiscreteSystemForceCalculator (MeshBasedCellPopulation< 2 > &rCellPopulation, std::vector< boost::shared_ptr< AbstractTwoBodyInteractionForce< 2 > > > forceCollection)
std::vector< std::vector
< double > > 
CalculateExtremalNormalForces ()
void WriteResultsToFile (std::string simulationOutputDirectory)

Private Member Functions

std::vector< doubleCalculateFtAndFn (unsigned index, double theta)
std::vector< doubleGetSamplingAngles (unsigned index)
double GetLocalExtremum (unsigned index, double angle1, double angle2)
std::vector< doubleGetExtremalAngles (unsigned index, std::vector< double > samplingAngles)

Private Attributes

MeshBasedCellPopulation< 2 > & mrCellPopulation
std::vector< boost::shared_ptr
< AbstractTwoBodyInteractionForce< 2 > > > 
mForceCollection
double mEpsilon
out_stream mpVizStressResultsFile

Friends

class TestDiscreteSystemForceCalculator

Detailed Description

A class for calculating the force and stress on each node in a mesh-based cell population.

Definition at line 45 of file DiscreteSystemForceCalculator.hpp.


Constructor & Destructor Documentation

DiscreteSystemForceCalculator::DiscreteSystemForceCalculator ( MeshBasedCellPopulation< 2 > &  rCellPopulation,
std::vector< boost::shared_ptr< AbstractTwoBodyInteractionForce< 2 > > >  forceCollection 
)

Constructor.

Parameters:
rCellPopulationreference to the cell population
forceCollectionvector of force laws present

Definition at line 38 of file DiscreteSystemForceCalculator.cpp.


Member Function Documentation

std::vector< std::vector< double > > DiscreteSystemForceCalculator::CalculateExtremalNormalForces ( )
Returns:
the extremal normal forces on each node in the cell population.

Definition at line 46 of file DiscreteSystemForceCalculator.cpp.

References CalculateFtAndFn(), GetExtremalAngles(), MeshBasedCellPopulation< ELEMENT_DIM, SPACE_DIM >::GetNumNodes(), GetSamplingAngles(), and mrCellPopulation.

Referenced by WriteResultsToFile().

std::vector< double > DiscreteSystemForceCalculator::CalculateFtAndFn ( unsigned  index,
double  theta 
) [private]

Given a node index and angle of intersecting line in the range (-pi,pi], returns the tangential and normal forces.

Parameters:
indexthe node index
thetathe angle of intersection
Returns:
the vector of tangential and normal forces.

Definition at line 127 of file DiscreteSystemForceCalculator.cpp.

References TetrahedralMesh< ELEMENT_DIM, SPACE_DIM >::GetAngleBetweenNodes(), MeshBasedCellPopulation< ELEMENT_DIM, SPACE_DIM >::GetNeighbouringNodeIndices(), mForceCollection, mrCellPopulation, and MeshBasedCellPopulation< ELEMENT_DIM, SPACE_DIM >::rGetMesh().

Referenced by CalculateExtremalNormalForces(), GetExtremalAngles(), and GetLocalExtremum().

std::vector< double > DiscreteSystemForceCalculator::GetExtremalAngles ( unsigned  index,
std::vector< double samplingAngles 
) [private]

Given a vector of sampling angles in the range (-pi,pi], returns a vector of extremal angles, i.e. angles at which local extrema of the normal force occur, again in the range (-pi,pi].

Parameters:
indexthe node index
samplingAnglesthe vector of sampling angles
Returns:
the vector of extremal angles.

Definition at line 280 of file DiscreteSystemForceCalculator.cpp.

References CalculateFtAndFn(), GetLocalExtremum(), and mEpsilon.

Referenced by CalculateExtremalNormalForces().

double DiscreteSystemForceCalculator::GetLocalExtremum ( unsigned  index,
double  angle1,
double  angle2 
) [private]

Given a node index and two sampling angles, finds the location of the root of the tangential force in the interval between the two angles. There is no guarantee that this will lie in (-pi,pi].

Parameters:
indexthe node index
angle1the first sampling angle
angle2the second sampling angle
Returns:
the local extremum.

Definition at line 249 of file DiscreteSystemForceCalculator.cpp.

References CalculateFtAndFn().

Referenced by GetExtremalAngles().

std::vector< double > DiscreteSystemForceCalculator::GetSamplingAngles ( unsigned  index) [private]

Given a node index, returns a vector of sampling angles in the range (-pi,pi] that can be used by GetExtremalAngles() to find the locations of local extrema of the normal force.

Parameters:
index
Returns:
the vector of sampling angles.

Definition at line 178 of file DiscreteSystemForceCalculator.cpp.

References TetrahedralMesh< ELEMENT_DIM, SPACE_DIM >::GetAngleBetweenNodes(), MeshBasedCellPopulation< ELEMENT_DIM, SPACE_DIM >::GetNeighbouringNodeIndices(), mEpsilon, mrCellPopulation, and MeshBasedCellPopulation< ELEMENT_DIM, SPACE_DIM >::rGetMesh().

Referenced by CalculateExtremalNormalForces().

void DiscreteSystemForceCalculator::WriteResultsToFile ( std::string  simulationOutputDirectory)

Member Data Documentation

Small parameter, used in GetSamplingAngles().

Definition at line 62 of file DiscreteSystemForceCalculator.hpp.

Referenced by GetExtremalAngles(), and GetSamplingAngles().

The mechanics used to determine the new location of the cells.

Definition at line 57 of file DiscreteSystemForceCalculator.hpp.

Referenced by CalculateFtAndFn().

The file that the results of CalculateExtremalNormalForces.

Definition at line 65 of file DiscreteSystemForceCalculator.hpp.

Referenced by WriteResultsToFile().


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