36 #include "NodeVelocityWriter.hpp"
37 #include "AbstractCellPopulation.hpp"
38 #include "MeshBasedCellPopulation.hpp"
39 #include "CaBasedCellPopulation.hpp"
40 #include "NodeBasedCellPopulation.hpp"
41 #include "PottsBasedCellPopulation.hpp"
42 #include "VertexBasedCellPopulation.hpp"
44 template<
unsigned ELEMENT_DIM,
unsigned SPACE_DIM>
50 template<
unsigned ELEMENT_DIM,
unsigned SPACE_DIM>
54 node_iter != pCellPopulation->
rGetMesh().GetNodeIteratorEnd();
58 assert(!node_iter->IsDeleted());
60 unsigned node_index = node_iter->GetIndex();
63 bool is_real_node = !(pCellPopulation->
IsGhostNode(node_index));
74 *this->mpOutStream << node_index <<
" ";
77 const c_vector<double, SPACE_DIM>& position = node_iter->rGetLocation();
78 for (
unsigned i=0; i<SPACE_DIM; i++)
80 *this->mpOutStream << position[i] <<
" ";
86 c_vector<double, SPACE_DIM> velocity = time_step * node_iter->rGetAppliedForce() / damping_constant;
87 for (
unsigned i=0; i<SPACE_DIM; i++)
89 *this->mpOutStream << velocity[i] <<
" ";
95 template<
unsigned ELEMENT_DIM,
unsigned SPACE_DIM>
100 template<
unsigned ELEMENT_DIM,
unsigned SPACE_DIM>
108 assert(!node_iter->IsDeleted());
110 unsigned node_index = node_iter->GetIndex();
113 bool is_real_node = !(pCellPopulation->
IsGhostNode(node_index));
124 *this->mpOutStream << node_index <<
" ";
127 const c_vector<double, SPACE_DIM>& position = node_iter->rGetLocation();
128 for (
unsigned i=0; i<SPACE_DIM; i++)
130 *this->mpOutStream << position[i] <<
" ";
136 c_vector<double, SPACE_DIM> velocity = time_step * node_iter->rGetAppliedForce() / damping_constant;
137 for (
unsigned i=0; i<SPACE_DIM; i++)
139 *this->mpOutStream << velocity[i] <<
" ";
145 template<
unsigned ELEMENT_DIM,
unsigned SPACE_DIM>
150 template<
unsigned ELEMENT_DIM,
unsigned SPACE_DIM>
158 assert(!node_iter->IsDeleted());
161 unsigned node_index = node_iter->GetIndex();
162 *this->mpOutStream << node_index <<
" ";
165 const c_vector<double, SPACE_DIM>& position = node_iter->rGetLocation();
166 for (
unsigned i=0; i<SPACE_DIM; i++)
168 *this->mpOutStream << position[i] <<
" ";
174 c_vector<double, SPACE_DIM> velocity = time_step * node_iter->rGetAppliedForce() / damping_constant;
175 for (
unsigned i=0; i<SPACE_DIM; i++)
177 *this->mpOutStream << velocity[i] <<
" ";
NodesOnlyMesh< DIM > & rGetMesh()
virtual CellPtr GetCellUsingLocationIndex(unsigned index)
double GetDampingConstant(unsigned nodeIndex)
static SimulationTime * Instance()
NodeIterator GetNodeIteratorEnd()
double GetTimeStep() const
MutableMesh< ELEMENT_DIM, SPACE_DIM > & rGetMesh()
virtual bool IsGhostNode(unsigned index)
double GetDampingConstant(unsigned nodeIndex)
MutableVertexMesh< DIM, DIM > & rGetMesh()
virtual void Visit(MeshBasedCellPopulation< ELEMENT_DIM, SPACE_DIM > *pCellPopulation)
NodeIterator GetNodeIteratorBegin(bool skipDeletedNodes=true)
#define EXPORT_TEMPLATE_CLASS_ALL_DIMS(CLASS)
virtual CellPtr GetCellUsingLocationIndex(unsigned index)
virtual double GetDampingConstant(unsigned nodeIndex)