version 3.11-dev
Loading...
Searching...
No Matches
multidomain/facet/box/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//
15#ifndef DUMUX_FACETCOUPLING_BOX_GRID_FVGEOMETRY_HH
16#define DUMUX_FACETCOUPLING_BOX_GRID_FVGEOMETRY_HH
17
18#include <algorithm>
19#include <utility>
20
21#include <dune/grid/common/mcmgmapper.hh>
22#include <dune/localfunctions/lagrange/lagrangelfecache.hh>
23
30
34
35namespace Dumux {
36
37namespace Detail {
38template<class GV, class T>
39using BoxFacetCouplingGeometryHelper_t = Dune::Std::detected_or_t<
42 T
43>;
44} // end namespace Detail
45
53template<class GridView>
55{
56 // use a specialized version of the box scvf
59
60 template<class GridGeometry, bool enableCache>
62
63 // per default we use an mcmg mapper for the elements
64 using ElementMapper = Dune::MultipleCodimMultipleGeomTypeMapper<GridView>;
65 // the default vertex mapper is the enriched vertex dof mapper
67 // Mapper type for mapping edges
68 using FacetMapper = Dune::MultipleCodimMultipleGeomTypeMapper<GridView>;
69};
70
78template<class Scalar,
79 class GridView,
80 bool enableGridGeometryCache = false,
83
91template<class Scalar, class GV, class Traits>
92class BoxFacetCouplingFVGridGeometry<Scalar, GV, true, Traits>
93: public BaseGridGeometry<GV, Traits>
94{
96 using ParentType = BaseGridGeometry<GV, Traits>;
97 using GridIndexType = typename IndexTraits<GV>::GridIndex;
98 using LocalIndexType = typename IndexTraits<GV>::LocalIndex;
99
100 using Element = typename GV::template Codim<0>::Entity;
101 using CoordScalar = typename GV::ctype;
102 static const int dim = GV::dimension;
103 static const int dimWorld = GV::dimensionworld;
104
105public:
109
111 using LocalView = typename Traits::template LocalView<ThisType, true>;
113 using SubControlVolume = typename Traits::SubControlVolume;
115 using SubControlVolumeFace = typename Traits::SubControlVolumeFace;
119 using DofMapper = typename Traits::VertexMapper;
121 using FeCache = Dune::LagrangeLocalFiniteElementCache<CoordScalar, Scalar, dim, 1>;
123 using GridView = GV;
124
126 template<class FacetGridView, class CodimOneGridAdapter>
128 const FacetGridView& facetGridView,
129 const CodimOneGridAdapter& codimOneGridAdapter,
130 bool verbose = false)
131 : ParentType(gridView)
132 , cache_(*this)
133 {
134 update_(facetGridView, codimOneGridAdapter, verbose);
135 }
136
138 const DofMapper& dofMapper() const
139 { return this->vertexMapper(); }
140
142 std::size_t numScv() const
143 { return numScv_; }
144
146 std::size_t numScvf() const
147 { return numScvf_; }
148
151 std::size_t numBoundaryScvf() const
152 { return numBoundaryScvf_; }
153
155 std::size_t numDofs() const
156 { return this->vertexMapper().size(); }
157
171 template<class FacetGridView, class CodimOneGridAdapter>
173 const FacetGridView& facetGridView,
174 const CodimOneGridAdapter& codimOneGridAdapter,
175 bool verbose = false)
176 {
178 update_(facetGridView, codimOneGridAdapter, verbose);
179 }
180
182 template<class FacetGridView, class CodimOneGridAdapter>
184 const FacetGridView& facetGridView,
185 const CodimOneGridAdapter& codimOneGridAdapter,
186 bool verbose = false)
187 {
188 ParentType::update(std::move(gridView));
189 update_(facetGridView, codimOneGridAdapter, verbose);
190 }
191
193 const FeCache& feCache() const
194 { return feCache_; }
195
197 bool dofOnBoundary(GridIndexType dofIdx) const
198 { return boundaryDofIndices_[dofIdx]; }
199
201 bool dofOnInteriorBoundary(GridIndexType dofIdx) const
202 { return interiorBoundaryDofIndices_[dofIdx]; }
203
205 bool dofOnPeriodicBoundary(GridIndexType dofIdx) const
206 { return false; }
207
209 GridIndexType periodicallyMappedDof(GridIndexType dofIdx) const
210 { DUNE_THROW(Dune::InvalidStateException, "Periodic boundaries are not supported by the box facet coupling scheme"); }
211
214 { return { gg.cache_ }; }
215
216private:
217 class BoxFacetCouplingGridGeometryCache
218 {
220 public:
223 using DofHelper = typename GeometryHelper::DofHelper;
224
225 explicit BoxFacetCouplingGridGeometryCache(const BoxFacetCouplingFVGridGeometry& gg)
226 : gridGeometry_(&gg)
227 {}
228
229 const BoxFacetCouplingFVGridGeometry& gridGeometry() const
230 { return *gridGeometry_; }
231
233 const std::vector<SubControlVolume>& scvs(GridIndexType eIdx) const
234 { return scvs_[eIdx]; }
235
237 const std::vector<SubControlVolumeFace>& scvfs(GridIndexType eIdx) const
238 { return scvfs_[eIdx]; }
239
240
241 private:
242 void clear_()
243 {
244 scvs_.clear();
245 scvfs_.clear();
246 }
247
248 std::vector<std::vector<SubControlVolume>> scvs_;
249 std::vector<std::vector<SubControlVolumeFace>> scvfs_;
250
251 const BoxFacetCouplingFVGridGeometry* gridGeometry_;
252 };
253
254public:
257 using Cache = BoxFacetCouplingGridGeometryCache;
258
259private:
260 using GeometryHelper = typename Cache::GeometryHelper;
261
262 template<class FacetGridView, class CodimOneGridAdapter>
263 void update_(const FacetGridView& facetGridView,
264 const CodimOneGridAdapter& codimOneGridAdapter,
265 bool verbose = false)
266 {
267 // enrich the vertex mapper subject to the provided facet grid
268 this->vertexMapper().enrich(facetGridView, codimOneGridAdapter, verbose);
269
270 cache_.clear_();
271
272 // resize containers
273 const auto numDof = numDofs();
274 const auto numElements = this->gridView().size(0);
275 cache_.scvs_.resize(numElements);
276 cache_.scvfs_.resize(numElements);
277 boundaryDofIndices_.assign(numDof, false);
278 interiorBoundaryDofIndices_.assign(numDof, false);
279
280 // Build the SCV and SCV faces
281 numScv_ = 0;
282 numScvf_ = 0;
283 numBoundaryScvf_ = 0;
284 for (const auto& element : elements(this->gridView()))
285 {
286 auto eIdx = this->elementMapper().index(element);
287
288 // keep track of number of scvs and scvfs
289 numScv_ += element.subEntities(dim);
290 numScvf_ += element.subEntities(dim-1);
291
292 // get the element geometry
293 auto elementGeometry = element.geometry();
294 const auto refElement = referenceElement(elementGeometry);
295
296 // instantiate the geometry helper
297 GeometryHelper geometryHelper(elementGeometry);
298
299 // construct the sub control volumes
300 cache_.scvs_[eIdx].resize(elementGeometry.corners());
301 for (LocalIndexType scvLocalIdx = 0; scvLocalIdx < elementGeometry.corners(); ++scvLocalIdx)
302 cache_.scvs_[eIdx][scvLocalIdx] = SubControlVolume(geometryHelper.getScvCorners(scvLocalIdx),
303 scvLocalIdx,
304 eIdx,
305 this->vertexMapper().subIndex(element, scvLocalIdx, dim));
306
307 // construct the sub control volume faces
308 LocalIndexType scvfLocalIdx = 0;
309 cache_.scvfs_[eIdx].resize(element.subEntities(dim-1));
310 for (; scvfLocalIdx < element.subEntities(dim-1); ++scvfLocalIdx)
311 {
312 // find the global and local scv indices this scvf is belonging to
313 std::array<LocalIndexType, 2> localScvIndices{{
314 static_cast<LocalIndexType>(refElement.subEntity(scvfLocalIdx, dim-1, 0, dim)),
315 static_cast<LocalIndexType>(refElement.subEntity(scvfLocalIdx, dim-1, 1, dim))
316 }};
317
318 // create the sub-control volume face
319 cache_.scvfs_[eIdx][scvfLocalIdx] = SubControlVolumeFace(geometryHelper,
320 element,
321 scvfLocalIdx,
322 std::move(localScvIndices));
323 }
324
325 // construct the sub control volume faces on the domain/interior boundaries
326 // skip handled facets (necessary for e.g. Dune::FoamGrid)
327 std::vector<unsigned int> handledFacets;
328 for (const auto& intersection : intersections(this->gridView(), element))
329 {
330 if (std::count(handledFacets.begin(), handledFacets.end(), intersection.indexInInside()))
331 continue;
332
333 handledFacets.push_back(intersection.indexInInside());
334
335 // determine if all corners live on the facet grid
336 const auto isGeometry = intersection.geometry();
337 const auto numFaceCorners = isGeometry.corners();
338 const auto idxInInside = intersection.indexInInside();
339 const auto boundary = intersection.boundary();
340
341 std::vector<LocalIndexType> vIndicesLocal(numFaceCorners);
342 for (int i = 0; i < numFaceCorners; ++i)
343 vIndicesLocal[i] = static_cast<LocalIndexType>(refElement.subEntity(idxInInside, 1, i, dim));
344
345 std::vector<LocalIndexType> gridVertexIndices(numFaceCorners);
346 for (int i = 0; i < numFaceCorners; ++i)
347 gridVertexIndices[i] = this->vertexMapper().vertexIndex(element, vIndicesLocal[i], dim);
348
349 // if the vertices compose a facet element, the intersection is on facet grid
350 const bool isOnFacet = codimOneGridAdapter.composeFacetElement(gridVertexIndices);
351
352 // make sure there are no periodic boundaries
353 if (boundary && intersection.neighbor())
354 DUNE_THROW(Dune::InvalidStateException, "Periodic boundaries are not supported by the box facet coupling scheme");
355
356 if (isOnFacet || boundary)
357 {
358 // keep track of number of faces
359 numScvf_ += numFaceCorners;
360 numBoundaryScvf_ += int(boundary)*numFaceCorners;
361
362 for (unsigned int isScvfLocalIdx = 0; isScvfLocalIdx < numFaceCorners; ++isScvfLocalIdx)
363 {
364 // find the inside scv this scvf is belonging to (localIdx = element local vertex index)
365 std::array<LocalIndexType, 2> localScvIndices{{
366 vIndicesLocal[isScvfLocalIdx], vIndicesLocal[isScvfLocalIdx]
367 }};
368
369 // create the sub-control volume face
370 cache_.scvfs_[eIdx].emplace_back(geometryHelper,
371 intersection,
372 isScvfLocalIdx,
373 scvfLocalIdx,
374 std::move(localScvIndices),
375 boundary,
376 isOnFacet);
377
378 // Mark vertices to be on domain and/or interior boundary
379 const auto dofIndex = this->vertexMapper().subIndex(element, vIndicesLocal[isScvfLocalIdx], dim);
380 if (boundary) boundaryDofIndices_[ dofIndex ] = boundary && !isOnFacet;
381 if (isOnFacet) interiorBoundaryDofIndices_[ dofIndex ] = isOnFacet;
382
383 // increment local counter
384 scvfLocalIdx++;
385 }
386 }
387 }
388 }
389 }
390
391 const FeCache feCache_;
392
393 // TODO do we need those?
394 std::size_t numScv_;
395 std::size_t numScvf_;
396 std::size_t numBoundaryScvf_;
397
398 // vertices on domain/interior boundaries
399 std::vector<bool> boundaryDofIndices_;
400 std::vector<bool> interiorBoundaryDofIndices_;
401
402 Cache cache_;
403};
404
412template<class Scalar, class GV, class Traits>
413class BoxFacetCouplingFVGridGeometry<Scalar, GV, false, Traits>
414: public BaseGridGeometry<GV, Traits>
415{
417 using ParentType = BaseGridGeometry<GV, Traits>;
418 using GridIndexType = typename IndexTraits<GV>::GridIndex;
419 using LocalIndexType = typename IndexTraits<GV>::LocalIndex;
420
421 static const int dim = GV::dimension;
422 static const int dimWorld = GV::dimensionworld;
423
424 using Element = typename GV::template Codim<0>::Entity;
425 using Intersection = typename GV::Intersection;
426 using CoordScalar = typename GV::ctype;
427
428public:
432
434 using LocalView = typename Traits::template LocalView<ThisType, false>;
436 using SubControlVolume = typename Traits::SubControlVolume;
438 using SubControlVolumeFace = typename Traits::SubControlVolumeFace;
442 using DofMapper = typename Traits::VertexMapper;
444 using FeCache = Dune::LagrangeLocalFiniteElementCache<CoordScalar, Scalar, dim, 1>;
446 using GridView = GV;
447
449 template<class FacetGridView, class CodimOneGridAdapter>
451 const FacetGridView& facetGridView,
452 const CodimOneGridAdapter& codimOneGridAdapter,
453 bool verbose = false)
454 : ParentType(gridView)
455 , facetMapper_(gridView, Dune::mcmgLayout(Dune::template Codim<1>()))
456 , cache_(*this)
457 {
458 update_(facetGridView, codimOneGridAdapter, verbose);
459 }
460
463 const DofMapper& dofMapper() const
464 { return this->vertexMapper(); }
465
467 std::size_t numScv() const
468 { return numScv_; }
469
471 std::size_t numScvf() const
472 { return numScvf_; }
473
476 std::size_t numBoundaryScvf() const
477 { return numBoundaryScvf_; }
478
480 std::size_t numDofs() const
481 { return this->vertexMapper().size(); }
482
496 template<class FacetGridView, class CodimOneGridAdapter>
498 const FacetGridView& facetGridView,
499 const CodimOneGridAdapter& codimOneGridAdapter,
500 bool verbose = false)
501 {
503 updateFacetMapper_();
504 update_(facetGridView, codimOneGridAdapter, verbose);
505 }
506
508 template<class FacetGridView, class CodimOneGridAdapter>
510 const FacetGridView& facetGridView,
511 const CodimOneGridAdapter& codimOneGridAdapter,
512 bool verbose = false)
513 {
514 ParentType::update(std::move(gridView));
515 updateFacetMapper_();
516 update_(facetGridView, codimOneGridAdapter, verbose);
517 }
518
520 const FeCache& feCache() const
521 { return feCache_; }
522
524 bool dofOnBoundary(unsigned int dofIdx) const
525 { return boundaryDofIndices_[dofIdx]; }
526
528 bool dofOnInteriorBoundary(unsigned int dofIdx) const
529 { return interiorBoundaryDofIndices_[dofIdx]; }
530
532 bool isOnInteriorBoundary(const Element& element, const Intersection& intersection) const
533 { return facetIsOnInteriorBoundary_[ facetMapper_.subIndex(element, intersection.indexInInside(), 1) ]; }
534
536 bool dofOnPeriodicBoundary(GridIndexType dofIdx) const
537 { return false; }
538
540 GridIndexType periodicallyMappedDof(GridIndexType dofIdx) const
541 { DUNE_THROW(Dune::InvalidStateException, "Periodic boundaries are not supported by the facet coupling scheme"); }
542
545 { return { gg.cache_ }; }
546
547private:
548
549 class BoxFacetCouplingGridGeometryCache
550 {
552 public:
555 using DofHelper = typename GeometryHelper::DofHelper;
556
557 explicit BoxFacetCouplingGridGeometryCache(const BoxFacetCouplingFVGridGeometry& gg)
558 : gridGeometry_(&gg)
559 {}
560
561 const BoxFacetCouplingFVGridGeometry& gridGeometry() const
562 { return *gridGeometry_; }
563
564 private:
565 const BoxFacetCouplingFVGridGeometry* gridGeometry_;
566 };
567
568public:
571 using Cache = BoxFacetCouplingGridGeometryCache;
572
573private:
574
575 void updateFacetMapper_()
576 {
577 facetMapper_.update(this->gridView());
578 }
579
580 template<class FacetGridView, class CodimOneGridAdapter>
581 void update_(const FacetGridView& facetGridView,
582 const CodimOneGridAdapter& codimOneGridAdapter,
583 bool verbose)
584 {
585 // enrich the vertex mapper subject to the provided facet grid
586 this->vertexMapper().enrich(facetGridView, codimOneGridAdapter, verbose);
587
588 // save global data on the grid's scvs and scvfs
589 // TODO do we need those information?
590 numScv_ = 0;
591 numScvf_ = 0;
592 numBoundaryScvf_ = 0;
593
594 const auto numDof = numDofs();
595 boundaryDofIndices_.assign(numDof, false);
596 interiorBoundaryDofIndices_.assign(numDof, false);
597 facetIsOnInteriorBoundary_.assign(this->gridView().size(1), false);
598 for (const auto& element : elements(this->gridView()))
599 {
600 numScv_ += element.subEntities(dim);
601 numScvf_ += element.subEntities(dim-1);
602
603 const auto elementGeometry = element.geometry();
604 const auto refElement = referenceElement(elementGeometry);
605
606 // store the sub control volume face indices on the domain/interior boundary
607 // skip handled facets (necessary for e.g. Dune::FoamGrid)
608 std::vector<unsigned int> handledFacets;
609 for (const auto& intersection : intersections(this->gridView(), element))
610 {
611 if (std::count(handledFacets.begin(), handledFacets.end(), intersection.indexInInside()))
612 continue;
613
614 handledFacets.push_back(intersection.indexInInside());
615
616 // determine if all corners live on the facet grid
617 const auto isGeometry = intersection.geometry();
618 const auto numFaceCorners = isGeometry.corners();
619 const auto idxInInside = intersection.indexInInside();
620 const auto boundary = intersection.boundary();
621
622 std::vector<LocalIndexType> vIndicesLocal(numFaceCorners);
623 for (int i = 0; i < numFaceCorners; ++i)
624 vIndicesLocal[i] = static_cast<LocalIndexType>(refElement.subEntity(idxInInside, 1, i, dim));
625
626 std::vector<GridIndexType> gridVertexIndices(numFaceCorners);
627 for (int i = 0; i < numFaceCorners; ++i)
628 gridVertexIndices[i] = this->vertexMapper().vertexIndex(element, vIndicesLocal[i], dim);
629
630 // if all vertices are living on the facet grid, this is an interiour boundary
631 const bool isOnFacet = codimOneGridAdapter.composeFacetElement(gridVertexIndices);
632
633 // make sure there are no periodic boundaries
634 if (boundary && intersection.neighbor())
635 DUNE_THROW(Dune::InvalidStateException, "Periodic boundaries are not supported by the box facet coupling scheme");
636
637 if (isOnFacet || boundary)
638 {
639 numScvf_ += numFaceCorners;
640 numBoundaryScvf_ += int(boundary)*numFaceCorners;
641
642 // Mark vertices to be on domain and/or interior boundary
643 for (int i = 0; i < numFaceCorners; ++i)
644 {
645 const auto dofIndex = this->vertexMapper().subIndex(element, vIndicesLocal[i], dim);
646 if (boundary) boundaryDofIndices_[ dofIndex ] = boundary && !isOnFacet;
647 if (isOnFacet)
648 {
649 interiorBoundaryDofIndices_[ dofIndex ] = true;
650 facetIsOnInteriorBoundary_[ facetMapper_.subIndex(element, idxInInside, 1) ] = true;
651 }
652 }
653 }
654 }
655 }
656 }
657
658 const FeCache feCache_;
659
660 // Information on the global number of geometries
661 // TODO do we need those information?
662 std::size_t numScv_;
663 std::size_t numScvf_;
664 std::size_t numBoundaryScvf_;
665
666 // vertices on domain/interior boundaries
667 std::vector<bool> boundaryDofIndices_;
668 std::vector<bool> interiorBoundaryDofIndices_;
669
670 // facet mapper and markers which facets lie on interior boundaries
671 typename Traits::FacetMapper facetMapper_;
672 std::vector<bool> facetIsOnInteriorBoundary_;
673
674 Cache cache_;
675};
676
677} // end namespace Dumux
678
679#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 element-local finite volume geometry for box models in the context of models consi...
Definition multidomain/facet/box/fvelementgeometry.hh:36
typename Traits::SubControlVolume SubControlVolume
export the type of sub control volume
Definition multidomain/facet/box/fvgridgeometry.hh:436
BoxFacetCouplingFVGridGeometry(const GridView &gridView, const FacetGridView &facetGridView, const CodimOneGridAdapter &codimOneGridAdapter, bool verbose=false)
Constructor.
Definition multidomain/facet/box/fvgridgeometry.hh:450
std::size_t numScv() const
The total number of sub control volumes.
Definition multidomain/facet/box/fvgridgeometry.hh:467
std::size_t numScvf() const
The total number of sun control volume faces.
Definition multidomain/facet/box/fvgridgeometry.hh:471
GV GridView
export the grid view type
Definition multidomain/facet/box/fvgridgeometry.hh:446
DiscretizationMethods::Box DiscretizationMethod
export the discretization method this geometry belongs to
Definition multidomain/facet/box/fvgridgeometry.hh:430
std::size_t numDofs() const
The total number of degrees of freedom.
Definition multidomain/facet/box/fvgridgeometry.hh:480
void update(GridView &&gridView, const FacetGridView &facetGridView, const CodimOneGridAdapter &codimOneGridAdapter, bool verbose=false)
update all fvElementGeometries (call this after grid adaption)
Definition multidomain/facet/box/fvgridgeometry.hh:509
std::size_t numBoundaryScvf() const
Definition multidomain/facet/box/fvgridgeometry.hh:476
Dune::LagrangeLocalFiniteElementCache< CoordScalar, Scalar, dim, 1 > FeCache
export the finite element cache type
Definition multidomain/facet/box/fvgridgeometry.hh:444
const FeCache & feCache() const
The finite element cache for creating local FE bases.
Definition multidomain/facet/box/fvgridgeometry.hh:520
typename Traits::VertexMapper DofMapper
export dof mapper type
Definition multidomain/facet/box/fvgridgeometry.hh:442
const DofMapper & dofMapper() const
Definition multidomain/facet/box/fvgridgeometry.hh:463
friend LocalView localView(const BoxFacetCouplingFVGridGeometry &gg)
local view of this object (constructed with the internal cache)
Definition multidomain/facet/box/fvgridgeometry.hh:544
static constexpr DiscretizationMethod discMethod
Definition multidomain/facet/box/fvgridgeometry.hh:431
typename Traits::template LocalView< ThisType, false > LocalView
export the type of the fv element geometry (the local view type)
Definition multidomain/facet/box/fvgridgeometry.hh:434
GridIndexType periodicallyMappedDof(GridIndexType dofIdx) const
The index of the vertex / d.o.f. on the other side of the periodic boundary.
Definition multidomain/facet/box/fvgridgeometry.hh:540
bool dofOnPeriodicBoundary(GridIndexType dofIdx) const
Periodic boundaries are not supported for the box facet coupling scheme.
Definition multidomain/facet/box/fvgridgeometry.hh:536
BoxFacetCouplingGridGeometryCache Cache
Definition multidomain/facet/box/fvgridgeometry.hh:571
typename Traits::SubControlVolumeFace SubControlVolumeFace
export the type of sub control volume
Definition multidomain/facet/box/fvgridgeometry.hh:438
Extrusion_t< Traits > Extrusion
export the type of extrusion
Definition multidomain/facet/box/fvgridgeometry.hh:440
bool dofOnBoundary(unsigned int dofIdx) const
If a d.o.f. is on the boundary.
Definition multidomain/facet/box/fvgridgeometry.hh:524
void update(const GridView &gridView, const FacetGridView &facetGridView, const CodimOneGridAdapter &codimOneGridAdapter, bool verbose=false)
update all fvElementGeometries (call this after grid adaption)
Definition multidomain/facet/box/fvgridgeometry.hh:497
bool dofOnInteriorBoundary(unsigned int dofIdx) const
If a d.o.f. is on an interior boundary.
Definition multidomain/facet/box/fvgridgeometry.hh:528
bool isOnInteriorBoundary(const Element &element, const Intersection &intersection) const
returns true if an intersection is on an interior boundary
Definition multidomain/facet/box/fvgridgeometry.hh:532
bool dofOnInteriorBoundary(GridIndexType dofIdx) const
If a d.o.f. is on an interior boundary.
Definition multidomain/facet/box/fvgridgeometry.hh:201
GridIndexType periodicallyMappedDof(GridIndexType dofIdx) const
The index of the vertex / d.o.f. on the other side of the periodic boundary.
Definition multidomain/facet/box/fvgridgeometry.hh:209
void update(const GridView &gridView, const FacetGridView &facetGridView, const CodimOneGridAdapter &codimOneGridAdapter, bool verbose=false)
update all fvElementGeometries (call this after grid adaption)
Definition multidomain/facet/box/fvgridgeometry.hh:172
Dune::LagrangeLocalFiniteElementCache< CoordScalar, Scalar, dim, 1 > FeCache
export the finite element cache type
Definition multidomain/facet/box/fvgridgeometry.hh:121
Extrusion_t< Traits > Extrusion
export the type of extrusion
Definition multidomain/facet/box/fvgridgeometry.hh:117
static constexpr DiscretizationMethod discMethod
Definition multidomain/facet/box/fvgridgeometry.hh:108
BoxFacetCouplingGridGeometryCache Cache
Definition multidomain/facet/box/fvgridgeometry.hh:257
GV GridView
export the grid view type
Definition multidomain/facet/box/fvgridgeometry.hh:123
std::size_t numScv() const
The total number of sub control volumes.
Definition multidomain/facet/box/fvgridgeometry.hh:142
bool dofOnPeriodicBoundary(GridIndexType dofIdx) const
Periodic boundaries are not supported for the box facet coupling scheme.
Definition multidomain/facet/box/fvgridgeometry.hh:205
bool dofOnBoundary(GridIndexType dofIdx) const
If a d.o.f. is on the boundary.
Definition multidomain/facet/box/fvgridgeometry.hh:197
typename Traits::VertexMapper DofMapper
export dof mapper type
Definition multidomain/facet/box/fvgridgeometry.hh:119
std::size_t numBoundaryScvf() const
Definition multidomain/facet/box/fvgridgeometry.hh:151
const DofMapper & dofMapper() const
the vertex mapper is the dofMapper
Definition multidomain/facet/box/fvgridgeometry.hh:138
typename Traits::SubControlVolume SubControlVolume
export the type of sub control volume
Definition multidomain/facet/box/fvgridgeometry.hh:113
friend LocalView localView(const BoxFacetCouplingFVGridGeometry &gg)
local view of this object (constructed with the internal cache)
Definition multidomain/facet/box/fvgridgeometry.hh:213
std::size_t numScvf() const
The total number of sun control volume faces.
Definition multidomain/facet/box/fvgridgeometry.hh:146
void update(GridView &&gridView, const FacetGridView &facetGridView, const CodimOneGridAdapter &codimOneGridAdapter, bool verbose=false)
update all fvElementGeometries (call this after grid adaption)
Definition multidomain/facet/box/fvgridgeometry.hh:183
const FeCache & feCache() const
The finite element cache for creating local FE bases.
Definition multidomain/facet/box/fvgridgeometry.hh:193
std::size_t numDofs() const
The total number of degrees of freedom.
Definition multidomain/facet/box/fvgridgeometry.hh:155
BoxFacetCouplingFVGridGeometry(const GridView &gridView, const FacetGridView &facetGridView, const CodimOneGridAdapter &codimOneGridAdapter, bool verbose=false)
Constructor.
Definition multidomain/facet/box/fvgridgeometry.hh:127
typename Traits::template LocalView< ThisType, true > LocalView
export the type of the fv element geometry (the local view type)
Definition multidomain/facet/box/fvgridgeometry.hh:111
DiscretizationMethods::Box DiscretizationMethod
export the discretization method this geometry belongs to
Definition multidomain/facet/box/fvgridgeometry.hh:107
typename Traits::SubControlVolumeFace SubControlVolumeFace
export the type of sub control volume
Definition multidomain/facet/box/fvgridgeometry.hh:115
Base class for the finite volume geometry vector for box schemes in the context of coupled models whe...
Definition multidomain/facet/box/fvgridgeometry.hh:82
Class for a sub control volume face in the box method, i.e a part of the boundary of a sub control vo...
Definition multidomain/facet/box/subcontrolvolumeface.hh:39
Create sub control volumes and sub control volume face geometries.
Definition boxgeometryhelper.hh:261
the sub control volume for the box scheme
Definition discretization/box/subcontrolvolume.hh:58
Adapter that allows retrieving information on a d-dimensional grid for entities of a (d-1)-dimensiona...
Definition codimonegridadapter.hh:40
bool composeFacetElement(const IndexStorage &bulkVertexIndices) const
Returns true if a given set of bulk vertex indices make up a facet grid element.
Definition codimonegridadapter.hh:180
A vertex mapper that allows for enrichment of nodes. Indication on where to enrich the nodes is done ...
Definition vertexmapper.hh:126
the sub control volume for the box scheme
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.
Base class for the element-local finite volume geometry for box models in the context of models consi...
Base class for a sub control volume face of the box method in the context of of models considering co...
Definition cvfelocalresidual.hh:25
Dune::Std::detected_or_t< Dumux::BoxGeometryHelper< GV, GV::dimension, typename T::SubControlVolume, typename T::SubControlVolumeFace >, SpecifiesGeometryHelper, T > BoxFacetCouplingGeometryHelper_t
Definition multidomain/facet/box/fvgridgeometry.hh:39
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
The default traits for the finite volume grid geometry of the box scheme with coupling occurring acro...
Definition multidomain/facet/box/fvgridgeometry.hh:55
BoxFacetCouplingFVElementGeometry< GridGeometry, enableCache > LocalView
Definition multidomain/facet/box/fvgridgeometry.hh:61
Dune::MultipleCodimMultipleGeomTypeMapper< GridView > FacetMapper
Definition multidomain/facet/box/fvgridgeometry.hh:68
BoxFacetCouplingSubControlVolumeFace< GridView > SubControlVolumeFace
Definition multidomain/facet/box/fvgridgeometry.hh:58
EnrichedVertexDofMapper< GridView > VertexMapper
Definition multidomain/facet/box/fvgridgeometry.hh:66
Dune::MultipleCodimMultipleGeomTypeMapper< GridView > ElementMapper
Definition multidomain/facet/box/fvgridgeometry.hh:64
BoxSubControlVolume< GridView > SubControlVolume
Definition multidomain/facet/box/fvgridgeometry.hh:57
typename GridView::IndexSet::IndexType GridIndex
Definition indextraits.hh:27
unsigned int LocalIndex
Definition indextraits.hh:28
A vertex mapper that allows for enrichment of nodes. Indication on where to enrich the nodes is done ...