36 #include "SphereGeometryBoundaryCondition.hpp" 37 #include "NodeBasedCellPopulation.hpp" 39 template<
unsigned DIM>
41 c_vector<double, DIM> centre,
45 mCentreOfSphere(centre),
46 mRadiusOfSphere(radius),
47 mMaximumDistance(distance)
54 EXCEPTION(
"A NodeBasedCellPopulation must be used with this boundary condition object.");
58 EXCEPTION(
"This boundary condition is not implemented in 1D.");
62 template<
unsigned DIM>
68 template<
unsigned DIM>
74 template<
unsigned DIM>
85 assert(radius != 0.0);
91 c_vector<double, DIM> location_on_sphere =
102 template<
unsigned DIM>
105 bool condition_satisfied =
true;
120 condition_satisfied =
false;
124 return condition_satisfied;
127 template<
unsigned DIM>
130 *rParamsFile <<
"\t\t\t<CentreOfSphere>";
131 for (
unsigned index=0; index != DIM-1U; index++)
137 *rParamsFile <<
"\t\t\t<RadiusOfSphere>" <<
mRadiusOfSphere <<
"</RadiusOfSphere>\n";
138 *rParamsFile <<
"\t\t\t<MaximumDistance>" <<
mMaximumDistance <<
"</MaximumDistance>\n";
virtual Node< SPACE_DIM > * GetNode(unsigned index)=0
AbstractCellPopulation< ELEMENT_DIM, ELEMENT_DIM > * mpCellPopulation
unsigned GetLocationIndexUsingCell(CellPtr pCell)
void ImposeBoundaryCondition(const std::map< Node< DIM > *, c_vector< double, DIM > > &rOldLocations)
bool VerifyBoundaryCondition()
#define EXCEPTION(message)
double GetRadiusOfSphere() const
void OutputCellPopulationBoundaryConditionParameters(out_stream &rParamsFile)
#define EXPORT_TEMPLATE_CLASS_SAME_DIMS(CLASS)
c_vector< double, DIM > mCentreOfSphere
virtual c_vector< double, SPACE_DIM > GetLocationOfCellCentre(CellPtr pCell)=0
SphereGeometryBoundaryCondition(AbstractCellPopulation< DIM > *pCellPopulation, c_vector< double, DIM > centre, double radius, double distance=1e-5)
c_vector< double, SPACE_DIM > & rGetModifiableLocation()
virtual void OutputCellPopulationBoundaryConditionParameters(out_stream &rParamsFile)=0
const c_vector< double, DIM > & rGetCentreOfSphere() const