Chaste Commit::1fd4e48e3990e67db148bc1bc4cf6991a0049d0c
|
#include <DiscreteSystemForceCalculator.hpp>
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) |
void | SetEpsilon (double epsilon) |
Private Member Functions | |
std::vector< double > | CalculateFtAndFn (unsigned index, double theta) |
std::vector< double > | GetSamplingAngles (unsigned index) |
double | GetLocalExtremum (unsigned index, double angle1, double angle2) |
std::vector< double > | GetExtremalAngles (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 |
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.
DiscreteSystemForceCalculator::DiscreteSystemForceCalculator | ( | MeshBasedCellPopulation< 2 > & | rCellPopulation, |
std::vector< boost::shared_ptr< AbstractTwoBodyInteractionForce< 2 > > > | forceCollection | ||
) |
Constructor.
rCellPopulation | reference to the cell population |
forceCollection | vector of force laws present |
Definition at line 38 of file DiscreteSystemForceCalculator.cpp.
std::vector< std::vector< double > > DiscreteSystemForceCalculator::CalculateExtremalNormalForces | ( | ) |
Definition at line 46 of file DiscreteSystemForceCalculator.cpp.
References CalculateFtAndFn(), GetExtremalAngles(), MeshBasedCellPopulation< ELEMENT_DIM, SPACE_DIM >::GetNumNodes(), GetSamplingAngles(), and mrCellPopulation.
Referenced by WriteResultsToFile().
|
private |
Given a node index and angle of intersecting line in the range (-pi,pi], returns the tangential and normal forces.
index | the node index |
theta | the angle of intersection |
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().
|
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].
index | the node index |
samplingAngles | the vector of sampling angles |
Definition at line 274 of file DiscreteSystemForceCalculator.cpp.
References CalculateFtAndFn(), GetLocalExtremum(), and mEpsilon.
Referenced by CalculateExtremalNormalForces().
|
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].
index | the node index |
angle1 | the first sampling angle |
angle2 | the second sampling angle |
Definition at line 246 of file DiscreteSystemForceCalculator.cpp.
References CalculateFtAndFn().
Referenced by GetExtremalAngles().
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.
index |
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::SetEpsilon | ( | double | epsilon | ) |
Set mEpsilon.
epsilon | the new value of mEpsilon |
Definition at line 326 of file DiscreteSystemForceCalculator.cpp.
References mEpsilon.
void DiscreteSystemForceCalculator::WriteResultsToFile | ( | std::string | simulationOutputDirectory | ) |
Write results to file.
simulationOutputDirectory | the output directory, relative to where Chaste output is stored |
Definition at line 88 of file DiscreteSystemForceCalculator.cpp.
References CalculateExtremalNormalForces(), AbstractMesh< ELEMENT_DIM, SPACE_DIM >::GetNode(), AbstractMesh< ELEMENT_DIM, SPACE_DIM >::GetNumNodes(), SimulationTime::GetTime(), SimulationTime::Instance(), mpVizStressResultsFile, mrCellPopulation, OutputFileHandler::OpenOutputFile(), and MeshBasedCellPopulation< ELEMENT_DIM, SPACE_DIM >::rGetMesh().
|
friend |
Definition at line 47 of file DiscreteSystemForceCalculator.hpp.
|
private |
Small parameter, used in GetSamplingAngles().
Definition at line 62 of file DiscreteSystemForceCalculator.hpp.
Referenced by GetExtremalAngles(), GetSamplingAngles(), and SetEpsilon().
|
private |
The mechanics used to determine the new location of the cells.
Definition at line 57 of file DiscreteSystemForceCalculator.hpp.
Referenced by CalculateFtAndFn().
|
private |
The file that the results of CalculateExtremalNormalForces.
Definition at line 65 of file DiscreteSystemForceCalculator.hpp.
Referenced by WriteResultsToFile().
|
private |
Reference to cell population.
Definition at line 54 of file DiscreteSystemForceCalculator.hpp.
Referenced by CalculateExtremalNormalForces(), CalculateFtAndFn(), GetSamplingAngles(), and WriteResultsToFile().