36#include "ChasteCuboid.hpp"
39template <
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");
53template <
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])
67template <
unsigned SPACE_DIM>
73template <
unsigned SPACE_DIM>
79template <
unsigned SPACE_DIM>
82 assert(rDimension<SPACE_DIM);
83 return mUpperCorner[rDimension] - mLowerCorner[rDimension];
86template <
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)
#define EXPORT_TEMPLATE_CLASS_SAME_DIMS(CLASS)
bool DoesContain(const ChastePoint< SPACE_DIM > &rPointToCheck) const
ChasteCuboid(ChastePoint< SPACE_DIM > &rLowerPoint, ChastePoint< SPACE_DIM > &rUpperPoint)
const ChastePoint< SPACE_DIM > & rGetUpperCorner() const
const ChastePoint< SPACE_DIM > & rGetLowerCorner() const
unsigned GetLongestAxis() const
ChastePoint< SPACE_DIM > mLowerCorner
ChastePoint< SPACE_DIM > mUpperCorner
double GetWidth(unsigned rDimension) const