13#ifndef DUMUX_DISCRETIZATION_BOX_GEOMETRY_HELPER_HH
14#define DUMUX_DISCRETIZATION_BOX_GEOMETRY_HELPER_HH
18#include <dune/common/exceptions.hh>
20#include <dune/geometry/type.hh>
21#include <dune/geometry/typeindex.hh>
22#include <dune/geometry/referenceelements.hh>
23#include <dune/geometry/multilineargeometry.hh>
25#include <dune/common/rangeutilities.hh>
41 template<
int mydim,
int cdim >
44 using Type = std::array< Dune::FieldVector< ct, cdim >, (1<<(mydim)) >;
51 static const bool v =
true;
52 static const unsigned int topologyId = Dune::GeometryTypes::cube(mydim).id();
58template<Dune::GeometryType::Id gt>
64 using Key = std::pair<std::uint8_t, std::uint8_t>;
65 static constexpr std::array<std::array<Key, 2>, 2>
keys = {{
74 using Key = std::pair<std::uint8_t, std::uint8_t>;
75 static constexpr std::array<std::array<Key, 4>, 3>
keys = {{
85 using Key = std::pair<std::uint8_t, std::uint8_t>;
86 static constexpr std::array<std::array<Key, 4>, 4>
keys = {{
97 using Key = std::pair<std::uint8_t, std::uint8_t>;
98 static constexpr std::array<std::array<Key, 8>, 4>
keys = {{
99 {
Key{0, 3},
Key{0, 2},
Key{1, 2},
Key{0, 1},
Key{3, 2},
Key{1, 1},
Key{2, 1},
Key{0, 0} },
100 {
Key{1, 3},
Key{2, 2},
Key{0, 2},
Key{0, 1},
Key{4, 2},
Key{3, 1},
Key{1, 1},
Key{0, 0} },
101 {
Key{2, 3},
Key{1, 2},
Key{2, 2},
Key{0, 1},
Key{5, 2},
Key{2, 1},
Key{3, 1},
Key{0, 0} },
102 {
Key{3, 3},
Key{3, 2},
Key{5, 2},
Key{2, 1},
Key{4, 2},
Key{1, 1},
Key{3, 1},
Key{0, 0} }
109 using Key = std::pair<std::uint8_t, std::uint8_t>;
110 static constexpr std::array<std::array<Key, 8>, 6>
keys = {{
111 {
Key{0, 3},
Key{3, 2},
Key{4, 2},
Key{3, 1},
Key{0, 2},
Key{0, 1},
Key{1, 1},
Key{0, 0} },
112 {
Key{1, 3},
Key{5, 2},
Key{3, 2},
Key{3, 1},
Key{1, 2},
Key{2, 1},
Key{0, 1},
Key{0, 0} },
113 {
Key{2, 3},
Key{4, 2},
Key{5, 2},
Key{3, 1},
Key{2, 2},
Key{1, 1},
Key{2, 1},
Key{0, 0} },
114 {
Key{3, 3},
Key{7, 2},
Key{6, 2},
Key{4, 1},
Key{0, 2},
Key{1, 1},
Key{0, 1},
Key{0, 0} },
115 {
Key{4, 3},
Key{6, 2},
Key{8, 2},
Key{4, 1},
Key{1, 2},
Key{0, 1},
Key{2, 1},
Key{0, 0} },
116 {
Key{5, 3},
Key{8, 2},
Key{7, 2},
Key{4, 1},
Key{2, 2},
Key{2, 1},
Key{1, 1},
Key{0, 0} }
123 using Key = std::pair<std::uint8_t, std::uint8_t>;
124 static constexpr std::array<std::array<Key, 8>, 8>
keys = {{
125 {
Key{0, 3},
Key{6, 2},
Key{4, 2},
Key{4, 1},
Key{0, 2},
Key{2, 1},
Key{0, 1},
Key{0, 0} },
126 {
Key{1, 3},
Key{5, 2},
Key{6, 2},
Key{4, 1},
Key{1, 2},
Key{1, 1},
Key{2, 1},
Key{0, 0} },
127 {
Key{2, 3},
Key{4, 2},
Key{7, 2},
Key{4, 1},
Key{2, 2},
Key{0, 1},
Key{3, 1},
Key{0, 0} },
128 {
Key{3, 3},
Key{7, 2},
Key{5, 2},
Key{4, 1},
Key{3, 2},
Key{3, 1},
Key{1, 1},
Key{0, 0} },
129 {
Key{4, 3},
Key{8, 2},
Key{10, 2},
Key{5, 1},
Key{0, 2},
Key{0, 1},
Key{2, 1},
Key{0, 0} },
130 {
Key{5, 3},
Key{10, 2},
Key{9, 2},
Key{5, 1},
Key{1, 2},
Key{2, 1},
Key{1, 1},
Key{0, 0} },
131 {
Key{6, 3},
Key{11, 2},
Key{8, 2},
Key{5, 1},
Key{2, 2},
Key{3, 1},
Key{0, 1},
Key{0, 0} },
132 {
Key{7, 3},
Key{9, 2},
Key{11, 2},
Key{5, 1},
Key{3, 2},
Key{1, 1},
Key{3, 1},
Key{0, 0} }
136template<Dune::GeometryType::Id gt>
142 using Key = std::pair<std::uint8_t, std::uint8_t>;
143 static constexpr std::array<std::array<Key, 1>, 1>
keys = {{
151 using Key = std::pair<std::uint8_t, std::uint8_t>;
152 static constexpr std::array<std::array<Key, 2>, 3>
keys = {{
162 using Key = std::pair<std::uint8_t, std::uint8_t>;
163 static constexpr std::array<std::array<Key, 2>, 4>
keys = {{
174 using Key = std::pair<std::uint8_t, std::uint8_t>;
175 static constexpr std::array<std::array<Key, 4>, 6>
keys = {{
188 using Key = std::pair<std::uint8_t, std::uint8_t>;
189 static constexpr std::array<std::array<Key, 4>, 9>
keys = {{
205 using Key = std::pair<std::uint8_t, std::uint8_t>;
206 static constexpr std::array<std::array<Key, 4>, 12>
keys = {{
224template<
class S,
class ReferenceElement,
class Transformation,
class KeyArray, std::size_t... I>
225S
keyToCornerStorageImpl(
const ReferenceElement& ref, Transformation&& trans,
const KeyArray& key, std::index_sequence<I...>)
228 return { trans(ref.position(key[I].first, key[I].second))... };
232template<
class S,
class ReferenceElement,
class Transformation,
class T, std::
size_t N,
class Indices = std::make_index_sequence<N>>
233S
keyToCornerStorage(
const ReferenceElement& ref, Transformation&& trans,
const std::array<T, N>& key)
240template<
class S,
class ReferenceElement,
class Transformation,
class KeyArray, std::size_t... I>
242 unsigned int i,
unsigned int c,
const KeyArray& key, std::index_sequence<I...>)
246 return { trans(ref.position(ref.subEntity(i, c, key[I].first, c+key[I].second), c+key[I].second))... };
251template<
class S,
class ReferenceElement,
class Transformation,
class T, std::
size_t N,
class Indices = std::make_index_sequence<N>>
253 unsigned int i,
unsigned int c,
const std::array<T, N>& key)
261template<
class Gr
idView,
int dim,
class ScvType,
class ScvfType>
265template <
class Gr
idView,
class ScvType,
class ScvfType>
269 using Scalar =
typename GridView::ctype;
270 using GlobalPosition =
typename Dune::FieldVector<Scalar, GridView::dimensionworld>;
271 using ScvCornerStorage =
typename ScvType::Traits::CornerStorage;
272 using ScvfCornerStorage =
typename ScvfType::Traits::CornerStorage;
273 using ScvGeometry =
typename ScvType::Traits::Geometry;
274 using ScvfGeometry =
typename ScvfType::Traits::Geometry;
275 using LocalIndexType =
typename ScvType::Traits::LocalIndexType;
277 using Element =
typename GridView::template Codim<0>::Entity;
278 using Intersection =
typename GridView::Intersection;
280 static constexpr int dim = 1;
291 return getScvCorners(geo_.type(), [&](
const auto& local){ return geo_.global(local); }, localScvIdx);
295 template<
class Transformation>
296 static ScvCornerStorage
getScvCorners(Dune::GeometryType type, Transformation&& trans,
unsigned int localScvIdx)
298 const auto& ref = Dune::referenceElement<Scalar, dim>(type);
305 return { Dune::GeometryTypes::line,
getScvCorners(localScvIdx) };
311 return getScvfCorners(geo_.type(), [&](
const auto& local){ return geo_.global(local); }, localScvfIdx);
315 template<
class Transformation>
316 static ScvfCornerStorage
getScvfCorners(Dune::GeometryType type, Transformation&& trans,
unsigned int localScvfIdx)
318 const auto& ref = Dune::referenceElement<Scalar, dim>(type);
327 return ScvfCornerStorage{{ geo_.corner(localFacetIndex) }};
331 template<
class Transformation>
333 Transformation&& trans,
334 unsigned int localFacetIndex,
335 unsigned int indexInFacet)
337 const auto& ref = Dune::referenceElement<Scalar, dim>(type);
338 return trans(ref.position(localFacetIndex, dim));
342 GlobalPosition
normal(
const ScvfCornerStorage& scvfCorners,
343 const std::array<LocalIndexType, 2>&)
const
345 auto normal = geo_.corner(1) - geo_.corner(0);
353 return referenceElement(geo_).size(dim-1);
359 return Dune::referenceElement<Scalar, dim>(type).size(dim-1);
365 return referenceElement(geo_).size(dim);
373 static Element::Geometry::LocalCoordinate
localScvfCenter(Dune::GeometryType type,
unsigned int localScvfIdx)
375 return Dumux::center(getScvfCorners_(type, [&](
const auto& local){
return local; }, localScvfIdx));
379 static Element::Geometry::LocalCoordinate
localBoundaryScvfCenter(Dune::GeometryType type,
unsigned int localFacetIndex,
unsigned int)
381 return Dune::referenceElement<Scalar, dim>(type).position(localFacetIndex, dim);
385 const typename Element::Geometry& geo_;
389template <
class Gr
idView,
class ScvType,
class ScvfType>
392 using Scalar =
typename GridView::ctype;
393 using GlobalPosition =
typename Dune::FieldVector<Scalar, GridView::dimensionworld>;
394 using ScvCornerStorage =
typename ScvType::Traits::CornerStorage;
395 using ScvfCornerStorage =
typename ScvfType::Traits::CornerStorage;
396 using LocalIndexType =
typename ScvType::Traits::LocalIndexType;
398 using Element =
typename GridView::template Codim<0>::Entity;
399 using Intersection =
typename GridView::Intersection;
401 static constexpr auto dim = GridView::dimension;
402 static constexpr auto dimWorld = GridView::dimensionworld;
413 return getScvCorners(geo_.type(), [&](
const auto& local){ return geo_.global(local); }, localScvIdx);
417 template<
class Transformation>
418 static ScvCornerStorage
getScvCorners(Dune::GeometryType type, Transformation&& trans,
unsigned int localScvIdx)
421 const auto& ref = Dune::referenceElement<Scalar, dim>(type);
422 if (type == Dune::GeometryTypes::triangle)
427 else if (type == Dune::GeometryTypes::quadrilateral)
433 DUNE_THROW(Dune::NotImplemented,
"Box scv geometries for dim=" << dim
434 <<
" dimWorld=" << dimWorld
435 <<
" type=" << type);
441 return getScvfCorners(geo_.type(), [&](
const auto& local){ return geo_.global(local); }, localScvfIdx);
445 template<
class Transformation>
446 static ScvfCornerStorage
getScvfCorners(Dune::GeometryType type, Transformation&& trans,
unsigned int localScvfIdx)
449 const auto& ref = Dune::referenceElement<Scalar, dim>(type);
450 if (type == Dune::GeometryTypes::triangle)
455 else if (type == Dune::GeometryTypes::quadrilateral)
461 DUNE_THROW(Dune::NotImplemented,
"Box scvf geometries for dim=" << dim
462 <<
" dimWorld=" << dimWorld
463 <<
" type=" << type);
468 unsigned int indexInFacet)
const
470 return getBoundaryScvfCorners(geo_.type(), [&](
const auto& local){ return geo_.global(local); }, localFacetIndex, indexInFacet);
474 template<
class Transformation>
476 Transformation&& trans,
477 unsigned int localFacetIndex,
478 unsigned int indexInFacet)
483 const auto& ref = Dune::referenceElement<Scalar, dim>(type);
485 constexpr int facetCodim = 1;
490 GlobalPosition
normal(
const ScvfCornerStorage& scvfCorners,
491 const std::array<LocalIndexType, 2>& scvIndices)
const
496 const auto v = geo_.corner(scvIndices[1]) - geo_.corner(scvIndices[0]);
507 return referenceElement(geo_).size(dim-1);
513 return Dune::referenceElement<Scalar, dim>(type).size(dim-1);
519 return referenceElement(geo_).size(dim);
527 static Element::Geometry::LocalCoordinate
localScvfCenter(Dune::GeometryType type,
unsigned int localScvfIdx)
533 static Element::Geometry::LocalCoordinate
localBoundaryScvfCenter(Dune::GeometryType type,
unsigned int localFacetIndex,
unsigned int indexInFace)
539 const typename Element::Geometry& geo_;
543template <
class Gr
idView,
class ScvType,
class ScvfType>
546 using Scalar =
typename GridView::ctype;
547 using GlobalPosition =
typename Dune::FieldVector<Scalar, GridView::dimensionworld>;
548 using ScvCornerStorage =
typename ScvType::Traits::CornerStorage;
549 using ScvfCornerStorage =
typename ScvfType::Traits::CornerStorage;
550 using LocalIndexType =
typename ScvType::Traits::LocalIndexType;
552 using Element =
typename GridView::template Codim<0>::Entity;
553 using Intersection =
typename GridView::Intersection;
555 static constexpr auto dim = GridView::dimension;
556 static constexpr auto dimWorld = GridView::dimensionworld;
568 return getScvCorners(geo_.type(), [&](
const auto& local){ return geo_.global(local); }, localScvIdx);
572 template<
class Transformation>
573 static ScvCornerStorage
getScvCorners(Dune::GeometryType type, Transformation&& trans,
unsigned int localScvIdx)
575 const auto& ref = Dune::referenceElement<Scalar, dim>(type);
576 if (type == Dune::GeometryTypes::tetrahedron)
581 else if (type == Dune::GeometryTypes::prism)
586 else if (type == Dune::GeometryTypes::hexahedron)
592 DUNE_THROW(Dune::NotImplemented,
"Box scv geometries for dim=" << dim
593 <<
" dimWorld=" << dimWorld
594 <<
" type=" << type);
600 return getScvfCorners(geo_.type(), [&](
const auto& local){ return geo_.global(local); }, localScvfIdx);
604 template<
class Transformation>
605 static ScvfCornerStorage
getScvfCorners(Dune::GeometryType type, Transformation&& trans,
unsigned int localScvfIdx)
608 const auto& ref = Dune::referenceElement<Scalar, dim>(type);
609 if (type == Dune::GeometryTypes::tetrahedron)
614 else if (type == Dune::GeometryTypes::prism)
619 else if (type == Dune::GeometryTypes::hexahedron)
625 DUNE_THROW(Dune::NotImplemented,
"Box scvf geometries for dim=" << dim
626 <<
" dimWorld=" << dimWorld
627 <<
" type=" << type);
632 unsigned int indexInFacet)
const
634 return getBoundaryScvfCorners(geo_.type(), [&](
const auto& local){ return geo_.global(local); }, localFacetIndex, indexInFacet);
638 template<
class Transformation>
640 Transformation&& trans,
641 unsigned localFacetIndex,
642 unsigned int indexInFacet)
644 constexpr int facetCodim = 1;
649 const auto& ref = Dune::referenceElement<Scalar, dim>(type);
650 const auto facetType = ref.type(localFacetIndex, facetCodim);
651 if (facetType == Dune::GeometryTypes::triangle)
656 else if (facetType == Dune::GeometryTypes::quadrilateral)
662 DUNE_THROW(Dune::NotImplemented,
"Box boundary scvf geometries for dim=" << dim
663 <<
" dimWorld=" << dimWorld
664 <<
" type=" << facetType);
668 GlobalPosition
normal(
const ScvfCornerStorage& p,
669 const std::array<LocalIndexType, 2>& scvIndices)
const
673 const auto v = geo_.corner(scvIndices[1]) - geo_.corner(scvIndices[0]);
684 return referenceElement(geo_).size(dim-1);
690 return Dune::referenceElement<Scalar, dim>(type).size(dim-1);
696 return referenceElement(geo_).size(dim);
704 static Element::Geometry::LocalCoordinate
localScvfCenter(Dune::GeometryType type,
unsigned int localScvfIdx)
710 static Element::Geometry::LocalCoordinate
localBoundaryScvfCenter(Dune::GeometryType type,
unsigned int localFacetIndex,
unsigned int indexInFace)
716 const typename Element::Geometry& geo_;
Compute the center point of a convex polytope geometry or a random-access container of corner points.
const Element::Geometry & elementGeometry() const
the wrapped element geometry
Definition boxgeometryhelper.hh:369
std::size_t numInteriorScvf() const
number of sub control volume faces (number of edges)
Definition boxgeometryhelper.hh:351
static Element::Geometry::LocalCoordinate localScvfCenter(Dune::GeometryType type, unsigned int localScvfIdx)
local scvf center
Definition boxgeometryhelper.hh:373
BoxGeometryHelper(const typename Element::Geometry &geometry)
Definition boxgeometryhelper.hh:284
ScvCornerStorage getScvCorners(unsigned int localScvIdx) const
Create a vector with the scv corners.
Definition boxgeometryhelper.hh:289
PQ1LagrangeDofHelper< GridView > DofHelper
Definition boxgeometryhelper.hh:282
ScvfCornerStorage getBoundaryScvfCorners(unsigned int localFacetIndex, unsigned int) const
Create the sub control volume face geometries on the boundary.
Definition boxgeometryhelper.hh:324
static ScvCornerStorage getScvCorners(Dune::GeometryType type, Transformation &&trans, unsigned int localScvIdx)
Create a vector with the scv corners.
Definition boxgeometryhelper.hh:296
GlobalPosition normal(const ScvfCornerStorage &scvfCorners, const std::array< LocalIndexType, 2 > &) const
get scvf normal vector
Definition boxgeometryhelper.hh:342
std::size_t numScv() const
number of sub control volumes (number of vertices)
Definition boxgeometryhelper.hh:363
ScvGeometry scvGeometry(unsigned int localScvIdx) const
Definition boxgeometryhelper.hh:303
static ScvfCornerStorage getBoundaryScvfCorners(Dune::GeometryType type, Transformation &&trans, unsigned int localFacetIndex, unsigned int indexInFacet)
Create the sub control volume face geometries on the boundary.
Definition boxgeometryhelper.hh:332
ScvfCornerStorage getScvfCorners(unsigned int localScvfIdx) const
Create a vector with the corners of sub control volume faces.
Definition boxgeometryhelper.hh:309
static auto numInteriorScvf(Dune::GeometryType type)
number of interior sub control volume faces (number of edges)
Definition boxgeometryhelper.hh:357
static Element::Geometry::LocalCoordinate localBoundaryScvfCenter(Dune::GeometryType type, unsigned int localFacetIndex, unsigned int)
local boundary scvf center
Definition boxgeometryhelper.hh:379
static ScvfCornerStorage getScvfCorners(Dune::GeometryType type, Transformation &&trans, unsigned int localScvfIdx)
Create a vector with the corners of sub control volume faces.
Definition boxgeometryhelper.hh:316
std::size_t numScv() const
number of sub control volumes (number of vertices)
Definition boxgeometryhelper.hh:517
std::size_t numInteriorScvf() const
number of sub control volume faces (number of edges)
Definition boxgeometryhelper.hh:505
static Element::Geometry::LocalCoordinate localScvfCenter(Dune::GeometryType type, unsigned int localScvfIdx)
local scvf center
Definition boxgeometryhelper.hh:527
static ScvfCornerStorage getScvfCorners(Dune::GeometryType type, Transformation &&trans, unsigned int localScvfIdx)
Create a vector with the corners of sub control volume faces.
Definition boxgeometryhelper.hh:446
static ScvCornerStorage getScvCorners(Dune::GeometryType type, Transformation &&trans, unsigned int localScvIdx)
Create a vector with the scv corners.
Definition boxgeometryhelper.hh:418
ScvfCornerStorage getScvfCorners(unsigned int localScvfIdx) const
Create a vector with the corners of sub control volume faces.
Definition boxgeometryhelper.hh:439
PQ1LagrangeDofHelper< GridView > DofHelper
Definition boxgeometryhelper.hh:404
BoxGeometryHelper(const typename Element::Geometry &geometry)
Definition boxgeometryhelper.hh:406
static ScvfCornerStorage getBoundaryScvfCorners(Dune::GeometryType type, Transformation &&trans, unsigned int localFacetIndex, unsigned int indexInFacet)
Create the sub control volume face geometries on the boundary.
Definition boxgeometryhelper.hh:475
ScvfCornerStorage getBoundaryScvfCorners(unsigned int localFacetIndex, unsigned int indexInFacet) const
Create the sub control volume face geometries on the boundary.
Definition boxgeometryhelper.hh:467
const Element::Geometry & elementGeometry() const
the wrapped element geometry
Definition boxgeometryhelper.hh:523
GlobalPosition normal(const ScvfCornerStorage &scvfCorners, const std::array< LocalIndexType, 2 > &scvIndices) const
get scvf normal vector
Definition boxgeometryhelper.hh:490
static Element::Geometry::LocalCoordinate localBoundaryScvfCenter(Dune::GeometryType type, unsigned int localFacetIndex, unsigned int indexInFace)
local boundary scvf center
Definition boxgeometryhelper.hh:533
static auto numInteriorScvf(Dune::GeometryType type)
number of interior sub control volume faces (number of edges)
Definition boxgeometryhelper.hh:511
ScvCornerStorage getScvCorners(unsigned int localScvIdx) const
Create a vector with the scv corners.
Definition boxgeometryhelper.hh:411
static auto numInteriorScvf(Dune::GeometryType type)
number of interior sub control volume faces (number of edges)
Definition boxgeometryhelper.hh:688
GlobalPosition normal(const ScvfCornerStorage &p, const std::array< LocalIndexType, 2 > &scvIndices) const
get scvf normal vector
Definition boxgeometryhelper.hh:668
BoxGeometryHelper(const typename Element::Geometry &geometry)
Definition boxgeometryhelper.hh:561
const Element::Geometry & elementGeometry() const
the wrapped element geometry
Definition boxgeometryhelper.hh:700
static ScvfCornerStorage getScvfCorners(Dune::GeometryType type, Transformation &&trans, unsigned int localScvfIdx)
Create a vector with the scvf corners.
Definition boxgeometryhelper.hh:605
ScvfCornerStorage getBoundaryScvfCorners(unsigned int localFacetIndex, unsigned int indexInFacet) const
Create the sub control volume face geometries on the boundary.
Definition boxgeometryhelper.hh:631
ScvCornerStorage getScvCorners(unsigned int localScvIdx) const
Create a vector with the scv corners.
Definition boxgeometryhelper.hh:566
static Element::Geometry::LocalCoordinate localBoundaryScvfCenter(Dune::GeometryType type, unsigned int localFacetIndex, unsigned int indexInFace)
local boundary scvf center
Definition boxgeometryhelper.hh:710
static Element::Geometry::LocalCoordinate localScvfCenter(Dune::GeometryType type, unsigned int localScvfIdx)
local scvf center
Definition boxgeometryhelper.hh:704
ScvfCornerStorage getScvfCorners(unsigned int localScvfIdx) const
Create a vector with the scvf corners.
Definition boxgeometryhelper.hh:598
static ScvCornerStorage getScvCorners(Dune::GeometryType type, Transformation &&trans, unsigned int localScvIdx)
Create a vector with the scv corners.
Definition boxgeometryhelper.hh:573
std::size_t numScv() const
number of sub control volumes (number of vertices)
Definition boxgeometryhelper.hh:694
std::size_t numInteriorScvf() const
number of sub control volume faces (number of edges)
Definition boxgeometryhelper.hh:682
static ScvfCornerStorage getBoundaryScvfCorners(Dune::GeometryType type, Transformation &&trans, unsigned localFacetIndex, unsigned int indexInFacet)
Create the sub control volume face geometries on the boundary.
Definition boxgeometryhelper.hh:639
PQ1LagrangeDofHelper< GridView > DofHelper
Definition boxgeometryhelper.hh:559
Create sub control volumes and sub control volume face geometries.
Definition boxgeometryhelper.hh:262
Helper class providing degree of freedom information for the PQ1 Lagrange basis. The pq1 basis uses v...
Definition pq1/dofhelper.hh:32
auto scvfUnitNormal(const ElementGeometry &geo, const CornerStorage &corners)
Unit normal of an interior sub-control volume face, up to sign.
Definition scvfnormal.hh:33
Corners::value_type center(const Corners &corners)
The center of a given list of corners.
Definition center.hh:24
Define some often used mathematical functions.
Definition boxgeometryhelper.hh:56
S subEntityKeyToCornerStorage(const ReferenceElement &ref, Transformation &&trans, unsigned int i, unsigned int c, const std::array< T, N > &key)
Definition boxgeometryhelper.hh:252
S keyToCornerStorageImpl(const ReferenceElement &ref, Transformation &&trans, const KeyArray &key, std::index_sequence< I... >)
Definition boxgeometryhelper.hh:225
S keyToCornerStorage(const ReferenceElement &ref, Transformation &&trans, const std::array< T, N > &key)
Definition boxgeometryhelper.hh:233
S subEntityKeyToCornerStorageImpl(const ReferenceElement &ref, Transformation &&trans, unsigned int i, unsigned int c, const KeyArray &key, std::index_sequence< I... >)
Definition boxgeometryhelper.hh:241
Definition common/pdesolver.hh:24
Helper class providing degree of freedom information for the PQ1 Lagrange basis.
Normal vector of a sub-control volume face of an element-local dual grid.
Definition boxgeometryhelper.hh:43
std::array< Dune::FieldVector< ct, cdim >,(1<<(mydim)) > Type
Definition boxgeometryhelper.hh:44
Definition boxgeometryhelper.hh:50
static const bool v
Definition boxgeometryhelper.hh:51
static const unsigned int topologyId
Definition boxgeometryhelper.hh:52
Traits for an efficient corner storage for box method sub control volumes.
Definition boxgeometryhelper.hh:38
static constexpr std::array< std::array< Key, 8 >, 8 > keys
Definition boxgeometryhelper.hh:124
std::pair< std::uint8_t, std::uint8_t > Key
Definition boxgeometryhelper.hh:123
static constexpr std::array< std::array< Key, 2 >, 2 > keys
Definition boxgeometryhelper.hh:65
std::pair< std::uint8_t, std::uint8_t > Key
Definition boxgeometryhelper.hh:64
static constexpr std::array< std::array< Key, 8 >, 6 > keys
Definition boxgeometryhelper.hh:110
std::pair< std::uint8_t, std::uint8_t > Key
Definition boxgeometryhelper.hh:109
static constexpr std::array< std::array< Key, 4 >, 4 > keys
Definition boxgeometryhelper.hh:86
std::pair< std::uint8_t, std::uint8_t > Key
Definition boxgeometryhelper.hh:85
static constexpr std::array< std::array< Key, 8 >, 4 > keys
Definition boxgeometryhelper.hh:98
std::pair< std::uint8_t, std::uint8_t > Key
Definition boxgeometryhelper.hh:97
std::pair< std::uint8_t, std::uint8_t > Key
Definition boxgeometryhelper.hh:74
static constexpr std::array< std::array< Key, 4 >, 3 > keys
Definition boxgeometryhelper.hh:75
Definition boxgeometryhelper.hh:59
static constexpr std::array< std::array< Key, 4 >, 12 > keys
Definition boxgeometryhelper.hh:206
std::pair< std::uint8_t, std::uint8_t > Key
Definition boxgeometryhelper.hh:205
std::pair< std::uint8_t, std::uint8_t > Key
Definition boxgeometryhelper.hh:142
static constexpr std::array< std::array< Key, 1 >, 1 > keys
Definition boxgeometryhelper.hh:143
std::pair< std::uint8_t, std::uint8_t > Key
Definition boxgeometryhelper.hh:188
static constexpr std::array< std::array< Key, 4 >, 9 > keys
Definition boxgeometryhelper.hh:189
std::pair< std::uint8_t, std::uint8_t > Key
Definition boxgeometryhelper.hh:162
static constexpr std::array< std::array< Key, 2 >, 4 > keys
Definition boxgeometryhelper.hh:163
static constexpr std::array< std::array< Key, 4 >, 6 > keys
Definition boxgeometryhelper.hh:175
std::pair< std::uint8_t, std::uint8_t > Key
Definition boxgeometryhelper.hh:174
static constexpr std::array< std::array< Key, 2 >, 3 > keys
Definition boxgeometryhelper.hh:152
std::pair< std::uint8_t, std::uint8_t > Key
Definition boxgeometryhelper.hh:151
Definition boxgeometryhelper.hh:137