36#include "VertexCryptBoundaryForce.hpp"
42 mForceStrength(forceStrength)
62 EXCEPTION(
"VertexCryptBoundaryForce is to be used with VertexBasedCellPopulations only");
70 double y = node_iter->rGetLocation()[1];
73 if (y < 0.0 && DIM > 1)
75 c_vector<double, DIM> boundary_force = zero_vector<double>(DIM);
76 boundary_force[1] = mForceStrength*SmallPow(y, 2);
78 node_iter->AddAppliedForceContribution(boundary_force);
86 return mForceStrength;
92 *rParamsFile <<
"\t\t\t<ForceStrength>" << mForceStrength <<
"</ForceStrength>\n";
#define EXCEPTION(message)
#define EXPORT_TEMPLATE_CLASS_SAME_DIMS(CLASS)
virtual void OutputForceParameters(out_stream &rParamsFile)=0
NodeIterator GetNodeIteratorEnd()
NodeIterator GetNodeIteratorBegin(bool skipDeletedNodes=true)
MutableVertexMesh< DIM, DIM > & rGetMesh()
void AddForceContribution(AbstractCellPopulation< DIM > &rCellPopulation)
double GetForceStrength() const
VertexCryptBoundaryForce(double forceStrength=1.0)
~VertexCryptBoundaryForce()
void OutputForceParameters(out_stream &rParamsFile)