version 3.11-dev
discretization/pq1bubble/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_PQ1BUBBLE_GRID_GEOMETRY_HH
15#define DUMUX_DISCRETIZATION_PQ1BUBBLE_GRID_GEOMETRY_HH
16
17#include <utility>
18#include <unordered_map>
19#include <type_traits>
20#include <span>
21
22#include <dune/grid/common/mcmgmapper.hh>
23
25
28
31
40
42
43namespace Dumux {
44
45namespace Detail {
46template<class T>
48 = typename T::EnableHybridCVFE;
49
50template<class T>
51static constexpr bool enablesHybridCVFE
52 = Dune::Std::detected_or_t<std::false_type, EnableHybridCVFE, T>{};
53
54template<class GV, class T>
55using PQ1BubbleGeometryHelper_t = Dune::Std::detected_or_t<
56 std::conditional_t<enablesHybridCVFE<T>,
59 >,
61 T
62>;
63} // end namespace Detail
64
65template <class GridView, std::size_t numCubeBubbles = 1>
67{
68 using DofMapper = Dune::MultipleCodimMultipleGeomTypeMapper<GridView>;
69 static_assert(numCubeBubbles == 1 || numCubeBubbles == 2,
70 "PQ1BubbleMapperTraits supports numCubeBubbles = 1 or 2");
71 static constexpr std::size_t numCubeBubbleDofs = numCubeBubbles;
72
76 static Dune::MCMGLayout layout()
77 {
78 return [](Dune::GeometryType gt, int dimgrid) {
79 if (gt.dim() == 0)
80 return int(1);
81
82 if (gt.dim() == dimgrid)
83 return gt.isCube() ? int(numCubeBubbleDofs) : int(1);
84
85 return int(0);
86 };
87 }
88};
89
94template<class GridView,
98 class IntersectionRule = Dumux::QuadratureRules::MidpointQuadrature,
99 class BoundaryFaceRule = Dumux::QuadratureRules::MidpointQuadrature>
101
108template<class GridView, class MapperTraits = PQ1BubbleMapperTraits<GridView>, class QuadratureTraits = PQ1BubbleQuadratureTraits<GridView>>
110: public MapperTraits, public QuadratureTraits
111{
114
115 template<class GridGeometry, bool enableCache>
117
118 static constexpr std::size_t maxNumElementDofs = (1<<GridView::dimension)
119 + MapperTraits::numCubeBubbleDofs;
120};
121
128template<class BaseTraits>
130: public BaseTraits
131{ using EnableHybridCVFE = std::true_type; };
132
139template<class Scalar,
140 class GV,
141 bool enableCaching = true,
144: public BaseGridGeometry<GV, Traits>
145{
148 using GridIndexType = typename IndexTraits<GV>::GridIndex;
149 using LocalIndexType = typename IndexTraits<GV>::LocalIndex;
150
151 using Element = typename GV::template Codim<0>::Entity;
152 using CoordScalar = typename GV::ctype;
153 static const int dim = GV::dimension;
154 static const int dimWorld = GV::dimensionworld;
155
156 static_assert(dim > 1, "Only implemented for dim > 1");
157
158public:
162
163 static constexpr bool enableHybridCVFE = Detail::enablesHybridCVFE<Traits>;
164
165 static constexpr std::size_t maxNumElementDofs = Traits::maxNumElementDofs;
166
170 using LocalView = typename Traits::template LocalView<ThisType, true>;
172 using SubControlVolume = typename Traits::SubControlVolume;
174 using SubControlVolumeFace = typename Traits::SubControlVolumeFace;
180 using DofMapper = typename Traits::DofMapper;
184 using GridView = GV;
188 using ScvQuadratureRule = typename Traits::ScvQuadratureRule;
190 using ScvfQuadratureRule = typename Traits::ScvfQuadratureRule;
192 using ElementQuadratureRule = typename Traits::ElementQuadratureRule;
194 using IntersectionQuadratureRule = typename Traits::IntersectionQuadratureRule;
196 using BoundaryFaceQuadratureRule = typename Traits::BoundaryFaceQuadratureRule;
197
199 PQ1BubbleFVGridGeometry(std::shared_ptr<BasicGridGeometry> gg)
200 : ParentType(std::move(gg))
201 , dofMapper_(this->gridView(), Traits::layout())
202 , cache_(*this)
203 , periodicGridTraits_(this->gridView().grid())
204 {
205 update_();
206 }
207
211 {}
212
214 const DofMapper& dofMapper() const
215 { return dofMapper_; }
216
218 std::size_t numScv() const
219 { return numScv_; }
220
222 std::size_t numScvf() const
223 { return numScvf_; }
224
226 std::size_t numBoundaryScvf() const
227 { return numBoundaryScvf_; }
228
230 std::size_t numDofs() const
231 { return this->dofMapper().size(); }
232
235 {
237 update_();
238 }
239
242 {
243 ParentType::update(std::move(gridView));
244 update_();
245 }
246
248 const FeCache& feCache() const
249 { return feCache_; }
250
252 bool dofOnBoundary(GridIndexType dofIdx) const
253 { return boundaryDofIndices_[dofIdx]; }
254
256 bool dofOnPeriodicBoundary(GridIndexType dofIdx) const
257 { return periodicDofMap_.count(dofIdx); }
258
260 GridIndexType periodicallyMappedDof(GridIndexType dofIdx) const
261 { return periodicDofMap_.at(dofIdx); }
262
264 const std::unordered_map<GridIndexType, GridIndexType>& periodicDofMap() const
265 { return periodicDofMap_; }
266
269 { return { gg.cache_ }; }
270
271private:
272 class PQ1BubbleGridGeometryCache
273 {
274 friend class PQ1BubbleFVGridGeometry;
275 public:
278
279 explicit PQ1BubbleGridGeometryCache(const PQ1BubbleFVGridGeometry& gg)
280 : gridGeometry_(&gg)
281 {}
282
283 const PQ1BubbleFVGridGeometry& gridGeometry() const
284 { return *gridGeometry_; }
285
287 const std::vector<SubControlVolume>& scvs(GridIndexType eIdx) const
288 { return scvs_[eIdx]; }
289
291 const std::vector<SubControlVolumeFace>& scvfs(GridIndexType eIdx) const
292 { return scvfs_[eIdx]; }
293
295 bool hasBoundaryScvf(GridIndexType eIdx) const
296 { return hasBoundaryScvf_[eIdx]; }
297
299 const std::vector<std::array<LocalIndexType, 2>>& scvfBoundaryGeometryKeys(GridIndexType eIdx) const
300 { return scvfBoundaryGeometryKeys_.at(eIdx); }
301
303 auto boundaryFaces(GridIndexType eIdx) const -> std::span<const BoundaryFace>
304 {
305 if (auto it = boundaryFaces_.find(eIdx); it != boundaryFaces_.end())
306 return {it->second};
307 return {};
308 }
309
310 private:
311 void clear_()
312 {
313 scvs_.clear();
314 scvfs_.clear();
315 hasBoundaryScvf_.clear();
316 scvfBoundaryGeometryKeys_.clear();
317 boundaryFaces_.clear();
318 }
319
320 std::vector<std::vector<SubControlVolume>> scvs_;
321 std::vector<std::vector<SubControlVolumeFace>> scvfs_;
322 std::vector<bool> hasBoundaryScvf_;
323 std::unordered_map<GridIndexType, std::vector<std::array<LocalIndexType, 2>>> scvfBoundaryGeometryKeys_;
324 std::unordered_map<GridIndexType, Dune::ReservedVector<typename PQ1BubbleFVGridGeometry::BoundaryFace, 2*dim>> boundaryFaces_;
325
326 const PQ1BubbleFVGridGeometry* gridGeometry_;
327 };
328
329public:
332 using Cache = PQ1BubbleGridGeometryCache;
333
334private:
335 using GeometryHelper = typename Cache::GeometryHelper;
336
337 void update_()
338 {
339 cache_.clear_();
340 dofMapper_.update(this->gridView());
341
342 auto numElements = this->gridView().size(0);
343 cache_.scvs_.resize(numElements);
344 cache_.scvfs_.resize(numElements);
345 cache_.hasBoundaryScvf_.resize(numElements, false);
346
347 boundaryDofIndices_.assign(numDofs(), false);
348
349 numScv_ = 0;
350 numScvf_ = 0;
351 numBoundaryScvf_ = 0;
352
353 // Build the scvs and scv faces
354 for (const auto& element : elements(this->gridView()))
355 {
356 auto eIdx = this->elementMapper().index(element);
357
358 // get the element geometry
359 auto elementGeometry = element.geometry();
360 if (!enableHybridCVFE && elementGeometry.type().isCube() && Traits::numCubeBubbleDofs > 1)
361 DUNE_THROW(Dune::NotImplemented, "Multiple bubble dofs for cube elements only for hybrid scheme.");
362
363 const auto refElement = referenceElement(elementGeometry);
364 const auto& localCoefficients = this->feCache().get(element.type()).localCoefficients();
365
366 // instantiate the geometry helper
367 GeometryHelper geometryHelper(elementGeometry);
368
369 numScv_ += geometryHelper.numScv();
370 // construct the sub control volumes
371 cache_.scvs_[eIdx].resize(geometryHelper.numScv());
372
373 // Scvs related to control volumes
374 for (LocalIndexType scvLocalIdx = 0; scvLocalIdx < geometryHelper.numScv(); ++scvLocalIdx)
375 {
376 auto corners = geometryHelper.getScvCorners(scvLocalIdx);
377 cache_.scvs_[eIdx][scvLocalIdx] = SubControlVolume(
378 geometryHelper.scvVolume(scvLocalIdx, corners),
379 geometryHelper.dofPosition(scvLocalIdx),
380 Dumux::center(corners),
381 scvLocalIdx,
382 eIdx,
383 GeometryHelper::dofIndex(this->dofMapper(), element, localCoefficients.localKey(scvLocalIdx)),
384 geometryHelper.isOverlappingScv(scvLocalIdx)
385 );
386 }
387
388 // construct the sub control volume faces
389 const auto numInteriorScvfs = GeometryHelper::numInteriorScvf(elementGeometry.type());
390 numScvf_ += numInteriorScvfs;
391 cache_.scvfs_[eIdx].resize(numInteriorScvfs);
392 LocalIndexType scvfLocalIdx = 0;
393 for (; scvfLocalIdx < numInteriorScvfs; ++scvfLocalIdx)
394 {
395 const auto scvPair = geometryHelper.getScvPairForScvf(scvfLocalIdx);
396 const auto corners = geometryHelper.getScvfCorners(scvfLocalIdx);
397 const auto area = Dumux::convexPolytopeVolume<dim-1>(
398 geometryHelper.getInteriorScvfGeometryType(scvfLocalIdx),
399 [&](unsigned int i){ return corners[i]; }
400 );
401
402 cache_.scvfs_[eIdx][scvfLocalIdx] = SubControlVolumeFace(
403 Dumux::center(corners),
404 area,
405 geometryHelper.normal(corners, scvPair),
406 std::move(scvPair),
407 scvfLocalIdx,
408 geometryHelper.isOverlappingScvf(scvfLocalIdx)
409 );
410 }
411
412 // construct the sub control volume faces on the domain boundary
413 LocalIndexType numBoundaryFaces = 0;
414 for (const auto& intersection : intersections(this->gridView(), element))
415 {
416 if (intersection.boundary() && !intersection.neighbor())
417 {
418 cache_.hasBoundaryScvf_[eIdx] = true;
419
420 // add one boundary face per boundary intersection
421 const auto isGeometry = intersection.geometry();
422 cache_.boundaryFaces_[eIdx].push_back(BoundaryFace{
423 isGeometry.center(),
424 isGeometry.volume(),
425 intersection.centerUnitOuterNormal(),
426 numBoundaryFaces++,
427 static_cast<LocalIndexType>(intersection.indexInInside()),
428 typename BoundaryFace::Traits::BoundaryFlag{intersection}
429 });
430
431 const auto localFacetIndex = intersection.indexInInside();
432 const auto numBoundaryScvf = GeometryHelper::numBoundaryScvf(elementGeometry.type(), localFacetIndex);
433 numScvf_ += numBoundaryScvf;
434 numBoundaryScvf_ += numBoundaryScvf;
435
436 for (unsigned int isScvfLocalIdx = 0; isScvfLocalIdx < numBoundaryScvf; ++isScvfLocalIdx)
437 {
438 // find the scvs this scvf is belonging to
439 const auto scvPair = geometryHelper.getScvPairForBoundaryScvf(localFacetIndex, isScvfLocalIdx);
440 const auto corners = geometryHelper.getBoundaryScvfCorners(localFacetIndex, isScvfLocalIdx);
441 const auto area = Dumux::convexPolytopeVolume<dim-1>(
442 geometryHelper.getBoundaryScvfGeometryType(isScvfLocalIdx),
443 [&](unsigned int i){ return corners[i]; }
444 );
445 cache_.scvfs_[eIdx].emplace_back(
446 Dumux::center(corners),
447 area,
448 intersection.centerUnitOuterNormal(),
449 std::move(scvPair),
450 scvfLocalIdx,
451 typename SubControlVolumeFace::Traits::BoundaryFlag{ intersection },
452 geometryHelper.isOverlappingBoundaryScvf(localFacetIndex)
453 );
454
455 // store look-up map to construct boundary scvf geometries
456 cache_.scvfBoundaryGeometryKeys_[eIdx].emplace_back(std::array<LocalIndexType, 2>{{
457 static_cast<LocalIndexType>(localFacetIndex),
458 static_cast<LocalIndexType>(isScvfLocalIdx)
459 }});
460
461 // increment local counter
462 scvfLocalIdx++;
463 }
464
465 const auto numDofsIntersection = GeometryHelper::numLocalDofsIntersection(elementGeometry.type(), localFacetIndex);
466 // TODO also move this to helper class
467 // add all dofs on the intersection to the set of boundary dofs
468 for (int ilocalDofIdx = 0; ilocalDofIdx < numDofsIntersection; ++ilocalDofIdx)
469 {
470 auto localDofIdx = GeometryHelper::localDofIndexIntersection(elementGeometry.type(), localFacetIndex, ilocalDofIdx);
471 const auto vIdxGlobal = GeometryHelper::dofIndex(this->dofMapper(), element, localCoefficients.localKey(localDofIdx));
472 boundaryDofIndices_[vIdxGlobal] = true;
473 }
474 }
475
476 // inform the grid geometry if we have periodic boundaries
477 else if (periodicGridTraits_.isPeriodic(intersection))
478 {
479 this->setPeriodic();
480
481 // find the mapped periodic vertex of all vertices on periodic boundaries
482 const auto fIdx = intersection.indexInInside();
483 const auto numFaceVerts = refElement.size(fIdx, 1, dim);
484 const auto eps = 1e-7*(elementGeometry.corner(1) - elementGeometry.corner(0)).two_norm();
485 for (int localVIdx = 0; localVIdx < numFaceVerts; ++localVIdx)
486 {
487 const auto vIdx = refElement.subEntity(fIdx, 1, localVIdx, dim);
488 const auto vIdxGlobal = this->dofMapper().subIndex(element, vIdx, dim);
489 const auto vPos = elementGeometry.corner(vIdx);
490
491 const auto& outside = intersection.outside();
492 const auto outsideGeometry = outside.geometry();
493 for (const auto& isOutside : intersections(this->gridView(), outside))
494 {
495 // only check periodic vertices of the periodic neighbor
496 if (periodicGridTraits_.isPeriodic(isOutside))
497 {
498 const auto fIdxOutside = isOutside.indexInInside();
499 const auto numFaceVertsOutside = refElement.size(fIdxOutside, 1, dim);
500 for (int localVIdxOutside = 0; localVIdxOutside < numFaceVertsOutside; ++localVIdxOutside)
501 {
502 const auto vIdxOutside = refElement.subEntity(fIdxOutside, 1, localVIdxOutside, dim);
503 const auto vPosOutside = outsideGeometry.corner(vIdxOutside);
504 const auto shift = std::abs((this->bBoxMax()-this->bBoxMin())*intersection.centerUnitOuterNormal());
505 if (std::abs((vPosOutside-vPos).two_norm() - shift) < eps)
506 periodicDofMap_[vIdxGlobal] = this->dofMapper().subIndex(outside, vIdxOutside, dim);
507 }
508 }
509 }
510 }
511 }
512 }
513 }
514
515 // error check: periodic boundaries currently don't work for pq1bubble in parallel
516 if (this->isPeriodic() && this->gridView().comm().size() > 1)
517 DUNE_THROW(Dune::NotImplemented, "Periodic boundaries for pq1bubble method for parallel simulations!");
518 }
519
520 DofMapper dofMapper_;
521
522 const FeCache feCache_;
523
524 std::size_t numScv_;
525 std::size_t numScvf_;
526 std::size_t numBoundaryScvf_;
527
528 // vertices on the boundary
529 std::vector<bool> boundaryDofIndices_;
530
531 // a map for periodic boundary vertices
532 std::unordered_map<GridIndexType, GridIndexType> periodicDofMap_;
533
534 Cache cache_;
535
537};
538
539} // end namespace Dumux
540
541#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
Definition: discretization/pq1bubble/geometryhelper.hh:502
Definition: pq1bubblefecache.hh:29
const FiniteElementType & get(const Dune::GeometryType &gt) const
Get local finite element for given GeometryType.
Definition: pq1bubblefecache.hh:48
Base class for the finite volume geometry vector for pq1bubble models This builds up the sub control ...
Definition: discretization/pq1bubble/fvelementgeometry.hh:43
Base class for the finite volume geometry vector for pq1bubble schemes This builds up the sub control...
Definition: discretization/pq1bubble/fvgridgeometry.hh:145
void update(const GridView &gridView)
update all geometries (call this after grid adaption)
Definition: discretization/pq1bubble/fvgridgeometry.hh:234
friend LocalView localView(const PQ1BubbleFVGridGeometry &gg)
local view of this object (constructed with the internal cache)
Definition: discretization/pq1bubble/fvgridgeometry.hh:268
PQ1BubbleGridGeometryCache Cache
Definition: discretization/pq1bubble/fvgridgeometry.hh:332
PQ1BubbleFVGridGeometry(std::shared_ptr< BasicGridGeometry > gg)
Constructor with basic grid geometry used to share state with another grid geometry on the same grid ...
Definition: discretization/pq1bubble/fvgridgeometry.hh:199
static constexpr DiscretizationMethod discMethod
Definition: discretization/pq1bubble/fvgridgeometry.hh:161
std::size_t numBoundaryScvf() const
The total number of boundary sub control volume faces.
Definition: discretization/pq1bubble/fvgridgeometry.hh:226
Dumux::PQ1BubbleFECache< CoordScalar, Scalar, dim, Traits::numCubeBubbleDofs > FeCache
export the finite element cache type
Definition: discretization/pq1bubble/fvgridgeometry.hh:182
typename Traits::ElementQuadratureRule ElementQuadratureRule
the quadrature rule type for elements
Definition: discretization/pq1bubble/fvgridgeometry.hh:192
PQ1BubbleFVGridGeometry(const GridView &gridView)
Constructor.
Definition: discretization/pq1bubble/fvgridgeometry.hh:209
BasicGridGeometry_t< GV, Traits > BasicGridGeometry
export basic grid geometry type for the alternative constructor
Definition: discretization/pq1bubble/fvgridgeometry.hh:168
std::size_t numScv() const
The total number of sub control volumes.
Definition: discretization/pq1bubble/fvgridgeometry.hh:218
std::size_t numScvf() const
The total number of sub control volume faces.
Definition: discretization/pq1bubble/fvgridgeometry.hh:222
static constexpr std::size_t maxNumElementDofs
Definition: discretization/pq1bubble/fvgridgeometry.hh:165
const FeCache & feCache() const
The finite element cache for creating local FE bases.
Definition: discretization/pq1bubble/fvgridgeometry.hh:248
GridIndexType periodicallyMappedDof(GridIndexType dofIdx) const
The index of the vertex / d.o.f. on the other side of the periodic boundary.
Definition: discretization/pq1bubble/fvgridgeometry.hh:260
Extrusion_t< Traits > Extrusion
export the type of extrusion
Definition: discretization/pq1bubble/fvgridgeometry.hh:178
typename Traits::BoundaryFaceQuadratureRule BoundaryFaceQuadratureRule
the quadrature rule type for boundary faces
Definition: discretization/pq1bubble/fvgridgeometry.hh:196
static constexpr bool enableHybridCVFE
Definition: discretization/pq1bubble/fvgridgeometry.hh:163
typename Traits::SubControlVolumeFace SubControlVolumeFace
export the type of sub control volume
Definition: discretization/pq1bubble/fvgridgeometry.hh:174
std::size_t numDofs() const
The total number of degrees of freedom.
Definition: discretization/pq1bubble/fvgridgeometry.hh:230
bool dofOnBoundary(GridIndexType dofIdx) const
If a vertex / d.o.f. is on the boundary.
Definition: discretization/pq1bubble/fvgridgeometry.hh:252
typename Traits::DofMapper DofMapper
export dof mapper type
Definition: discretization/pq1bubble/fvgridgeometry.hh:180
const DofMapper & dofMapper() const
The dofMapper.
Definition: discretization/pq1bubble/fvgridgeometry.hh:214
const std::unordered_map< GridIndexType, GridIndexType > & periodicDofMap() const
Returns the map between dofs across periodic boundaries.
Definition: discretization/pq1bubble/fvgridgeometry.hh:264
typename Traits::ScvfQuadratureRule ScvfQuadratureRule
the quadrature rule type for scvfs
Definition: discretization/pq1bubble/fvgridgeometry.hh:190
GV GridView
export the grid view type
Definition: discretization/pq1bubble/fvgridgeometry.hh:184
bool dofOnPeriodicBoundary(GridIndexType dofIdx) const
If a vertex / d.o.f. is on a periodic boundary.
Definition: discretization/pq1bubble/fvgridgeometry.hh:256
typename Traits::template LocalView< ThisType, true > LocalView
export the type of the fv element geometry (the local view type)
Definition: discretization/pq1bubble/fvgridgeometry.hh:170
typename Traits::SubControlVolume SubControlVolume
export the type of sub control volume
Definition: discretization/pq1bubble/fvgridgeometry.hh:172
typename Traits::ScvQuadratureRule ScvQuadratureRule
the quadrature rule type for scvs
Definition: discretization/pq1bubble/fvgridgeometry.hh:188
typename PeriodicGridTraits< typename GV::Grid >::SupportsPeriodicity SupportsPeriodicity
export whether the grid(geometry) supports periodicity
Definition: discretization/pq1bubble/fvgridgeometry.hh:186
void update(GridView &&gridView)
update all geometries (call this after grid adaption)
Definition: discretization/pq1bubble/fvgridgeometry.hh:241
typename Traits::IntersectionQuadratureRule IntersectionQuadratureRule
the quadrature rule type for intersections
Definition: discretization/pq1bubble/fvgridgeometry.hh:194
A class to create sub control volume and sub control volume face geometries per element.
Definition: discretization/pq1bubble/geometryhelper.hh:169
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/pq1bubble/subcontrolvolumeface.hh:58
the sub control volume for the pq1bubble scheme
Definition: discretization/pq1bubble/subcontrolvolume.hh:55
Defines the default element and vertex mapper types.
Base class for the local finite volume geometry for the pq1bubble method This builds up the sub contr...
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::HybridPQ1BubbleGeometryHelper< GV, typename T::SubControlVolume, typename T::SubControlVolumeFace, T::numCubeBubbleDofs >, Dumux::PQ1BubbleGeometryHelper< GV, typename T::SubControlVolume, typename T::SubControlVolumeFace > >, SpecifiesGeometryHelper, T > PQ1BubbleGeometryHelper_t
Definition: discretization/pq1bubble/fvgridgeometry.hh:62
typename T::EnableHybridCVFE EnableHybridCVFE
Definition: discretization/pq1bubble/fvgridgeometry.hh:48
static constexpr bool enablesHybridCVFE
Definition: discretization/pq1bubble/fvgridgeometry.hh:52
typename T::GeometryHelper SpecifiesGeometryHelper
Definition: basegridgeometry.hh:30
CVFE< CVFEMethods::PQ1Bubble > PQ1Bubble
Definition: method.hh:112
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.
A finite element cache for P1/Q1 function with bubble.
Quadrature rule traits for discretization schemes.
Definition: quadraturerules.hh:85
Definition: defaultmappertraits.hh:23
Definition: method.hh:46
The default traits for the hybrid pq1bubble finite volume grid geometry Defines the scv and scvf type...
Definition: discretization/pq1bubble/fvgridgeometry.hh:131
std::true_type EnableHybridCVFE
Definition: discretization/pq1bubble/fvgridgeometry.hh:131
Structure to define the index types used for grid and local indices.
Definition: indextraits.hh:26
The default traits for the pq1bubble finite volume grid geometry Defines the scv and scvf types and t...
Definition: discretization/pq1bubble/fvgridgeometry.hh:111
static constexpr std::size_t maxNumElementDofs
Definition: discretization/pq1bubble/fvgridgeometry.hh:118
Definition: discretization/pq1bubble/fvgridgeometry.hh:67
static constexpr std::size_t numCubeBubbleDofs
Definition: discretization/pq1bubble/fvgridgeometry.hh:71
static Dune::MCMGLayout layout()
Layout for elements (numCubeBubbleDofs) and vertices.
Definition: discretization/pq1bubble/fvgridgeometry.hh:76
Dune::MultipleCodimMultipleGeomTypeMapper< GridView > DofMapper
Definition: discretization/pq1bubble/fvgridgeometry.hh:68
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.