24#ifndef DUMUX_DISCRETIZATION_BASE_GRID_GEOMETRY_HH
25#define DUMUX_DISCRETIZATION_BASE_GRID_GEOMETRY_HH
28#include <dune/common/std/type_traits.hh>
46template<
class GV,
class T>
59template<
class GV,
class Traits>
63 using Element =
typename GV::template Codim<0>::Entity;
67 using Grid =
typename BaseImplementation::Grid;
69 using GridView =
typename BaseImplementation::GridView;
82 : impl_(std::move(impl))
104 { impl_->update(std::move(
gridView)); }
110 {
return impl_->gridView(); }
116 {
return impl_->vertexMapper(); }
122 {
return impl_->elementMapper(); }
128 {
return impl_->vertexMapper(); }
134 {
return impl_->elementMapper(); }
140 {
return impl_->boundingBoxTree(); }
146 {
return impl_->elementMap(); }
152 {
return impl_->element(eIdx); }
159 {
return impl_->bBoxMin(); }
166 {
return impl_->bBoxMax(); }
172 {
return periodic_; }
179 { periodic_ = value; }
182 std::shared_ptr<BaseImplementation> impl_;
185 bool periodic_ =
false;
Defines the index types used for grid and local indices.
Free function to get the local view of a grid cache object.
A basic implementation of a grid geometry with some common interfaces.
BaseGridGeometry(std::shared_ptr< BaseImplementation > impl)
Constructor from a BaseImplementation.
Definition: basegridgeometry.hh:81
BaseGridGeometry(const GridView &gridView)
Constructor from a grid view.
Definition: basegridgeometry.hh:90
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:51
Adaption of the non-isothermal two-phase two-component flow model to problems with CO2.
Definition: adapt.hh:29
typename T::BasicGridGeometry SpecifiesBaseGridGeometry
Definition: basegridgeometry.hh:39
Structure to define the index types used for grid and local indices.
Definition: indextraits.hh:38
Base class for all grid geometries.
Definition: basegridgeometry.hh:61
const ElementMapper & elementMapper() const
Returns the mapper for elements to indices for constant grids.
Definition: basegridgeometry.hh:121
void setPeriodic(bool value=true)
Set the periodicity of the grid geometry.
Definition: basegridgeometry.hh:178
typename BaseImplementation::GridView GridView
export the grid view type
Definition: basegridgeometry.hh:69
typename BaseImplementation::GlobalCoordinate GlobalCoordinate
export the global coordinate type
Definition: basegridgeometry.hh:71
typename BaseImplementation::ElementMapper ElementMapper
export the element mapper type
Definition: basegridgeometry.hh:73
const GlobalCoordinate & bBoxMax() const
The coordinate of the corner of the GridView's bounding box with the largest values.
Definition: basegridgeometry.hh:165
void update(GridView &&gridView)
Update all fvElementGeometries (call this after grid adaption)
Definition: basegridgeometry.hh:103
Element element(GridIndexType eIdx) const
Get an element from a global element index.
Definition: basegridgeometry.hh:151
typename BaseImplementation::Grid Grid
export the grid type
Definition: basegridgeometry.hh:67
decltype(auto) boundingBoxTree() const
Returns the bounding box tree of the grid.
Definition: basegridgeometry.hh:139
const VertexMapper & vertexMapper() const
Returns the mapper for vertices to indices for constant grids.
Definition: basegridgeometry.hh:115
VertexMapper & vertexMapper()
Returns the mapper for vertices to indices for possibly adaptive grids.
Definition: basegridgeometry.hh:127
const GridView & gridView() const
Return the gridView this grid geometry object lives on.
Definition: basegridgeometry.hh:109
ElementMapper & elementMapper()
Returns the mapper for elements to indices for possibly adaptive grids.
Definition: basegridgeometry.hh:133
void update(const GridView &gridView)
Update all fvElementGeometries (call this after grid adaption)
Definition: basegridgeometry.hh:97
const GlobalCoordinate & bBoxMin() const
The coordinate of the corner of the GridView's bounding box with the smallest values.
Definition: basegridgeometry.hh:158
bool isPeriodic() const
Returns if the grid geometry is periodic (at all)
Definition: basegridgeometry.hh:171
decltype(auto) elementMap() const
Returns the element index to element map.
Definition: basegridgeometry.hh:145
typename BaseImplementation::VertexMapper VertexMapper
export the vertex mapper type
Definition: basegridgeometry.hh:75
An implementation of a grid geometry with some basic features.
Definition: basicgridgeometry.hh:49