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#include <span>
25
26#include <dune/grid/common/mcmgmapper.hh>
27#include <dune/geometry/type.hh>
28#include <dune/localfunctions/lagrange/lagrangelfecache.hh>
29
31
34
37
46
48
49namespace Dumux {
50
51namespace Detail {
52
53template<class GV, class T>
54using PQ2GeometryHelper_t = Dune::Std::detected_or_t<
55 std::conditional_t<enablesHybridCVFE<T>,
57 void // we currently only support hybrid schemes
58 >,
60 T
61>;
62} // end namespace Detail
63
64template <class GridView>
65struct PQ2MapperTraits :public DefaultMapperTraits<GridView>
66{
67 using DofMapper = Dune::MultipleCodimMultipleGeomTypeMapper<GridView>;
68
73 static Dune::MCMGLayout layout()
74 {
75 return [](Dune::GeometryType gt, int dimgrid) {
76 return (gt.dim() == 0) || (gt.dim() == 1)
77 || (gt.dim() == dimgrid && gt == Dune::GeometryTypes::cube(dimgrid))
78 || (dimgrid == 3 && gt == Dune::GeometryTypes::cube(dimgrid-1));
79 };
80 }
81};
82
87template<class GridView,
91 class IntersectionRule = Dumux::QuadratureRules::DuneQuadrature<4>,
92 class BoundaryFaceRule = Dumux::QuadratureRules::DuneQuadrature<4>>
94
101template<class GridView, class MapperTraits = PQ2MapperTraits<GridView>, class QuadratureTraits = PQ2QuadratureTraits<GridView>>
103: public MapperTraits, public QuadratureTraits
104{
107
108 template<class GridGeometry, bool enableCache>
110
111 using EnableHybridCVFE = std::true_type;
112
113 // The maximum values correspond to cubes
114 // This can be overwritten by the user when knowing the grid entity types
115 static constexpr std::size_t maxNumElementDofs = []()
116 {
117 if constexpr (GridView::dimension == 1)
118 return 3;
119 else if constexpr (GridView::dimension == 2)
120 return 9;
121 else if constexpr (GridView::dimension == 3)
122 return 27;
123 }();
124};
125
132template<class Scalar,
133 class GV,
134 bool enableCaching = true,
135 class Traits = PQ2DefaultGridGeometryTraits<GV>>
137: public BaseGridGeometry<GV, Traits>
138{
141 using GridIndexType = typename IndexTraits<GV>::GridIndex;
142 using LocalIndexType = typename IndexTraits<GV>::LocalIndex;
143
144 using Element = typename GV::template Codim<0>::Entity;
145 using CoordScalar = typename GV::ctype;
146 static const int dim = GV::dimension;
147 static const int dimWorld = GV::dimensionworld;
148
149 static_assert(dim > 1, "Only implemented for dim > 1");
150
151public:
155
156 static constexpr bool enableHybridCVFE = Detail::enablesHybridCVFE<Traits>;
157 static_assert(enableHybridCVFE, "Only hybrid scheme implemented for pq2");
158
159 static constexpr std::size_t maxNumElementDofs = Traits::maxNumElementDofs;
160
164 using LocalView = typename Traits::template LocalView<ThisType, true>;
166 using SubControlVolume = typename Traits::SubControlVolume;
168 using SubControlVolumeFace = typename Traits::SubControlVolumeFace;
174 using DofMapper = typename Traits::DofMapper;
176 using FeCache = Dune::LagrangeLocalFiniteElementCache<CoordScalar, Scalar, dim, 2>;
178 using GridView = GV;
182 using ScvQuadratureRule = typename Traits::ScvQuadratureRule;
184 using ScvfQuadratureRule = typename Traits::ScvfQuadratureRule;
186 using ElementQuadratureRule = typename Traits::ElementQuadratureRule;
188 using IntersectionQuadratureRule = typename Traits::IntersectionQuadratureRule;
190 using BoundaryFaceQuadratureRule = typename Traits::BoundaryFaceQuadratureRule;
191
193 PQ2FVGridGeometry(std::shared_ptr<BasicGridGeometry> gg)
194 : ParentType(std::move(gg))
195 , dofMapper_(this->gridView(), Traits::layout())
196 , cache_(*this)
197 , periodicGridTraits_(this->gridView().grid())
198 {
199 update_();
200 }
201
204 : PQ2FVGridGeometry(std::make_shared<BasicGridGeometry>(gridView))
205 {}
206
208 const DofMapper& dofMapper() const
209 { return dofMapper_; }
210
212 std::size_t numScv() const
213 { return numScv_; }
214
216 std::size_t numScvf() const
217 { return numScvf_; }
218
220 std::size_t numBoundaryScvf() const
221 { return numBoundaryScvf_; }
222
224 std::size_t numDofs() const
225 { return this->dofMapper().size(); }
226
229 {
231 update_();
232 }
233
236 {
237 ParentType::update(std::move(gridView));
238 update_();
239 }
240
242 const FeCache& feCache() const
243 { return feCache_; }
244
246 bool dofOnBoundary(GridIndexType dofIdx) const
247 { return boundaryDofIndices_[dofIdx]; }
248
250 bool dofOnPeriodicBoundary(GridIndexType dofIdx) const
251 { return periodicDofMap_.count(dofIdx); }
252
254 GridIndexType periodicallyMappedDof(GridIndexType dofIdx) const
255 { return periodicDofMap_.at(dofIdx); }
256
258 const std::unordered_map<GridIndexType, GridIndexType>& periodicDofMap() const
259 { return periodicDofMap_; }
260
262 friend inline LocalView localView(const PQ2FVGridGeometry& gg)
263 { return { gg.cache_ }; }
264
265private:
266
267 class PQ2GridGeometryCache
268 {
269 friend class PQ2FVGridGeometry;
270 public:
272 using GeometryHelper = Detail::PQ2GeometryHelper_t<GV, Traits>;
273
274 explicit PQ2GridGeometryCache(const PQ2FVGridGeometry& gg)
275 : gridGeometry_(&gg)
276 {}
277
278 const PQ2FVGridGeometry& gridGeometry() const
279 { return *gridGeometry_; }
280
282 const std::vector<SubControlVolume>& scvs(GridIndexType eIdx) const
283 { return scvs_[eIdx]; }
284
286 const std::vector<SubControlVolumeFace>& scvfs(GridIndexType eIdx) const
287 { return scvfs_[eIdx]; }
288
290 bool hasBoundaryScvf(GridIndexType eIdx) const
291 { return hasBoundaryScvf_[eIdx]; }
292
294 const std::vector<std::array<LocalIndexType, 2>>& scvfBoundaryGeometryKeys(GridIndexType eIdx) const
295 { return scvfBoundaryGeometryKeys_.at(eIdx); }
296
298 auto boundaryFaces(GridIndexType eIdx) const -> std::span<const BoundaryFace>
299 {
300 if (auto it = boundaryFaces_.find(eIdx); it != boundaryFaces_.end())
301 return {it->second};
302 return {};
303 }
304
305 private:
306 void clear_()
307 {
308 scvs_.clear();
309 scvfs_.clear();
310 hasBoundaryScvf_.clear();
311 scvfBoundaryGeometryKeys_.clear();
312 boundaryFaces_.clear();
313 }
314
315 std::vector<std::vector<SubControlVolume>> scvs_;
316 std::vector<std::vector<SubControlVolumeFace>> scvfs_;
317 std::vector<bool> hasBoundaryScvf_;
318 std::unordered_map<GridIndexType, std::vector<std::array<LocalIndexType, 2>>> scvfBoundaryGeometryKeys_;
319 std::unordered_map<GridIndexType, Dune::ReservedVector<typename PQ2FVGridGeometry::BoundaryFace, 2*dim>> boundaryFaces_;
320
321 const PQ2FVGridGeometry* gridGeometry_;
322 };
323
324public:
327 using Cache = PQ2GridGeometryCache;
328
329private:
330 using GeometryHelper = typename Cache::GeometryHelper;
331
332 void update_()
333 {
334 cache_.clear_();
335 dofMapper_.update(this->gridView());
336
337 auto numElements = this->gridView().size(0);
338 cache_.scvs_.resize(numElements);
339 cache_.scvfs_.resize(numElements);
340 cache_.hasBoundaryScvf_.resize(numElements, false);
341
342 boundaryDofIndices_.assign(numDofs(), false);
343
344 numScv_ = 0;
345 numScvf_ = 0;
346 numBoundaryScvf_ = 0;
347
348 // Build the scvs and scv faces
349 for (const auto& element : elements(this->gridView()))
350 {
351 auto eIdx = this->elementMapper().index(element);
352
353 // get the element geometry
354 auto elementGeometry = element.geometry();
355
356 const auto& localCoefficients = this->feCache().get(element.type()).localCoefficients();
357
358 // instantiate the geometry helper
359 GeometryHelper geometryHelper(elementGeometry);
360
361 numScv_ += geometryHelper.numScv();
362 // construct the sub control volumes
363 cache_.scvs_[eIdx].resize(geometryHelper.numScv());
364
365 for (LocalIndexType keyIdx = 0; keyIdx < localCoefficients.size(); ++keyIdx)
366 {
367 const auto& localKey = localCoefficients.localKey(keyIdx);
368 // If the dof is a vertex, we construct scvs
369 if(localKey.codim() == dim)
370 {
371 const auto localIdx = localKey.subEntity();
372 // With the new localIdx, scvs can be constructed as for the Box method
373 auto corners = geometryHelper.getScvCorners(localIdx);
374 cache_.scvs_[eIdx][localIdx] = SubControlVolume(
375 geometryHelper.scvVolume(localIdx, corners),
376 geometryHelper.dofPosition(localKey),
377 Dumux::center(corners),
378 localIdx,
379 keyIdx,
380 eIdx,
381 geometryHelper.dofIndex(this->dofMapper(), element, localKey),
382 false
383 );
384 }
385 }
386
387 // construct the sub control volume faces, this is the same as for the Box method
388 const auto numInteriorScvfs = GeometryHelper::numInteriorScvf(elementGeometry.type());
389 numScvf_ += numInteriorScvfs;
390 cache_.scvfs_[eIdx].resize(numInteriorScvfs);
391 LocalIndexType scvfLocalIdx = 0;
392 for (; scvfLocalIdx < numInteriorScvfs; ++scvfLocalIdx)
393 {
394 const auto scvPair = geometryHelper.getScvPairForScvf(scvfLocalIdx);
395 const auto corners = geometryHelper.getScvfCorners(scvfLocalIdx);
396 const auto area = Dumux::convexPolytopeVolume<dim-1>(
397 geometryHelper.getInteriorScvfGeometryType(scvfLocalIdx),
398 [&](unsigned int i){ return corners[i]; }
399 );
400
401 cache_.scvfs_[eIdx][scvfLocalIdx] = SubControlVolumeFace(
402 Dumux::center(corners),
403 area,
404 geometryHelper.normal(corners, scvPair),
405 std::move(scvPair),
406 scvfLocalIdx,
407 geometryHelper.isOverlappingScvf(scvfLocalIdx)
408 );
409 }
410
411 // construct the sub control volume faces on the domain boundary
412 LocalIndexType numBoundaryFaces = 0;
413 for (const auto& intersection : intersections(this->gridView(), element))
414 {
415 if (intersection.boundary() && !intersection.neighbor())
416 {
417 cache_.hasBoundaryScvf_[eIdx] = true;
418
419 // add one boundary face per boundary intersection
420 const auto isGeometry = intersection.geometry();
421 cache_.boundaryFaces_[eIdx].push_back(BoundaryFace{
422 isGeometry.center(),
423 isGeometry.volume(),
424 intersection.centerUnitOuterNormal(),
425 numBoundaryFaces++,
426 static_cast<LocalIndexType>(intersection.indexInInside()),
427 typename BoundaryFace::Traits::BoundaryFlag{intersection}
428 });
429
430 const auto localFacetIndex = intersection.indexInInside();
431 const auto numBoundaryScvf = GeometryHelper::numBoundaryScvf(elementGeometry.type(), localFacetIndex);
432 numScvf_ += numBoundaryScvf;
433 numBoundaryScvf_ += numBoundaryScvf;
434
435 for (unsigned int isScvfLocalIdx = 0; isScvfLocalIdx < numBoundaryScvf; ++isScvfLocalIdx)
436 {
437 // find the scvs this scvf is belonging to
438 const auto scvPair = geometryHelper.getScvPairForBoundaryScvf(localFacetIndex, isScvfLocalIdx);
439 const auto corners = geometryHelper.getBoundaryScvfCorners(localFacetIndex, isScvfLocalIdx);
440 const auto area = Dumux::convexPolytopeVolume<dim-1>(
441 geometryHelper.getBoundaryScvfGeometryType(isScvfLocalIdx),
442 [&](unsigned int i){ return corners[i]; }
443 );
444 cache_.scvfs_[eIdx].emplace_back(
445 Dumux::center(corners),
446 area,
447 intersection.centerUnitOuterNormal(),
448 std::move(scvPair),
449 scvfLocalIdx,
450 typename SubControlVolumeFace::Traits::BoundaryFlag{ intersection },
451 geometryHelper.isOverlappingBoundaryScvf(localFacetIndex)
452 );
453
454 // store look-up map to construct boundary scvf geometries
455 cache_.scvfBoundaryGeometryKeys_[eIdx].emplace_back(std::array<LocalIndexType, 2>{{
456 static_cast<LocalIndexType>(localFacetIndex),
457 static_cast<LocalIndexType>(isScvfLocalIdx)
458 }});
459
460 // increment local counter
461 scvfLocalIdx++;
462 }
463
464 for (LocalIndexType keyIdx = 0; keyIdx < localCoefficients.size(); ++keyIdx)
465 {
466 if(GeometryHelper::localDofOnIntersection(elementGeometry.type(), intersection.indexInInside(), localCoefficients.localKey(keyIdx)))
467 {
468 const auto dofIdxGlobal = GeometryHelper::dofIndex(this->dofMapper(), element, localCoefficients.localKey(keyIdx));
469 boundaryDofIndices_[dofIdxGlobal] = true;
470 }
471 }
472 }
473
474 // inform the grid geometry if we have periodic boundaries
475 else if (periodicGridTraits_.isPeriodic(intersection))
476 {
477 this->setPeriodic();
478
479 // find the mapped periodic vertex of all vertices on periodic boundaries
480 const auto eps = 1e-7*(elementGeometry.corner(1) - elementGeometry.corner(0)).two_norm();
481 for (int localDofIdx = 0; localDofIdx < localCoefficients.size(); ++localDofIdx)
482 {
483 if(!GeometryHelper::localDofOnIntersection(elementGeometry.type(), intersection.indexInInside(), localCoefficients.localKey(localDofIdx)))
484 continue;
485
486 const auto dofIdxGlobal = GeometryHelper::dofIndex(this->dofMapper(), element, localCoefficients.localKey(localDofIdx));
487 const auto dofPos = geometryHelper.dofPosition(localCoefficients.localKey(localDofIdx));
488
489 const auto& outside = intersection.outside();
490 const auto outsideGeometry = outside.geometry();
491 const auto& localCoefficientsOut = this->feCache().get(outsideGeometry.type()).localCoefficients();
492 for (const auto& isOutside : intersections(this->gridView(), outside))
493 {
494 // only check periodic vertices of the periodic neighbor
495 if (isOutside.boundary() && isOutside.neighbor())
496 {
497 for (int localDofIdxOut = 0; localDofIdxOut < localCoefficientsOut.size(); ++localDofIdxOut)
498 {
499 const auto& localKeyOut = localCoefficientsOut.localKey(localDofIdxOut);
500 if(!GeometryHelper::localDofOnIntersection(outsideGeometry.type(), isOutside.indexInInside(), localKeyOut))
501 continue;
502
503 const auto dofIdxGlobalOut = GeometryHelper::dofIndex(this->dofMapper(), outside, localKeyOut);
504 const auto dofPosOutside = GeometryHelper::dofPosition(outsideGeometry, localKeyOut);
505 const auto shift = std::abs((this->bBoxMax()-this->bBoxMin())*intersection.centerUnitOuterNormal());
506 if (std::abs((dofPosOutside-dofPos).two_norm() - shift) < eps)
507 periodicDofMap_[dofIdxGlobal] = dofIdxGlobalOut;
508 }
509 }
510 }
511 }
512 }
513 }
514 }
515
516 // error check: periodic boundaries currently don't work for pq2 in parallel
517 if (this->isPeriodic() && this->gridView().comm().size() > 1)
518 DUNE_THROW(Dune::NotImplemented, "Periodic boundaries for pq2 method for parallel simulations!");
519 }
520
521 DofMapper dofMapper_;
522
523 const FeCache feCache_;
524
525 std::size_t numScv_;
526 std::size_t numScvf_;
527 std::size_t numBoundaryScvf_;
528
529 // dofs on the boundary
530 std::vector<bool> boundaryDofIndices_;
531
532 // a map for periodic boundary dofs
533 std::unordered_map<GridIndexType, GridIndexType> periodicDofMap_;
534
535 Cache cache_;
536
538};
539
540} // end namespace Dumux
541
542#endif
Base class for grid geometries.
Implementation of a boundary face related to primary grid elements (dune intersections)
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
Class for a boundary face related to primary grid elements (dune intersections)
Definition: boundaryface.hh:69
const GlobalPosition & center() const
The center of the face.
Definition: boundaryface.hh:103
A class to create sub control volume and sub control volume face geometries per element.
Definition: discretization/pq2/geometryhelper.hh:51
Base class for the finite volume geometry vector for pq2 models This builds up the sub control volume...
Definition: discretization/pq2/fvelementgeometry.hh:48
Base class for the finite volume geometry vector for pq2 schemes This builds up the sub control volum...
Definition: discretization/pq2/fvgridgeometry.hh:138
Dune::LagrangeLocalFiniteElementCache< CoordScalar, Scalar, dim, 2 > FeCache
export the finite element cache type
Definition: discretization/pq2/fvgridgeometry.hh:176
typename Traits::DofMapper DofMapper
export dof mapper type
Definition: discretization/pq2/fvgridgeometry.hh:174
PQ2FVGridGeometry(const GridView &gridView)
Constructor.
Definition: discretization/pq2/fvgridgeometry.hh:203
std::size_t numScvf() const
The total number of sub control volume faces.
Definition: discretization/pq2/fvgridgeometry.hh:216
const DofMapper & dofMapper() const
The dofMapper.
Definition: discretization/pq2/fvgridgeometry.hh:208
typename Traits::IntersectionQuadratureRule IntersectionQuadratureRule
the quadrature rule type for intersections
Definition: discretization/pq2/fvgridgeometry.hh:188
bool dofOnBoundary(GridIndexType dofIdx) const
If a vertex / d.o.f. is on the boundary.
Definition: discretization/pq2/fvgridgeometry.hh:246
typename Traits::BoundaryFaceQuadratureRule BoundaryFaceQuadratureRule
the quadrature rule type for boundary faces
Definition: discretization/pq2/fvgridgeometry.hh:190
typename Traits::ScvQuadratureRule ScvQuadratureRule
the quadrature rule type for scvs
Definition: discretization/pq2/fvgridgeometry.hh:182
const FeCache & feCache() const
The finite element cache for creating local FE bases.
Definition: discretization/pq2/fvgridgeometry.hh:242
void update(const GridView &gridView)
update all geometries (call this after grid adaption)
Definition: discretization/pq2/fvgridgeometry.hh:228
friend LocalView localView(const PQ2FVGridGeometry &gg)
local view of this object (constructed with the internal cache)
Definition: discretization/pq2/fvgridgeometry.hh:262
typename Traits::ElementQuadratureRule ElementQuadratureRule
the quadrature rule type for elements
Definition: discretization/pq2/fvgridgeometry.hh:186
static constexpr bool enableHybridCVFE
Definition: discretization/pq2/fvgridgeometry.hh:156
std::size_t numBoundaryScvf() const
The total number of boundary sub control volume faces.
Definition: discretization/pq2/fvgridgeometry.hh:220
std::size_t numScv() const
The total number of sub control volumes.
Definition: discretization/pq2/fvgridgeometry.hh:212
PQ2GridGeometryCache Cache
Definition: discretization/pq2/fvgridgeometry.hh:327
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:193
typename Traits::ScvfQuadratureRule ScvfQuadratureRule
the quadrature rule type for scvfs
Definition: discretization/pq2/fvgridgeometry.hh:184
typename Traits::SubControlVolumeFace SubControlVolumeFace
export the type of sub control volume
Definition: discretization/pq2/fvgridgeometry.hh:168
void update(GridView &&gridView)
update all geometries (call this after grid adaption)
Definition: discretization/pq2/fvgridgeometry.hh:235
typename Traits::template LocalView< ThisType, true > LocalView
export the type of the fv element geometry (the local view type)
Definition: discretization/pq2/fvgridgeometry.hh:164
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:254
static constexpr std::size_t maxNumElementDofs
Definition: discretization/pq2/fvgridgeometry.hh:159
const std::unordered_map< GridIndexType, GridIndexType > & periodicDofMap() const
Returns the map between dofs across periodic boundaries.
Definition: discretization/pq2/fvgridgeometry.hh:258
static constexpr DiscretizationMethod discMethod
Definition: discretization/pq2/fvgridgeometry.hh:154
BasicGridGeometry_t< GV, Traits > BasicGridGeometry
export basic grid geometry type for the alternative constructor
Definition: discretization/pq2/fvgridgeometry.hh:162
bool dofOnPeriodicBoundary(GridIndexType dofIdx) const
If a vertex / d.o.f. is on a periodic boundary.
Definition: discretization/pq2/fvgridgeometry.hh:250
GV GridView
export the grid view type
Definition: discretization/pq2/fvgridgeometry.hh:178
typename PeriodicGridTraits< typename GV::Grid >::SupportsPeriodicity SupportsPeriodicity
export whether the grid(geometry) supports periodicity
Definition: discretization/pq2/fvgridgeometry.hh:180
typename Traits::SubControlVolume SubControlVolume
export the type of sub control volume
Definition: discretization/pq2/fvgridgeometry.hh:166
std::size_t numDofs() const
The total number of degrees of freedom.
Definition: discretization/pq2/fvgridgeometry.hh:224
Extrusion_t< Traits > Extrusion
export the type of extrusion
Definition: discretization/pq2/fvgridgeometry.hh:172
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:61
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:236
std::ranges::range auto scvs(const FVElementGeometry &fvGeometry, const LocalDof &localDof)
Definition: localdof.hh:79
Grid properties related to periodicity.
Quadrature rule traits for discretization schemes.
Definition: quadraturerules.hh:85
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:104
static constexpr std::size_t maxNumElementDofs
Definition: discretization/pq2/fvgridgeometry.hh:115
std::true_type EnableHybridCVFE
Definition: discretization/pq2/fvgridgeometry.hh:111
Definition: discretization/pq2/fvgridgeometry.hh:66
Dune::MultipleCodimMultipleGeomTypeMapper< GridView > DofMapper
Definition: discretization/pq2/fvgridgeometry.hh:67
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:73
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.