version 3.10-dev
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-FileCopyrightInfo: 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{
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:
108 static constexpr DiscretizationMethod discMethod{};
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;
126
128 template<class FacetGridView, class CodimOneGridAdapter>
130 const FacetGridView& facetGridView,
131 const CodimOneGridAdapter& codimOneGridAdapter,
132 bool verbose = false)
133 : ParentType(gridView)
134 {
135 update_(facetGridView, codimOneGridAdapter, verbose);
136 }
137
139 const DofMapper& dofMapper() const
140 { return this->vertexMapper(); }
141
143 std::size_t numScv() const
144 { return numScv_; }
145
147 std::size_t numScvf() const
148 { return numScvf_; }
149
152 std::size_t numBoundaryScvf() const
153 { return numBoundaryScvf_; }
154
156 std::size_t numDofs() const
157 { return this->vertexMapper().size(); }
158
172 template<class FacetGridView, class CodimOneGridAdapter>
173 void update(const GridView& gridView,
174 const FacetGridView& facetGridView,
175 const CodimOneGridAdapter& codimOneGridAdapter,
176 bool verbose = false)
177 {
178 ParentType::update(gridView);
179 update_(facetGridView, codimOneGridAdapter, verbose);
180 }
181
183 template<class FacetGridView, class CodimOneGridAdapter>
184 void update(GridView&& gridView,
185 const FacetGridView& facetGridView,
186 const CodimOneGridAdapter& codimOneGridAdapter,
187 bool verbose = false)
188 {
189 ParentType::update(std::move(gridView));
190 update_(facetGridView, codimOneGridAdapter, verbose);
191 }
192
194 const FeCache& feCache() const
195 { return feCache_; }
196
198 const std::vector<SubControlVolume>& scvs(GridIndexType eIdx) const
199 { return scvs_[eIdx]; }
200
202 const std::vector<SubControlVolumeFace>& scvfs(GridIndexType eIdx) const
203 { return scvfs_[eIdx]; }
204
206 bool dofOnBoundary(GridIndexType dofIdx) const
207 { return boundaryDofIndices_[dofIdx]; }
208
210 bool dofOnInteriorBoundary(GridIndexType dofIdx) const
211 { return interiorBoundaryDofIndices_[dofIdx]; }
212
214 bool dofOnPeriodicBoundary(GridIndexType dofIdx) const
215 { return false; }
216
218 GridIndexType periodicallyMappedDof(GridIndexType dofIdx) const
219 { DUNE_THROW(Dune::InvalidStateException, "Periodic boundaries are not supported by the box facet coupling scheme"); }
220
222 [[deprecated("Will be removed after release 3.9. Implement periodicDofMap() if periodic bcs are supported.")]]
223 std::unordered_map<GridIndexType, GridIndexType> periodicVertexMap() const
224 { return std::unordered_map<GridIndexType, GridIndexType>(); }
225
226private:
227
228 template<class FacetGridView, class CodimOneGridAdapter>
229 void update_(const FacetGridView& facetGridView,
230 const CodimOneGridAdapter& codimOneGridAdapter,
231 bool verbose = false)
232 {
233 // enrich the vertex mapper subject to the provided facet grid
234 this->vertexMapper().enrich(facetGridView, codimOneGridAdapter, verbose);
235
236 // resize containers
237 const auto numDof = numDofs();
238 const auto numElements = this->gridView().size(0);
239 scvs_.clear();
240 scvfs_.clear();
241 scvs_.resize(numElements);
242 scvfs_.resize(numElements);
243 boundaryDofIndices_.assign(numDof, false);
244 interiorBoundaryDofIndices_.assign(numDof, false);
245
246 // Build the SCV and SCV faces
247 numScv_ = 0;
248 numScvf_ = 0;
249 numBoundaryScvf_ = 0;
250 for (const auto& element : elements(this->gridView()))
251 {
252 auto eIdx = this->elementMapper().index(element);
253
254 // keep track of number of scvs and scvfs
255 numScv_ += element.subEntities(dim);
256 numScvf_ += element.subEntities(dim-1);
257
258 // get the element geometry
259 auto elementGeometry = element.geometry();
260 const auto refElement = referenceElement(elementGeometry);
261
262 // instantiate the geometry helper
263 GeometryHelper geometryHelper(elementGeometry);
264
265 // construct the sub control volumes
266 scvs_[eIdx].clear();
267 scvs_[eIdx].reserve(elementGeometry.corners());
268 for (LocalIndexType scvLocalIdx = 0; scvLocalIdx < elementGeometry.corners(); ++scvLocalIdx)
269 scvs_[eIdx].emplace_back(geometryHelper.getScvCorners(scvLocalIdx),
270 scvLocalIdx,
271 eIdx,
272 this->vertexMapper().subIndex(element, scvLocalIdx, dim));
273
274 // construct the sub control volume faces
275 LocalIndexType scvfLocalIdx = 0;
276 scvfs_[eIdx].clear();
277 scvfs_[eIdx].reserve(element.subEntities(dim-1));
278 for (; scvfLocalIdx < element.subEntities(dim-1); ++scvfLocalIdx)
279 {
280 // find the global and local scv indices this scvf is belonging to
281 std::vector<LocalIndexType> localScvIndices({static_cast<LocalIndexType>(refElement.subEntity(scvfLocalIdx, dim-1, 0, dim)),
282 static_cast<LocalIndexType>(refElement.subEntity(scvfLocalIdx, dim-1, 1, dim))});
283
284 // create the sub-control volume face
285 scvfs_[eIdx].emplace_back(geometryHelper,
286 element,
287 elementGeometry,
288 scvfLocalIdx,
289 std::move(localScvIndices));
290 }
291
292 // construct the sub control volume faces on the domain/interior boundaries
293 // skip handled facets (necessary for e.g. Dune::FoamGrid)
294 std::vector<unsigned int> handledFacets;
295 for (const auto& intersection : intersections(this->gridView(), element))
296 {
297 if (std::count(handledFacets.begin(), handledFacets.end(), intersection.indexInInside()))
298 continue;
299
300 handledFacets.push_back(intersection.indexInInside());
301
302 // determine if all corners live on the facet grid
303 const auto isGeometry = intersection.geometry();
304 const auto numFaceCorners = isGeometry.corners();
305 const auto idxInInside = intersection.indexInInside();
306 const auto boundary = intersection.boundary();
307
308 std::vector<LocalIndexType> vIndicesLocal(numFaceCorners);
309 for (int i = 0; i < numFaceCorners; ++i)
310 vIndicesLocal[i] = static_cast<LocalIndexType>(refElement.subEntity(idxInInside, 1, i, dim));
311
312 std::vector<LocalIndexType> gridVertexIndices(numFaceCorners);
313 for (int i = 0; i < numFaceCorners; ++i)
314 gridVertexIndices[i] = this->vertexMapper().vertexIndex(element, vIndicesLocal[i], dim);
315
316 // if the vertices compose a facet element, the intersection is on facet grid
317 const bool isOnFacet = codimOneGridAdapter.composeFacetElement(gridVertexIndices);
318
319 // make sure there are no periodic boundaries
320 if (boundary && intersection.neighbor())
321 DUNE_THROW(Dune::InvalidStateException, "Periodic boundaries are not supported by the box facet coupling scheme");
322
323 if (isOnFacet || boundary)
324 {
325 // keep track of number of faces
326 numScvf_ += numFaceCorners;
327 numBoundaryScvf_ += int(boundary)*numFaceCorners;
328
329 for (unsigned int isScvfLocalIdx = 0; isScvfLocalIdx < numFaceCorners; ++isScvfLocalIdx)
330 {
331 // find the inside scv this scvf is belonging to (localIdx = element local vertex index)
332 std::vector<LocalIndexType> localScvIndices = {vIndicesLocal[isScvfLocalIdx], vIndicesLocal[isScvfLocalIdx]};
333
334 // create the sub-control volume face
335 scvfs_[eIdx].emplace_back(geometryHelper,
336 intersection,
337 isGeometry,
338 isScvfLocalIdx,
339 scvfLocalIdx,
340 std::move(localScvIndices),
341 boundary,
342 isOnFacet);
343
344 // Mark vertices to be on domain and/or interior boundary
345 const auto dofIndex = this->vertexMapper().subIndex(element, vIndicesLocal[isScvfLocalIdx], dim);
346 if (boundary) boundaryDofIndices_[ dofIndex ] = boundary && !isOnFacet;
347 if (isOnFacet) interiorBoundaryDofIndices_[ dofIndex ] = isOnFacet;
348
349 // increment local counter
350 scvfLocalIdx++;
351 }
352 }
353 }
354 }
355 }
356
357 const FeCache feCache_;
358
359 std::vector<std::vector<SubControlVolume>> scvs_;
360 std::vector<std::vector<SubControlVolumeFace>> scvfs_;
361
362 // TODO do we need those?
363 std::size_t numScv_;
364 std::size_t numScvf_;
365 std::size_t numBoundaryScvf_;
366
367 // vertices on domain/interior boundaries
368 std::vector<bool> boundaryDofIndices_;
369 std::vector<bool> interiorBoundaryDofIndices_;
370};
371
379template<class Scalar, class GV, class Traits>
380class BoxFacetCouplingFVGridGeometry<Scalar, GV, false, Traits>
381: public BaseGridGeometry<GV, Traits>
382{
385 using GridIndexType = typename IndexTraits<GV>::GridIndex;
386 using LocalIndexType = typename IndexTraits<GV>::LocalIndex;
387
388 static const int dim = GV::dimension;
389 static const int dimWorld = GV::dimensionworld;
390
391 using Element = typename GV::template Codim<0>::Entity;
392 using Intersection = typename GV::Intersection;
393 using CoordScalar = typename GV::ctype;
394
395public:
398 static constexpr DiscretizationMethod discMethod{};
399
401 using LocalView = typename Traits::template LocalView<ThisType, false>;
403 using SubControlVolume = typename Traits::SubControlVolume;
405 using SubControlVolumeFace = typename Traits::SubControlVolumeFace;
409 using DofMapper = typename Traits::VertexMapper;
411 using FeCache = Dune::LagrangeLocalFiniteElementCache<CoordScalar, Scalar, dim, 1>;
413 using GridView = GV;
416
418 template<class FacetGridView, class CodimOneGridAdapter>
420 const FacetGridView& facetGridView,
421 const CodimOneGridAdapter& codimOneGridAdapter,
422 bool verbose = false)
423 : ParentType(gridView)
424 , facetMapper_(gridView, Dune::mcmgLayout(Dune::template Codim<1>()))
425 {
426 update_(facetGridView, codimOneGridAdapter, verbose);
427 }
428
431 const DofMapper& dofMapper() const
432 { return this->vertexMapper(); }
433
435 std::size_t numScv() const
436 { return numScv_; }
437
439 std::size_t numScvf() const
440 { return numScvf_; }
441
444 std::size_t numBoundaryScvf() const
445 { return numBoundaryScvf_; }
446
448 std::size_t numDofs() const
449 { return this->vertexMapper().size(); }
450
464 template<class FacetGridView, class CodimOneGridAdapter>
465 void update(const GridView& gridView,
466 const FacetGridView& facetGridView,
467 const CodimOneGridAdapter& codimOneGridAdapter,
468 bool verbose = false)
469 {
470 ParentType::update(gridView);
471 updateFacetMapper_();
472 update_(facetGridView, codimOneGridAdapter, verbose);
473 }
474
476 template<class FacetGridView, class CodimOneGridAdapter>
477 void update(GridView&& gridView,
478 const FacetGridView& facetGridView,
479 const CodimOneGridAdapter& codimOneGridAdapter,
480 bool verbose = false)
481 {
482 ParentType::update(std::move(gridView));
483 updateFacetMapper_();
484 update_(facetGridView, codimOneGridAdapter, verbose);
485 }
486
488 const FeCache& feCache() const
489 { return feCache_; }
490
492 bool dofOnBoundary(unsigned int dofIdx) const
493 { return boundaryDofIndices_[dofIdx]; }
494
496 bool dofOnInteriorBoundary(unsigned int dofIdx) const
497 { return interiorBoundaryDofIndices_[dofIdx]; }
498
500 bool isOnInteriorBoundary(const Element& element, const Intersection& intersection) const
501 { return facetIsOnInteriorBoundary_[ facetMapper_.subIndex(element, intersection.indexInInside(), 1) ]; }
502
504 bool dofOnPeriodicBoundary(GridIndexType dofIdx) const
505 { return false; }
506
508 GridIndexType periodicallyMappedDof(GridIndexType dofIdx) const
509 { DUNE_THROW(Dune::InvalidStateException, "Periodic boundaries are not supported by the facet coupling scheme"); }
510
512 [[deprecated("Will be removed after release 3.9. Implement periodicDofMap() if periodic bcs are supported.")]]
513 std::unordered_map<GridIndexType, GridIndexType> periodicVertexMap() const
514 { return std::unordered_map<GridIndexType, GridIndexType>(); }
515
516private:
517
518 void updateFacetMapper_()
519 {
520 facetMapper_.update(this->gridView());
521 }
522
523 template<class FacetGridView, class CodimOneGridAdapter>
524 void update_(const FacetGridView& facetGridView,
525 const CodimOneGridAdapter& codimOneGridAdapter,
526 bool verbose)
527 {
528 // enrich the vertex mapper subject to the provided facet grid
529 this->vertexMapper().enrich(facetGridView, codimOneGridAdapter, verbose);
530
531 // save global data on the grid's scvs and scvfs
532 // TODO do we need those information?
533 numScv_ = 0;
534 numScvf_ = 0;
535 numBoundaryScvf_ = 0;
536
537 const auto numDof = numDofs();
538 boundaryDofIndices_.assign(numDof, false);
539 interiorBoundaryDofIndices_.assign(numDof, false);
540 facetIsOnInteriorBoundary_.assign(this->gridView().size(1), false);
541 for (const auto& element : elements(this->gridView()))
542 {
543 numScv_ += element.subEntities(dim);
544 numScvf_ += element.subEntities(dim-1);
545
546 const auto elementGeometry = element.geometry();
547 const auto refElement = referenceElement(elementGeometry);
548
549 // store the sub control volume face indices on the domain/interior boundary
550 // skip handled facets (necessary for e.g. Dune::FoamGrid)
551 std::vector<unsigned int> handledFacets;
552 for (const auto& intersection : intersections(this->gridView(), element))
553 {
554 if (std::count(handledFacets.begin(), handledFacets.end(), intersection.indexInInside()))
555 continue;
556
557 handledFacets.push_back(intersection.indexInInside());
558
559 // determine if all corners live on the facet grid
560 const auto isGeometry = intersection.geometry();
561 const auto numFaceCorners = isGeometry.corners();
562 const auto idxInInside = intersection.indexInInside();
563 const auto boundary = intersection.boundary();
564
565 std::vector<LocalIndexType> vIndicesLocal(numFaceCorners);
566 for (int i = 0; i < numFaceCorners; ++i)
567 vIndicesLocal[i] = static_cast<LocalIndexType>(refElement.subEntity(idxInInside, 1, i, dim));
568
569 std::vector<GridIndexType> gridVertexIndices(numFaceCorners);
570 for (int i = 0; i < numFaceCorners; ++i)
571 gridVertexIndices[i] = this->vertexMapper().vertexIndex(element, vIndicesLocal[i], dim);
572
573 // if all vertices are living on the facet grid, this is an interiour boundary
574 const bool isOnFacet = codimOneGridAdapter.composeFacetElement(gridVertexIndices);
575
576 // make sure there are no periodic boundaries
577 if (boundary && intersection.neighbor())
578 DUNE_THROW(Dune::InvalidStateException, "Periodic boundaries are not supported by the box facet coupling scheme");
579
580 if (isOnFacet || boundary)
581 {
582 numScvf_ += numFaceCorners;
583 numBoundaryScvf_ += int(boundary)*numFaceCorners;
584
585 // Mark vertices to be on domain and/or interior boundary
586 for (int i = 0; i < numFaceCorners; ++i)
587 {
588 const auto dofIndex = this->vertexMapper().subIndex(element, vIndicesLocal[i], dim);
589 if (boundary) boundaryDofIndices_[ dofIndex ] = boundary && !isOnFacet;
590 if (isOnFacet)
591 {
592 interiorBoundaryDofIndices_[ dofIndex ] = true;
593 facetIsOnInteriorBoundary_[ facetMapper_.subIndex(element, idxInInside, 1) ] = true;
594 }
595 }
596 }
597 }
598 }
599 }
600
601 const FeCache feCache_;
602
603 // Information on the global number of geometries
604 // TODO do we need those information?
605 std::size_t numScv_;
606 std::size_t numScvf_;
607 std::size_t numBoundaryScvf_;
608
609 // vertices on domain/interior boundaries
610 std::vector<bool> boundaryDofIndices_;
611 std::vector<bool> interiorBoundaryDofIndices_;
612
613 // facet mapper and markers which facets lie on interior boundaries
614 typename Traits::FacetMapper facetMapper_;
615 std::vector<bool> facetIsOnInteriorBoundary_;
616};
617
618} // end namespace Dumux
619
620#endif
Base class for grid geometries.
Helper class constructing the dual grid finite volume geometries for the box discretizazion method.
Base class for all grid geometries.
Definition: basegridgeometry.hh:52
typename BaseImplementation::GridView GridView
export the grid view type
Definition: basegridgeometry.hh:60
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
Base class for the finite volume geometry vector for box schemes This builds up the sub control volum...
Definition: multidomain/facet/box/fvgridgeometry.hh:382
typename Traits::SubControlVolume SubControlVolume
export the type of sub control volume
Definition: multidomain/facet/box/fvgridgeometry.hh:403
BoxFacetCouplingFVGridGeometry(const GridView &gridView, const FacetGridView &facetGridView, const CodimOneGridAdapter &codimOneGridAdapter, bool verbose=false)
Constructor.
Definition: multidomain/facet/box/fvgridgeometry.hh:419
std::size_t numScv() const
The total number of sub control volumes.
Definition: multidomain/facet/box/fvgridgeometry.hh:435
std::size_t numScvf() const
The total number of sun control volume faces.
Definition: multidomain/facet/box/fvgridgeometry.hh:439
std::size_t numDofs() const
The total number of degrees of freedom.
Definition: multidomain/facet/box/fvgridgeometry.hh:448
std::unordered_map< GridIndexType, GridIndexType > periodicVertexMap() const
Returns the map between dofs across periodic boundaries.
Definition: multidomain/facet/box/fvgridgeometry.hh:513
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:477
std::size_t numBoundaryScvf() const
Definition: multidomain/facet/box/fvgridgeometry.hh:444
Dune::LagrangeLocalFiniteElementCache< CoordScalar, Scalar, dim, 1 > FeCache
export the finite element cache type
Definition: multidomain/facet/box/fvgridgeometry.hh:411
Detail::BoxFacetCouplingGeometryHelper_t< GV, Traits > GeometryHelper
export the geometry helper type
Definition: multidomain/facet/box/fvgridgeometry.hh:415
const FeCache & feCache() const
The finite element cache for creating local FE bases.
Definition: multidomain/facet/box/fvgridgeometry.hh:488
typename Traits::VertexMapper DofMapper
export dof mapper type
Definition: multidomain/facet/box/fvgridgeometry.hh:409
const DofMapper & dofMapper() const
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:401
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:508
bool dofOnPeriodicBoundary(GridIndexType dofIdx) const
Periodic boundaries are not supported for the box facet coupling scheme.
Definition: multidomain/facet/box/fvgridgeometry.hh:504
typename Traits::SubControlVolumeFace SubControlVolumeFace
export the type of sub control volume
Definition: multidomain/facet/box/fvgridgeometry.hh:405
Extrusion_t< Traits > Extrusion
export the type of extrusion
Definition: multidomain/facet/box/fvgridgeometry.hh:407
bool dofOnBoundary(unsigned int dofIdx) const
If a d.o.f. is on the boundary.
Definition: multidomain/facet/box/fvgridgeometry.hh:492
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:465
bool dofOnInteriorBoundary(unsigned int dofIdx) const
If a d.o.f. is on an interior boundary.
Definition: multidomain/facet/box/fvgridgeometry.hh:496
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:500
Base class for the finite volume geometry vector for box schemes in the context of coupled models whe...
Definition: multidomain/facet/box/fvgridgeometry.hh:94
bool dofOnInteriorBoundary(GridIndexType dofIdx) const
If a d.o.f. is on an interior boundary.
Definition: multidomain/facet/box/fvgridgeometry.hh:210
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:218
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:173
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
const std::vector< SubControlVolume > & scvs(GridIndexType eIdx) const
Get the local scvs for an element.
Definition: multidomain/facet/box/fvgridgeometry.hh:198
std::size_t numScv() const
The total number of sub control volumes.
Definition: multidomain/facet/box/fvgridgeometry.hh:143
bool dofOnPeriodicBoundary(GridIndexType dofIdx) const
Periodic boundaries are not supported for the box facet coupling scheme.
Definition: multidomain/facet/box/fvgridgeometry.hh:214
bool dofOnBoundary(GridIndexType dofIdx) const
If a d.o.f. is on the boundary.
Definition: multidomain/facet/box/fvgridgeometry.hh:206
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:152
const DofMapper & dofMapper() const
the vertex mapper is the dofMapper
Definition: multidomain/facet/box/fvgridgeometry.hh:139
typename Traits::SubControlVolume SubControlVolume
export the type of sub control volume
Definition: multidomain/facet/box/fvgridgeometry.hh:113
std::size_t numScvf() const
The total number of sun control volume faces.
Definition: multidomain/facet/box/fvgridgeometry.hh:147
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:184
const FeCache & feCache() const
The finite element cache for creating local FE bases.
Definition: multidomain/facet/box/fvgridgeometry.hh:194
std::size_t numDofs() const
The total number of degrees of freedom.
Definition: multidomain/facet/box/fvgridgeometry.hh:156
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:111
std::unordered_map< GridIndexType, GridIndexType > periodicVertexMap() const
Returns the map between dofs across periodic boundaries.
Definition: multidomain/facet/box/fvgridgeometry.hh:223
const std::vector< SubControlVolumeFace > & scvfs(GridIndexType eIdx) const
Get the local scvfs for an element.
Definition: multidomain/facet/box/fvgridgeometry.hh:202
Detail::BoxFacetCouplingGeometryHelper_t< GV, Traits > GeometryHelper
export the geometry helper type
Definition: multidomain/facet/box/fvgridgeometry.hh:125
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:41
Create sub control volumes and sub control volume face geometries.
Definition: boxgeometryhelper.hh:257
the sub control volume for the box scheme
Definition: discretization/box/subcontrolvolume.hh:60
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.
Defines the index types used for grid and local indices.
The available discretization methods in Dumux.
Base class for a sub control volume face of the box method in the context of of models considering co...
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:43
typename T::GeometryHelper SpecifiesGeometryHelper
Definition: basegridgeometry.hh:30
CVFE< CVFEMethods::PQ1 > Box
Definition: method.hh:94
Definition: adapt.hh:17
typename Extrusion< T >::type Extrusion_t
Convenience alias for obtaining the extrusion type.
Definition: extrusion.hh:166
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
Dune::MultipleCodimMultipleGeomTypeMapper< GridView > FacetMapper
Definition: multidomain/facet/box/fvgridgeometry.hh:68
Dune::MultipleCodimMultipleGeomTypeMapper< GridView > ElementMapper
Definition: multidomain/facet/box/fvgridgeometry.hh:64
Definition: method.hh:46
Structure to define the index types used for grid and local indices.
Definition: indextraits.hh:26