12#ifndef DUMUX_DISCRETIZATION_BASE_GRID_GEOMETRY_HH 
   13#define DUMUX_DISCRETIZATION_BASE_GRID_GEOMETRY_HH 
   16#include <dune/common/std/type_traits.hh> 
   37template<
class GV, 
class T>
 
   50template<
class GV, 
class Traits>
 
   54    using Element = 
typename GV::template Codim<0>::Entity;
 
   58    using Grid = 
typename BaseImplementation::Grid;
 
   60    using GridView = 
typename BaseImplementation::GridView;
 
   73    : impl_(std::move(impl))
 
 
   95    { impl_->update(std::move(
gridView)); }
 
 
  101    { 
return impl_->gridView(); }
 
 
  107    { 
return impl_->vertexMapper(); }
 
 
  113    { 
return impl_->elementMapper(); }
 
 
  119    { 
return impl_->vertexMapper(); }
 
 
  125    { 
return impl_->elementMapper(); }
 
 
  131    { 
return impl_->boundingBoxTree(); }
 
 
  137    { 
return impl_->elementMap(); }
 
 
  143    { 
return impl_->element(eIdx); }
 
 
  150    { 
return impl_->bBoxMin(); }
 
 
  157    { 
return impl_->bBoxMax(); }
 
 
  163    { 
return periodic_; }
 
 
  170    { periodic_ = value; }
 
 
  173    std::shared_ptr<BaseImplementation> impl_;
 
  176    bool periodic_ = 
false;
 
 
A basic implementation of a grid geometry with some common interfaces.
const ElementMapper & elementMapper() const
Returns the mapper for elements to indices for constant grids.
Definition basegridgeometry.hh:112
void setPeriodic(bool value=true)
Set the periodicity of the grid geometry.
Definition basegridgeometry.hh:169
typename BaseImplementation::GridView GridView
export the grid view type
Definition basegridgeometry.hh:60
typename BaseImplementation::GlobalCoordinate GlobalCoordinate
export the global coordinate type
Definition basegridgeometry.hh:62
typename BaseImplementation::ElementMapper ElementMapper
export the element mapper type
Definition basegridgeometry.hh:64
const GlobalCoordinate & bBoxMax() const
The coordinate of the corner of the GridView's bounding box with the largest values.
Definition basegridgeometry.hh:156
void update(GridView &&gridView)
Update all fvElementGeometries (call this after grid adaption)
Definition basegridgeometry.hh:94
Element element(GridIndexType eIdx) const
Get an element from a global element index.
Definition basegridgeometry.hh:142
typename BaseImplementation::Grid Grid
export the grid type
Definition basegridgeometry.hh:58
decltype(auto) boundingBoxTree() const
Returns the bounding box tree of the grid.
Definition basegridgeometry.hh:130
const VertexMapper & vertexMapper() const
Returns the mapper for vertices to indices for constant grids.
Definition basegridgeometry.hh:106
VertexMapper & vertexMapper()
Returns the mapper for vertices to indices for possibly adaptive grids.
Definition basegridgeometry.hh:118
const GridView & gridView() const
Definition basegridgeometry.hh:100
ElementMapper & elementMapper()
Returns the mapper for elements to indices for possibly adaptive grids.
Definition basegridgeometry.hh:124
void update(const GridView &gridView)
Update all fvElementGeometries (call this after grid adaption)
Definition basegridgeometry.hh:88
const GlobalCoordinate & bBoxMin() const
The coordinate of the corner of the GridView's bounding box with the smallest values.
Definition basegridgeometry.hh:149
bool isPeriodic() const
Returns if the grid geometry is periodic (at all)
Definition basegridgeometry.hh:162
decltype(auto) elementMap() const
Returns the element index to element map.
Definition basegridgeometry.hh:136
typename BaseImplementation::VertexMapper VertexMapper
export the vertex mapper type
Definition basegridgeometry.hh:66
An implementation of a grid geometry with some basic features.
Definition basicgridgeometry.hh:37
BaseGridGeometry(std::shared_ptr< BaseImplementation > impl)
Constructor from a BaseImplementation.
Definition basegridgeometry.hh:72
BaseGridGeometry(const GridView &gridView)
Constructor from a grid view.
Definition basegridgeometry.hh:81
Dune::Std::detected_or_t< Dumux::BasicGridGeometry< GV, typename T::ElementMapper, typename T::VertexMapper >, Detail::SpecifiesBaseGridGeometry, T > BasicGridGeometry_t
Type of the basic grid geometry implementation used as backend.
Definition basegridgeometry.hh:38
Free function to get the local view of a grid cache object.
Distance implementation details.
Definition cvfelocalresidual.hh:25
typename T::BasicGridGeometry SpecifiesBaseGridGeometry
Definition basegridgeometry.hh:27
typename T::GeometryHelper SpecifiesGeometryHelper
Definition basegridgeometry.hh:30
typename GridView::IndexSet::IndexType GridIndex
Definition indextraits.hh:27