version 3.11-dev
discretization/pq2/fvgridgeometry.hh
Go to the documentation of this file.
1// -*- mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
2// vi: set et ts=4 sw=4 sts=4:
3//
4// SPDX-FileCopyrightText: Copyright © DuMux Project contributors, see AUTHORS.md in root folder
5// SPDX-License-Identifier: GPL-3.0-or-later
6//
14#ifndef DUMUX_DISCRETIZATION_PQ2_GRID_GEOMETRY_HH
15#define DUMUX_DISCRETIZATION_PQ2_GRID_GEOMETRY_HH
16
17#include <array>
18#include <cstddef>
19#include <memory>
20#include <vector>
21#include <utility>
22#include <unordered_map>
23#include <type_traits>
24
25#include <dune/grid/common/mcmgmapper.hh>
26#include <dune/geometry/type.hh>
27
30
33
36
44
46
47namespace Dumux {
48
49namespace Detail {
50
51template<class GV, class T>
52using PQ2GeometryHelper_t = Dune::Std::detected_or_t<
53 std::conditional_t<enablesHybridCVFE<T>,
55 void // we currently only support hybrid schemes
56 >,
58 T
59>;
60} // end namespace Detail
61
62template <class GridView>
63struct PQ2MapperTraits :public DefaultMapperTraits<GridView>
64{
65 using DofMapper = Dune::MultipleCodimMultipleGeomTypeMapper<GridView>;
66
71 static Dune::MCMGLayout layout()
72 {
73 return [](Dune::GeometryType gt, int dimgrid) {
74 return (gt.dim() == 0) || (gt.dim() == 1)
75 || (gt.dim() == dimgrid && gt == Dune::GeometryTypes::cube(dimgrid))
76 || (dimgrid == 3 && gt == Dune::GeometryTypes::cube(dimgrid-1));
77 };
78 }
79};
80
85template<class GridView,
89 class IntersectionRule = Dumux::QuadratureRules::DuneQuadrature<4>>
91
98template<class GridView, class MapperTraits = PQ2MapperTraits<GridView>, class QuadratureTraits = PQ2QuadratureTraits<GridView>>
100: public MapperTraits, public QuadratureTraits
101{
104
105 template<class GridGeometry, bool enableCache>
107
108 using EnableHybridCVFE = std::true_type;
109
110 // The maximum values correspond to cubes
111 // This can be overwritten by the user when knowing the grid entity types
112 static constexpr std::size_t maxNumElementDofs = []()
113 {
114 if constexpr (GridView::dimension == 1)
115 return 3;
116 else if constexpr (GridView::dimension == 2)
117 return 9;
118 else if constexpr (GridView::dimension == 3)
119 return 27;
120 }();
121};
122
129template<class Scalar,
130 class GV,
131 bool enableCaching = true,
132 class Traits = PQ2DefaultGridGeometryTraits<GV>>
134: public BaseGridGeometry<GV, Traits>
135{
138 using GridIndexType = typename IndexTraits<GV>::GridIndex;
139 using LocalIndexType = typename IndexTraits<GV>::LocalIndex;
140
141 using Element = typename GV::template Codim<0>::Entity;
142 using CoordScalar = typename GV::ctype;
143 static const int dim = GV::dimension;
144 static const int dimWorld = GV::dimensionworld;
145
146 static_assert(dim > 1, "Only implemented for dim > 1");
147
148public:
152
153 static constexpr bool enableHybridCVFE = Detail::enablesHybridCVFE<Traits>;
154 static_assert(enableHybridCVFE, "Only hybrid scheme implemented for pq2");
155
156 static constexpr std::size_t maxNumElementDofs = Traits::maxNumElementDofs;
157
161 using LocalView = typename Traits::template LocalView<ThisType, true>;
163 using SubControlVolume = typename Traits::SubControlVolume;
165 using SubControlVolumeFace = typename Traits::SubControlVolumeFace;
169 using DofMapper = typename Traits::DofMapper;
173 using GridView = GV;
177 using ScvQuadratureRule = typename Traits::ScvQuadratureRule;
179 using ScvfQuadratureRule = typename Traits::ScvfQuadratureRule;
181 using ElementQuadratureRule = typename Traits::ElementQuadratureRule;
183 using IntersectionQuadratureRule = typename Traits::IntersectionQuadratureRule;
184
186 PQ2FVGridGeometry(std::shared_ptr<BasicGridGeometry> gg)
187 : ParentType(std::move(gg))
188 , dofMapper_(this->gridView(), Traits::layout())
189 , cache_(*this)
190 , periodicGridTraits_(this->gridView().grid())
191 {
192 update_();
193 }
194
197 : PQ2FVGridGeometry(std::make_shared<BasicGridGeometry>(gridView))
198 {}
199
201 const DofMapper& dofMapper() const
202 { return dofMapper_; }
203
205 std::size_t numScv() const
206 { return numScv_; }
207
209 std::size_t numScvf() const
210 { return numScvf_; }
211
213 std::size_t numBoundaryScvf() const
214 { return numBoundaryScvf_; }
215
217 std::size_t numDofs() const
218 { return this->dofMapper().size(); }
219
222 {
224 update_();
225 }
226
229 {
230 ParentType::update(std::move(gridView));
231 update_();
232 }
233
235 const FeCache& feCache() const
236 { return feCache_; }
237
239 bool dofOnBoundary(GridIndexType dofIdx) const
240 { return boundaryDofIndices_[dofIdx]; }
241
243 bool dofOnPeriodicBoundary(GridIndexType dofIdx) const
244 { return periodicDofMap_.count(dofIdx); }
245
247 GridIndexType periodicallyMappedDof(GridIndexType dofIdx) const
248 { return periodicDofMap_.at(dofIdx); }
249
251 const std::unordered_map<GridIndexType, GridIndexType>& periodicDofMap() const
252 { return periodicDofMap_; }
253
255 friend inline LocalView localView(const PQ2FVGridGeometry& gg)
256 { return { gg.cache_ }; }
257
258private:
259
260 class PQ2GridGeometryCache
261 {
262 friend class PQ2FVGridGeometry;
263 public:
265 using GeometryHelper = Detail::PQ2GeometryHelper_t<GV, Traits>;
266
267 explicit PQ2GridGeometryCache(const PQ2FVGridGeometry& gg)
268 : gridGeometry_(&gg)
269 {}
270
271 const PQ2FVGridGeometry& gridGeometry() const
272 { return *gridGeometry_; }
273
275 const std::vector<SubControlVolume>& scvs(GridIndexType eIdx) const
276 { return scvs_[eIdx]; }
277
279 const std::vector<SubControlVolumeFace>& scvfs(GridIndexType eIdx) const
280 { return scvfs_[eIdx]; }
281
283 bool hasBoundaryScvf(GridIndexType eIdx) const
284 { return hasBoundaryScvf_[eIdx]; }
285
287 const std::vector<std::array<LocalIndexType, 2>>& scvfBoundaryGeometryKeys(GridIndexType eIdx) const
288 { return scvfBoundaryGeometryKeys_.at(eIdx); }
289
290 private:
291 void clear_()
292 {
293 scvs_.clear();
294 scvfs_.clear();
295 hasBoundaryScvf_.clear();
296 scvfBoundaryGeometryKeys_.clear();
297 }
298
299 std::vector<std::vector<SubControlVolume>> scvs_;
300 std::vector<std::vector<SubControlVolumeFace>> scvfs_;
301 std::vector<bool> hasBoundaryScvf_;
302 std::unordered_map<GridIndexType, std::vector<std::array<LocalIndexType, 2>>> scvfBoundaryGeometryKeys_;
303
304 const PQ2FVGridGeometry* gridGeometry_;
305 };
306
307public:
310 using Cache = PQ2GridGeometryCache;
311
312private:
313 using GeometryHelper = typename Cache::GeometryHelper;
314
315 void update_()
316 {
317 cache_.clear_();
318 dofMapper_.update(this->gridView());
319
320 auto numElements = this->gridView().size(0);
321 cache_.scvs_.resize(numElements);
322 cache_.scvfs_.resize(numElements);
323 cache_.hasBoundaryScvf_.resize(numElements, false);
324
325 boundaryDofIndices_.assign(numDofs(), false);
326
327 numScv_ = 0;
328 numScvf_ = 0;
329 numBoundaryScvf_ = 0;
330
331 // Build the scvs and scv faces
332 for (const auto& element : elements(this->gridView()))
333 {
334 auto eIdx = this->elementMapper().index(element);
335
336 // get the element geometry
337 auto elementGeometry = element.geometry();
338
339 const auto& localCoefficients = this->feCache().get(element.type()).localCoefficients();
340
341 // instantiate the geometry helper
342 GeometryHelper geometryHelper(elementGeometry);
343
344 numScv_ += geometryHelper.numScv();
345 // construct the sub control volumes
346 cache_.scvs_[eIdx].resize(geometryHelper.numScv());
347
348 for (LocalIndexType keyIdx = 0; keyIdx < localCoefficients.size(); ++keyIdx)
349 {
350 const auto& localKey = localCoefficients.localKey(keyIdx);
351 // If the dof is a vertex, we construct scvs
352 if(localKey.codim() == dim)
353 {
354 const auto localIdx = localKey.subEntity();
355 // With the new localIdx, scvs can be constructed as for the Box method
356 auto corners = geometryHelper.getScvCorners(localIdx);
357 cache_.scvs_[eIdx][localIdx] = SubControlVolume(
358 geometryHelper.scvVolume(localIdx, corners),
359 geometryHelper.dofPosition(localKey),
360 Dumux::center(corners),
361 localIdx,
362 keyIdx,
363 eIdx,
364 geometryHelper.dofIndex(this->dofMapper(), element, localKey),
365 false
366 );
367 }
368 }
369
370 // construct the sub control volume faces, this is the same as for the Box method
371 const auto numInteriorScvfs = GeometryHelper::numInteriorScvf(elementGeometry.type());
372 numScvf_ += numInteriorScvfs;
373 cache_.scvfs_[eIdx].resize(numInteriorScvfs);
374 LocalIndexType scvfLocalIdx = 0;
375 for (; scvfLocalIdx < numInteriorScvfs; ++scvfLocalIdx)
376 {
377 const auto scvPair = geometryHelper.getScvPairForScvf(scvfLocalIdx);
378 const auto corners = geometryHelper.getScvfCorners(scvfLocalIdx);
379 const auto area = Dumux::convexPolytopeVolume<dim-1>(
380 geometryHelper.getInteriorScvfGeometryType(scvfLocalIdx),
381 [&](unsigned int i){ return corners[i]; }
382 );
383
384 cache_.scvfs_[eIdx][scvfLocalIdx] = SubControlVolumeFace(
385 Dumux::center(corners),
386 area,
387 geometryHelper.normal(corners, scvPair),
388 std::move(scvPair),
389 scvfLocalIdx,
390 geometryHelper.isOverlappingScvf(scvfLocalIdx)
391 );
392 }
393
394 // construct the sub control volume faces on the domain boundary
395 for (const auto& intersection : intersections(this->gridView(), element))
396 {
397 if (intersection.boundary() && !intersection.neighbor())
398 {
399 cache_.hasBoundaryScvf_[eIdx] = true;
400
401 const auto localFacetIndex = intersection.indexInInside();
402 const auto numBoundaryScvf = GeometryHelper::numBoundaryScvf(elementGeometry.type(), localFacetIndex);
403 numScvf_ += numBoundaryScvf;
404 numBoundaryScvf_ += numBoundaryScvf;
405
406 for (unsigned int isScvfLocalIdx = 0; isScvfLocalIdx < numBoundaryScvf; ++isScvfLocalIdx)
407 {
408 // find the scvs this scvf is belonging to
409 const auto scvPair = geometryHelper.getScvPairForBoundaryScvf(localFacetIndex, isScvfLocalIdx);
410 const auto corners = geometryHelper.getBoundaryScvfCorners(localFacetIndex, isScvfLocalIdx);
411 const auto area = Dumux::convexPolytopeVolume<dim-1>(
412 geometryHelper.getBoundaryScvfGeometryType(isScvfLocalIdx),
413 [&](unsigned int i){ return corners[i]; }
414 );
415 cache_.scvfs_[eIdx].emplace_back(
416 Dumux::center(corners),
417 area,
418 intersection.centerUnitOuterNormal(),
419 std::move(scvPair),
420 scvfLocalIdx,
421 typename SubControlVolumeFace::Traits::BoundaryFlag{ intersection },
422 geometryHelper.isOverlappingBoundaryScvf(localFacetIndex)
423 );
424
425 // store look-up map to construct boundary scvf geometries
426 cache_.scvfBoundaryGeometryKeys_[eIdx].emplace_back(std::array<LocalIndexType, 2>{{
427 static_cast<LocalIndexType>(localFacetIndex),
428 static_cast<LocalIndexType>(isScvfLocalIdx)
429 }});
430
431 // increment local counter
432 scvfLocalIdx++;
433 }
434
435 for (LocalIndexType keyIdx = 0; keyIdx < localCoefficients.size(); ++keyIdx)
436 {
437 if(GeometryHelper::localDofOnIntersection(elementGeometry.type(), intersection.indexInInside(), localCoefficients.localKey(keyIdx)))
438 {
439 const auto dofIdxGlobal = GeometryHelper::dofIndex(this->dofMapper(), element, localCoefficients.localKey(keyIdx));
440 boundaryDofIndices_[dofIdxGlobal] = true;
441 }
442 }
443 }
444
445 // inform the grid geometry if we have periodic boundaries
446 else if (periodicGridTraits_.isPeriodic(intersection))
447 {
448 this->setPeriodic();
449
450 // find the mapped periodic vertex of all vertices on periodic boundaries
451 const auto eps = 1e-7*(elementGeometry.corner(1) - elementGeometry.corner(0)).two_norm();
452 for (int localDofIdx = 0; localDofIdx < localCoefficients.size(); ++localDofIdx)
453 {
454 if(!GeometryHelper::localDofOnIntersection(elementGeometry.type(), intersection.indexInInside(), localCoefficients.localKey(localDofIdx)))
455 continue;
456
457 const auto dofIdxGlobal = GeometryHelper::dofIndex(this->dofMapper(), element, localCoefficients.localKey(localDofIdx));
458 const auto dofPos = geometryHelper.dofPosition(localCoefficients.localKey(localDofIdx));
459
460 const auto& outside = intersection.outside();
461 const auto outsideGeometry = outside.geometry();
462 const auto& localCoefficientsOut = this->feCache().get(outsideGeometry.type()).localCoefficients();
463 for (const auto& isOutside : intersections(this->gridView(), outside))
464 {
465 // only check periodic vertices of the periodic neighbor
466 if (isOutside.boundary() && isOutside.neighbor())
467 {
468 for (int localDofIdxOut = 0; localDofIdxOut < localCoefficientsOut.size(); ++localDofIdxOut)
469 {
470 const auto& localKeyOut = localCoefficientsOut.localKey(localDofIdxOut);
471 if(!GeometryHelper::localDofOnIntersection(outsideGeometry.type(), isOutside.indexInInside(), localKeyOut))
472 continue;
473
474 const auto dofIdxGlobalOut = GeometryHelper::dofIndex(this->dofMapper(), outside, localKeyOut);
475 const auto dofPosOutside = GeometryHelper::dofPosition(outsideGeometry, localKeyOut);
476 const auto shift = std::abs((this->bBoxMax()-this->bBoxMin())*intersection.centerUnitOuterNormal());
477 if (std::abs((dofPosOutside-dofPos).two_norm() - shift) < eps)
478 periodicDofMap_[dofIdxGlobal] = dofIdxGlobalOut;
479 }
480 }
481 }
482 }
483 }
484 }
485 }
486
487 // error check: periodic boundaries currently don't work for pq2 in parallel
488 if (this->isPeriodic() && this->gridView().comm().size() > 1)
489 DUNE_THROW(Dune::NotImplemented, "Periodic boundaries for pq2 method for parallel simulations!");
490 }
491
492 DofMapper dofMapper_;
493
494 const FeCache feCache_;
495
496 std::size_t numScv_;
497 std::size_t numScvf_;
498 std::size_t numBoundaryScvf_;
499
500 // dofs on the boundary
501 std::vector<bool> boundaryDofIndices_;
502
503 // a map for periodic boundary dofs
504 std::unordered_map<GridIndexType, GridIndexType> periodicDofMap_;
505
506 Cache cache_;
507
509};
510
511} // end namespace Dumux
512
513#endif
Base class for grid geometries.
Compute the center point of a convex polytope geometry or a random-access container of corner points.
Base class for all grid geometries.
Definition: basegridgeometry.hh:52
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
const GlobalCoordinate & bBoxMax() const
The coordinate of the corner of the GridView's bounding box with the largest values.
Definition: basegridgeometry.hh:156
Element element(GridIndexType eIdx) const
Get an element from a global element index.
Definition: basegridgeometry.hh:142
const GridView & gridView() const
Return the gridView this grid geometry object lives on.
Definition: basegridgeometry.hh:100
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
A class to create sub control volume and sub control volume face geometries per element.
Definition: discretization/pq2/geometryhelper.hh:50
Base class for the finite volume geometry vector for pq2 models This builds up the sub control volume...
Definition: discretization/pq2/fvelementgeometry.hh:47
Base class for the finite volume geometry vector for pq2 schemes This builds up the sub control volum...
Definition: discretization/pq2/fvgridgeometry.hh:135
typename Traits::DofMapper DofMapper
export dof mapper type
Definition: discretization/pq2/fvgridgeometry.hh:169
PQ2FVGridGeometry(const GridView &gridView)
Constructor.
Definition: discretization/pq2/fvgridgeometry.hh:196
std::size_t numScvf() const
The total number of sub control volume faces.
Definition: discretization/pq2/fvgridgeometry.hh:209
const DofMapper & dofMapper() const
The dofMapper.
Definition: discretization/pq2/fvgridgeometry.hh:201
typename Traits::IntersectionQuadratureRule IntersectionQuadratureRule
the quadrature rule type for intersections
Definition: discretization/pq2/fvgridgeometry.hh:183
bool dofOnBoundary(GridIndexType dofIdx) const
If a vertex / d.o.f. is on the boundary.
Definition: discretization/pq2/fvgridgeometry.hh:239
PQ2HierarchicalFECache< CoordScalar, Scalar, dim > FeCache
export the finite element cache type
Definition: discretization/pq2/fvgridgeometry.hh:171
typename Traits::ScvQuadratureRule ScvQuadratureRule
the quadrature rule type for scvs
Definition: discretization/pq2/fvgridgeometry.hh:177
const FeCache & feCache() const
The finite element cache for creating local FE bases.
Definition: discretization/pq2/fvgridgeometry.hh:235
void update(const GridView &gridView)
update all geometries (call this after grid adaption)
Definition: discretization/pq2/fvgridgeometry.hh:221
friend LocalView localView(const PQ2FVGridGeometry &gg)
local view of this object (constructed with the internal cache)
Definition: discretization/pq2/fvgridgeometry.hh:255
typename Traits::ElementQuadratureRule ElementQuadratureRule
the quadrature rule type for elements
Definition: discretization/pq2/fvgridgeometry.hh:181
static constexpr bool enableHybridCVFE
Definition: discretization/pq2/fvgridgeometry.hh:153
std::size_t numBoundaryScvf() const
The total number of boundary sub control volume faces.
Definition: discretization/pq2/fvgridgeometry.hh:213
std::size_t numScv() const
The total number of sub control volumes.
Definition: discretization/pq2/fvgridgeometry.hh:205
PQ2GridGeometryCache Cache
Definition: discretization/pq2/fvgridgeometry.hh:310
PQ2FVGridGeometry(std::shared_ptr< BasicGridGeometry > gg)
Constructor with basic grid geometry used to share state with another grid geometry on the same grid ...
Definition: discretization/pq2/fvgridgeometry.hh:186
typename Traits::ScvfQuadratureRule ScvfQuadratureRule
the quadrature rule type for scvfs
Definition: discretization/pq2/fvgridgeometry.hh:179
typename Traits::SubControlVolumeFace SubControlVolumeFace
export the type of sub control volume
Definition: discretization/pq2/fvgridgeometry.hh:165
void update(GridView &&gridView)
update all geometries (call this after grid adaption)
Definition: discretization/pq2/fvgridgeometry.hh:228
typename Traits::template LocalView< ThisType, true > LocalView
export the type of the fv element geometry (the local view type)
Definition: discretization/pq2/fvgridgeometry.hh:161
GridIndexType periodicallyMappedDof(GridIndexType dofIdx) const
The index of the vertex / d.o.f. on the other side of the periodic boundary.
Definition: discretization/pq2/fvgridgeometry.hh:247
static constexpr std::size_t maxNumElementDofs
Definition: discretization/pq2/fvgridgeometry.hh:156
const std::unordered_map< GridIndexType, GridIndexType > & periodicDofMap() const
Returns the map between dofs across periodic boundaries.
Definition: discretization/pq2/fvgridgeometry.hh:251
static constexpr DiscretizationMethod discMethod
Definition: discretization/pq2/fvgridgeometry.hh:151
BasicGridGeometry_t< GV, Traits > BasicGridGeometry
export basic grid geometry type for the alternative constructor
Definition: discretization/pq2/fvgridgeometry.hh:159
bool dofOnPeriodicBoundary(GridIndexType dofIdx) const
If a vertex / d.o.f. is on a periodic boundary.
Definition: discretization/pq2/fvgridgeometry.hh:243
GV GridView
export the grid view type
Definition: discretization/pq2/fvgridgeometry.hh:173
typename PeriodicGridTraits< typename GV::Grid >::SupportsPeriodicity SupportsPeriodicity
export whether the grid(geometry) supports periodicity
Definition: discretization/pq2/fvgridgeometry.hh:175
typename Traits::SubControlVolume SubControlVolume
export the type of sub control volume
Definition: discretization/pq2/fvgridgeometry.hh:163
std::size_t numDofs() const
The total number of degrees of freedom.
Definition: discretization/pq2/fvgridgeometry.hh:217
Extrusion_t< Traits > Extrusion
export the type of extrusion
Definition: discretization/pq2/fvgridgeometry.hh:167
Definition: pq2hierarchicalfecache.hh:29
const FiniteElementType & get(const Dune::GeometryType &gt) const
Get local finite element for given GeometryType.
Definition: pq2hierarchicalfecache.hh:44
Class for a sub control volume face in the cvfe method, i.e a part of the boundary of a sub control v...
Definition: discretization/pq2/subcontrolvolumeface.hh:58
the sub control volume for the pq2 scheme
Definition: discretization/pq2/subcontrolvolume.hh:55
Defines the default element and vertex mapper types.
Base class for the finite volume geometry vector for the pq1bubble method This builds up the sub cont...
Base class for the local finite volume geometry for the pq2 method This builds up the sub control vol...
Helper class constructing the dual grid finite volume geometries for the cvfe discretizazion method.
the sub control volume for the cvfe scheme
Base class for a sub control volume face.
Helper classes to compute the integration elements.
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:42
auto convexPolytopeVolume(Dune::GeometryType type, const CornerF &c)
Compute the volume of several common geometry types.
Definition: volume.hh:41
Corners::value_type center(const Corners &corners)
The center of a given list of corners.
Definition: center.hh:24
Defines the index types used for grid and local indices.
The available discretization methods in Dumux.
Dune::Std::detected_or_t< std::conditional_t< enablesHybridCVFE< T >, Dumux::HybridPQ2GeometryHelper< GV, typename T::SubControlVolume, typename T::SubControlVolumeFace >, void >, SpecifiesGeometryHelper, T > PQ2GeometryHelper_t
Definition: discretization/pq2/fvgridgeometry.hh:59
typename T::GeometryHelper SpecifiesGeometryHelper
Definition: basegridgeometry.hh:30
CVFE< CVFEMethods::PQ2 > PQ2
Definition: method.hh:118
Definition: adapt.hh:17
typename Extrusion< T >::type Extrusion_t
Convenience alias for obtaining the extrusion type.
Definition: extrusion.hh:166
std::ranges::range auto scvs(const FVElementGeometry &fvGeometry, const LocalDof &localDof)
Definition: localdof.hh:79
Grid properties related to periodicity.
A finite element cache for P2/Q2 hierarchical function spaces.
Quadrature rule traits for discretization schemes.
Definition: quadraturerules.hh:84
Definition: defaultmappertraits.hh:23
Definition: method.hh:46
Structure to define the index types used for grid and local indices.
Definition: indextraits.hh:26
The default traits for the pq2 finite volume grid geometry Defines the scv and scvf types and the map...
Definition: discretization/pq2/fvgridgeometry.hh:101
static constexpr std::size_t maxNumElementDofs
Definition: discretization/pq2/fvgridgeometry.hh:112
std::true_type EnableHybridCVFE
Definition: discretization/pq2/fvgridgeometry.hh:108
Definition: discretization/pq2/fvgridgeometry.hh:64
Dune::MultipleCodimMultipleGeomTypeMapper< GridView > DofMapper
Definition: discretization/pq2/fvgridgeometry.hh:65
static Dune::MCMGLayout layout()
layout for vertices and edges and elements (and faces in 3D) for the case of cubes
Definition: discretization/pq2/fvgridgeometry.hh:71
Definition: periodicgridtraits.hh:24
bool isPeriodic(const typename Grid::LeafIntersection &intersection) const
Definition: periodicgridtraits.hh:28
Dune-based quadrature rule with specified order.
Definition: quadraturerules.hh:66
Midpoint quadrature rule that uses scv/scvf centers.
Definition: quadraturerules.hh:58
Compute the volume of several common geometry types.