version 3.8
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-FileCopyrightInfo: Copyright © DuMux Project contributors, see AUTHORS.md in root folder
5// SPDX-License-Identifier: GPL-3.0-or-later
6//
17#ifndef DUMUX_POROUSMEDIUMFLOW_BOXDFM_GRID_FVGEOMETRY_HH
18#define DUMUX_POROUSMEDIUMFLOW_BOXDFM_GRID_FVGEOMETRY_HH
19
20#include <utility>
21#include <unordered_map>
22
23#include <dune/localfunctions/lagrange/lagrangelfecache.hh>
24#include <dune/geometry/multilineargeometry.hh>
25#include <dune/grid/common/mcmgmapper.hh>
26
32
33#include "fvelementgeometry.hh"
34#include "geometryhelper.hh"
35#include "subcontrolvolume.hh"
37
38namespace Dumux {
39
40namespace Detail {
41template<class GV, class T>
42using BoxDfmGeometryHelper_t = Dune::Std::detected_or_t<
45 T
46>;
47} // end namespace Detail
48
57template<class GridView, class MapperTraits = DefaultMapperTraits<GridView>>
59: public MapperTraits
60{
63
64 template<class GridGeometry, bool enableCache>
66
67 // Mapper type for mapping edges
68 using FacetMapper = Dune::MultipleCodimMultipleGeomTypeMapper<GridView>;
69};
70
79template<class Scalar,
80 class GridView,
81 bool enableGridGeometryCache = false,
84
95template<class Scalar, class GV, class Traits>
96class BoxDfmFVGridGeometry<Scalar, GV, true, Traits>
97: public BaseGridGeometry<GV, Traits>
98{
101 using GridIndexType = typename GV::IndexSet::IndexType;
102
103 using Element = typename GV::template Codim<0>::Entity;
104 using CoordScalar = typename GV::ctype;
105 static const int dim = GV::dimension;
106 static const int dimWorld = GV::dimensionworld;
107 static_assert(dim == 2 || dim == 3, "The box-dfm GridGeometry is only implemented in 2 or 3 dimensions.");
108
109public:
112 static constexpr DiscretizationMethod discMethod{};
113
115 using LocalView = typename Traits::template LocalView<ThisType, true>;
117 using SubControlVolume = typename Traits::SubControlVolume;
119 using SubControlVolumeFace = typename Traits::SubControlVolumeFace;
123 using DofMapper = typename Traits::VertexMapper;
125 using FeCache = Dune::LagrangeLocalFiniteElementCache<CoordScalar, Scalar, dim, 1>;
127 using GridView = GV;
130
132 template< class FractureGridAdapter >
133 BoxDfmFVGridGeometry(const GridView gridView, const FractureGridAdapter& fractureGridAdapter)
134 : ParentType(gridView)
135 {
136 update_(fractureGridAdapter);
137 }
138
141 const DofMapper& dofMapper() const
142 { return this->vertexMapper(); }
143
145 std::size_t numScv() const
146 { return numScv_; }
147
149 std::size_t numScvf() const
150 { return numScvf_; }
151
154 std::size_t numBoundaryScvf() const
155 { return numBoundaryScvf_; }
156
158 std::size_t numDofs() const
159 { return this->gridView().size(dim); }
160
162 template< class FractureGridAdapter >
163 void update(const GridView& gridView, const FractureGridAdapter& fractureGridAdapter)
164 {
165 ParentType::update(gridView);
166 update_(fractureGridAdapter);
167 }
168
170 template< class FractureGridAdapter >
171 void update(GridView&& gridView, const FractureGridAdapter& fractureGridAdapter)
172 {
173 ParentType::update(std::move(gridView));
174 update_(fractureGridAdapter);
175 }
176
178 const FeCache& feCache() const { return feCache_; }
180 const std::vector<SubControlVolume>& scvs(GridIndexType eIdx) const { return scvs_[eIdx]; }
182 const std::vector<SubControlVolumeFace>& scvfs(GridIndexType eIdx) const { return scvfs_[eIdx]; }
184 bool dofOnBoundary(unsigned int dofIdx) const { return boundaryDofIndices_[dofIdx]; }
186 bool dofOnFracture(unsigned int dofIdx) const { return fractureDofIndices_[dofIdx]; }
188 bool dofOnPeriodicBoundary(std::size_t dofIdx) const { return false; }
189
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::unordered_map<std::size_t, std::size_t> periodicVertexMap() const
196 { return std::unordered_map<std::size_t, std::size_t>(); }
197
198private:
199
200 template< class FractureGridAdapter >
201 void update_(const FractureGridAdapter& fractureGridAdapter)
202 {
203 scvs_.clear();
204 scvfs_.clear();
205
206 auto numElements = this->gridView().size(0);
207 scvs_.resize(numElements);
208 scvfs_.resize(numElements);
209
210 boundaryDofIndices_.assign(numDofs(), false);
211 fractureDofIndices_.assign(this->gridView.size(dim), false);
212
213 numScv_ = 0;
214 numScvf_ = 0;
215 numBoundaryScvf_ = 0;
216 // Build the SCV and SCV faces
217 for (const auto& element : elements(this->gridView()))
218 {
219 // fill the element map with seeds
220 auto eIdx = this->elementMapper().index(element);
221
222 // count
223 numScv_ += element.subEntities(dim);
224 numScvf_ += element.subEntities(dim-1);
225
226 // get the element geometry
227 auto elementGeometry = element.geometry();
228 const auto refElement = referenceElement(elementGeometry);
229
230 // instantiate the geometry helper
231 GeometryHelper geometryHelper(elementGeometry);
232
233 // construct the sub control volumes
234 scvs_[eIdx].resize(elementGeometry.corners());
235 using LocalIndexType = typename SubControlVolumeFace::Traits::LocalIndexType;
236 for (LocalIndexType scvLocalIdx = 0; scvLocalIdx < elementGeometry.corners(); ++scvLocalIdx)
237 {
238 const auto dofIdxGlobal = this->vertexMapper().subIndex(element, scvLocalIdx, dim);
239
240 scvs_[eIdx][scvLocalIdx] = SubControlVolume(geometryHelper,
241 scvLocalIdx,
242 eIdx,
243 dofIdxGlobal);
244 }
245
246 // construct the sub control volume faces
247 LocalIndexType scvfLocalIdx = 0;
248 scvfs_[eIdx].resize(element.subEntities(dim-1));
249 for (; scvfLocalIdx < element.subEntities(dim-1); ++scvfLocalIdx)
250 {
251 // find the global and local scv indices this scvf is belonging to
252 std::vector<LocalIndexType> localScvIndices({static_cast<LocalIndexType>(refElement.subEntity(scvfLocalIdx, dim-1, 0, dim)),
253 static_cast<LocalIndexType>(refElement.subEntity(scvfLocalIdx, dim-1, 1, dim))});
254
255 scvfs_[eIdx][scvfLocalIdx] = SubControlVolumeFace(geometryHelper,
256 element,
257 elementGeometry,
258 scvfLocalIdx,
259 std::move(localScvIndices));
260 }
261
262 // construct the ...
263 // ... sub-control volume faces on the domain boundary
264 // ... sub-control volumes on fracture facets
265 // ... sub-control volume faces on fracture facets
266 // NOTE We do not construct fracture scvfs on boundaries here!
267 // That means specifying Neumann fluxes on only the fractures is not possible
268 // However, it is difficult to interpret this here as a fracture ending on the boundary
269 // could also be connected to a facet which is both boundary and fracture at the same time!
270 // In that case, the fracture boundary scvf wouldn't make sense. In order to do it properly
271 // we would have to find only those fractures that are at the boundary and aren't connected
272 // to a fracture which is a boundary.
273 LocalIndexType scvLocalIdx = element.subEntities(dim);
274 for (const auto& intersection : intersections(this->gridView(), element))
275 {
276 // first, obtain all vertex indices on this intersection
277 const auto& isGeometry = intersection.geometry();
278 const auto numCorners = isGeometry.corners();
279 const auto idxInInside = intersection.indexInInside();
280
281 std::vector<GridIndexType> isVertexIndices(numCorners);
282 for (unsigned int vIdxLocal = 0; vIdxLocal < numCorners; ++vIdxLocal)
283 isVertexIndices[vIdxLocal] = this->vertexMapper().subIndex(element,
284 refElement.subEntity(idxInInside, 1, vIdxLocal, dim),
285 dim);
286 // maybe add boundary scvf
287 if (intersection.boundary() && !intersection.neighbor())
288 {
289 numScvf_ += isGeometry.corners();
290 numBoundaryScvf_ += isGeometry.corners();
291
292 for (unsigned int isScvfLocalIdx = 0; isScvfLocalIdx < numCorners; ++isScvfLocalIdx)
293 {
294 // find the scvs this scvf is belonging to
295 const LocalIndexType insideScvIdx = static_cast<LocalIndexType>(refElement.subEntity(idxInInside, 1, isScvfLocalIdx, dim));
296 std::vector<LocalIndexType> localScvIndices = {insideScvIdx, insideScvIdx};
297 scvfs_[eIdx].emplace_back(geometryHelper,
298 intersection,
299 isGeometry,
300 isScvfLocalIdx,
301 scvfLocalIdx++,
302 std::move(localScvIndices));
303 }
304
305 // add all vertices on the intersection to the set of
306 // boundary vertices
307 const auto numFaceVerts = refElement.size(idxInInside, 1, dim);
308 for (int localVIdx = 0; localVIdx < numFaceVerts; ++localVIdx)
309 {
310 const auto vIdx = refElement.subEntity(idxInInside, 1, localVIdx, dim);
311 const auto vIdxGlobal = this->vertexMapper().subIndex(element, vIdx, dim);
312 boundaryDofIndices_[vIdxGlobal] = true;
313 }
314 }
315 // make sure we have no periodic boundaries
316 else if (intersection.boundary() && intersection.neighbor())
317 DUNE_THROW(Dune::InvalidStateException, "Periodic boundaries are not supported by the box-dfm scheme");
318
319 // maybe add fracture scvs & scvfs
320 if (fractureGridAdapter.composeFacetElement(isVertexIndices))
321 {
322 for (auto vIdx : isVertexIndices)
323 fractureDofIndices_[vIdx] = true;
324
325 // add fracture scv for each vertex of intersection
326 numScv_ += numCorners;
327 const auto curNumScvs = scvs_[eIdx].size();
328 scvs_[eIdx].reserve(curNumScvs+numCorners);
329 for (unsigned int vIdxLocal = 0; vIdxLocal < numCorners; ++vIdxLocal)
330 scvs_[eIdx].emplace_back(geometryHelper,
331 intersection,
332 isGeometry,
333 vIdxLocal,
334 static_cast<LocalIndexType>(refElement.subEntity(idxInInside, 1, vIdxLocal, dim)),
335 scvLocalIdx++,
336 idxInInside,
337 eIdx,
338 isVertexIndices[vIdxLocal]);
339
340 // add fracture scvf for each edge of the intersection in 3d
341 if (dim == 3)
342 {
343 const auto& faceRefElement = referenceElement(isGeometry);
344 for (unsigned int edgeIdx = 0; edgeIdx < faceRefElement.size(1); ++edgeIdx)
345 {
346 // inside/outside scv indices in face local node numbering
347 std::vector<LocalIndexType> localScvIndices({static_cast<LocalIndexType>(faceRefElement.subEntity(edgeIdx, 1, 0, dim-1)),
348 static_cast<LocalIndexType>(faceRefElement.subEntity(edgeIdx, 1, 1, dim-1))});
349
350 // add offset to get the right scv indices
351 std::for_each( localScvIndices.begin(),
352 localScvIndices.end(),
353 [curNumScvs] (auto& elemLocalIdx) { elemLocalIdx += curNumScvs; } );
354
355 // add scvf
356 numScvf_++;
357 scvfs_[eIdx].emplace_back(geometryHelper,
358 intersection,
359 isGeometry,
360 edgeIdx,
361 scvfLocalIdx++,
362 std::move(localScvIndices),
363 intersection.boundary());
364 }
365 }
366
367 // dim == 2, intersection is an edge, make 1 scvf
368 else
369 {
370 // inside/outside scv indices in face local node numbering
371 std::vector<LocalIndexType> localScvIndices({0, 1});
372
373 // add offset such that the fracture scvs above are addressed
374 std::for_each( localScvIndices.begin(),
375 localScvIndices.end(),
376 [curNumScvs] (auto& elemLocalIdx) { elemLocalIdx += curNumScvs; } );
377
378 // add scvf
379 numScvf_++;
380 scvfs_[eIdx].emplace_back(geometryHelper,
381 intersection,
382 isGeometry,
383 /*idxOnIntersection*/0,
384 scvfLocalIdx++,
385 std::move(localScvIndices),
386 intersection.boundary());
387 }
388 }
389 }
390 }
391 }
392
393 const FeCache feCache_;
394
395 std::vector<std::vector<SubControlVolume>> scvs_;
396 std::vector<std::vector<SubControlVolumeFace>> scvfs_;
397
398 // TODO do we need those?
399 std::size_t numScv_;
400 std::size_t numScvf_;
401 std::size_t numBoundaryScvf_;
402
403 // vertices on the boundary & fracture facets
404 std::vector<bool> boundaryDofIndices_;
405 std::vector<bool> fractureDofIndices_;
406};
407
415template<class Scalar, class GV, class Traits>
416class BoxDfmFVGridGeometry<Scalar, GV, false, Traits>
417: public BaseGridGeometry<GV, Traits>
418{
421 using GridIndexType = typename GV::IndexSet::IndexType;
422
423 static const int dim = GV::dimension;
424 static const int dimWorld = GV::dimensionworld;
425
426 using Element = typename GV::template Codim<0>::Entity;
427 using Intersection = typename GV::Intersection;
428 using CoordScalar = typename GV::ctype;
429
430public:
433 static constexpr DiscretizationMethod discMethod{};
434
436 using LocalView = typename Traits::template LocalView<ThisType, false>;
438 using SubControlVolume = typename Traits::SubControlVolume;
440 using SubControlVolumeFace = typename Traits::SubControlVolumeFace;
444 using DofMapper = typename Traits::VertexMapper;
446 using FeCache = Dune::LagrangeLocalFiniteElementCache<CoordScalar, Scalar, dim, 1>;
448 using GridView = GV;
451
453 template< class FractureGridAdapter >
454 BoxDfmFVGridGeometry(const GridView gridView, const FractureGridAdapter& fractureGridAdapter)
455 : ParentType(gridView)
456 , facetMapper_(gridView, Dune::mcmgLayout(Dune::template Codim<1>()))
457 {
458 update_(fractureGridAdapter);
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->gridView().size(dim); }
482
484 template< class FractureGridAdapter >
485 void update(const GridView& gridView, const FractureGridAdapter& fractureGridAdapter)
486 {
487 ParentType::update(gridView);
488 updateFacetMapper_();
489 update_(fractureGridAdapter);
490 }
491
493 template< class FractureGridAdapter >
494 void update(GridView&& gridView, const FractureGridAdapter& fractureGridAdapter)
495 {
496 ParentType::update(std::move(gridView));
497 updateFacetMapper_();
498 update_(fractureGridAdapter);
499 }
500
502 const FeCache& feCache() const { return feCache_; }
504 bool dofOnBoundary(unsigned int dofIdx) const { return boundaryDofIndices_[dofIdx]; }
506 bool dofOnFracture(unsigned int dofIdx) const { return fractureDofIndices_[dofIdx]; }
508 bool dofOnPeriodicBoundary(std::size_t dofIdx) const { return false; }
509
511 bool isOnFracture(const Element& element, const Intersection& intersection) const
512 { return facetOnFracture_[facetMapper_.subIndex(element, intersection.indexInInside(), 1)]; }
513
515 std::size_t periodicallyMappedDof(std::size_t dofIdx) const
516 { DUNE_THROW(Dune::InvalidStateException, "Periodic boundaries are not supported by the box-dfm scheme"); }
517
519 std::unordered_map<std::size_t, std::size_t> periodicVertexMap() const
520 { return std::unordered_map<std::size_t, std::size_t>(); }
521
522private:
523
524 void updateFacetMapper_()
525 {
526 facetMapper_.update(this->gridView());
527 }
528
529 template< class FractureGridAdapter >
530 void update_(const FractureGridAdapter& fractureGridAdapter)
531 {
532 boundaryDofIndices_.assign(numDofs(), false);
533 fractureDofIndices_.assign(numDofs(), false);
534 facetOnFracture_.assign(this->gridView().size(1), false);
535
536 // save global data on the grid's scvs and scvfs
537 // TODO do we need those information?
538 numScv_ = 0;
539 numScvf_ = 0;
540 numBoundaryScvf_ = 0;
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 boundary
550 for (const auto& intersection : intersections(this->gridView(), element))
551 {
552 // first, obtain all vertex indices on this intersection
553 const auto& isGeometry = intersection.geometry();
554 const auto numCorners = isGeometry.corners();
555 const auto idxInInside = intersection.indexInInside();
556
557 std::vector<GridIndexType> isVertexIndices(numCorners);
558 for (unsigned int vIdxLocal = 0; vIdxLocal < numCorners; ++vIdxLocal)
559 isVertexIndices[vIdxLocal] = this->vertexMapper().subIndex(element,
560 refElement.subEntity(idxInInside, 1, vIdxLocal, dim),
561 dim);
562
563 if (intersection.boundary() && !intersection.neighbor())
564 {
565 numScvf_ += numCorners;
566 numBoundaryScvf_ += numCorners;
567
568 // add all vertices on the intersection to the set of
569 // boundary vertices
570 const auto fIdx = intersection.indexInInside();
571 const auto numFaceVerts = refElement.size(fIdx, 1, dim);
572 for (int localVIdx = 0; localVIdx < numFaceVerts; ++localVIdx)
573 {
574 const auto vIdx = refElement.subEntity(fIdx, 1, localVIdx, dim);
575 const auto vIdxGlobal = this->vertexMapper().subIndex(element, vIdx, dim);
576 boundaryDofIndices_[vIdxGlobal] = true;
577 }
578 }
579
580 // make sure we have no periodic boundaries
581 else if (intersection.boundary() && intersection.neighbor())
582 DUNE_THROW(Dune::InvalidStateException, "Periodic boundaries are not supported by the box-dfm scheme");
583
584 // maybe add fracture scvs & scvfs
585 if (fractureGridAdapter.composeFacetElement(isVertexIndices))
586 {
587 facetOnFracture_[facetMapper_.subIndex(element, idxInInside, 1)] = true;
588 for (auto vIdx : isVertexIndices)
589 fractureDofIndices_[vIdx] = true;
590
591 const auto isGeometry = intersection.geometry();
592 numScv_ += isGeometry.corners();
593 numScvf_ += dim == 3 ? referenceElement(isGeometry).size(1) : 1;
594 }
595 }
596 }
597 }
598
599 const FeCache feCache_;
600
601 // Information on the global number of geometries
602 // TODO do we need those information?
603 std::size_t numScv_;
604 std::size_t numScvf_;
605 std::size_t numBoundaryScvf_;
606
607 // vertices on the boundary & fracture facets
608 std::vector<bool> boundaryDofIndices_;
609 std::vector<bool> fractureDofIndices_;
610
611 // facet mapper and markers which facets lie on interior boundaries
612 typename Traits::FacetMapper facetMapper_;
613 std::vector<bool> facetOnFracture_;
614};
615
616} // end namespace Dumux
617
618#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 finite volume geometry vector for box discrete fracture model.
Definition: porousmediumflow/boxdfm/fvelementgeometry.hh:41
Base class for the finite volume geometry vector for box schemes This builds up the sub control volum...
Definition: porousmediumflow/boxdfm/fvgridgeometry.hh:418
Extrusion_t< Traits > Extrusion
Export the extrusion type.
Definition: porousmediumflow/boxdfm/fvgridgeometry.hh:442
bool dofOnBoundary(unsigned int dofIdx) const
If a vertex / d.o.f. is on the boundary.
Definition: porousmediumflow/boxdfm/fvgridgeometry.hh:504
bool dofOnPeriodicBoundary(std::size_t dofIdx) const
Periodic boundaries are not supported for the box-dfm scheme.
Definition: porousmediumflow/boxdfm/fvgridgeometry.hh:508
BoxDfmFVGridGeometry(const GridView gridView, const FractureGridAdapter &fractureGridAdapter)
Constructor.
Definition: porousmediumflow/boxdfm/fvgridgeometry.hh:454
std::size_t numScv() const
The total number of sub control volumes.
Definition: porousmediumflow/boxdfm/fvgridgeometry.hh:467
bool isOnFracture(const Element &element, const Intersection &intersection) const
Returns true if an intersection coincides with a fracture element.
Definition: porousmediumflow/boxdfm/fvgridgeometry.hh:511
std::unordered_map< std::size_t, std::size_t > periodicVertexMap() const
Returns the map between dofs across periodic boundaries.
Definition: porousmediumflow/boxdfm/fvgridgeometry.hh:519
std::size_t numDofs() const
The total number of degrees of freedom.
Definition: porousmediumflow/boxdfm/fvgridgeometry.hh:480
std::size_t numBoundaryScvf() const
Definition: porousmediumflow/boxdfm/fvgridgeometry.hh:476
void update(const GridView &gridView, const FractureGridAdapter &fractureGridAdapter)
update all fvElementGeometries (call this after grid adaption)
Definition: porousmediumflow/boxdfm/fvgridgeometry.hh:485
typename Traits::VertexMapper DofMapper
export dof mapper type
Definition: porousmediumflow/boxdfm/fvgridgeometry.hh:444
typename Traits::template LocalView< ThisType, false > LocalView
export the type of the fv element geometry (the local view type)
Definition: porousmediumflow/boxdfm/fvgridgeometry.hh:436
std::size_t numScvf() const
The total number of sun control volume faces.
Definition: porousmediumflow/boxdfm/fvgridgeometry.hh:471
Dune::LagrangeLocalFiniteElementCache< CoordScalar, Scalar, dim, 1 > FeCache
export the finite element cache type
Definition: porousmediumflow/boxdfm/fvgridgeometry.hh:446
const FeCache & feCache() const
The finite element cache for creating local FE bases.
Definition: porousmediumflow/boxdfm/fvgridgeometry.hh:502
const DofMapper & dofMapper() const
Definition: porousmediumflow/boxdfm/fvgridgeometry.hh:463
typename Traits::SubControlVolumeFace SubControlVolumeFace
export the type of sub control volume
Definition: porousmediumflow/boxdfm/fvgridgeometry.hh:440
Detail::BoxDfmGeometryHelper_t< GV, Traits > GeometryHelper
export the geometry helper type
Definition: porousmediumflow/boxdfm/fvgridgeometry.hh:450
typename Traits::SubControlVolume SubControlVolume
export the type of sub control volume
Definition: porousmediumflow/boxdfm/fvgridgeometry.hh:438
bool dofOnFracture(unsigned int dofIdx) const
If a vertex / d.o.f. is on a fracture.
Definition: porousmediumflow/boxdfm/fvgridgeometry.hh:506
void update(GridView &&gridView, const FractureGridAdapter &fractureGridAdapter)
update all fvElementGeometries (call this after grid adaption)
Definition: porousmediumflow/boxdfm/fvgridgeometry.hh:494
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:515
Base class for the finite volume geometry vector for box schemes that consider extra connectivity bet...
Definition: porousmediumflow/boxdfm/fvgridgeometry.hh:98
typename Traits::SubControlVolume SubControlVolume
Export the type of sub control volume.
Definition: porousmediumflow/boxdfm/fvgridgeometry.hh:117
Dune::LagrangeLocalFiniteElementCache< CoordScalar, Scalar, dim, 1 > FeCache
Export the finite element cache type.
Definition: porousmediumflow/boxdfm/fvgridgeometry.hh:125
std::unordered_map< std::size_t, std::size_t > periodicVertexMap() const
Returns the map between dofs across periodic boundaries.
Definition: porousmediumflow/boxdfm/fvgridgeometry.hh:195
Detail::BoxDfmGeometryHelper_t< GV, Traits > GeometryHelper
export the geometry helper type
Definition: porousmediumflow/boxdfm/fvgridgeometry.hh:129
const std::vector< SubControlVolumeFace > & scvfs(GridIndexType eIdx) const
Get the local scvfs for an element.
Definition: porousmediumflow/boxdfm/fvgridgeometry.hh:182
std::size_t numDofs() const
The total number of degrees of freedom.
Definition: porousmediumflow/boxdfm/fvgridgeometry.hh:158
typename Traits::VertexMapper DofMapper
Export dof mapper type.
Definition: porousmediumflow/boxdfm/fvgridgeometry.hh:123
BoxDfmFVGridGeometry(const GridView gridView, const FractureGridAdapter &fractureGridAdapter)
Constructor.
Definition: porousmediumflow/boxdfm/fvgridgeometry.hh:133
void update(GridView &&gridView, const FractureGridAdapter &fractureGridAdapter)
update all fvElementGeometries (call this after grid adaption)
Definition: porousmediumflow/boxdfm/fvgridgeometry.hh:171
const std::vector< SubControlVolume > & scvs(GridIndexType eIdx) const
Get the local scvs for an element.
Definition: porousmediumflow/boxdfm/fvgridgeometry.hh:180
Extrusion_t< Traits > Extrusion
Export the extrusion type.
Definition: porousmediumflow/boxdfm/fvgridgeometry.hh:121
typename Traits::template LocalView< ThisType, true > LocalView
Export the type of the fv element geometry (the local view type)
Definition: porousmediumflow/boxdfm/fvgridgeometry.hh:115
const DofMapper & dofMapper() const
Definition: porousmediumflow/boxdfm/fvgridgeometry.hh:141
std::size_t numScvf() const
The total number of sun control volume faces.
Definition: porousmediumflow/boxdfm/fvgridgeometry.hh:149
std::size_t numScv() const
The total number of sub control volumes.
Definition: porousmediumflow/boxdfm/fvgridgeometry.hh:145
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
std::size_t numBoundaryScvf() const
Definition: porousmediumflow/boxdfm/fvgridgeometry.hh:154
bool dofOnBoundary(unsigned int dofIdx) const
If a vertex / d.o.f. is on the boundary.
Definition: porousmediumflow/boxdfm/fvgridgeometry.hh:184
const FeCache & feCache() const
The finite element cache for creating local FE bases.
Definition: porousmediumflow/boxdfm/fvgridgeometry.hh:178
void update(const GridView &gridView, const FractureGridAdapter &fractureGridAdapter)
update all fvElementGeometries (call this after grid adaption)
Definition: porousmediumflow/boxdfm/fvgridgeometry.hh:163
typename Traits::SubControlVolumeFace SubControlVolumeFace
Export the type of sub control volume.
Definition: porousmediumflow/boxdfm/fvgridgeometry.hh:119
bool dofOnPeriodicBoundary(std::size_t dofIdx) const
Periodic boundaries are not supported for the box-dfm scheme.
Definition: porousmediumflow/boxdfm/fvgridgeometry.hh:188
bool dofOnFracture(unsigned int dofIdx) const
If a vertex / d.o.f. is on a fracture.
Definition: porousmediumflow/boxdfm/fvgridgeometry.hh:186
Base class for the finite volume geometry vector for box schemes.
Definition: porousmediumflow/boxdfm/fvgridgeometry.hh:83
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:65
the sub control volume for the box discrete fracture scheme
Definition: porousmediumflow/boxdfm/subcontrolvolume.hh:64
Defines the default element and vertex mapper types.
Helper classes to compute the integration elements.
The available discretization methods in Dumux.
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:46
typename T::GeometryHelper SpecifiesGeometryHelper
Definition: basegridgeometry.hh:30
CVFE< CVFEMethods::PQ1 > Box
Definition: method.hh:94
std::size_t numCorners(Shape shape)
Returns the number of corners of a given geometry.
Definition: throatproperties.hh:220
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
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:60
Dune::MultipleCodimMultipleGeomTypeMapper< GridView > FacetMapper
Definition: porousmediumflow/boxdfm/fvgridgeometry.hh:68
Definition: method.hh:46