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));
77 const c_vector<double, SPACE_DIM>& position = node_iter->rGetLocation();
78 for (
unsigned i=0; i<SPACE_DIM; i++)
86 c_vector<double, SPACE_DIM> velocity = time_step * node_iter->rGetAppliedForce() / damping_constant;
87 for (
unsigned i=0; i<SPACE_DIM; i++)
95 template<
unsigned ELEMENT_DIM,
unsigned SPACE_DIM>
98 EXCEPTION(
"NodeVelocityWriter cannot be used with a CaBasedCellPopulation");
101 template<
unsigned ELEMENT_DIM,
unsigned SPACE_DIM>
109 assert(!node_iter->IsDeleted());
111 unsigned node_index = node_iter->GetIndex();
114 bool is_real_node = !(pCellPopulation->
IsGhostNode(node_index));
128 const c_vector<double, SPACE_DIM>& position = node_iter->rGetLocation();
129 for (
unsigned i=0; i<SPACE_DIM; i++)
137 c_vector<double, SPACE_DIM> velocity = time_step * node_iter->rGetAppliedForce() / damping_constant;
138 for (
unsigned i=0; i<SPACE_DIM; i++)
146 template<
unsigned ELEMENT_DIM,
unsigned SPACE_DIM>
149 EXCEPTION(
"NodeVelocityWriter cannot be used with a PottsBasedCellPopulation");
152 template<
unsigned ELEMENT_DIM,
unsigned SPACE_DIM>
160 assert(!node_iter->IsDeleted());
163 unsigned node_index = node_iter->GetIndex();
167 const c_vector<double, SPACE_DIM>& position = node_iter->rGetLocation();
168 for (
unsigned i=0; i<SPACE_DIM; i++)
176 c_vector<double, SPACE_DIM> velocity = time_step * node_iter->rGetAppliedForce() / damping_constant;
177 for (
unsigned i=0; i<SPACE_DIM; i++)
NodesOnlyMesh< DIM > & rGetMesh()
virtual CellPtr GetCellUsingLocationIndex(unsigned index)
double GetDampingConstant(unsigned nodeIndex)
#define EXCEPTION(message)
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)