version 3.11-dev
Loading...
Searching...
No Matches
discretization/pq3/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_PQ3_GRID_GEOMETRY_HH
15#define DUMUX_DISCRETIZATION_PQ3_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#include <ranges>
26
27#include <dune/grid/common/mcmgmapper.hh>
28#include <dune/geometry/type.hh>
29#include <dune/localfunctions/lagrange/lagrangelfecache.hh>
30
39// Reuse PQ2 SCV/SCVF/FVElementGeometry (all templated, work for any GG)
47
48namespace Dumux {
49
50// Reuse PQ2 SCV/SCVF types under PQ3 aliases
51template<class GV>
53
54template<class GV>
56
57// FVElementGeometry reused from PQ2 (it's fully templated on the grid geometry)
58template<class GG, bool enableCache>
60
61namespace Detail {
62
63template<class GV, class T>
64using PQ3GeometryHelper_t = Dune::Std::detected_or_t<
65 std::conditional_t<enablesHybridCVFE<T>,
67 void
68 >,
70 T
71>;
72
73} // end namespace Detail
74
81template<class GV>
83{
84 using DofMapper = Dune::MultipleCodimMultipleGeomTypeMapper<GV>;
85
86 static Dune::MCMGLayout layout()
87 {
88 return [](Dune::GeometryType gt, int /*dimgrid*/) -> std::size_t {
89 if (gt.dim() == 0) return 1; // vertices: 1 DOF each
90 if (gt.dim() == 1) return 2; // edges: 2 interior DOFs (order 3)
91 if (gt.dim() == 2) {
92 if (gt == Dune::GeometryTypes::cube(2)) return 4; // quad: 4 interior DOFs
93 if (gt == Dune::GeometryTypes::simplex(2)) return 1; // triangle: 1 interior DOF
94 }
95 if (gt.dim() == 3) {
96 if (gt == Dune::GeometryTypes::cube(3)) return 8; // hex: 8 interior DOFs
97 // simplex (tet): 0 interior DOFs for P3
98 }
99 return 0;
100 };
101 }
102};
103
108template<class GridView,
112 class IntersectionRule = Dumux::QuadratureRules::DuneQuadrature<6>,
113 class BoundaryFaceRule = Dumux::QuadratureRules::DuneQuadrature<6>>
115
120template<class GridView,
121 class MapperTraits = PQ3MapperTraits<GridView>,
122 class QuadratureTraits = PQ3QuadratureTraits<GridView>>
124: public MapperTraits, public QuadratureTraits
125{
128
129 template<class GridGeometry, bool enableCache>
131
132 using EnableHybridCVFE = std::true_type;
133
134 // Maximum number of element-local DOFs (for cubes, order 3)
135 static constexpr std::size_t maxNumElementDofs = []()
136 {
137 if constexpr (GridView::dimension == 1)
138 return 4; // Q3 interval: 2 vertices + 2 edge interior
139 else if constexpr (GridView::dimension == 2)
140 return 16; // Q3 quad: 4 vertices + 8 edge + 4 interior
141 else if constexpr (GridView::dimension == 3)
142 return 64; // Q3 hex: 8 vertices + 24 edge + 24 face + 8 interior
143 }();
144};
145
153template<class Scalar,
154 class GV,
155 bool enableCaching = true,
156 class Traits = PQ3DefaultGridGeometryTraits<GV>>
158: public BaseGridGeometry<GV, Traits>
159{
161 using ParentType = BaseGridGeometry<GV, Traits>;
162 using GridIndexType = typename IndexTraits<GV>::GridIndex;
163 using LocalIndexType = typename IndexTraits<GV>::LocalIndex;
164
165 using Element = typename GV::template Codim<0>::Entity;
166 using CoordScalar = typename GV::ctype;
167 static const int dim = GV::dimension;
168 static const int dimWorld = GV::dimensionworld;
169
170public:
174
176 static_assert(enableHybridCVFE, "Only hybrid scheme implemented for pq3");
177
178 static constexpr std::size_t maxNumElementDofs = Traits::maxNumElementDofs;
179
183 using LocalView = typename Traits::template LocalView<ThisType, true>;
185 using SubControlVolume = typename Traits::SubControlVolume;
187 using SubControlVolumeFace = typename Traits::SubControlVolumeFace;
193 using DofMapper = typename Traits::DofMapper;
195 using FeCache = Dune::LagrangeLocalFiniteElementCache<CoordScalar, Scalar, dim, 3>;
197 using GridView = GV;
201 using ScvQuadratureRule = typename Traits::ScvQuadratureRule;
202 using ScvfQuadratureRule = typename Traits::ScvfQuadratureRule;
203 using ElementQuadratureRule = typename Traits::ElementQuadratureRule;
204 using IntersectionQuadratureRule = typename Traits::IntersectionQuadratureRule;
205 using BoundaryFaceQuadratureRule = typename Traits::BoundaryFaceQuadratureRule;
206
208 PQ3FVGridGeometry(std::shared_ptr<BasicGridGeometry> gg)
209 : ParentType(std::move(gg))
210 , dofMapper_(this->gridView(), Traits::layout())
211 , cache_(*this)
212 , periodicGridTraits_(this->gridView().grid())
213 {
214 update_();
215 }
216
221
222 const DofMapper& dofMapper() const
223 { return dofMapper_; }
224
225 std::size_t numScv() const
226 { return numScv_; }
227
228 std::size_t numScvf() const
229 { return numScvf_; }
230
231 std::size_t numBoundaryScvf() const
232 { return numBoundaryScvf_; }
233
234 std::size_t numDofs() const
235 { return this->dofMapper().size(); }
236
238 {
240 update_();
241 }
242
244 {
245 ParentType::update(std::move(gridView));
246 update_();
247 }
248
249 const FeCache& feCache() const
250 { return feCache_; }
251
256 template<class LocalKey>
257 auto dofIndex(const Element& element, const LocalKey& localKey) const
258 { return Detail::PQ3GeometryHelper_t<GV, Traits>::DofHelper::dofIndex(dofMapper_, element, localKey, this->gridView().grid().globalIdSet()); }
259
260 bool dofOnBoundary(GridIndexType dofIdx) const
261 { return boundaryDofIndices_[dofIdx]; }
262
263 bool dofOnPeriodicBoundary(GridIndexType dofIdx) const
264 { return periodicDofMap_.count(dofIdx); }
265
266 [[deprecated("Will be removed after release 3.11. Use periodicallyMappedDofs, returning a range of dofs")]]
267 GridIndexType periodicallyMappedDof(GridIndexType dofIdx) const
268 { return periodicDofMap_.at(dofIdx)[0]; }
269
270 const std::ranges::range auto periodicallyMappedDofs(GridIndexType dofIdx) const
271 { return std::views::all(periodicDofMap_.at(dofIdx)); }
272
273 const std::unordered_map<GridIndexType, std::vector<GridIndexType>>& periodicDofMap() const
274 { return periodicDofMap_; }
275
276 friend inline LocalView localView(const PQ3FVGridGeometry& gg)
277 { return { gg.cache_ }; }
278
279private:
280
281 class PQ3GridGeometryCache
282 {
283 friend class PQ3FVGridGeometry;
284 public:
285 using GeometryHelper = Detail::PQ3GeometryHelper_t<GV, Traits>;
286 using DofHelper = GeometryHelper::DofHelper;
287
288 explicit PQ3GridGeometryCache(const PQ3FVGridGeometry& gg)
289 : gridGeometry_(&gg)
290 {}
291
292 const PQ3FVGridGeometry& gridGeometry() const
293 { return *gridGeometry_; }
294
295 const std::vector<SubControlVolume>& scvs(GridIndexType eIdx) const
296 { return scvs_[eIdx]; }
297
298 const std::vector<SubControlVolumeFace>& scvfs(GridIndexType eIdx) const
299 { return scvfs_[eIdx]; }
300
301 bool hasBoundaryScvf(GridIndexType eIdx) const
302 { return hasBoundaryScvf_[eIdx]; }
303
304 const std::vector<std::array<LocalIndexType, 2>>& scvfBoundaryGeometryKeys(GridIndexType eIdx) const
305 { return scvfBoundaryGeometryKeys_.at(eIdx); }
306
307 auto boundaryFaces(GridIndexType eIdx) const -> std::span<const BoundaryFace>
308 {
309 if (auto it = boundaryFaces_.find(eIdx); it != boundaryFaces_.end())
310 return {it->second};
311 return {};
312 }
313
314 const auto& boundaryFaceScvfRanges(GridIndexType eIdx) const
315 { return boundaryFaceScvfRanges_.at(eIdx); }
316
317 private:
318 void clear_()
319 {
320 scvs_.clear();
321 scvfs_.clear();
322 hasBoundaryScvf_.clear();
323 scvfBoundaryGeometryKeys_.clear();
324 boundaryFaces_.clear();
325 boundaryFaceScvfRanges_.clear();
326 }
327
328 std::vector<std::vector<SubControlVolume>> scvs_;
329 std::vector<std::vector<SubControlVolumeFace>> scvfs_;
330 std::vector<bool> hasBoundaryScvf_;
331 std::unordered_map<GridIndexType, std::vector<std::array<LocalIndexType, 2>>> scvfBoundaryGeometryKeys_;
332 std::unordered_map<GridIndexType, Dune::ReservedVector<typename PQ3FVGridGeometry::BoundaryFace, 2*dim>> boundaryFaces_;
333 std::unordered_map<GridIndexType, Dune::ReservedVector<std::array<LocalIndexType, 2>, 2*dim>> boundaryFaceScvfRanges_;
334
335 const PQ3FVGridGeometry* gridGeometry_;
336 };
337
338public:
339 using Cache = PQ3GridGeometryCache;
340
341private:
342 using GeometryHelper = typename Cache::GeometryHelper;
343 using DofHelper = typename GeometryHelper::DofHelper;
344
345 void update_()
346 {
347 cache_.clear_();
348 dofMapper_.update(this->gridView());
349
350 const auto& gidSet = this->gridView().grid().globalIdSet();
351
352 auto numElements = this->gridView().size(0);
353 cache_.scvs_.resize(numElements);
354 cache_.scvfs_.resize(numElements);
355 cache_.hasBoundaryScvf_.resize(numElements, false);
356
357 boundaryDofIndices_.assign(numDofs(), false);
358 periodicDofMap_.clear();
359
360 numScv_ = 0;
361 numScvf_ = 0;
362 numBoundaryScvf_ = 0;
363
364 for (const auto& element : elements(this->gridView()))
365 {
366 auto eIdx = this->elementMapper().index(element);
367 auto elementGeometry = element.geometry();
368 const auto& localCoefficients = this->feCache().get(element.type()).localCoefficients();
369
370 GeometryHelper geometryHelper(elementGeometry);
371
372 numScv_ += geometryHelper.numScv();
373 cache_.scvs_[eIdx].resize(geometryHelper.numScv());
374
375 for (LocalIndexType keyIdx = 0; keyIdx < localCoefficients.size(); ++keyIdx)
376 {
377 const auto& localKey = localCoefficients.localKey(keyIdx);
378 if (localKey.codim() == dim)
379 {
380 const auto localIdx = localKey.subEntity();
381 auto corners = geometryHelper.getScvCorners(localIdx);
382 cache_.scvs_[eIdx][localIdx] = SubControlVolume(
383 geometryHelper.scvVolume(localIdx, corners),
384 DofHelper::dofPosition(elementGeometry, localKey),
385 Dumux::center(corners),
386 localIdx,
387 keyIdx,
388 eIdx,
389 DofHelper::dofIndex(this->dofMapper(), element, localKey, gidSet),
390 false
391 );
392 }
393 }
394
395 const auto numInteriorScvfs = GeometryHelper::numInteriorScvf(elementGeometry.type());
396 numScvf_ += numInteriorScvfs;
397 cache_.scvfs_[eIdx].resize(numInteriorScvfs);
398 LocalIndexType scvfLocalIdx = 0;
399 for (; scvfLocalIdx < numInteriorScvfs; ++scvfLocalIdx)
400 {
401 const auto scvPair = geometryHelper.getScvPairForScvf(scvfLocalIdx);
402 const auto corners = geometryHelper.getScvfCorners(scvfLocalIdx);
403 const auto area = Dumux::convexPolytopeVolume<dim-1>(
404 geometryHelper.getInteriorScvfGeometryType(scvfLocalIdx),
405 [&](unsigned int i){ return corners[i]; }
406 );
407
408 cache_.scvfs_[eIdx][scvfLocalIdx] = SubControlVolumeFace(
409 Dumux::center(corners),
410 area,
411 geometryHelper.normal(corners, scvPair),
412 std::move(scvPair),
413 scvfLocalIdx,
414 geometryHelper.isOverlappingScvf(scvfLocalIdx)
415 );
416 }
417
418 LocalIndexType numBoundaryFaces = 0;
419 for (const auto& intersection : intersections(this->gridView(), element))
420 {
421 if (intersection.boundary() && !intersection.neighbor())
422 {
423 cache_.hasBoundaryScvf_[eIdx] = true;
424
425 const auto isGeometry = intersection.geometry();
426 cache_.boundaryFaces_[eIdx].push_back(BoundaryFace{
427 isGeometry.center(),
428 isGeometry.volume(),
429 intersection.centerUnitOuterNormal(),
430 numBoundaryFaces++,
431 static_cast<LocalIndexType>(intersection.indexInInside()),
432 typename BoundaryFace::Traits::BoundaryFlag{intersection}
433 });
434
435 const auto localFacetIndex = intersection.indexInInside();
436 const auto numBoundaryScvf = GeometryHelper::numBoundaryScvf(elementGeometry.type(), localFacetIndex);
437 numScvf_ += numBoundaryScvf;
438 numBoundaryScvf_ += numBoundaryScvf;
439
440 cache_.boundaryFaceScvfRanges_[eIdx].push_back(std::array<LocalIndexType, 2>{{
441 scvfLocalIdx,
442 static_cast<LocalIndexType>(numBoundaryScvf)
443 }});
444
445 for (unsigned int isScvfLocalIdx = 0; isScvfLocalIdx < numBoundaryScvf; ++isScvfLocalIdx)
446 {
447 const auto scvPair = geometryHelper.getScvPairForBoundaryScvf(localFacetIndex, isScvfLocalIdx);
448 const auto corners = geometryHelper.getBoundaryScvfCorners(localFacetIndex, isScvfLocalIdx);
449 const auto area = Dumux::convexPolytopeVolume<dim-1>(
450 geometryHelper.getBoundaryScvfGeometryType(isScvfLocalIdx),
451 [&](unsigned int i){ return corners[i]; }
452 );
453 cache_.scvfs_[eIdx].emplace_back(
454 Dumux::center(corners),
455 area,
456 intersection.centerUnitOuterNormal(),
457 std::move(scvPair),
458 scvfLocalIdx,
459 typename SubControlVolumeFace::Traits::BoundaryFlag{ intersection },
460 geometryHelper.isOverlappingBoundaryScvf(localFacetIndex)
461 );
462
463 cache_.scvfBoundaryGeometryKeys_[eIdx].emplace_back(std::array<LocalIndexType, 2>{{
464 static_cast<LocalIndexType>(localFacetIndex),
465 static_cast<LocalIndexType>(isScvfLocalIdx)
466 }});
467
468 scvfLocalIdx++;
469 }
470
471 for (LocalIndexType keyIdx = 0; keyIdx < localCoefficients.size(); ++keyIdx)
472 {
473 if (DofHelper::localDofOnIntersection(elementGeometry.type(), intersection.indexInInside(), localCoefficients.localKey(keyIdx)))
474 {
475 const auto dofIdxGlobal = DofHelper::dofIndex(this->dofMapper(), element, localCoefficients.localKey(keyIdx), gidSet);
476 boundaryDofIndices_[dofIdxGlobal] = true;
477 }
478 }
479 }
480
481 else if (periodicGridTraits_.isPeriodic(intersection))
482 {
483 this->setPeriodic();
484
485 const auto eps = 1e-7*(elementGeometry.corner(1) - elementGeometry.corner(0)).two_norm();
486 for (int localDofIdx = 0; localDofIdx < localCoefficients.size(); ++localDofIdx)
487 {
488 if (!DofHelper::localDofOnIntersection(elementGeometry.type(), intersection.indexInInside(), localCoefficients.localKey(localDofIdx)))
489 continue;
490
491 const auto dofIdxGlobal = DofHelper::dofIndex(this->dofMapper(), element, localCoefficients.localKey(localDofIdx), gidSet);
492 const auto dofPos = DofHelper::dofPosition(elementGeometry, localCoefficients.localKey(localDofIdx));
493
494 const auto& outside = intersection.outside();
495 const auto outsideGeometry = outside.geometry();
496 const auto& localCoefficientsOut = this->feCache().get(outsideGeometry.type()).localCoefficients();
497 for (const auto& isOutside : intersections(this->gridView(), outside))
498 {
499 if (periodicGridTraits_.isPeriodic(isOutside))
500 {
501 for (int localDofIdxOut = 0; localDofIdxOut < localCoefficientsOut.size(); ++localDofIdxOut)
502 {
503 const auto& localKeyOut = localCoefficientsOut.localKey(localDofIdxOut);
504 if (!DofHelper::localDofOnIntersection(outsideGeometry.type(), isOutside.indexInInside(), localKeyOut))
505 continue;
506
507 const auto dofIdxGlobalOut = DofHelper::dofIndex(this->dofMapper(), outside, localKeyOut, gidSet);
508 const auto dofPosOutside = DofHelper::dofPosition(outsideGeometry, localKeyOut);
509 const auto shift = std::abs((this->bBoxMax()-this->bBoxMin())*intersection.centerUnitOuterNormal());
510 if ((dofPosOutside - dofPos + shift*intersection.centerUnitOuterNormal()).two_norm() < eps)
511 Dumux::Detail::addPeriodicallyMappedDof(periodicDofMap_, dofIdxGlobal, dofIdxGlobalOut);
512 }
513 }
514 }
515 }
516 }
517 }
518 }
519
520 Dumux::Detail::closePeriodicDofMap(periodicDofMap_);
521
522 if (this->isPeriodic() && this->gridView().comm().size() > 1)
523 DUNE_THROW(Dune::NotImplemented, "Periodic boundaries for pq3 method for parallel simulations!");
524 }
525
526 DofMapper dofMapper_;
527 const FeCache feCache_;
528 std::size_t numScv_;
529 std::size_t numScvf_;
530 std::size_t numBoundaryScvf_;
531 std::vector<bool> boundaryDofIndices_;
532 std::unordered_map<GridIndexType, std::vector<GridIndexType>> periodicDofMap_;
533 Cache cache_;
535};
536
537} // end namespace Dumux
538
539#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.
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
Definition basegridgeometry.hh:142
const GridView & gridView() const
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
A class to create sub control volume and sub control volume face geometries per element for the order...
Definition discretization/pq3/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:49
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
Finite volume geometry for the pq3 hybrid CVFE scheme (order-3 Lagrange elements).
Definition discretization/pq3/fvgridgeometry.hh:159
typename PQ3DefaultGridGeometryTraits< GridView >::IntersectionQuadratureRule IntersectionQuadratureRule
Definition discretization/pq3/fvgridgeometry.hh:204
Dune::LagrangeLocalFiniteElementCache< CoordScalar, Scalar, dim, 3 > FeCache
Definition discretization/pq3/fvgridgeometry.hh:195
typename PQ3DefaultGridGeometryTraits< GridView >::ScvQuadratureRule ScvQuadratureRule
Definition discretization/pq3/fvgridgeometry.hh:201
PQ3FVGridGeometry(const GridView &gridView)
Constructor.
Definition discretization/pq3/fvgridgeometry.hh:218
typename PQ3DefaultGridGeometryTraits< GridView >::ScvfQuadratureRule ScvfQuadratureRule
Definition discretization/pq3/fvgridgeometry.hh:202
std::size_t numScv() const
Definition discretization/pq3/fvgridgeometry.hh:225
friend LocalView localView(const PQ3FVGridGeometry &gg)
Definition discretization/pq3/fvgridgeometry.hh:276
bool dofOnPeriodicBoundary(GridIndexType dofIdx) const
Definition discretization/pq3/fvgridgeometry.hh:263
bool dofOnBoundary(GridIndexType dofIdx) const
Definition discretization/pq3/fvgridgeometry.hh:260
const DofMapper & dofMapper() const
Definition discretization/pq3/fvgridgeometry.hh:222
auto dofIndex(const Element &element, const LocalKey &localKey) const
Definition discretization/pq3/fvgridgeometry.hh:257
Experimental::BoundaryFace< GridView > BoundaryFace
Definition discretization/pq3/fvgridgeometry.hh:189
const std::ranges::range auto periodicallyMappedDofs(GridIndexType dofIdx) const
Definition discretization/pq3/fvgridgeometry.hh:270
const FeCache & feCache() const
Definition discretization/pq3/fvgridgeometry.hh:249
GridView GridView
Definition discretization/pq3/fvgridgeometry.hh:197
typename PQ3DefaultGridGeometryTraits< GridView >::template LocalView< ThisType, true > LocalView
Definition discretization/pq3/fvgridgeometry.hh:183
static constexpr std::size_t maxNumElementDofs
Definition discretization/pq3/fvgridgeometry.hh:178
static constexpr bool enableHybridCVFE
Definition discretization/pq3/fvgridgeometry.hh:175
std::size_t numDofs() const
Definition discretization/pq3/fvgridgeometry.hh:234
void update(const GridView &gridView)
Definition discretization/pq3/fvgridgeometry.hh:237
DiscretizationMethods::PQ3 DiscretizationMethod
Definition discretization/pq3/fvgridgeometry.hh:172
typename PQ3DefaultGridGeometryTraits< GridView >::BoundaryFaceQuadratureRule BoundaryFaceQuadratureRule
Definition discretization/pq3/fvgridgeometry.hh:205
GridIndexType periodicallyMappedDof(GridIndexType dofIdx) const
Definition discretization/pq3/fvgridgeometry.hh:267
typename PeriodicGridTraits< typename GridView::Grid >::SupportsPeriodicity SupportsPeriodicity
Definition discretization/pq3/fvgridgeometry.hh:199
typename PQ3DefaultGridGeometryTraits< GridView >::SubControlVolume SubControlVolume
Definition discretization/pq3/fvgridgeometry.hh:185
typename PQ3DefaultGridGeometryTraits< GridView >::DofMapper DofMapper
Definition discretization/pq3/fvgridgeometry.hh:193
void update(GridView &&gridView)
Definition discretization/pq3/fvgridgeometry.hh:243
std::size_t numBoundaryScvf() const
Definition discretization/pq3/fvgridgeometry.hh:231
std::size_t numScvf() const
Definition discretization/pq3/fvgridgeometry.hh:228
PQ3GridGeometryCache Cache
Definition discretization/pq3/fvgridgeometry.hh:339
typename PQ3DefaultGridGeometryTraits< GridView >::SubControlVolumeFace SubControlVolumeFace
Definition discretization/pq3/fvgridgeometry.hh:187
BasicGridGeometry_t< GridView, PQ3DefaultGridGeometryTraits< GridView > > BasicGridGeometry
Definition discretization/pq3/fvgridgeometry.hh:181
PQ3FVGridGeometry(std::shared_ptr< BasicGridGeometry > gg)
Constructor with shared basic grid geometry.
Definition discretization/pq3/fvgridgeometry.hh:208
static constexpr DiscretizationMethod discMethod
Definition discretization/pq3/fvgridgeometry.hh:173
typename PQ3DefaultGridGeometryTraits< GridView >::ElementQuadratureRule ElementQuadratureRule
Definition discretization/pq3/fvgridgeometry.hh:203
const std::unordered_map< GridIndexType, std::vector< GridIndexType > > & periodicDofMap() const
Definition discretization/pq3/fvgridgeometry.hh:273
Extrusion_t< PQ3DefaultGridGeometryTraits< GridView > > Extrusion
Definition discretization/pq3/fvgridgeometry.hh:191
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...
the sub control volume for the cvfe scheme
Base class for a sub control volume face.
Helper class constructing the dual grid finite volume geometries for the pq3 cvfe discretization meth...
Helper classes to compute the integration elements.
void closePeriodicDofMap(std::unordered_map< Index, std::vector< Index > > &periodicDofMap)
Map every degree of freedom to all others it is identified with.
Definition periodicdofmap.hh:48
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
void addPeriodicallyMappedDof(std::unordered_map< Index, std::vector< Index > > &periodicDofMap, std::type_identity_t< Index > dofIdx, std::type_identity_t< Index > periodicDofIdx)
Register a degree of freedom as periodically mapped to another one.
Definition periodicdofmap.hh:29
BaseGridGeometry(std::shared_ptr< BaseImplementation > impl)
Constructor from a BaseImplementation.
Definition basegridgeometry.hh:72
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
CVFE::DefaultQuadratureTraits< GridView, ScvRule, ScvfRule, ElementRule, IntersectionRule, BoundaryFaceRule > PQ3QuadratureTraits
Quadrature rule traits for PQ3 discretization.
Definition discretization/pq3/fvgridgeometry.hh:114
Defines the index types used for grid and local indices.
The available discretization methods in Dumux.
Definition cvfelocalresidual.hh:25
static constexpr bool enablesHybridCVFE
Definition discretization/pq1bubble/fvgridgeometry.hh:53
Dune::Std::detected_or_t< std::conditional_t< enablesHybridCVFE< T >, Dumux::HybridPQ3GeometryHelper< GV, typename T::SubControlVolume, typename T::SubControlVolumeFace >, void >, SpecifiesGeometryHelper, T > PQ3GeometryHelper_t
Definition discretization/pq3/fvgridgeometry.hh:64
typename T::GeometryHelper SpecifiesGeometryHelper
Definition basegridgeometry.hh:30
CVFE< CVFEMethods::PQ3 > PQ3
Definition method.hh:138
Definition adapt.hh:17
PQ2SubControlVolume< GV > PQ3SubControlVolume
Definition discretization/pq3/fvgridgeometry.hh:52
PQ2FVElementGeometry< GG, enableCache > PQ3FVElementGeometry
Definition discretization/pq3/fvgridgeometry.hh:59
PQ2SubControlVolumeFace< GV > PQ3SubControlVolumeFace
Definition discretization/pq3/fvgridgeometry.hh:55
typename Extrusion< T >::type Extrusion_t
Convenience alias for obtaining the extrusion type.
Definition extrusion.hh:257
Helpers for maps between degrees of freedom identified across periodic boundaries.
Grid properties related to periodicity.
Quadrature rule traits for discretization schemes.
Definition quadraturerules.hh:86
Definition defaultmappertraits.hh:23
typename GridView::IndexSet::IndexType GridIndex
Definition indextraits.hh:27
unsigned int LocalIndex
Definition indextraits.hh:28
Default traits for the pq3 finite volume grid geometry.
Definition discretization/pq3/fvgridgeometry.hh:125
static constexpr std::size_t maxNumElementDofs
Definition discretization/pq3/fvgridgeometry.hh:135
std::true_type EnableHybridCVFE
Definition discretization/pq3/fvgridgeometry.hh:132
PQ3SubControlVolumeFace< GridView > SubControlVolumeFace
Definition discretization/pq3/fvgridgeometry.hh:127
PQ3SubControlVolume< GridView > SubControlVolume
Definition discretization/pq3/fvgridgeometry.hh:126
PQ3FVElementGeometry< GridGeometry, enableCache > LocalView
Definition discretization/pq3/fvgridgeometry.hh:130
Mapper traits for PQ3: vertices get 1 DOF, edges get 2 DOFs, quad faces/elements get 4 DOFs,...
Definition discretization/pq3/fvgridgeometry.hh:83
Dune::MultipleCodimMultipleGeomTypeMapper< GV > DofMapper
Definition discretization/pq3/fvgridgeometry.hh:84
static Dune::MCMGLayout layout()
Definition discretization/pq3/fvgridgeometry.hh:86
Definition periodicgridtraits.hh:24
Definition periodicgridtraits.hh:23
Dune-based quadrature rule with specified order.
Definition quadraturerules.hh:67
Compute the volume of several common geometry types.