36 #include "ChasteEllipsoid.hpp"
39 template <
unsigned SPACE_DIM>
44 for (
unsigned dim=0; dim<SPACE_DIM; dim++)
48 EXCEPTION(
"Attempted to create an ellipsoid with a negative radius");
60 if (rPointToCheck[0] < mCentre[0] - mRadii[0] - 100.0 * DBL_EPSILON ||
61 rPointToCheck[0] > mCentre[0] + mRadii[0] + 100.0 * DBL_EPSILON )
82 double x_distance = (rPointToCheck[0]-mCentre[0])/mRadii[0];
83 double y_distance = (rPointToCheck[1]-mCentre[1])/mRadii[1];
85 if ((x_distance*x_distance + y_distance*y_distance) > (1.0 + 100.0 * DBL_EPSILON))
106 double x_distance = (rPointToCheck[0]-mCentre[0])/mRadii[0];
107 double y_distance = (rPointToCheck[1]-mCentre[1])/mRadii[1];
108 double z_distance = (rPointToCheck[2]-mCentre[2])/mRadii[2];
110 if ((x_distance*x_distance + y_distance*y_distance + z_distance*z_distance) > (1.0 + 100.0 * DBL_EPSILON))
124 template <
unsigned SPACE_DIM>
130 template <
unsigned SPACE_DIM>
#define EXCEPTION(message)
bool DoesContain(const ChastePoint< SPACE_DIM > &rPointToCheck) const
#define EXPORT_TEMPLATE_CLASS_SAME_DIMS(CLASS)
const ChastePoint< SPACE_DIM > & rGetRadii() const
ChastePoint< SPACE_DIM > mRadii
ChasteEllipsoid(ChastePoint< SPACE_DIM > &rCentre, ChastePoint< SPACE_DIM > &rRadii)
const ChastePoint< SPACE_DIM > & rGetCentre() const