AMDiS 2.10
The Adaptive Multi-Dimensional Simulation Toolbox
ContextGeometry< ContextType > Struct Template Reference

Wrapper class for element and geometry. More...

#include <ContextGeometry.hpp>

Public Types

enum  { dim = ElementGeometry::mydimension , dow = ElementGeometry::coorddimension }
 
template<class I >
using IsIntersection = std::void_t< typename I::Entity, typename I::Geometry, typename I::LocalGeometry >
 
template<class E >
using IsElement = std::void_t< typename E::Geometry, typename E::EntitySeed, typename E::LocalGeometry, typename E::HierarchicIterator >
 
using Context = ContextType
 
using Geometry = typename Context::Geometry
 
using LocalCoordinate = typename Geometry::LocalCoordinate
 
using Element = typename Impl::ContextTypes< Context >::Entity
 
using ElementGeometry = typename Element::Geometry
 
using ElementCoordinate = typename ElementGeometry::LocalCoordinate
 

Public Member Functions

 ContextGeometry (Context const &context, Element const &element, ElementGeometry const &elementGeo)
 Constructor. Stores pointer to localContext, element, and geometry.
 
 ContextGeometry (Context const &context, Element const &element, ElementGeometry &&elementGeo)=delete
 
Context const & context () const
 Return the LocalContext, either the element or an intersection.
 
Element const & element () const
 Return the bound element (entity of codim 0)
 
ElementGeometry const & elementGeometry () const
 Return the geometry of the Element.
 
template<class C = Context>
decltype(auto) geometry () const
 Return the geometry of the Context.
 
template<class C = Context>
auto geometryInElement () const
 Return the geometry relative to the element geometry. This can be either an identity, or geometryInInside of the intersection.
 
template<class C = Context>
auto coordinateInElement (LocalCoordinate const &p) const
 
template<class C = Context>
auto global (LocalCoordinate const &p) const
 Coordinate p given in coordinates inside the context, transformed to coordinate in world space.
 
Dune::GeometryType type () const
 Return the geometry-type of the local context.
 
template<class C = Context>
auto integrationElement (LocalCoordinate const &p) const
 The integration element of the context geometry.
 

Static Public Attributes

template<class C >
static constexpr bool isEntity = Dune::Std::is_detected_v<IsElement,C>
 

Detailed Description

template<class ContextType>
struct AMDiS::ContextGeometry< ContextType >

Wrapper class for element and geometry.

A LocalContext can be either a grid entity of codim 0 (called an element) or an intersection of elements. The element and its geometry may be stored externally and can be passed along with the localContext object. Since an intersection has a geometry (and localGeometry) different from the geometry (and localGeometry) of the entity it belongs to, these objects are provided as well.

Template Parameters
LCLocalContext, either element or intersection

Member Function Documentation

◆ coordinateInElement()

auto coordinateInElement ( LocalCoordinate const &  p) const
inline

Coordinate p given in coordinates inside the context, transformed to coordinate in geometry of the Element. NOTE: This is equivalent to geometryInElement.global(p)


The documentation for this struct was generated from the following file: