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 <ranges>
19#include <span>
20#include <algorithm>
21#include <utility>
22
23#include <dune/grid/common/mcmgmapper.hh>
24#include <dune/localfunctions/lagrange/lagrangelfecache.hh>
25
32
36
37namespace Dumux {
38
39namespace Detail {
40template<class GV, class T>
41using BoxFacetCouplingGeometryHelper_t = Dune::Std::detected_or_t<
44 T
45>;
46} // end namespace Detail
47
55template<class GridView>
57{
58 // use a specialized version of the box scvf
61
62 template<class GridGeometry, bool enableCache>
64
65 // per default we use an mcmg mapper for the elements
66 using ElementMapper = Dune::MultipleCodimMultipleGeomTypeMapper<GridView>;
67 // the default vertex mapper is the enriched vertex dof mapper
69 // Mapper type for mapping edges
70 using FacetMapper = Dune::MultipleCodimMultipleGeomTypeMapper<GridView>;
71};
72
80template<class Scalar,
81 class GridView,
82 bool enableGridGeometryCache = false,
85
93template<class Scalar, class GV, class Traits>
94class BoxFacetCouplingFVGridGeometry<Scalar, GV, true, Traits>
95: public BaseGridGeometry<GV, Traits>
96{
98 using ParentType = BaseGridGeometry<GV, Traits>;
99 using GridIndexType = typename IndexTraits<GV>::GridIndex;
100 using LocalIndexType = typename IndexTraits<GV>::LocalIndex;
101
102 using Element = typename GV::template Codim<0>::Entity;
103 using CoordScalar = typename GV::ctype;
104 static const int dim = GV::dimension;
105 static const int dimWorld = GV::dimensionworld;
106
107public:
111
113 using LocalView = typename Traits::template LocalView<ThisType, true>;
115 using SubControlVolume = typename Traits::SubControlVolume;
117 using SubControlVolumeFace = typename Traits::SubControlVolumeFace;
121 using DofMapper = typename Traits::VertexMapper;
123 using FeCache = Dune::LagrangeLocalFiniteElementCache<CoordScalar, Scalar, dim, 1>;
125 using GridView = GV;
126
128 template<class FacetGridView, class CodimOneGridAdapter>
130 const FacetGridView& facetGridView,
131 const CodimOneGridAdapter& codimOneGridAdapter,
132 bool verbose = false)
133 : ParentType(gridView)
134 , cache_(*this)
135 {
136 update_(facetGridView, codimOneGridAdapter, verbose);
137 }
138
140 const DofMapper& dofMapper() const
141 { return this->vertexMapper(); }
142
144 std::size_t numScv() const
145 { return numScv_; }
146
148 std::size_t numScvf() const
149 { return numScvf_; }
150
153 std::size_t numBoundaryScvf() const
154 { return numBoundaryScvf_; }
155
157 std::size_t numDofs() const
158 { return this->vertexMapper().size(); }
159
173 template<class FacetGridView, class CodimOneGridAdapter>
175 const FacetGridView& facetGridView,
176 const CodimOneGridAdapter& codimOneGridAdapter,
177 bool verbose = false)
178 {
180 update_(facetGridView, codimOneGridAdapter, verbose);
181 }
182
184 template<class FacetGridView, class CodimOneGridAdapter>
186 const FacetGridView& facetGridView,
187 const CodimOneGridAdapter& codimOneGridAdapter,
188 bool verbose = false)
189 {
190 ParentType::update(std::move(gridView));
191 update_(facetGridView, codimOneGridAdapter, verbose);
192 }
193
195 const FeCache& feCache() const
196 { return feCache_; }
197
199 bool dofOnBoundary(GridIndexType dofIdx) const
200 { return boundaryDofIndices_[dofIdx]; }
201
203 bool dofOnInteriorBoundary(GridIndexType dofIdx) const
204 { return interiorBoundaryDofIndices_[dofIdx]; }
205
207 bool dofOnPeriodicBoundary(GridIndexType dofIdx) const
208 { return false; }
209
211 [[deprecated("Will be removed after release 3.11. Use periodicallyMappedDofs, returning a range of dofs")]]
212 GridIndexType periodicallyMappedDof(GridIndexType dofIdx) const
213 { DUNE_THROW(Dune::InvalidStateException, "Periodic boundaries are not supported by the box facet coupling scheme"); }
214
216 std::span<const GridIndexType> periodicallyMappedDofs(GridIndexType dofIdx) const
217 { DUNE_THROW(Dune::InvalidStateException, "Periodic boundaries are not supported by the box facet coupling scheme"); }
218
221 { return { gg.cache_ }; }
222
223private:
224 class BoxFacetCouplingGridGeometryCache
225 {
227 public:
230 using DofHelper = typename GeometryHelper::DofHelper;
231
232 explicit BoxFacetCouplingGridGeometryCache(const BoxFacetCouplingFVGridGeometry& gg)
233 : gridGeometry_(&gg)
234 {}
235
236 const BoxFacetCouplingFVGridGeometry& gridGeometry() const
237 { return *gridGeometry_; }
238
240 const std::vector<SubControlVolume>& scvs(GridIndexType eIdx) const
241 { return scvs_[eIdx]; }
242
244 const std::vector<SubControlVolumeFace>& scvfs(GridIndexType eIdx) const
245 { return scvfs_[eIdx]; }
246
247
248 private:
249 void clear_()
250 {
251 scvs_.clear();
252 scvfs_.clear();
253 }
254
255 std::vector<std::vector<SubControlVolume>> scvs_;
256 std::vector<std::vector<SubControlVolumeFace>> scvfs_;
257
258 const BoxFacetCouplingFVGridGeometry* gridGeometry_;
259 };
260
261public:
264 using Cache = BoxFacetCouplingGridGeometryCache;
265
266private:
267 using GeometryHelper = typename Cache::GeometryHelper;
268
269 template<class FacetGridView, class CodimOneGridAdapter>
270 void update_(const FacetGridView& facetGridView,
271 const CodimOneGridAdapter& codimOneGridAdapter,
272 bool verbose = false)
273 {
274 // enrich the vertex mapper subject to the provided facet grid
275 this->vertexMapper().enrich(facetGridView, codimOneGridAdapter, verbose);
276
277 cache_.clear_();
278
279 // resize containers
280 const auto numDof = numDofs();
281 const auto numElements = this->gridView().size(0);
282 cache_.scvs_.resize(numElements);
283 cache_.scvfs_.resize(numElements);
284 boundaryDofIndices_.assign(numDof, false);
285 interiorBoundaryDofIndices_.assign(numDof, false);
286
287 // Build the SCV and SCV faces
288 numScv_ = 0;
289 numScvf_ = 0;
290 numBoundaryScvf_ = 0;
291 for (const auto& element : elements(this->gridView()))
292 {
293 auto eIdx = this->elementMapper().index(element);
294
295 // keep track of number of scvs and scvfs
296 numScv_ += element.subEntities(dim);
297 numScvf_ += element.subEntities(dim-1);
298
299 // get the element geometry
300 auto elementGeometry = element.geometry();
301 const auto refElement = referenceElement(elementGeometry);
302
303 // instantiate the geometry helper
304 GeometryHelper geometryHelper(elementGeometry);
305
306 // construct the sub control volumes
307 cache_.scvs_[eIdx].resize(elementGeometry.corners());
308 for (LocalIndexType scvLocalIdx = 0; scvLocalIdx < elementGeometry.corners(); ++scvLocalIdx)
309 cache_.scvs_[eIdx][scvLocalIdx] = SubControlVolume(geometryHelper.getScvCorners(scvLocalIdx),
310 scvLocalIdx,
311 eIdx,
312 this->vertexMapper().subIndex(element, scvLocalIdx, dim));
313
314 // construct the sub control volume faces
315 LocalIndexType scvfLocalIdx = 0;
316 cache_.scvfs_[eIdx].resize(element.subEntities(dim-1));
317 for (; scvfLocalIdx < element.subEntities(dim-1); ++scvfLocalIdx)
318 {
319 // find the global and local scv indices this scvf is belonging to
320 std::array<LocalIndexType, 2> localScvIndices{{
321 static_cast<LocalIndexType>(refElement.subEntity(scvfLocalIdx, dim-1, 0, dim)),
322 static_cast<LocalIndexType>(refElement.subEntity(scvfLocalIdx, dim-1, 1, dim))
323 }};
324
325 // create the sub-control volume face
326 cache_.scvfs_[eIdx][scvfLocalIdx] = SubControlVolumeFace(geometryHelper,
327 element,
328 scvfLocalIdx,
329 std::move(localScvIndices));
330 }
331
332 // construct the sub control volume faces on the domain/interior boundaries
333 // skip handled facets (necessary for e.g. Dune::FoamGrid)
334 std::vector<unsigned int> handledFacets;
335 for (const auto& intersection : intersections(this->gridView(), element))
336 {
337 if (std::count(handledFacets.begin(), handledFacets.end(), intersection.indexInInside()))
338 continue;
339
340 handledFacets.push_back(intersection.indexInInside());
341
342 // determine if all corners live on the facet grid
343 const auto isGeometry = intersection.geometry();
344 const auto numFaceCorners = isGeometry.corners();
345 const auto idxInInside = intersection.indexInInside();
346 const auto boundary = intersection.boundary();
347
348 std::vector<LocalIndexType> vIndicesLocal(numFaceCorners);
349 for (int i = 0; i < numFaceCorners; ++i)
350 vIndicesLocal[i] = static_cast<LocalIndexType>(refElement.subEntity(idxInInside, 1, i, dim));
351
352 std::vector<LocalIndexType> gridVertexIndices(numFaceCorners);
353 for (int i = 0; i < numFaceCorners; ++i)
354 gridVertexIndices[i] = this->vertexMapper().vertexIndex(element, vIndicesLocal[i], dim);
355
356 // if the vertices compose a facet element, the intersection is on facet grid
357 const bool isOnFacet = codimOneGridAdapter.composeFacetElement(gridVertexIndices);
358
359 // make sure there are no periodic boundaries
360 if (boundary && intersection.neighbor())
361 DUNE_THROW(Dune::InvalidStateException, "Periodic boundaries are not supported by the box facet coupling scheme");
362
363 if (isOnFacet || boundary)
364 {
365 // keep track of number of faces
366 numScvf_ += numFaceCorners;
367 numBoundaryScvf_ += int(boundary)*numFaceCorners;
368
369 for (unsigned int isScvfLocalIdx = 0; isScvfLocalIdx < numFaceCorners; ++isScvfLocalIdx)
370 {
371 // find the inside scv this scvf is belonging to (localIdx = element local vertex index)
372 std::array<LocalIndexType, 2> localScvIndices{{
373 vIndicesLocal[isScvfLocalIdx], vIndicesLocal[isScvfLocalIdx]
374 }};
375
376 // create the sub-control volume face
377 cache_.scvfs_[eIdx].emplace_back(geometryHelper,
378 intersection,
379 isScvfLocalIdx,
380 scvfLocalIdx,
381 std::move(localScvIndices),
382 boundary,
383 isOnFacet);
384
385 // Mark vertices to be on domain and/or interior boundary
386 const auto dofIndex = this->vertexMapper().subIndex(element, vIndicesLocal[isScvfLocalIdx], dim);
387 if (boundary) boundaryDofIndices_[ dofIndex ] = boundary && !isOnFacet;
388 if (isOnFacet) interiorBoundaryDofIndices_[ dofIndex ] = isOnFacet;
389
390 // increment local counter
391 scvfLocalIdx++;
392 }
393 }
394 }
395 }
396 }
397
398 const FeCache feCache_;
399
400 // TODO do we need those?
401 std::size_t numScv_;
402 std::size_t numScvf_;
403 std::size_t numBoundaryScvf_;
404
405 // vertices on domain/interior boundaries
406 std::vector<bool> boundaryDofIndices_;
407 std::vector<bool> interiorBoundaryDofIndices_;
408
409 Cache cache_;
410};
411
419template<class Scalar, class GV, class Traits>
420class BoxFacetCouplingFVGridGeometry<Scalar, GV, false, Traits>
421: public BaseGridGeometry<GV, Traits>
422{
424 using ParentType = BaseGridGeometry<GV, Traits>;
425 using GridIndexType = typename IndexTraits<GV>::GridIndex;
426 using LocalIndexType = typename IndexTraits<GV>::LocalIndex;
427
428 static const int dim = GV::dimension;
429 static const int dimWorld = GV::dimensionworld;
430
431 using Element = typename GV::template Codim<0>::Entity;
432 using Intersection = typename GV::Intersection;
433 using CoordScalar = typename GV::ctype;
434
435public:
439
441 using LocalView = typename Traits::template LocalView<ThisType, false>;
443 using SubControlVolume = typename Traits::SubControlVolume;
445 using SubControlVolumeFace = typename Traits::SubControlVolumeFace;
449 using DofMapper = typename Traits::VertexMapper;
451 using FeCache = Dune::LagrangeLocalFiniteElementCache<CoordScalar, Scalar, dim, 1>;
453 using GridView = GV;
454
456 template<class FacetGridView, class CodimOneGridAdapter>
458 const FacetGridView& facetGridView,
459 const CodimOneGridAdapter& codimOneGridAdapter,
460 bool verbose = false)
461 : ParentType(gridView)
462 , facetMapper_(gridView, Dune::mcmgLayout(Dune::template Codim<1>()))
463 , cache_(*this)
464 {
465 update_(facetGridView, codimOneGridAdapter, verbose);
466 }
467
470 const DofMapper& dofMapper() const
471 { return this->vertexMapper(); }
472
474 std::size_t numScv() const
475 { return numScv_; }
476
478 std::size_t numScvf() const
479 { return numScvf_; }
480
483 std::size_t numBoundaryScvf() const
484 { return numBoundaryScvf_; }
485
487 std::size_t numDofs() const
488 { return this->vertexMapper().size(); }
489
503 template<class FacetGridView, class CodimOneGridAdapter>
505 const FacetGridView& facetGridView,
506 const CodimOneGridAdapter& codimOneGridAdapter,
507 bool verbose = false)
508 {
510 updateFacetMapper_();
511 update_(facetGridView, codimOneGridAdapter, verbose);
512 }
513
515 template<class FacetGridView, class CodimOneGridAdapter>
517 const FacetGridView& facetGridView,
518 const CodimOneGridAdapter& codimOneGridAdapter,
519 bool verbose = false)
520 {
521 ParentType::update(std::move(gridView));
522 updateFacetMapper_();
523 update_(facetGridView, codimOneGridAdapter, verbose);
524 }
525
527 const FeCache& feCache() const
528 { return feCache_; }
529
531 bool dofOnBoundary(unsigned int dofIdx) const
532 { return boundaryDofIndices_[dofIdx]; }
533
535 bool dofOnInteriorBoundary(unsigned int dofIdx) const
536 { return interiorBoundaryDofIndices_[dofIdx]; }
537
539 bool isOnInteriorBoundary(const Element& element, const Intersection& intersection) const
540 { return facetIsOnInteriorBoundary_[ facetMapper_.subIndex(element, intersection.indexInInside(), 1) ]; }
541
543 bool dofOnPeriodicBoundary(GridIndexType dofIdx) const
544 { return false; }
545
547 [[deprecated("Will be removed after release 3.11. Use periodicallyMappedDofs, returning a range of dofs")]]
548 GridIndexType periodicallyMappedDof(GridIndexType dofIdx) const
549 { DUNE_THROW(Dune::InvalidStateException, "Periodic boundaries are not supported by the facet coupling scheme"); }
550
552 std::span<const GridIndexType> periodicallyMappedDofs(GridIndexType dofIdx) const
553 { DUNE_THROW(Dune::InvalidStateException, "Periodic boundaries are not supported by the facet coupling scheme"); }
554
557 { return { gg.cache_ }; }
558
559private:
560
561 class BoxFacetCouplingGridGeometryCache
562 {
564 public:
567 using DofHelper = typename GeometryHelper::DofHelper;
568
569 explicit BoxFacetCouplingGridGeometryCache(const BoxFacetCouplingFVGridGeometry& gg)
570 : gridGeometry_(&gg)
571 {}
572
573 const BoxFacetCouplingFVGridGeometry& gridGeometry() const
574 { return *gridGeometry_; }
575
576 private:
577 const BoxFacetCouplingFVGridGeometry* gridGeometry_;
578 };
579
580public:
583 using Cache = BoxFacetCouplingGridGeometryCache;
584
585private:
586
587 void updateFacetMapper_()
588 {
589 facetMapper_.update(this->gridView());
590 }
591
592 template<class FacetGridView, class CodimOneGridAdapter>
593 void update_(const FacetGridView& facetGridView,
594 const CodimOneGridAdapter& codimOneGridAdapter,
595 bool verbose)
596 {
597 // enrich the vertex mapper subject to the provided facet grid
598 this->vertexMapper().enrich(facetGridView, codimOneGridAdapter, verbose);
599
600 // save global data on the grid's scvs and scvfs
601 // TODO do we need those information?
602 numScv_ = 0;
603 numScvf_ = 0;
604 numBoundaryScvf_ = 0;
605
606 const auto numDof = numDofs();
607 boundaryDofIndices_.assign(numDof, false);
608 interiorBoundaryDofIndices_.assign(numDof, false);
609 facetIsOnInteriorBoundary_.assign(this->gridView().size(1), false);
610 for (const auto& element : elements(this->gridView()))
611 {
612 numScv_ += element.subEntities(dim);
613 numScvf_ += element.subEntities(dim-1);
614
615 const auto elementGeometry = element.geometry();
616 const auto refElement = referenceElement(elementGeometry);
617
618 // store the sub control volume face indices on the domain/interior boundary
619 // skip handled facets (necessary for e.g. Dune::FoamGrid)
620 std::vector<unsigned int> handledFacets;
621 for (const auto& intersection : intersections(this->gridView(), element))
622 {
623 if (std::count(handledFacets.begin(), handledFacets.end(), intersection.indexInInside()))
624 continue;
625
626 handledFacets.push_back(intersection.indexInInside());
627
628 // determine if all corners live on the facet grid
629 const auto isGeometry = intersection.geometry();
630 const auto numFaceCorners = isGeometry.corners();
631 const auto idxInInside = intersection.indexInInside();
632 const auto boundary = intersection.boundary();
633
634 std::vector<LocalIndexType> vIndicesLocal(numFaceCorners);
635 for (int i = 0; i < numFaceCorners; ++i)
636 vIndicesLocal[i] = static_cast<LocalIndexType>(refElement.subEntity(idxInInside, 1, i, dim));
637
638 std::vector<GridIndexType> gridVertexIndices(numFaceCorners);
639 for (int i = 0; i < numFaceCorners; ++i)
640 gridVertexIndices[i] = this->vertexMapper().vertexIndex(element, vIndicesLocal[i], dim);
641
642 // if all vertices are living on the facet grid, this is an interiour boundary
643 const bool isOnFacet = codimOneGridAdapter.composeFacetElement(gridVertexIndices);
644
645 // make sure there are no periodic boundaries
646 if (boundary && intersection.neighbor())
647 DUNE_THROW(Dune::InvalidStateException, "Periodic boundaries are not supported by the box facet coupling scheme");
648
649 if (isOnFacet || boundary)
650 {
651 numScvf_ += numFaceCorners;
652 numBoundaryScvf_ += int(boundary)*numFaceCorners;
653
654 // Mark vertices to be on domain and/or interior boundary
655 for (int i = 0; i < numFaceCorners; ++i)
656 {
657 const auto dofIndex = this->vertexMapper().subIndex(element, vIndicesLocal[i], dim);
658 if (boundary) boundaryDofIndices_[ dofIndex ] = boundary && !isOnFacet;
659 if (isOnFacet)
660 {
661 interiorBoundaryDofIndices_[ dofIndex ] = true;
662 facetIsOnInteriorBoundary_[ facetMapper_.subIndex(element, idxInInside, 1) ] = true;
663 }
664 }
665 }
666 }
667 }
668 }
669
670 const FeCache feCache_;
671
672 // Information on the global number of geometries
673 // TODO do we need those information?
674 std::size_t numScv_;
675 std::size_t numScvf_;
676 std::size_t numBoundaryScvf_;
677
678 // vertices on domain/interior boundaries
679 std::vector<bool> boundaryDofIndices_;
680 std::vector<bool> interiorBoundaryDofIndices_;
681
682 // facet mapper and markers which facets lie on interior boundaries
683 typename Traits::FacetMapper facetMapper_;
684 std::vector<bool> facetIsOnInteriorBoundary_;
685
686 Cache cache_;
687};
688
689} // end namespace Dumux
690
691#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:443
BoxFacetCouplingFVGridGeometry(const GridView &gridView, const FacetGridView &facetGridView, const CodimOneGridAdapter &codimOneGridAdapter, bool verbose=false)
Constructor.
Definition multidomain/facet/box/fvgridgeometry.hh:457
std::size_t numScv() const
The total number of sub control volumes.
Definition multidomain/facet/box/fvgridgeometry.hh:474
std::size_t numScvf() const
The total number of sun control volume faces.
Definition multidomain/facet/box/fvgridgeometry.hh:478
GV GridView
export the grid view type
Definition multidomain/facet/box/fvgridgeometry.hh:453
DiscretizationMethods::Box DiscretizationMethod
export the discretization method this geometry belongs to
Definition multidomain/facet/box/fvgridgeometry.hh:437
std::size_t numDofs() const
The total number of degrees of freedom.
Definition multidomain/facet/box/fvgridgeometry.hh:487
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:516
std::size_t numBoundaryScvf() const
Definition multidomain/facet/box/fvgridgeometry.hh:483
Dune::LagrangeLocalFiniteElementCache< CoordScalar, Scalar, dim, 1 > FeCache
export the finite element cache type
Definition multidomain/facet/box/fvgridgeometry.hh:451
std::span< const GridIndexType > periodicallyMappedDofs(GridIndexType dofIdx) const
The indices of the vertices / d.o.f.s on the other side of the periodic boundary.
Definition multidomain/facet/box/fvgridgeometry.hh:552
const FeCache & feCache() const
The finite element cache for creating local FE bases.
Definition multidomain/facet/box/fvgridgeometry.hh:527
typename Traits::VertexMapper DofMapper
export dof mapper type
Definition multidomain/facet/box/fvgridgeometry.hh:449
const DofMapper & dofMapper() const
Definition multidomain/facet/box/fvgridgeometry.hh:470
friend LocalView localView(const BoxFacetCouplingFVGridGeometry &gg)
local view of this object (constructed with the internal cache)
Definition multidomain/facet/box/fvgridgeometry.hh:556
static constexpr DiscretizationMethod discMethod
Definition multidomain/facet/box/fvgridgeometry.hh:438
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:441
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:548
bool dofOnPeriodicBoundary(GridIndexType dofIdx) const
Periodic boundaries are not supported for the box facet coupling scheme.
Definition multidomain/facet/box/fvgridgeometry.hh:543
BoxFacetCouplingGridGeometryCache Cache
Definition multidomain/facet/box/fvgridgeometry.hh:583
typename Traits::SubControlVolumeFace SubControlVolumeFace
export the type of sub control volume
Definition multidomain/facet/box/fvgridgeometry.hh:445
Extrusion_t< Traits > Extrusion
export the type of extrusion
Definition multidomain/facet/box/fvgridgeometry.hh:447
bool dofOnBoundary(unsigned int dofIdx) const
If a d.o.f. is on the boundary.
Definition multidomain/facet/box/fvgridgeometry.hh:531
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:504
bool dofOnInteriorBoundary(unsigned int dofIdx) const
If a d.o.f. is on an interior boundary.
Definition multidomain/facet/box/fvgridgeometry.hh:535
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:539
bool dofOnInteriorBoundary(GridIndexType dofIdx) const
If a d.o.f. is on an interior boundary.
Definition multidomain/facet/box/fvgridgeometry.hh:203
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:212
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:174
Dune::LagrangeLocalFiniteElementCache< CoordScalar, Scalar, dim, 1 > FeCache
export the finite element cache type
Definition multidomain/facet/box/fvgridgeometry.hh:123
Extrusion_t< Traits > Extrusion
export the type of extrusion
Definition multidomain/facet/box/fvgridgeometry.hh:119
static constexpr DiscretizationMethod discMethod
Definition multidomain/facet/box/fvgridgeometry.hh:110
BoxFacetCouplingGridGeometryCache Cache
Definition multidomain/facet/box/fvgridgeometry.hh:264
std::span< const GridIndexType > periodicallyMappedDofs(GridIndexType dofIdx) const
The indices of the vertices / d.o.f.s on the other side of the periodic boundary.
Definition multidomain/facet/box/fvgridgeometry.hh:216
GV GridView
export the grid view type
Definition multidomain/facet/box/fvgridgeometry.hh:125
std::size_t numScv() const
The total number of sub control volumes.
Definition multidomain/facet/box/fvgridgeometry.hh:144
bool dofOnPeriodicBoundary(GridIndexType dofIdx) const
Periodic boundaries are not supported for the box facet coupling scheme.
Definition multidomain/facet/box/fvgridgeometry.hh:207
bool dofOnBoundary(GridIndexType dofIdx) const
If a d.o.f. is on the boundary.
Definition multidomain/facet/box/fvgridgeometry.hh:199
typename Traits::VertexMapper DofMapper
export dof mapper type
Definition multidomain/facet/box/fvgridgeometry.hh:121
std::size_t numBoundaryScvf() const
Definition multidomain/facet/box/fvgridgeometry.hh:153
const DofMapper & dofMapper() const
the vertex mapper is the dofMapper
Definition multidomain/facet/box/fvgridgeometry.hh:140
typename Traits::SubControlVolume SubControlVolume
export the type of sub control volume
Definition multidomain/facet/box/fvgridgeometry.hh:115
friend LocalView localView(const BoxFacetCouplingFVGridGeometry &gg)
local view of this object (constructed with the internal cache)
Definition multidomain/facet/box/fvgridgeometry.hh:220
std::size_t numScvf() const
The total number of sun control volume faces.
Definition multidomain/facet/box/fvgridgeometry.hh:148
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:185
const FeCache & feCache() const
The finite element cache for creating local FE bases.
Definition multidomain/facet/box/fvgridgeometry.hh:195
std::size_t numDofs() const
The total number of degrees of freedom.
Definition multidomain/facet/box/fvgridgeometry.hh:157
BoxFacetCouplingFVGridGeometry(const GridView &gridView, const FacetGridView &facetGridView, const CodimOneGridAdapter &codimOneGridAdapter, bool verbose=false)
Constructor.
Definition multidomain/facet/box/fvgridgeometry.hh:129
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:113
DiscretizationMethods::Box DiscretizationMethod
export the discretization method this geometry belongs to
Definition multidomain/facet/box/fvgridgeometry.hh:109
typename Traits::SubControlVolumeFace SubControlVolumeFace
export the type of sub control volume
Definition multidomain/facet/box/fvgridgeometry.hh:117
Base class for the finite volume geometry vector for box schemes in the context of coupled models whe...
Definition multidomain/facet/box/fvgridgeometry.hh:84
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:262
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:41
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:57
BoxFacetCouplingFVElementGeometry< GridGeometry, enableCache > LocalView
Definition multidomain/facet/box/fvgridgeometry.hh:63
Dune::MultipleCodimMultipleGeomTypeMapper< GridView > FacetMapper
Definition multidomain/facet/box/fvgridgeometry.hh:70
BoxFacetCouplingSubControlVolumeFace< GridView > SubControlVolumeFace
Definition multidomain/facet/box/fvgridgeometry.hh:60
EnrichedVertexDofMapper< GridView > VertexMapper
Definition multidomain/facet/box/fvgridgeometry.hh:68
Dune::MultipleCodimMultipleGeomTypeMapper< GridView > ElementMapper
Definition multidomain/facet/box/fvgridgeometry.hh:66
BoxSubControlVolume< GridView > SubControlVolume
Definition multidomain/facet/box/fvgridgeometry.hh:59
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 ...