version 3.10-dev
discretization/staggered/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//
12#ifndef DUMUX_DISCRETIZATION_STAGGERED_FV_GRID_GEOMETRY
13#define DUMUX_DISCRETIZATION_STAGGERED_FV_GRID_GEOMETRY
14
15#include <utility>
16
22
23namespace Dumux {
24
30template<class ActualGridGeometry>
32{
33public:
34
35 explicit GridGeometryView(const ActualGridGeometry* actualGridGeometry)
37
39 using GridView = typename ActualGridGeometry::GridView;
40
43 static constexpr DiscretizationMethod discMethod{};
44
45 using LocalView = typename ActualGridGeometry::LocalView;
46
50 static constexpr bool isCellCenter() { return false; }
51
55 static constexpr bool isFace() {return false; }
56
60 static constexpr auto cellCenterIdx()
61 { return typename ActualGridGeometry::DofTypeIndices::CellCenterIdx{}; }
62
66 static constexpr auto faceIdx()
67 { return typename ActualGridGeometry::DofTypeIndices::FaceIdx{}; }
68
72 const auto& gridView() const
73 { return gridGeometry_->gridView(); }
74
79 const auto& connectivityMap() const // TODO return correct map
80 { return gridGeometry_->connectivityMap(); }
81
85 const auto& vertexMapper() const
86 { return gridGeometry_->vertexMapper(); }
87
91 const auto& elementMapper() const
92 { return gridGeometry_->elementMapper(); }
93
97 const ActualGridGeometry& actualGridGeometry() const
98 { return *gridGeometry_; }
99
100protected:
101 const ActualGridGeometry* gridGeometry_;
102
103};
104
110template <class ActualGridGeometry>
111class CellCenterFVGridGeometry : public GridGeometryView<ActualGridGeometry>
112{
114public:
115
116 using ParentType::ParentType;
117
121 static constexpr bool isCellCenter() { return true; }
122
126 std::size_t numDofs() const
127 { return this->gridGeometry_->numCellCenterDofs(); }
128};
129
135template <class ActualGridGeometry>
136class FaceFVGridGeometry : public GridGeometryView<ActualGridGeometry>
137{
139public:
140
141 using ParentType::ParentType;
142
146 static constexpr bool isFace() {return true; }
147
151 std::size_t numDofs() const
152 { return this->gridGeometry_->numFaceDofs(); }
153};
154
161template<class GridView,
162 bool cachingEnabled,
163 class Traits>
165
172template<class GV, class T>
173class StaggeredFVGridGeometry<GV, true, T>
174: public BaseGridGeometry<GV, T>
175{
178 using GridIndexType = typename IndexTraits<GV>::GridIndex;
179 using LocalIndexType = typename IndexTraits<GV>::LocalIndex;
180 using Element = typename GV::template Codim<0>::Entity;
181
182 using IntersectionMapper = typename T::IntersectionMapper;
183 using GeometryHelper = typename T::GeometryHelper;
184 using ConnectivityMap = typename T::template ConnectivityMap<ThisType>;
185
186public:
188 using Traits = typename T::PublicTraits;
189
192 static constexpr DiscretizationMethod discMethod{};
193
194 static constexpr int upwindSchemeOrder = T::upwindSchemeOrder;
195 static constexpr bool useHigherOrder = upwindSchemeOrder > 1;
196 static constexpr bool cachingEnabled = true;
197
199 using LocalView = typename T::template LocalView<ThisType, true>;
201 using SubControlVolume = typename T::SubControlVolume;
203 using SubControlVolumeFace = typename T::SubControlVolumeFace;
207 using GridView = GV;
209 using DofTypeIndices = typename T::DofTypeIndices;
210
212 static constexpr auto cellCenterIdx()
213 { return typename DofTypeIndices::CellCenterIdx{}; }
214
216 static constexpr auto faceIdx()
217 { return typename DofTypeIndices::FaceIdx{}; }
218
220 static constexpr int upwindStencilOrder()
221 { return upwindSchemeOrder; }
222
225
226 using FVGridGeometryTuple = std::tuple< CellCenterFVGridGeometry<ThisType>, FaceFVGridGeometry<ThisType> >;
227
229 StaggeredFVGridGeometry(const GridView& gridView, const std::string& paramGroup = "")
230 : ParentType(gridView)
231 , intersectionMapper_(gridView)
232 {
233 // Check if the overlap size is what we expect
235 DUNE_THROW(Dune::InvalidStateException, "The staggered discretization method needs at least an overlap of 1 for parallel computations. "
236 << " Set the parameter \"Grid.Overlap\" in the input file.");
237
238 update_();
239 }
240
242 std::size_t numScv() const
243 {
244 return scvs_.size();
245 }
246
248 std::size_t numScvf() const
249 {
250 return scvfs_.size();
251 }
252
254 std::size_t numBoundaryScvf() const
255 {
256 return numBoundaryScvf_;
257 }
258
259
261 std::size_t numIntersections() const
262 {
263 return intersectionMapper_.numIntersections();
264 }
265
267 std::size_t numDofs() const
268 { return numCellCenterDofs() + numFaceDofs(); }
269
270 std::size_t numCellCenterDofs() const
271 { return this->gridView().size(0); }
272
273 std::size_t numFaceDofs() const
274 { return this->gridView().size(1); }
275
277 void update(const GridView& gridView)
278 {
279 ParentType::update(gridView);
280 updateIntersectionMapper_();
281 update_();
282 }
283
285 void update(GridView&& gridView)
286 {
287 ParentType::update(std::move(gridView));
288 updateIntersectionMapper_();
289 update_();
290 }
291
293 const SubControlVolume& scv(GridIndexType scvIdx) const
294 {
295 return scvs_[scvIdx];
296 }
297
299 const SubControlVolumeFace& scvf(GridIndexType scvfIdx) const
300 {
301 return scvfs_[scvfIdx];
302 }
303
305 const std::vector<GridIndexType>& scvfIndicesOfScv(GridIndexType scvIdx) const
306 {
307 return scvfIndicesOfScv_[scvIdx];
308 }
309
310 GridIndexType localToGlobalScvfIndex(GridIndexType eIdx, LocalIndexType localScvfIdx) const
311 {
312 return localToGlobalScvfIndices_[eIdx][localScvfIdx];
313 }
314
315 const SubControlVolumeFace& scvf(GridIndexType eIdx, LocalIndexType localScvfIdx) const
316 {
317 return scvf(localToGlobalScvfIndex(eIdx, localScvfIdx));
318 }
319
324 const ConnectivityMap &connectivityMap() const
325 { return connectivityMap_; }
326
328 std::unique_ptr<CellCenterFVGridGeometry<ThisType>> cellCenterFVGridGeometryPtr() const
329 {
330 return std::make_unique<CellCenterFVGridGeometry<ThisType>>(this);
331 }
332
334 std::unique_ptr<FaceFVGridGeometry<ThisType>> faceFVGridGeometryPtr() const
335 {
336 return std::make_unique<FaceFVGridGeometry<ThisType>>(this);
337 }
338
341 {
343 }
344
347 {
348 return FaceFVGridGeometry<ThisType>(this);
349 }
350
352 bool hasBoundaryScvf(GridIndexType eIdx) const
353 { return hasBoundaryScvf_[eIdx]; }
354
355private:
356
357 void updateIntersectionMapper_()
358 {
359 intersectionMapper_.update(this->gridView());
360 }
361
362 void update_()
363 {
364 // clear containers (necessary after grid refinement)
365 scvs_.clear();
366 scvfs_.clear();
367 scvfIndicesOfScv_.clear();
368 localToGlobalScvfIndices_.clear();
369
370 // determine size of containers
371 std::size_t numScvs = this->gridView().size(0);
372 std::size_t numScvf = 0;
373 for (const auto& element : elements(this->gridView()))
374 numScvf += element.subEntities(1);
375
376 // reserve memory
377 scvs_.resize(numScvs);
378 scvfs_.reserve(numScvf);
379 scvfIndicesOfScv_.resize(numScvs);
380 localToGlobalScvfIndices_.resize(numScvs);
381 hasBoundaryScvf_.assign(numScvs, false);
382
383 // Build the scvs and scv faces
384 GridIndexType scvfIdx = 0;
385 numBoundaryScvf_ = 0;
386 for (const auto& element : elements(this->gridView()))
387 {
388 auto eIdx = this->elementMapper().index(element);
389
390 // reserve memory for the localToGlobalScvfIdx map
391 auto numLocalFaces = intersectionMapper_.numFaces(element);
392 localToGlobalScvfIndices_[eIdx].resize(numLocalFaces);
393
394 scvs_[eIdx] = SubControlVolume(element.geometry(), eIdx);
395
396 // the element-wise index sets for finite volume geometry
397 std::vector<GridIndexType> scvfsIndexSet;
398 scvfsIndexSet.reserve(numLocalFaces);
399
400 GeometryHelper geometryHelper(element, this->gridView());
401
402 for (const auto& intersection : intersections(this->gridView(), element))
403 {
404 geometryHelper.updateLocalFace(intersectionMapper_, intersection);
405 const int localFaceIndex = geometryHelper.localFaceIndex();
406
407 // inner sub control volume faces
408 if (intersection.neighbor())
409 {
410 auto nIdx = this->elementMapper().index(intersection.outside());
411 scvfs_.emplace_back(intersection,
412 intersection.geometry(),
413 scvfIdx,
414 std::vector<GridIndexType>({eIdx, nIdx}),
415 geometryHelper);
416 localToGlobalScvfIndices_[eIdx][localFaceIndex] = scvfIdx;
417 scvfsIndexSet.push_back(scvfIdx++);
418 }
419 // boundary sub control volume faces
420 else if (intersection.boundary())
421 {
422 scvfs_.emplace_back(intersection,
423 intersection.geometry(),
424 scvfIdx,
425 std::vector<GridIndexType>({eIdx, this->gridView().size(0) + numBoundaryScvf_++}),
426 geometryHelper);
427 localToGlobalScvfIndices_[eIdx][localFaceIndex] = scvfIdx;
428 scvfsIndexSet.push_back(scvfIdx++);
429
430 hasBoundaryScvf_[eIdx] = true;
431 }
432 }
433
434 // Save the scvf indices belonging to this scv to build up fv element geometries fast
435 scvfIndicesOfScv_[eIdx] = scvfsIndexSet;
436 }
437
438 // build the connectivity map for an efficient assembly
439 connectivityMap_.update(*this);
440 }
441
442 // mappers
443 ConnectivityMap connectivityMap_;
444 IntersectionMapper intersectionMapper_;
445
446 std::vector<SubControlVolume> scvs_;
447 std::vector<SubControlVolumeFace> scvfs_;
448 std::vector<std::vector<GridIndexType>> scvfIndicesOfScv_;
449 std::vector<std::vector<GridIndexType>> localToGlobalScvfIndices_;
450 GridIndexType numBoundaryScvf_;
451 std::vector<bool> hasBoundaryScvf_;
452};
453
460template<class GV, class T>
461class StaggeredFVGridGeometry<GV, false, T>
462: public BaseGridGeometry<GV, T>
463{
466 using GridIndexType = typename IndexTraits<GV>::GridIndex;
467 using LocalIndexType = typename IndexTraits<GV>::LocalIndex;
468 using Element = typename GV::template Codim<0>::Entity;
469
470 using IntersectionMapper = typename T::IntersectionMapper;
471 using ConnectivityMap = typename T::template ConnectivityMap<ThisType>;
472
473public:
475 using Traits = typename T::PublicTraits;
476
479 static constexpr DiscretizationMethod discMethod{};
480
481 static constexpr int upwindSchemeOrder = T::upwindSchemeOrder;
482 static constexpr bool useHigherOrder = upwindSchemeOrder > 1;
483 static constexpr bool cachingEnabled = false;
484
485 using GeometryHelper = typename T::GeometryHelper;
486
488 using LocalView = typename T::template LocalView<ThisType, false>;
490 using SubControlVolume = typename T::SubControlVolume;
492 using SubControlVolumeFace = typename T::SubControlVolumeFace;
496 using GridView = GV;
498 using DofTypeIndices = typename T::DofTypeIndices;
499
501 static constexpr auto cellCenterIdx()
502 { return typename DofTypeIndices::CellCenterIdx{}; }
503
505 static constexpr auto faceIdx()
506 { return typename DofTypeIndices::FaceIdx{}; }
507
509 static constexpr int upwindStencilOrder()
510 { return upwindSchemeOrder; }
511
514
515 using FVGridGeometryTuple = std::tuple< CellCenterFVGridGeometry<ThisType>, FaceFVGridGeometry<ThisType> >;
516
518 StaggeredFVGridGeometry(const GridView& gridView, const std::string& paramGroup = "")
519 : ParentType(gridView)
520 , intersectionMapper_(gridView)
521 {
522 // Check if the overlap size is what we expect
524 DUNE_THROW(Dune::InvalidStateException, "The staggered discretization method needs at least an overlap of 1 for parallel computations. "
525 << " Set the parameter \"Grid.Overlap\" in the input file.");
526
527 update_();
528 }
529
530
532 void update(const GridView& gridView)
533 {
534 ParentType::update(gridView);
535 updateIntersectionMapper_();
536 update_();
537 }
538
540 void update(GridView&& gridView)
541 {
542 ParentType::update(std::move(gridView));
543 updateIntersectionMapper_();
544 update_();
545 }
546
548 std::size_t numScv() const
549 {
550 return numScvs_;
551 }
552
554 std::size_t numScvf() const
555 {
556 return numScvf_;
557 }
558
560 std::size_t numBoundaryScvf() const
561 {
562 return numBoundaryScvf_;
563 }
564
566 std::size_t numIntersections() const
567 {
568 return intersectionMapper_.numIntersections();
569 }
570
572 std::size_t numDofs() const
573 { return numCellCenterDofs() + numFaceDofs(); }
574
575 std::size_t numCellCenterDofs() const
576 { return this->gridView().size(0); }
577
578 std::size_t numFaceDofs() const
579 { return this->gridView().size(1); }
580
581 const std::vector<GridIndexType>& scvfIndicesOfScv(GridIndexType scvIdx) const
582 { return scvfIndicesOfScv_[scvIdx]; }
583
584 GridIndexType localToGlobalScvfIndex(GridIndexType eIdx, LocalIndexType localScvfIdx) const
585 {
586 return localToGlobalScvfIndices_[eIdx][localScvfIdx];
587 }
588
593 const ConnectivityMap &connectivityMap() const
594 { return connectivityMap_; }
595
597 std::unique_ptr<CellCenterFVGridGeometry<ThisType>> cellCenterFVGridGeometryPtr() const
598 {
599 return std::make_unique<CellCenterFVGridGeometry<ThisType>>(this);
600 }
601
603 std::unique_ptr<FaceFVGridGeometry<ThisType>> faceFVGridGeometryPtr() const
604 {
605 return std::make_unique<FaceFVGridGeometry<ThisType>>(this);
606 }
607
610 {
612 }
613
616 {
617 return FaceFVGridGeometry<ThisType>(this);
618 }
619
621 const IntersectionMapper& intersectionMapper() const
622 {
623 return intersectionMapper_;
624 }
625
627 const std::vector<GridIndexType>& neighborVolVarIndices(GridIndexType scvIdx) const
628 { return neighborVolVarIndices_[scvIdx]; }
629
630private:
631
632 void updateIntersectionMapper_()
633 {
634 intersectionMapper_.update(this->gridView());
635 }
636
637 void update_()
638 {
639 // clear containers (necessary after grid refinement)
640 scvfIndicesOfScv_.clear();
641 neighborVolVarIndices_.clear();
642 localToGlobalScvfIndices_.clear();
643
644 numScvs_ = numCellCenterDofs();
645 numScvf_ = 0;
646 numBoundaryScvf_ = 0;
647 scvfIndicesOfScv_.resize(numScvs_);
648 localToGlobalScvfIndices_.resize(numScvs_);
649 neighborVolVarIndices_.resize(numScvs_);
650
651 // Build the scvs and scv faces
652 for (const auto& element : elements(this->gridView()))
653 {
654 auto eIdx = this->elementMapper().index(element);
655
656 // the element-wise index sets for finite volume geometry
657 auto numLocalFaces = intersectionMapper_.numFaces(element);
658 std::vector<GridIndexType> scvfsIndexSet;
659 scvfsIndexSet.reserve(numLocalFaces);
660 localToGlobalScvfIndices_[eIdx].resize(numLocalFaces);
661
662 std::vector<GridIndexType> neighborVolVarIndexSet;
663 neighborVolVarIndexSet.reserve(numLocalFaces);
664
665 for (const auto& intersection : intersections(this->gridView(), element))
666 {
667 const auto localFaceIndex = intersection.indexInInside();
668 localToGlobalScvfIndices_[eIdx][localFaceIndex] = numScvf_;
669 scvfsIndexSet.push_back(numScvf_++);
670
671 if (intersection.neighbor())
672 {
673 const auto nIdx = this->elementMapper().index(intersection.outside());
674 neighborVolVarIndexSet.emplace_back(nIdx);
675 }
676 else
677 neighborVolVarIndexSet.emplace_back(numScvs_ + numBoundaryScvf_++);
678 }
679
680 // Save the scvf indices belonging to this scv to build up fv element geometries fast
681 scvfIndicesOfScv_[eIdx] = scvfsIndexSet;
682 neighborVolVarIndices_[eIdx] = neighborVolVarIndexSet;
683 }
684
685 // build the connectivity map for an efficient assembly
686 connectivityMap_.update(*this);
687 }
688
690 std::size_t numScvs_;
691 std::size_t numScvf_;
692 std::size_t numBoundaryScvf_;
693 std::vector<std::vector<GridIndexType>> localToGlobalScvfIndices_;
694 std::vector<std::vector<GridIndexType>> neighborVolVarIndices_;
695
696 // mappers
697 ConnectivityMap connectivityMap_;
698 IntersectionMapper intersectionMapper_;
699
701 std::vector<std::vector<GridIndexType>> scvfIndicesOfScv_;
702};
703
704} // end namespace
705
706#endif
Base class for grid geometries.
Check the overlap size for different discretization methods.
Base class for all grid geometries.
Definition: basegridgeometry.hh:52
Cell center specific auxiliary FvGridGeometry classes. Required for the Dumux multi-domain framework.
Definition: discretization/staggered/fvgridgeometry.hh:112
std::size_t numDofs() const
The total number of cell centered dofs.
Definition: discretization/staggered/fvgridgeometry.hh:126
static constexpr bool isCellCenter()
Returns true because this view is related to cell centered dofs.
Definition: discretization/staggered/fvgridgeometry.hh:121
Face specific auxiliary FvGridGeometry classes. Required for the Dumux multi-domain framework.
Definition: discretization/staggered/fvgridgeometry.hh:137
static constexpr bool isFace()
Returns true because this view is related to face dofs.
Definition: discretization/staggered/fvgridgeometry.hh:146
std::size_t numDofs() const
The total number of cell centered dofs.
Definition: discretization/staggered/fvgridgeometry.hh:151
Base class for cell center of face specific auxiliary FvGridGeometry classes. Provides a common inter...
Definition: discretization/staggered/fvgridgeometry.hh:32
static constexpr auto faceIdx()
Return an integral constant index for face dofs.
Definition: discretization/staggered/fvgridgeometry.hh:66
const auto & elementMapper() const
Returns the mapper for elements to indices for constant grids.
Definition: discretization/staggered/fvgridgeometry.hh:91
static constexpr bool isCellCenter()
Returns true if this view if related to cell centered dofs.
Definition: discretization/staggered/fvgridgeometry.hh:50
const ActualGridGeometry & actualGridGeometry() const
Returns the actual gridGeometry we are a restriction of.
Definition: discretization/staggered/fvgridgeometry.hh:97
static constexpr DiscretizationMethod discMethod
Definition: discretization/staggered/fvgridgeometry.hh:43
const ActualGridGeometry * gridGeometry_
Definition: discretization/staggered/fvgridgeometry.hh:101
const auto & connectivityMap() const
Returns the connectivity map of which dofs have derivatives with respect to a given dof.
Definition: discretization/staggered/fvgridgeometry.hh:79
static constexpr auto cellCenterIdx()
Return an integral constant index for cell centered dofs.
Definition: discretization/staggered/fvgridgeometry.hh:60
const auto & gridView() const
Return the gridView this grid geometry object lives on.
Definition: discretization/staggered/fvgridgeometry.hh:72
typename ActualGridGeometry::LocalView LocalView
Definition: discretization/staggered/fvgridgeometry.hh:45
GridGeometryView(const ActualGridGeometry *actualGridGeometry)
Definition: discretization/staggered/fvgridgeometry.hh:35
const auto & vertexMapper() const
Returns the mapper for vertices to indices for possibly adaptive grids.
Definition: discretization/staggered/fvgridgeometry.hh:85
typename ActualGridGeometry::GridView GridView
export the GridView type and the discretization method
Definition: discretization/staggered/fvgridgeometry.hh:39
static constexpr bool isFace()
Returns true if this view if related to face dofs.
Definition: discretization/staggered/fvgridgeometry.hh:55
Base class for the finite volume geometry vector for staggered models This builds up the sub control ...
Definition: discretization/staggered/fvgridgeometry.hh:463
typename T::template LocalView< ThisType, false > LocalView
export the type of the fv element geometry (the local view type)
Definition: discretization/staggered/fvgridgeometry.hh:488
static constexpr auto faceIdx()
return a integral constant for face dofs
Definition: discretization/staggered/fvgridgeometry.hh:505
typename T::DofTypeIndices DofTypeIndices
export the dof type indices
Definition: discretization/staggered/fvgridgeometry.hh:498
typename T::PublicTraits Traits
export the traits
Definition: discretization/staggered/fvgridgeometry.hh:475
void update(const GridView &gridView)
update all fvElementGeometries (call this after grid adaption)
Definition: discretization/staggered/fvgridgeometry.hh:532
GridIndexType localToGlobalScvfIndex(GridIndexType eIdx, LocalIndexType localScvfIdx) const
Definition: discretization/staggered/fvgridgeometry.hh:584
std::size_t numCellCenterDofs() const
Definition: discretization/staggered/fvgridgeometry.hh:575
typename T::GeometryHelper GeometryHelper
Definition: discretization/staggered/fvgridgeometry.hh:485
const ConnectivityMap & connectivityMap() const
Returns the connectivity map of which dofs have derivatives with respect to a given dof.
Definition: discretization/staggered/fvgridgeometry.hh:593
std::size_t numFaceDofs() const
Definition: discretization/staggered/fvgridgeometry.hh:578
CellCenterFVGridGeometry< ThisType > cellCenterFVGridGeometry() const
Return a copy of the cell center specific auxiliary class.
Definition: discretization/staggered/fvgridgeometry.hh:609
static constexpr int upwindStencilOrder()
The order of the stencil built.
Definition: discretization/staggered/fvgridgeometry.hh:509
std::tuple< CellCenterFVGridGeometry< ThisType >, FaceFVGridGeometry< ThisType > > FVGridGeometryTuple
Definition: discretization/staggered/fvgridgeometry.hh:515
const std::vector< GridIndexType > & scvfIndicesOfScv(GridIndexType scvIdx) const
Definition: discretization/staggered/fvgridgeometry.hh:581
GV GridView
export the grid view type
Definition: discretization/staggered/fvgridgeometry.hh:496
typename T::SubControlVolumeFace SubControlVolumeFace
export the type of sub control volume
Definition: discretization/staggered/fvgridgeometry.hh:492
const IntersectionMapper & intersectionMapper() const
Return a reference to the intersection mapper.
Definition: discretization/staggered/fvgridgeometry.hh:621
StaggeredFVGridGeometry(const GridView &gridView, const std::string &paramGroup="")
Constructor.
Definition: discretization/staggered/fvgridgeometry.hh:518
typename T::SubControlVolume SubControlVolume
export the type of sub control volume
Definition: discretization/staggered/fvgridgeometry.hh:490
void update(GridView &&gridView)
update all fvElementGeometries (call this after grid adaption)
Definition: discretization/staggered/fvgridgeometry.hh:540
std::size_t numIntersections() const
The total number of intersections.
Definition: discretization/staggered/fvgridgeometry.hh:566
std::unique_ptr< FaceFVGridGeometry< ThisType > > faceFVGridGeometryPtr() const
Returns a pointer the face specific auxiliary class. Required for the multi-domain FVAssembler's ctor...
Definition: discretization/staggered/fvgridgeometry.hh:603
std::size_t numBoundaryScvf() const
The total number of boundary sub control volume faces.
Definition: discretization/staggered/fvgridgeometry.hh:560
std::unique_ptr< CellCenterFVGridGeometry< ThisType > > cellCenterFVGridGeometryPtr() const
Returns a pointer the cell center specific auxiliary class. Required for the multi-domain FVAssembler...
Definition: discretization/staggered/fvgridgeometry.hh:597
FaceFVGridGeometry< ThisType > faceFVGridGeometry() const
Return a copy of the face specific auxiliary class.
Definition: discretization/staggered/fvgridgeometry.hh:615
Extrusion_t< T > Extrusion
export the type of extrusion
Definition: discretization/staggered/fvgridgeometry.hh:494
static constexpr auto cellCenterIdx()
return a integral constant for cell center dofs
Definition: discretization/staggered/fvgridgeometry.hh:501
std::size_t numDofs() const
the total number of dofs
Definition: discretization/staggered/fvgridgeometry.hh:572
std::size_t numScv() const
The total number of sub control volumes.
Definition: discretization/staggered/fvgridgeometry.hh:548
const std::vector< GridIndexType > & neighborVolVarIndices(GridIndexType scvIdx) const
Return the neighbor volVar indices for all scvfs in the scv with index scvIdx.
Definition: discretization/staggered/fvgridgeometry.hh:627
std::size_t numScvf() const
The total number of sub control volume faces.
Definition: discretization/staggered/fvgridgeometry.hh:554
Base class for the finite volume geometry vector for staggered models This builds up the sub control ...
Definition: discretization/staggered/fvgridgeometry.hh:175
std::unique_ptr< CellCenterFVGridGeometry< ThisType > > cellCenterFVGridGeometryPtr() const
Returns a pointer the cell center specific auxiliary class. Required for the multi-domain FVAssembler...
Definition: discretization/staggered/fvgridgeometry.hh:328
std::size_t numDofs() const
the total number of dofs
Definition: discretization/staggered/fvgridgeometry.hh:267
const SubControlVolumeFace & scvf(GridIndexType scvfIdx) const
Get a sub control volume face with a global scvf index.
Definition: discretization/staggered/fvgridgeometry.hh:299
CellCenterFVGridGeometry< ThisType > cellCenterFVGridGeometry() const
Return a copy of the cell center specific auxiliary class.
Definition: discretization/staggered/fvgridgeometry.hh:340
const std::vector< GridIndexType > & scvfIndicesOfScv(GridIndexType scvIdx) const
Get the sub control volume face indices of an scv by global index.
Definition: discretization/staggered/fvgridgeometry.hh:305
typename T::PublicTraits Traits
export the traits
Definition: discretization/staggered/fvgridgeometry.hh:188
std::size_t numBoundaryScvf() const
The total number of boundary sub control volume faces.
Definition: discretization/staggered/fvgridgeometry.hh:254
typename T::DofTypeIndices DofTypeIndices
export the dof type indices
Definition: discretization/staggered/fvgridgeometry.hh:209
std::size_t numFaceDofs() const
Definition: discretization/staggered/fvgridgeometry.hh:273
static constexpr int upwindStencilOrder()
The order of the stencil built.
Definition: discretization/staggered/fvgridgeometry.hh:220
typename T::SubControlVolume SubControlVolume
export the type of sub control volume
Definition: discretization/staggered/fvgridgeometry.hh:201
std::tuple< CellCenterFVGridGeometry< ThisType >, FaceFVGridGeometry< ThisType > > FVGridGeometryTuple
Definition: discretization/staggered/fvgridgeometry.hh:226
void update(const GridView &gridView)
update all fvElementGeometries (call this after grid adaption)
Definition: discretization/staggered/fvgridgeometry.hh:277
StaggeredFVGridGeometry(const GridView &gridView, const std::string &paramGroup="")
Constructor.
Definition: discretization/staggered/fvgridgeometry.hh:229
std::size_t numScvf() const
The total number of sub control volume faces.
Definition: discretization/staggered/fvgridgeometry.hh:248
typename T::SubControlVolumeFace SubControlVolumeFace
export the type of sub control volume
Definition: discretization/staggered/fvgridgeometry.hh:203
std::size_t numIntersections() const
The total number of intersections.
Definition: discretization/staggered/fvgridgeometry.hh:261
std::unique_ptr< FaceFVGridGeometry< ThisType > > faceFVGridGeometryPtr() const
Returns a pointer the face specific auxiliary class. Required for the multi-domain FVAssembler's ctor...
Definition: discretization/staggered/fvgridgeometry.hh:334
std::size_t numCellCenterDofs() const
Definition: discretization/staggered/fvgridgeometry.hh:270
const SubControlVolumeFace & scvf(GridIndexType eIdx, LocalIndexType localScvfIdx) const
Definition: discretization/staggered/fvgridgeometry.hh:315
FaceFVGridGeometry< ThisType > faceFVGridGeometry() const
Return a copy of the face specific auxiliary class.
Definition: discretization/staggered/fvgridgeometry.hh:346
static constexpr auto cellCenterIdx()
return a integral constant for cell center dofs
Definition: discretization/staggered/fvgridgeometry.hh:212
GV GridView
export the grid view type
Definition: discretization/staggered/fvgridgeometry.hh:207
const ConnectivityMap & connectivityMap() const
Returns the connectivity map of which dofs have derivatives with respect to a given dof.
Definition: discretization/staggered/fvgridgeometry.hh:324
bool hasBoundaryScvf(GridIndexType eIdx) const
Returns whether one of the geometry's scvfs lies on a boundary.
Definition: discretization/staggered/fvgridgeometry.hh:352
static constexpr auto faceIdx()
return a integral constant for face dofs
Definition: discretization/staggered/fvgridgeometry.hh:216
Extrusion_t< T > Extrusion
export the type of extrusion
Definition: discretization/staggered/fvgridgeometry.hh:205
std::size_t numScv() const
The total number of sub control volumes.
Definition: discretization/staggered/fvgridgeometry.hh:242
GridIndexType localToGlobalScvfIndex(GridIndexType eIdx, LocalIndexType localScvfIdx) const
Definition: discretization/staggered/fvgridgeometry.hh:310
typename T::template LocalView< ThisType, true > LocalView
export the type of the fv element geometry (the local view type)
Definition: discretization/staggered/fvgridgeometry.hh:199
const SubControlVolume & scv(GridIndexType scvIdx) const
Get a sub control volume with a global scv index.
Definition: discretization/staggered/fvgridgeometry.hh:293
void update(GridView &&gridView)
update all fvElementGeometries (call this after grid adaption)
Definition: discretization/staggered/fvgridgeometry.hh:285
Base class for the finite volume geometry vector for staggered models This builds up the sub control ...
Definition: discretization/staggered/fvgridgeometry.hh:164
Helper classes to compute the integration elements.
Defines the index types used for grid and local indices.
The available discretization methods in Dumux.
Definition: adapt.hh:17
typename Extrusion< T >::type Extrusion_t
Convenience alias for obtaining the extrusion type.
Definition: extrusion.hh:166
Check if the overlap size is valid for a given discretization method.
Definition: checkoverlapsize.hh:28
Structure to define the index types used for grid and local indices.
Definition: indextraits.hh:26