16 #ifndef dealii_base_bounding_box_h 17 #define dealii_base_bounding_box_h 20 #include <deal.II/base/config.h> 22 #include <deal.II/base/exceptions.h> 23 #include <deal.II/base/point.h> 24 #include <deal.II/base/utilities.h> 26 DEAL_II_NAMESPACE_OPEN
32 enum class NeighborType
49 attached_neighbors = 2,
61 mergeable_neighbors = 3
96 template <
int spacedim,
typename Number =
double>
121 template <
class Container>
170 extend(
const Number &amount);
181 template <
class Archive>
183 serialize(Archive &ar,
const unsigned int version);
194 template <
int spacedim,
typename Number>
200 for (
unsigned int i = 0; i < spacedim; ++i)
201 Assert(boundary_points.first[i] <= boundary_points.second[i],
202 ExcMessage(
"Bounding Box can't be created: the points' " 203 "order should be bottom left, top right!"));
205 this->boundary_points = boundary_points;
210 template <
int spacedim,
typename Number>
211 template <
class Container>
214 boost::geometry::envelope(
222 template <
int spacedim,
typename Number>
226 for (
unsigned int d = 0;
d < spacedim; ++
d)
228 boundary_points.first[
d] -= amount;
229 boundary_points.second[
d] += amount;
230 Assert(boundary_points.first[d] <= boundary_points.second[d],
231 ExcMessage(
"Bounding Box can't be shrunk this much: the points' " 232 "order should remain bottom left, top right."));
237 template <
int spacedim,
typename Number>
238 template <
class Archive>
247 DEAL_II_NAMESPACE_CLOSE
void extend(const Number &amount)
void merge_with(const BoundingBox< spacedim, Number > &other_bbox)
static ::ExceptionBase & ExcMessage(std::string arg1)
#define Assert(cond, exc)
SymmetricTensor< 2, dim, Number > d(const Tensor< 2, dim, Number > &F, const Tensor< 2, dim, Number > &dF_dt)
NeighborType get_neighbor_type(const BoundingBox< spacedim, Number > &other_bbox) const
bool point_inside(const Point< spacedim, Number > &p) const
void serialize(Archive &ar, const unsigned int version)
std::pair< Point< spacedim, Number >, Point< spacedim, Number > > & get_boundary_points()