36 #include "ChasteCuboid.hpp"
39 template <
unsigned SPACE_DIM>
41 : mLowerCorner(rLowerPoint),
42 mUpperCorner(rUpperPoint)
44 for (
unsigned dim=0; dim<SPACE_DIM; dim++)
48 EXCEPTION(
"Attempt to create a cuboid with MinCorner greater than MaxCorner in some dimension");
53 template <
unsigned SPACE_DIM>
56 for (
unsigned dim=0; dim<SPACE_DIM; dim++)
58 if (rPointToCheck[dim] < mLowerCorner[dim] - 100*DBL_EPSILON
59 || mUpperCorner[dim] + 100* DBL_EPSILON < rPointToCheck[dim])
67 template <
unsigned SPACE_DIM>
73 template <
unsigned SPACE_DIM>
79 template <
unsigned SPACE_DIM>
82 assert(rDimension<SPACE_DIM);
83 return mUpperCorner[rDimension] - mLowerCorner[rDimension];
86 template <
unsigned SPACE_DIM>
90 double max_dimension = 0.0;
91 for (
unsigned i=0; i<SPACE_DIM; i++)
93 double dimension = mUpperCorner[i] - mLowerCorner[i];
94 if ( dimension > max_dimension)
97 max_dimension = dimension;
#define EXCEPTION(message)
ChastePoint< SPACE_DIM > mUpperCorner
bool DoesContain(const ChastePoint< SPACE_DIM > &rPointToCheck) const
const ChastePoint< SPACE_DIM > & rGetUpperCorner() const
#define EXPORT_TEMPLATE_CLASS_SAME_DIMS(CLASS)
double GetWidth(unsigned rDimension) const
ChasteCuboid(ChastePoint< SPACE_DIM > &rLowerPoint, ChastePoint< SPACE_DIM > &rUpperPoint)
unsigned GetLongestAxis() const
ChastePoint< SPACE_DIM > mLowerCorner
const ChastePoint< SPACE_DIM > & rGetLowerCorner() const