12#ifndef DUMUX_GEOMETRY_BOUNDINGBOX_GEOMETRY_HH
13#define DUMUX_GEOMETRY_BOUNDINGBOX_GEOMETRY_HH
15#include <dune/common/fvector.hh>
16#include <dune/geometry/type.hh>
32template<
class ct,
int dimworld>
48 int corners()
const {
return 1 << dimworld; }
54 for (
int d = 0; d < dimworld; ++d)
55 c[d] = (i & (1 << d)) ? upper_[d] : lower_[d];
60 Dune::GeometryType
type()
const {
return Dune::GeometryTypes::cube(dimworld); }
72template<
class ct,
int dimworld>
A thin axis-aligned box geometry.
Definition boundingboxgeometry.hh:34
const GlobalCoordinate & lower() const
Definition boundingboxgeometry.hh:63
GlobalCoordinate corner(int i) const
the i-th corner in Dune reference-cube ordering
Definition boundingboxgeometry.hh:51
Dune::FieldVector< ct, dimworld > GlobalCoordinate
Definition boundingboxgeometry.hh:39
Dune::GeometryType type() const
the geometry type (an axis-aligned cube)
Definition boundingboxgeometry.hh:60
const GlobalCoordinate & upper() const
Definition boundingboxgeometry.hh:65
BoundingBoxGeometry()=default
int corners() const
the number of corners of the box
Definition boundingboxgeometry.hh:48
static constexpr int mydimension
Definition boundingboxgeometry.hh:36
static constexpr int coorddimension
Definition boundingboxgeometry.hh:37
ct ctype
Definition boundingboxgeometry.hh:38
BoundingBoxGeometry(const GlobalCoordinate &lower, const GlobalCoordinate &upper)
Construct from the lower and upper corner of the box.
Definition boundingboxgeometry.hh:44
Traits telling the bounding box tree algorithms about a leaf geometry.
static constexpr bool axisAligned
Definition boundingboxgeometry.hh:74
Traits telling the bounding box tree algorithms about a leaf geometry.
Definition geometrytraits.hh:31