version 3.11-dev
Loading...
Searching...
No Matches
porousmediumflow/boxdfm/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//
16
17#ifndef DUMUX_POROUSMEDIUMFLOW_BOXDFM_GRID_FVGEOMETRY_HH
18#define DUMUX_POROUSMEDIUMFLOW_BOXDFM_GRID_FVGEOMETRY_HH
19
20#include <ranges>
21#include <span>
22#include <utility>
23#include <unordered_map>
24
25#include <dune/localfunctions/lagrange/lagrangelfecache.hh>
26#include <dune/geometry/multilineargeometry.hh>
27#include <dune/grid/common/mcmgmapper.hh>
28
35
36#include "fvelementgeometry.hh"
37#include "geometryhelper.hh"
38#include "subcontrolvolume.hh"
40
41namespace Dumux {
42
43namespace Detail {
44template<class GV, class T>
45using BoxDfmGeometryHelper_t = Dune::Std::detected_or_t<
48 T
49>;
50} // end namespace Detail
51
60template<class GridView, class MapperTraits = DefaultMapperTraits<GridView>>
62: public MapperTraits
63{
66
67 template<class GridGeometry, bool enableCache>
69
70 // Mapper type for mapping edges
71 using FacetMapper = Dune::MultipleCodimMultipleGeomTypeMapper<GridView>;
72};
73
82template<class Scalar,
83 class GridView,
84 bool enableGridGeometryCache = false,
87
98template<class Scalar, class GV, class Traits>
99class BoxDfmFVGridGeometry<Scalar, GV, true, Traits>
100: public BaseGridGeometry<GV, Traits>
101{
103 using ParentType = BaseGridGeometry<GV, Traits>;
104 using GridIndexType = typename IndexTraits<GV>::GridIndex;
105 using LocalIndexType = typename IndexTraits<GV>::LocalIndex;
106
107 using Element = typename GV::template Codim<0>::Entity;
108 using CoordScalar = typename GV::ctype;
109 static const int dim = GV::dimension;
110 static const int dimWorld = GV::dimensionworld;
111 static_assert(dim == 2 || dim == 3, "The box-dfm GridGeometry is only implemented in 2 or 3 dimensions.");
112
113public:
117
119 using LocalView = typename Traits::template LocalView<ThisType, true>;
121 using SubControlVolume = typename Traits::SubControlVolume;
123 using SubControlVolumeFace = typename Traits::SubControlVolumeFace;
127 using DofMapper = typename Traits::VertexMapper;
129 using FeCache = Dune::LagrangeLocalFiniteElementCache<CoordScalar, Scalar, dim, 1>;
131 using GridView = GV;
132
134 template< class FractureGridAdapter >
135 BoxDfmFVGridGeometry(const GridView gridView, const FractureGridAdapter& fractureGridAdapter)
136 : ParentType(gridView)
137 , cache_(*this)
138 {
139 update_(fractureGridAdapter);
140 }
141
144 const DofMapper& dofMapper() const
145 { return this->vertexMapper(); }
146
148 std::size_t numScv() const
149 { return numScv_; }
150
152 std::size_t numScvf() const
153 { return numScvf_; }
154
157 std::size_t numBoundaryScvf() const
158 { return numBoundaryScvf_; }
159
161 std::size_t numDofs() const
162 { return this->gridView().size(dim); }
163
165 template< class FractureGridAdapter >
166 void update(const GridView& gridView, const FractureGridAdapter& fractureGridAdapter)
167 {
169 update_(fractureGridAdapter);
170 }
171
173 template< class FractureGridAdapter >
174 void update(GridView&& gridView, const FractureGridAdapter& fractureGridAdapter)
175 {
176 ParentType::update(std::move(gridView));
177 update_(fractureGridAdapter);
178 }
179
181 const FeCache& feCache() const { return feCache_; }
183 bool dofOnBoundary(unsigned int dofIdx) const { return boundaryDofIndices_[dofIdx]; }
185 bool dofOnFracture(unsigned int dofIdx) const { return fractureDofIndices_[dofIdx]; }
187 bool dofOnPeriodicBoundary(std::size_t dofIdx) const { return false; }
188
190 [[deprecated("Will be removed after release 3.11. Use periodicallyMappedDofs, returning a range of dofs")]]
191 std::size_t periodicallyMappedDof(std::size_t dofIdx) const
192 { DUNE_THROW(Dune::InvalidStateException, "Periodic boundaries are not supported by the box-dfm scheme"); }
193
195 std::span<const std::size_t> periodicallyMappedDofs(std::size_t dofIdx) const
196 { DUNE_THROW(Dune::InvalidStateException, "Periodic boundaries are not supported by the box-dfm scheme"); }
197
199 friend inline LocalView localView(const BoxDfmFVGridGeometry& gg)
200 { return { gg.cache_ }; }
201
202private:
203
204 class BoxDfmGridGeometryCache
205 {
206 friend class BoxDfmFVGridGeometry;
207 public:
209 using GeometryHelper = Detail::BoxDfmGeometryHelper_t<GV, Traits>;
210
211 explicit BoxDfmGridGeometryCache(const BoxDfmFVGridGeometry& gg)
212 : gridGeometry_(&gg)
213 {}
214
215 const BoxDfmFVGridGeometry& gridGeometry() const
216 { return *gridGeometry_; }
217
219 const std::vector<SubControlVolume>& scvs(GridIndexType eIdx) const
220 { return scvs_[eIdx]; }
221
223 const std::vector<SubControlVolumeFace>& scvfs(GridIndexType eIdx) const
224 { return scvfs_[eIdx]; }
225
226
227 private:
228 void clear_()
229 {
230 scvs_.clear();
231 scvfs_.clear();
232 }
233
234 std::vector<std::vector<SubControlVolume>> scvs_;
235 std::vector<std::vector<SubControlVolumeFace>> scvfs_;
236
237 const BoxDfmFVGridGeometry* gridGeometry_;
238 };
239
240public:
243 using Cache = BoxDfmGridGeometryCache;
244
245private:
246 using GeometryHelper = typename Cache::GeometryHelper;
247
248 template< class FractureGridAdapter >
249 void update_(const FractureGridAdapter& fractureGridAdapter)
250 {
251 cache_.clear_();
252
253 const auto numElements = this->gridView().size(0);
254 cache_.scvs_.resize(numElements);
255 cache_.scvfs_.resize(numElements);
256
257 boundaryDofIndices_.assign(numDofs(), false);
258 fractureDofIndices_.assign(this->gridView.size(dim), false);
259
260 numScv_ = 0;
261 numScvf_ = 0;
262 numBoundaryScvf_ = 0;
263 // Build the SCV and SCV faces
264 for (const auto& element : elements(this->gridView()))
265 {
266 // fill the element map with seeds
267 const auto eIdx = this->elementMapper().index(element);
268
269 // count
270 numScv_ += element.subEntities(dim);
271 numScvf_ += element.subEntities(dim-1);
272
273 // get the element geometry
274 auto elementGeometry = element.geometry();
275 const auto refElement = referenceElement(elementGeometry);
276
277 // instantiate the geometry helper
278 GeometryHelper geometryHelper(elementGeometry);
279
280 // construct the sub control volumes
281 cache_.scvs_[eIdx].resize(elementGeometry.corners());
282 for (LocalIndexType scvLocalIdx = 0; scvLocalIdx < elementGeometry.corners(); ++scvLocalIdx)
283 {
284 const auto dofIdxGlobal = this->vertexMapper().subIndex(element, scvLocalIdx, dim);
285
286 cache_.scvs_[eIdx][scvLocalIdx] = SubControlVolume(geometryHelper,
287 scvLocalIdx,
288 eIdx,
289 dofIdxGlobal);
290 }
291
292 // construct the sub control volume faces
293 LocalIndexType scvfLocalIdx = 0;
294 cache_.scvfs_[eIdx].resize(element.subEntities(dim-1));
295 for (; scvfLocalIdx < element.subEntities(dim-1); ++scvfLocalIdx)
296 {
297 // find the global and local scv indices this scvf is belonging to
298 std::array<LocalIndexType, 2> localScvIndices{{
299 static_cast<LocalIndexType>(refElement.subEntity(scvfLocalIdx, dim-1, 0, dim)),
300 static_cast<LocalIndexType>(refElement.subEntity(scvfLocalIdx, dim-1, 1, dim))
301 }};
302
303 cache_.scvfs_[eIdx][scvfLocalIdx] = SubControlVolumeFace(geometryHelper,
304 element,
305 scvfLocalIdx,
306 std::move(localScvIndices));
307 }
308
309 // construct the ...
310 // ... sub-control volume faces on the domain boundary
311 // ... sub-control volumes on fracture facets
312 // ... sub-control volume faces on fracture facets
313 // NOTE We do not construct fracture scvfs on boundaries here!
314 // That means specifying Neumann fluxes on only the fractures is not possible
315 // However, it is difficult to interpret this here as a fracture ending on the boundary
316 // could also be connected to a facet which is both boundary and fracture at the same time!
317 // In that case, the fracture boundary scvf wouldn't make sense. In order to do it properly
318 // we would have to find only those fractures that are at the boundary and aren't connected
319 // to a fracture which is a boundary.
320 LocalIndexType scvLocalIdx = element.subEntities(dim);
321 for (const auto& intersection : intersections(this->gridView(), element))
322 {
323 // first, obtain all vertex indices on this intersection
324 const auto& isGeometry = intersection.geometry();
325 const auto numCorners = isGeometry.corners();
326 const auto idxInInside = intersection.indexInInside();
327
328 std::vector<GridIndexType> isVertexIndices(numCorners);
329 for (unsigned int vIdxLocal = 0; vIdxLocal < numCorners; ++vIdxLocal)
330 isVertexIndices[vIdxLocal] = this->vertexMapper().subIndex(element,
331 refElement.subEntity(idxInInside, 1, vIdxLocal, dim),
332 dim);
333 // maybe add boundary scvf
334 if (intersection.boundary() && !intersection.neighbor())
335 {
336 numScvf_ += isGeometry.corners();
337 numBoundaryScvf_ += isGeometry.corners();
338
339 for (unsigned int isScvfLocalIdx = 0; isScvfLocalIdx < numCorners; ++isScvfLocalIdx)
340 {
341 // find the scvs this scvf is belonging to
342 const LocalIndexType insideScvIdx = static_cast<LocalIndexType>(refElement.subEntity(idxInInside, 1, isScvfLocalIdx, dim));
343 std::array<LocalIndexType, 2> localScvIndices{{insideScvIdx, insideScvIdx}};
344 cache_.scvfs_[eIdx].emplace_back(geometryHelper,
345 intersection,
346 isScvfLocalIdx,
347 scvfLocalIdx++,
348 std::move(localScvIndices));
349 }
350
351 // add all vertices on the intersection to the set of
352 // boundary vertices
353 const auto numFaceVerts = refElement.size(idxInInside, 1, dim);
354 for (int localVIdx = 0; localVIdx < numFaceVerts; ++localVIdx)
355 {
356 const auto vIdx = refElement.subEntity(idxInInside, 1, localVIdx, dim);
357 const auto vIdxGlobal = this->vertexMapper().subIndex(element, vIdx, dim);
358 boundaryDofIndices_[vIdxGlobal] = true;
359 }
360 }
361 // TODO: should use periodicGridTraits but carrying them around just to verify no
362 // periodicity?
363 // make sure we have no periodic boundaries
364 else if (intersection.boundary() && intersection.neighbor())
365 DUNE_THROW(Dune::InvalidStateException, "Periodic boundaries are not supported by the box-dfm scheme");
366
367 // maybe add fracture scvs & scvfs
368 if (fractureGridAdapter.composeFacetElement(isVertexIndices))
369 {
370 for (auto vIdx : isVertexIndices)
371 fractureDofIndices_[vIdx] = true;
372
373 // add fracture scv for each vertex of intersection
374 numScv_ += numCorners;
375 const auto curNumScvs = cache_.scvs_[eIdx].size();
376 cache_.scvs_[eIdx].reserve(curNumScvs+numCorners);
377 for (unsigned int vIdxLocal = 0; vIdxLocal < numCorners; ++vIdxLocal)
378 cache_.scvs_[eIdx].emplace_back(geometryHelper,
379 intersection,
380 isGeometry,
381 vIdxLocal,
382 static_cast<LocalIndexType>(refElement.subEntity(idxInInside, 1, vIdxLocal, dim)),
383 scvLocalIdx++,
384 idxInInside,
385 eIdx,
386 isVertexIndices[vIdxLocal]);
387
388 // add fracture scvf for each edge of the intersection in 3d
389 if (dim == 3)
390 {
391 const auto& faceRefElement = referenceElement(isGeometry);
392 for (unsigned int edgeIdx = 0; edgeIdx < faceRefElement.size(1); ++edgeIdx)
393 {
394 // inside/outside scv indices in face local node numbering
395 std::array<LocalIndexType, 2> localScvIndices{{
396 static_cast<LocalIndexType>(faceRefElement.subEntity(edgeIdx, 1, 0, dim-1)),
397 static_cast<LocalIndexType>(faceRefElement.subEntity(edgeIdx, 1, 1, dim-1))
398 }};
399
400 // add offset to get the right scv indices
401 std::for_each( localScvIndices.begin(),
402 localScvIndices.end(),
403 [curNumScvs] (auto& elemLocalIdx) { elemLocalIdx += curNumScvs; } );
404
405 // add scvf
406 numScvf_++;
407 cache_.scvfs_[eIdx].emplace_back(geometryHelper,
408 intersection,
409 edgeIdx,
410 scvfLocalIdx++,
411 std::move(localScvIndices),
412 intersection.boundary());
413 }
414 }
415
416 // dim == 2, intersection is an edge, make 1 scvf
417 else
418 {
419 // inside/outside scv indices in face local node numbering
420 std::array<LocalIndexType, 2> localScvIndices{{0, 1}};
421
422 // add offset such that the fracture scvs above are addressed
423 std::for_each( localScvIndices.begin(),
424 localScvIndices.end(),
425 [curNumScvs] (auto& elemLocalIdx) { elemLocalIdx += curNumScvs; } );
426
427 // add scvf
428 numScvf_++;
429 cache_.scvfs_[eIdx].emplace_back(geometryHelper,
430 intersection,
431 /*idxOnIntersection*/0,
432 scvfLocalIdx++,
433 std::move(localScvIndices),
434 intersection.boundary());
435 }
436 }
437 }
438 }
439 }
440
441 const FeCache feCache_;
442
443 // TODO do we need those?
444 std::size_t numScv_;
445 std::size_t numScvf_;
446 std::size_t numBoundaryScvf_;
447
448 // vertices on the boundary & fracture facets
449 std::vector<bool> boundaryDofIndices_;
450 std::vector<bool> fractureDofIndices_;
451
452 Cache cache_;
453};
454
462template<class Scalar, class GV, class Traits>
463class BoxDfmFVGridGeometry<Scalar, GV, false, Traits>
464: public BaseGridGeometry<GV, Traits>
465{
467 using ParentType = BaseGridGeometry<GV, Traits>;
468 using GridIndexType = typename GV::IndexSet::IndexType;
469
470 static const int dim = GV::dimension;
471 static const int dimWorld = GV::dimensionworld;
472
473 using Element = typename GV::template Codim<0>::Entity;
474 using Intersection = typename GV::Intersection;
475 using CoordScalar = typename GV::ctype;
476
477public:
481
483 using LocalView = typename Traits::template LocalView<ThisType, false>;
485 using SubControlVolume = typename Traits::SubControlVolume;
487 using SubControlVolumeFace = typename Traits::SubControlVolumeFace;
491 using DofMapper = typename Traits::VertexMapper;
493 using FeCache = Dune::LagrangeLocalFiniteElementCache<CoordScalar, Scalar, dim, 1>;
495 using GridView = GV;
496
498 template< class FractureGridAdapter >
499 BoxDfmFVGridGeometry(const GridView gridView, const FractureGridAdapter& fractureGridAdapter)
500 : ParentType(gridView)
501 , facetMapper_(gridView, Dune::mcmgLayout(Dune::template Codim<1>()))
502 , cache_(*this)
503 {
504 update_(fractureGridAdapter);
505 }
506
509 const DofMapper& dofMapper() const
510 { return this->vertexMapper(); }
511
513 std::size_t numScv() const
514 { return numScv_; }
515
517 std::size_t numScvf() const
518 { return numScvf_; }
519
522 std::size_t numBoundaryScvf() const
523 { return numBoundaryScvf_; }
524
526 std::size_t numDofs() const
527 { return this->gridView().size(dim); }
528
530 template< class FractureGridAdapter >
531 void update(const GridView& gridView, const FractureGridAdapter& fractureGridAdapter)
532 {
534 updateFacetMapper_();
535 update_(fractureGridAdapter);
536 }
537
539 template< class FractureGridAdapter >
540 void update(GridView&& gridView, const FractureGridAdapter& fractureGridAdapter)
541 {
542 ParentType::update(std::move(gridView));
543 updateFacetMapper_();
544 update_(fractureGridAdapter);
545 }
546
548 const FeCache& feCache() const { return feCache_; }
550 bool dofOnBoundary(unsigned int dofIdx) const { return boundaryDofIndices_[dofIdx]; }
552 bool dofOnFracture(unsigned int dofIdx) const { return fractureDofIndices_[dofIdx]; }
554 bool dofOnPeriodicBoundary(std::size_t dofIdx) const { return false; }
555
557 bool isOnFracture(const Element& element, const Intersection& intersection) const
558 { return facetOnFracture_[facetMapper_.subIndex(element, intersection.indexInInside(), 1)]; }
559
561 [[deprecated("Will be removed after release 3.11. Use periodicallyMappedDofs, returning a range of dofs")]]
562 std::size_t periodicallyMappedDof(std::size_t dofIdx) const
563 { DUNE_THROW(Dune::InvalidStateException, "Periodic boundaries are not supported by the box-dfm scheme"); }
564
566 std::span<const std::size_t> periodicallyMappedDofs(std::size_t dofIdx) const
567 { DUNE_THROW(Dune::InvalidStateException, "Periodic boundaries are not supported by the box-dfm scheme"); }
568
570 friend inline LocalView localView(const BoxDfmFVGridGeometry& gg)
571 { return { gg.cache_ }; }
572
573private:
574 class BoxDfmGridGeometryCache
575 {
576 friend class BoxDfmFVGridGeometry;
577 public:
579 using GeometryHelper = Detail::BoxDfmGeometryHelper_t<GV, Traits>;
580
581 explicit BoxDfmGridGeometryCache(const BoxDfmFVGridGeometry& gg)
582 : gridGeometry_(&gg)
583 {}
584
585 const BoxDfmFVGridGeometry& gridGeometry() const
586 { return *gridGeometry_; }
587
588 private:
589 const BoxDfmFVGridGeometry* gridGeometry_;
590 };
591
592public:
595 using Cache = BoxDfmGridGeometryCache;
596
597private:
598
599 void updateFacetMapper_()
600 {
601 facetMapper_.update(this->gridView());
602 }
603
604 template< class FractureGridAdapter >
605 void update_(const FractureGridAdapter& fractureGridAdapter)
606 {
607 boundaryDofIndices_.assign(numDofs(), false);
608 fractureDofIndices_.assign(numDofs(), false);
609 facetOnFracture_.assign(this->gridView().size(1), false);
610
611 // save global data on the grid's scvs and scvfs
612 // TODO do we need those information?
613 numScv_ = 0;
614 numScvf_ = 0;
615 numBoundaryScvf_ = 0;
616 for (const auto& element : elements(this->gridView()))
617 {
618 numScv_ += element.subEntities(dim);
619 numScvf_ += element.subEntities(dim-1);
620
621 const auto elementGeometry = element.geometry();
622 const auto refElement = referenceElement(elementGeometry);
623
624 // store the sub control volume face indices on the domain boundary
625 for (const auto& intersection : intersections(this->gridView(), element))
626 {
627 // first, obtain all vertex indices on this intersection
628 const auto& isGeometry = intersection.geometry();
629 const auto numCorners = isGeometry.corners();
630 const auto idxInInside = intersection.indexInInside();
631
632 std::vector<GridIndexType> isVertexIndices(numCorners);
633 for (unsigned int vIdxLocal = 0; vIdxLocal < numCorners; ++vIdxLocal)
634 isVertexIndices[vIdxLocal] = this->vertexMapper().subIndex(element,
635 refElement.subEntity(idxInInside, 1, vIdxLocal, dim),
636 dim);
637
638 if (intersection.boundary() && !intersection.neighbor())
639 {
640 numScvf_ += numCorners;
641 numBoundaryScvf_ += numCorners;
642
643 // add all vertices on the intersection to the set of
644 // boundary vertices
645 const auto fIdx = intersection.indexInInside();
646 const auto numFaceVerts = refElement.size(fIdx, 1, dim);
647 for (int localVIdx = 0; localVIdx < numFaceVerts; ++localVIdx)
648 {
649 const auto vIdx = refElement.subEntity(fIdx, 1, localVIdx, dim);
650 const auto vIdxGlobal = this->vertexMapper().subIndex(element, vIdx, dim);
651 boundaryDofIndices_[vIdxGlobal] = true;
652 }
653 }
654
655 // make sure we have no periodic boundaries
656 else if (intersection.boundary() && intersection.neighbor())
657 DUNE_THROW(Dune::InvalidStateException, "Periodic boundaries are not supported by the box-dfm scheme");
658
659 // maybe add fracture scvs & scvfs
660 if (fractureGridAdapter.composeFacetElement(isVertexIndices))
661 {
662 facetOnFracture_[facetMapper_.subIndex(element, idxInInside, 1)] = true;
663 for (auto vIdx : isVertexIndices)
664 fractureDofIndices_[vIdx] = true;
665
666 const auto isGeometry = intersection.geometry();
667 numScv_ += isGeometry.corners();
668 numScvf_ += dim == 3 ? referenceElement(isGeometry).size(1) : 1;
669 }
670 }
671 }
672 }
673
674 const FeCache feCache_;
675
676 // Information on the global number of geometries
677 // TODO do we need those information?
678 std::size_t numScv_;
679 std::size_t numScvf_;
680 std::size_t numBoundaryScvf_;
681
682 // vertices on the boundary & fracture facets
683 std::vector<bool> boundaryDofIndices_;
684 std::vector<bool> fractureDofIndices_;
685
686 // facet mapper and markers which facets lie on interior boundaries
687 typename Traits::FacetMapper facetMapper_;
688 std::vector<bool> facetOnFracture_;
689
690 Cache cache_;
691};
692
693} // end namespace Dumux
694
695#endif
Base class for grid geometries.
Helper class constructing the dual grid finite volume geometries for the box discretizazion method.
const ElementMapper & elementMapper() const
Returns the mapper for elements to indices for constant grids.
Definition basegridgeometry.hh:112
Element element(GridIndexType eIdx) const
Get an element from a global element index.
Definition basegridgeometry.hh:142
const VertexMapper & vertexMapper() const
Returns the mapper for vertices to indices for constant grids.
Definition basegridgeometry.hh:106
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
Base class for the finite volume geometry vector for box discrete fracture model.
Definition porousmediumflow/boxdfm/fvelementgeometry.hh:44
Extrusion_t< Traits > Extrusion
Export the extrusion type.
Definition porousmediumflow/boxdfm/fvgridgeometry.hh:489
bool dofOnBoundary(unsigned int dofIdx) const
If a vertex / d.o.f. is on the boundary.
Definition porousmediumflow/boxdfm/fvgridgeometry.hh:550
bool dofOnPeriodicBoundary(std::size_t dofIdx) const
Periodic boundaries are not supported for the box-dfm scheme.
Definition porousmediumflow/boxdfm/fvgridgeometry.hh:554
BoxDfmFVGridGeometry(const GridView gridView, const FractureGridAdapter &fractureGridAdapter)
Constructor.
Definition porousmediumflow/boxdfm/fvgridgeometry.hh:499
std::size_t numScv() const
The total number of sub control volumes.
Definition porousmediumflow/boxdfm/fvgridgeometry.hh:513
bool isOnFracture(const Element &element, const Intersection &intersection) const
Returns true if an intersection coincides with a fracture element.
Definition porousmediumflow/boxdfm/fvgridgeometry.hh:557
std::span< const std::size_t > periodicallyMappedDofs(std::size_t dofIdx) const
The indices of the vertices / d.o.f.s on the other side of the periodic boundary.
Definition porousmediumflow/boxdfm/fvgridgeometry.hh:566
std::size_t numDofs() const
The total number of degrees of freedom.
Definition porousmediumflow/boxdfm/fvgridgeometry.hh:526
BoxDfmGridGeometryCache Cache
Definition porousmediumflow/boxdfm/fvgridgeometry.hh:595
static constexpr DiscretizationMethod discMethod
Definition porousmediumflow/boxdfm/fvgridgeometry.hh:480
std::size_t numBoundaryScvf() const
Definition porousmediumflow/boxdfm/fvgridgeometry.hh:522
void update(const GridView &gridView, const FractureGridAdapter &fractureGridAdapter)
update all fvElementGeometries (call this after grid adaption)
Definition porousmediumflow/boxdfm/fvgridgeometry.hh:531
GV GridView
export the grid view type
Definition porousmediumflow/boxdfm/fvgridgeometry.hh:495
typename Traits::VertexMapper DofMapper
export dof mapper type
Definition porousmediumflow/boxdfm/fvgridgeometry.hh:491
typename Traits::template LocalView< ThisType, false > LocalView
export the type of the fv element geometry (the local view type)
Definition porousmediumflow/boxdfm/fvgridgeometry.hh:483
std::size_t numScvf() const
The total number of sun control volume faces.
Definition porousmediumflow/boxdfm/fvgridgeometry.hh:517
Dune::LagrangeLocalFiniteElementCache< CoordScalar, Scalar, dim, 1 > FeCache
export the finite element cache type
Definition porousmediumflow/boxdfm/fvgridgeometry.hh:493
friend LocalView localView(const BoxDfmFVGridGeometry &gg)
local view of this object (constructed with the internal cache)
Definition porousmediumflow/boxdfm/fvgridgeometry.hh:570
const FeCache & feCache() const
The finite element cache for creating local FE bases.
Definition porousmediumflow/boxdfm/fvgridgeometry.hh:548
const DofMapper & dofMapper() const
Definition porousmediumflow/boxdfm/fvgridgeometry.hh:509
typename Traits::SubControlVolumeFace SubControlVolumeFace
export the type of sub control volume
Definition porousmediumflow/boxdfm/fvgridgeometry.hh:487
DiscretizationMethods::Box DiscretizationMethod
export the discretization method this geometry belongs to
Definition porousmediumflow/boxdfm/fvgridgeometry.hh:479
typename Traits::SubControlVolume SubControlVolume
export the type of sub control volume
Definition porousmediumflow/boxdfm/fvgridgeometry.hh:485
bool dofOnFracture(unsigned int dofIdx) const
If a vertex / d.o.f. is on a fracture.
Definition porousmediumflow/boxdfm/fvgridgeometry.hh:552
void update(GridView &&gridView, const FractureGridAdapter &fractureGridAdapter)
update all fvElementGeometries (call this after grid adaption)
Definition porousmediumflow/boxdfm/fvgridgeometry.hh:540
std::size_t periodicallyMappedDof(std::size_t dofIdx) const
The index of the vertex / d.o.f. on the other side of the periodic boundary.
Definition porousmediumflow/boxdfm/fvgridgeometry.hh:562
typename Traits::SubControlVolume SubControlVolume
Export the type of sub control volume.
Definition porousmediumflow/boxdfm/fvgridgeometry.hh:121
Dune::LagrangeLocalFiniteElementCache< CoordScalar, Scalar, dim, 1 > FeCache
Export the finite element cache type.
Definition porousmediumflow/boxdfm/fvgridgeometry.hh:129
std::span< const std::size_t > periodicallyMappedDofs(std::size_t dofIdx) const
The indices of the vertices / d.o.f.s on the other side of the periodic boundary.
Definition porousmediumflow/boxdfm/fvgridgeometry.hh:195
std::size_t numDofs() const
The total number of degrees of freedom.
Definition porousmediumflow/boxdfm/fvgridgeometry.hh:161
typename Traits::VertexMapper DofMapper
Export dof mapper type.
Definition porousmediumflow/boxdfm/fvgridgeometry.hh:127
BoxDfmFVGridGeometry(const GridView gridView, const FractureGridAdapter &fractureGridAdapter)
Constructor.
Definition porousmediumflow/boxdfm/fvgridgeometry.hh:135
BoxDfmGridGeometryCache Cache
Definition porousmediumflow/boxdfm/fvgridgeometry.hh:243
friend LocalView localView(const BoxDfmFVGridGeometry &gg)
local view of this object (constructed with the internal cache)
Definition porousmediumflow/boxdfm/fvgridgeometry.hh:199
GV GridView
Export the grid view type.
Definition porousmediumflow/boxdfm/fvgridgeometry.hh:131
void update(GridView &&gridView, const FractureGridAdapter &fractureGridAdapter)
update all fvElementGeometries (call this after grid adaption)
Definition porousmediumflow/boxdfm/fvgridgeometry.hh:174
Extrusion_t< Traits > Extrusion
Export the extrusion type.
Definition porousmediumflow/boxdfm/fvgridgeometry.hh:125
typename Traits::template LocalView< ThisType, true > LocalView
Export the type of the fv element geometry (the local view type).
Definition porousmediumflow/boxdfm/fvgridgeometry.hh:119
const DofMapper & dofMapper() const
Definition porousmediumflow/boxdfm/fvgridgeometry.hh:144
std::size_t numScvf() const
The total number of sun control volume faces.
Definition porousmediumflow/boxdfm/fvgridgeometry.hh:152
std::size_t numScv() const
The total number of sub control volumes.
Definition porousmediumflow/boxdfm/fvgridgeometry.hh:148
std::size_t periodicallyMappedDof(std::size_t dofIdx) const
The index of the vertex / d.o.f. on the other side of the periodic boundary.
Definition porousmediumflow/boxdfm/fvgridgeometry.hh:191
DiscretizationMethods::Box DiscretizationMethod
export the discretization method this geometry belongs to
Definition porousmediumflow/boxdfm/fvgridgeometry.hh:115
std::size_t numBoundaryScvf() const
Definition porousmediumflow/boxdfm/fvgridgeometry.hh:157
static constexpr DiscretizationMethod discMethod
Definition porousmediumflow/boxdfm/fvgridgeometry.hh:116
bool dofOnBoundary(unsigned int dofIdx) const
If a vertex / d.o.f. is on the boundary.
Definition porousmediumflow/boxdfm/fvgridgeometry.hh:183
const FeCache & feCache() const
The finite element cache for creating local FE bases.
Definition porousmediumflow/boxdfm/fvgridgeometry.hh:181
void update(const GridView &gridView, const FractureGridAdapter &fractureGridAdapter)
update all fvElementGeometries (call this after grid adaption)
Definition porousmediumflow/boxdfm/fvgridgeometry.hh:166
typename Traits::SubControlVolumeFace SubControlVolumeFace
Export the type of sub control volume.
Definition porousmediumflow/boxdfm/fvgridgeometry.hh:123
bool dofOnPeriodicBoundary(std::size_t dofIdx) const
Periodic boundaries are not supported for the box-dfm scheme.
Definition porousmediumflow/boxdfm/fvgridgeometry.hh:187
bool dofOnFracture(unsigned int dofIdx) const
If a vertex / d.o.f. is on a fracture.
Definition porousmediumflow/boxdfm/fvgridgeometry.hh:185
Base class for the finite volume geometry vector for box schemes.
Definition porousmediumflow/boxdfm/fvgridgeometry.hh:86
Create sub control volumes and sub control volume face geometries.
Definition porousmediumflow/boxdfm/geometryhelper.hh:47
Class for a sub control volume face in the box discrete fracture method, i.e a part of the boundary o...
Definition porousmediumflow/boxdfm/subcontrolvolumeface.hh:63
the sub control volume for the box discrete fracture scheme
Definition porousmediumflow/boxdfm/subcontrolvolume.hh:62
Defines the default element and vertex mapper types.
Helper classes to compute the integration elements.
BaseGridGeometry(std::shared_ptr< BaseImplementation > impl)
Constructor from a BaseImplementation.
Definition basegridgeometry.hh:72
Defines the index types used for grid and local indices.
The available discretization methods in Dumux.
Definition cvfelocalresidual.hh:25
Dune::Std::detected_or_t< Dumux::BoxDfmGeometryHelper< GV, GV::dimension, typename T::SubControlVolume, typename T::SubControlVolumeFace >, SpecifiesGeometryHelper, T > BoxDfmGeometryHelper_t
Definition porousmediumflow/boxdfm/fvgridgeometry.hh:45
typename T::GeometryHelper SpecifiesGeometryHelper
Definition basegridgeometry.hh:30
CVFE< CVFEMethods::PQ1 > Box
Definition method.hh:102
Definition adapt.hh:17
std::ranges::range auto scvs(const FVElementGeometry &fvGeometry, const LocalDof &localDof)
Definition localdof.hh:82
typename Extrusion< T >::type Extrusion_t
Convenience alias for obtaining the extrusion type.
Definition extrusion.hh:257
Definition common/pdesolver.hh:24
Base class for the local finite volume geometry for the box discrete fracture model.
Helper class constructing the dual grid finite volume geometries for the box discrete fracture model.
the sub control volume for the box discrete fracture scheme
The sub control volume face class for the box discrete fracture model.
The default traits for the box finite volume grid geometry.
Definition porousmediumflow/boxdfm/fvgridgeometry.hh:63
BoxDfmSubControlVolume< GridView > SubControlVolume
Definition porousmediumflow/boxdfm/fvgridgeometry.hh:64
BoxDfmSubControlVolumeFace< GridView > SubControlVolumeFace
Definition porousmediumflow/boxdfm/fvgridgeometry.hh:65
Dune::MultipleCodimMultipleGeomTypeMapper< GridView > FacetMapper
Definition porousmediumflow/boxdfm/fvgridgeometry.hh:71
BoxDfmFVElementGeometry< GridGeometry, enableCache > LocalView
Definition porousmediumflow/boxdfm/fvgridgeometry.hh:68
typename GridView::IndexSet::IndexType GridIndex
Definition indextraits.hh:27
unsigned int LocalIndex
Definition indextraits.hh:28