3.5-git
DUNE for Multi-{Phase, Component, Scale, Physics, ...} flow and transport in porous media
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 * See the file COPYING for full copying permissions. *
5 * *
6 * This program is free software: you can redistribute it and/or modify *
7 * it under the terms of the GNU General Public License as published by *
8 * the Free Software Foundation, either version 3 of the License, or *
9 * (at your option) any later version. *
10 * *
11 * This program is distributed in the hope that it will be useful, *
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of *
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
14 * GNU General Public License for more details. *
15 * *
16 * You should have received a copy of the GNU General Public License *
17 * along with this program. If not, see <http://www.gnu.org/licenses/>. *
18 *****************************************************************************/
24#ifndef DUMUX_DISCRETIZATION_STAGGERED_FV_GRID_GEOMETRY
25#define DUMUX_DISCRETIZATION_STAGGERED_FV_GRID_GEOMETRY
26
27#include <utility>
28
35
36namespace Dumux {
37
43template<class ActualGridGeometry>
45{
46public:
47
48 explicit GridGeometryView(const ActualGridGeometry* actualGridGeometry)
50
52 using GridView = typename ActualGridGeometry::GridView;
53
56 static constexpr DiscretizationMethod discMethod{};
57
58 using LocalView = typename ActualGridGeometry::LocalView;
59
63 static constexpr bool isCellCenter() { return false; }
64
68 static constexpr bool isFace() {return false; }
69
73 static constexpr auto cellCenterIdx()
74 { return typename ActualGridGeometry::DofTypeIndices::CellCenterIdx{}; }
75
79 static constexpr auto faceIdx()
80 { return typename ActualGridGeometry::DofTypeIndices::FaceIdx{}; }
81
85 const auto& gridView() const
86 { return gridGeometry_->gridView(); }
87
92 const auto& connectivityMap() const // TODO return correct map
93 { return gridGeometry_->connectivityMap(); }
94
98 const auto& vertexMapper() const
99 { return gridGeometry_->vertexMapper(); }
100
104 const auto& elementMapper() const
105 { return gridGeometry_->elementMapper(); }
106
110 const ActualGridGeometry& actualGridGeometry() const
111 { return *gridGeometry_; }
112
113protected:
114 const ActualGridGeometry* gridGeometry_;
115
116};
117
123template <class ActualGridGeometry>
124class CellCenterFVGridGeometry : public GridGeometryView<ActualGridGeometry>
125{
127public:
128
129 using ParentType::ParentType;
130
134 static constexpr bool isCellCenter() { return true; }
135
139 std::size_t numDofs() const
140 { return this->gridGeometry_->numCellCenterDofs(); }
141};
142
148template <class ActualGridGeometry>
149class FaceFVGridGeometry : public GridGeometryView<ActualGridGeometry>
150{
152public:
153
154 using ParentType::ParentType;
155
159 static constexpr bool isFace() {return true; }
160
164 std::size_t numDofs() const
165 { return this->gridGeometry_->numFaceDofs(); }
166};
167
174template<class GridView,
175 bool cachingEnabled,
176 class Traits>
178
185template<class GV, class T>
186class StaggeredFVGridGeometry<GV, true, T>
187: public BaseGridGeometry<GV, T>
188{
191 using GridIndexType = typename IndexTraits<GV>::GridIndex;
192 using LocalIndexType = typename IndexTraits<GV>::LocalIndex;
193 using Element = typename GV::template Codim<0>::Entity;
194
195 using IntersectionMapper = typename T::IntersectionMapper;
196 using GeometryHelper = typename T::GeometryHelper;
197 using ConnectivityMap = typename T::template ConnectivityMap<ThisType>;
198
199public:
201 using Traits = typename T::PublicTraits;
202
205 static constexpr DiscretizationMethod discMethod{};
206
207 static constexpr int upwindSchemeOrder = T::upwindSchemeOrder;
208 static constexpr bool useHigherOrder = upwindSchemeOrder > 1;
209 static constexpr bool cachingEnabled = true;
210
212 using LocalView = typename T::template LocalView<ThisType, true>;
214 using SubControlVolume = typename T::SubControlVolume;
216 using SubControlVolumeFace = typename T::SubControlVolumeFace;
220 using GridView = GV;
222 using DofTypeIndices = typename T::DofTypeIndices;
223
225 static constexpr auto cellCenterIdx()
226 { return typename DofTypeIndices::CellCenterIdx{}; }
227
229 static constexpr auto faceIdx()
230 { return typename DofTypeIndices::FaceIdx{}; }
231
233 static constexpr int upwindStencilOrder()
234 { return upwindSchemeOrder; }
235
238
239 using FVGridGeometryTuple = std::tuple< CellCenterFVGridGeometry<ThisType>, FaceFVGridGeometry<ThisType> >;
240
242 StaggeredFVGridGeometry(const GridView& gridView, const std::string& paramGroup = "")
243 : ParentType(gridView)
244 , intersectionMapper_(gridView)
245 {
246 // Check if the overlap size is what we expect
248 DUNE_THROW(Dune::InvalidStateException, "The staggered discretization method needs at least an overlap of 1 for parallel computations. "
249 << " Set the parameter \"Grid.Overlap\" in the input file.");
250
251 update_();
252 }
253
255 std::size_t numScv() const
256 {
257 return scvs_.size();
258 }
259
261 std::size_t numScvf() const
262 {
263 return scvfs_.size();
264 }
265
267 std::size_t numBoundaryScvf() const
268 {
269 return numBoundaryScvf_;
270 }
271
272
274 std::size_t numIntersections() const
275 {
276 return intersectionMapper_.numIntersections();
277 }
278
280 std::size_t numDofs() const
281 { return numCellCenterDofs() + numFaceDofs(); }
282
283 std::size_t numCellCenterDofs() const
284 { return this->gridView().size(0); }
285
286 std::size_t numFaceDofs() const
287 { return this->gridView().size(1); }
288
290 [[deprecated("Use update(gridView) instead! Will be removed after release 3.5.")]]
291 void update()
292 {
293 ParentType::update();
294 updateIntersectionMapper_();
295 update_();
296 }
297
299 void update(const GridView& gridView)
300 {
301 ParentType::update(gridView);
302 updateIntersectionMapper_();
303 update_();
304 }
305
307 void update(GridView&& gridView)
308 {
309 ParentType::update(std::move(gridView));
310 updateIntersectionMapper_();
311 update_();
312 }
313
315 const SubControlVolume& scv(GridIndexType scvIdx) const
316 {
317 return scvs_[scvIdx];
318 }
319
321 const SubControlVolumeFace& scvf(GridIndexType scvfIdx) const
322 {
323 return scvfs_[scvfIdx];
324 }
325
327 const std::vector<GridIndexType>& scvfIndicesOfScv(GridIndexType scvIdx) const
328 {
329 return scvfIndicesOfScv_[scvIdx];
330 }
331
332 GridIndexType localToGlobalScvfIndex(GridIndexType eIdx, LocalIndexType localScvfIdx) const
333 {
334 return localToGlobalScvfIndices_[eIdx][localScvfIdx];
335 }
336
337 const SubControlVolumeFace& scvf(GridIndexType eIdx, LocalIndexType localScvfIdx) const
338 {
339 return scvf(localToGlobalScvfIndex(eIdx, localScvfIdx));
340 }
341
346 const ConnectivityMap &connectivityMap() const
347 { return connectivityMap_; }
348
350 std::unique_ptr<CellCenterFVGridGeometry<ThisType>> cellCenterFVGridGeometryPtr() const
351 {
352 return std::make_unique<CellCenterFVGridGeometry<ThisType>>(this);
353 }
354
356 std::unique_ptr<FaceFVGridGeometry<ThisType>> faceFVGridGeometryPtr() const
357 {
358 return std::make_unique<FaceFVGridGeometry<ThisType>>(this);
359 }
360
363 {
365 }
366
369 {
370 return FaceFVGridGeometry<ThisType>(this);
371 }
372
374 bool hasBoundaryScvf(GridIndexType eIdx) const
375 { return hasBoundaryScvf_[eIdx]; }
376
377private:
378
379 void updateIntersectionMapper_()
380 {
381 if constexpr (Deprecated::hasUpdateGridView<IntersectionMapper, GridView>())
382 intersectionMapper_.update(this->gridView());
383 else
384 Deprecated::update(intersectionMapper_);
385 }
386
387 void update_()
388 {
389 // clear containers (necessary after grid refinement)
390 scvs_.clear();
391 scvfs_.clear();
392 scvfIndicesOfScv_.clear();
393 localToGlobalScvfIndices_.clear();
394
395 // determine size of containers
396 std::size_t numScvs = this->gridView().size(0);
397 std::size_t numScvf = 0;
398 for (const auto& element : elements(this->gridView()))
399 numScvf += element.subEntities(1);
400
401 // reserve memory
402 scvs_.resize(numScvs);
403 scvfs_.reserve(numScvf);
404 scvfIndicesOfScv_.resize(numScvs);
405 localToGlobalScvfIndices_.resize(numScvs);
406 hasBoundaryScvf_.assign(numScvs, false);
407
408 // Build the scvs and scv faces
409 GridIndexType scvfIdx = 0;
410 numBoundaryScvf_ = 0;
411 for (const auto& element : elements(this->gridView()))
412 {
413 auto eIdx = this->elementMapper().index(element);
414
415 // reserve memory for the localToGlobalScvfIdx map
416 auto numLocalFaces = intersectionMapper_.numFaces(element);
417 localToGlobalScvfIndices_[eIdx].resize(numLocalFaces);
418
419 scvs_[eIdx] = SubControlVolume(element.geometry(), eIdx);
420
421 // the element-wise index sets for finite volume geometry
422 std::vector<GridIndexType> scvfsIndexSet;
423 scvfsIndexSet.reserve(numLocalFaces);
424
425 GeometryHelper geometryHelper(element, this->gridView());
426
427 for (const auto& intersection : intersections(this->gridView(), element))
428 {
429 geometryHelper.updateLocalFace(intersectionMapper_, intersection);
430 const int localFaceIndex = geometryHelper.localFaceIndex();
431
432 // inner sub control volume faces
433 if (intersection.neighbor())
434 {
435 auto nIdx = this->elementMapper().index(intersection.outside());
436 scvfs_.emplace_back(intersection,
437 intersection.geometry(),
438 scvfIdx,
439 std::vector<GridIndexType>({eIdx, nIdx}),
440 geometryHelper);
441 localToGlobalScvfIndices_[eIdx][localFaceIndex] = scvfIdx;
442 scvfsIndexSet.push_back(scvfIdx++);
443 }
444 // boundary sub control volume faces
445 else if (intersection.boundary())
446 {
447 scvfs_.emplace_back(intersection,
448 intersection.geometry(),
449 scvfIdx,
450 std::vector<GridIndexType>({eIdx, this->gridView().size(0) + numBoundaryScvf_++}),
451 geometryHelper);
452 localToGlobalScvfIndices_[eIdx][localFaceIndex] = scvfIdx;
453 scvfsIndexSet.push_back(scvfIdx++);
454
455 hasBoundaryScvf_[eIdx] = true;
456 }
457 }
458
459 // Save the scvf indices belonging to this scv to build up fv element geometries fast
460 scvfIndicesOfScv_[eIdx] = scvfsIndexSet;
461 }
462
463 // build the connectivity map for an efficient assembly
464 connectivityMap_.update(*this);
465 }
466
467 // mappers
468 ConnectivityMap connectivityMap_;
469 IntersectionMapper intersectionMapper_;
470
471 std::vector<SubControlVolume> scvs_;
472 std::vector<SubControlVolumeFace> scvfs_;
473 std::vector<std::vector<GridIndexType>> scvfIndicesOfScv_;
474 std::vector<std::vector<GridIndexType>> localToGlobalScvfIndices_;
475 GridIndexType numBoundaryScvf_;
476 std::vector<bool> hasBoundaryScvf_;
477};
478
485template<class GV, class T>
486class StaggeredFVGridGeometry<GV, false, T>
487: public BaseGridGeometry<GV, T>
488{
491 using GridIndexType = typename IndexTraits<GV>::GridIndex;
492 using LocalIndexType = typename IndexTraits<GV>::LocalIndex;
493 using Element = typename GV::template Codim<0>::Entity;
494
495 using IntersectionMapper = typename T::IntersectionMapper;
496 using ConnectivityMap = typename T::template ConnectivityMap<ThisType>;
497
498public:
500 using Traits = typename T::PublicTraits;
501
504 static constexpr DiscretizationMethod discMethod{};
505
506 static constexpr int upwindSchemeOrder = T::upwindSchemeOrder;
507 static constexpr bool useHigherOrder = upwindSchemeOrder > 1;
508 static constexpr bool cachingEnabled = false;
509
510 using GeometryHelper = typename T::GeometryHelper;
511
513 using LocalView = typename T::template LocalView<ThisType, false>;
515 using SubControlVolume = typename T::SubControlVolume;
517 using SubControlVolumeFace = typename T::SubControlVolumeFace;
521 using GridView = GV;
523 using DofTypeIndices = typename T::DofTypeIndices;
524
526 static constexpr auto cellCenterIdx()
527 { return typename DofTypeIndices::CellCenterIdx{}; }
528
530 static constexpr auto faceIdx()
531 { return typename DofTypeIndices::FaceIdx{}; }
532
534 static constexpr int upwindStencilOrder()
535 { return upwindSchemeOrder; }
536
539
540 using FVGridGeometryTuple = std::tuple< CellCenterFVGridGeometry<ThisType>, FaceFVGridGeometry<ThisType> >;
541
543 StaggeredFVGridGeometry(const GridView& gridView, const std::string& paramGroup = "")
544 : ParentType(gridView)
545 , intersectionMapper_(gridView)
546 {
547 // Check if the overlap size is what we expect
549 DUNE_THROW(Dune::InvalidStateException, "The staggered discretization method needs at least an overlap of 1 for parallel computations. "
550 << " Set the parameter \"Grid.Overlap\" in the input file.");
551
552 update_();
553 }
554
556 [[deprecated("Use update(gridView) instead! Will be removed after release 3.5.")]]
557 void update()
558 {
559 ParentType::update();
560 updateIntersectionMapper_();
561 update_();
562 }
563
565 void update(const GridView& gridView)
566 {
567 ParentType::update(gridView);
568 updateIntersectionMapper_();
569 update_();
570 }
571
573 void update(GridView&& gridView)
574 {
575 ParentType::update(std::move(gridView));
576 updateIntersectionMapper_();
577 update_();
578 }
579
581 std::size_t numScv() const
582 {
583 return numScvs_;
584 }
585
587 std::size_t numScvf() const
588 {
589 return numScvf_;
590 }
591
593 std::size_t numBoundaryScvf() const
594 {
595 return numBoundaryScvf_;
596 }
597
599 std::size_t numIntersections() const
600 {
601 return intersectionMapper_.numIntersections();
602 }
603
605 std::size_t numDofs() const
606 { return numCellCenterDofs() + numFaceDofs(); }
607
608 std::size_t numCellCenterDofs() const
609 { return this->gridView().size(0); }
610
611 std::size_t numFaceDofs() const
612 { return this->gridView().size(1); }
613
614 const std::vector<GridIndexType>& scvfIndicesOfScv(GridIndexType scvIdx) const
615 { return scvfIndicesOfScv_[scvIdx]; }
616
617 GridIndexType localToGlobalScvfIndex(GridIndexType eIdx, LocalIndexType localScvfIdx) const
618 {
619 return localToGlobalScvfIndices_[eIdx][localScvfIdx];
620 }
621
626 const ConnectivityMap &connectivityMap() const
627 { return connectivityMap_; }
628
630 std::unique_ptr<CellCenterFVGridGeometry<ThisType>> cellCenterFVGridGeometryPtr() const
631 {
632 return std::make_unique<CellCenterFVGridGeometry<ThisType>>(this);
633 }
634
636 std::unique_ptr<FaceFVGridGeometry<ThisType>> faceFVGridGeometryPtr() const
637 {
638 return std::make_unique<FaceFVGridGeometry<ThisType>>(this);
639 }
640
643 {
645 }
646
649 {
650 return FaceFVGridGeometry<ThisType>(this);
651 }
652
654 const IntersectionMapper& intersectionMapper() const
655 {
656 return intersectionMapper_;
657 }
658
660 const std::vector<GridIndexType>& neighborVolVarIndices(GridIndexType scvIdx) const
661 { return neighborVolVarIndices_[scvIdx]; }
662
663private:
664
665 void updateIntersectionMapper_()
666 {
667 if constexpr (Deprecated::hasUpdateGridView<IntersectionMapper, GridView>())
668 intersectionMapper_.update(this->gridView());
669 else
670 Deprecated::update(intersectionMapper_);
671 }
672
673 void update_()
674 {
675 // clear containers (necessary after grid refinement)
676 scvfIndicesOfScv_.clear();
677 neighborVolVarIndices_.clear();
678 localToGlobalScvfIndices_.clear();
679
680 numScvs_ = numCellCenterDofs();
681 numScvf_ = 0;
682 numBoundaryScvf_ = 0;
683 scvfIndicesOfScv_.resize(numScvs_);
684 localToGlobalScvfIndices_.resize(numScvs_);
685 neighborVolVarIndices_.resize(numScvs_);
686
687 // Build the scvs and scv faces
688 for (const auto& element : elements(this->gridView()))
689 {
690 auto eIdx = this->elementMapper().index(element);
691
692 // the element-wise index sets for finite volume geometry
693 auto numLocalFaces = intersectionMapper_.numFaces(element);
694 std::vector<GridIndexType> scvfsIndexSet;
695 scvfsIndexSet.reserve(numLocalFaces);
696 localToGlobalScvfIndices_[eIdx].resize(numLocalFaces);
697
698 std::vector<GridIndexType> neighborVolVarIndexSet;
699 neighborVolVarIndexSet.reserve(numLocalFaces);
700
701 for (const auto& intersection : intersections(this->gridView(), element))
702 {
703 const auto localFaceIndex = intersection.indexInInside();
704 localToGlobalScvfIndices_[eIdx][localFaceIndex] = numScvf_;
705 scvfsIndexSet.push_back(numScvf_++);
706
707 if (intersection.neighbor())
708 {
709 const auto nIdx = this->elementMapper().index(intersection.outside());
710 neighborVolVarIndexSet.emplace_back(nIdx);
711 }
712 else
713 neighborVolVarIndexSet.emplace_back(numScvs_ + numBoundaryScvf_++);
714 }
715
716 // Save the scvf indices belonging to this scv to build up fv element geometries fast
717 scvfIndicesOfScv_[eIdx] = scvfsIndexSet;
718 neighborVolVarIndices_[eIdx] = neighborVolVarIndexSet;
719 }
720
721 // build the connectivity map for an effecient assembly
722 connectivityMap_.update(*this);
723 }
724
726 std::size_t numScvs_;
727 std::size_t numScvf_;
728 std::size_t numBoundaryScvf_;
729 std::vector<std::vector<GridIndexType>> localToGlobalScvfIndices_;
730 std::vector<std::vector<GridIndexType>> neighborVolVarIndices_;
731
732 // mappers
733 ConnectivityMap connectivityMap_;
734 IntersectionMapper intersectionMapper_;
735
737 std::vector<std::vector<GridIndexType>> scvfIndicesOfScv_;
738};
739
740} // end namespace
741
742#endif
Defines the index types used for grid and local indices.
Helpers for deprecation.
Helper classes to compute the integration elements.
Base class for grid geometries.
Check the overlap size for different discretization methods.
The available discretization methods in Dumux.
Definition: adapt.hh:29
typename Extrusion< T >::type Extrusion_t
Convenience alias for obtaining the extrusion type.
Definition: extrusion.hh:177
Struture to define the index types used for grid and local indices.
Definition: indextraits.hh:38
Base class for all finite volume grid geometries.
Definition: basegridgeometry.hh:51
Check if the overlap size is valid for a given discretization method.
Definition: checkoverlapsize.hh:40
Base class for cell center of face specific auxiliary FvGridGeometry classes. Provides a common inter...
Definition: discretization/staggered/fvgridgeometry.hh:45
static constexpr auto faceIdx()
Return an integral constant index for face dofs.
Definition: discretization/staggered/fvgridgeometry.hh:79
const auto & elementMapper() const
Returns the mapper for elements to indices for constant grids.
Definition: discretization/staggered/fvgridgeometry.hh:104
static constexpr bool isCellCenter()
Returns true if this view if related to cell centered dofs.
Definition: discretization/staggered/fvgridgeometry.hh:63
const ActualGridGeometry & actualGridGeometry() const
Returns the actual gridGeometry we are a restriction of.
Definition: discretization/staggered/fvgridgeometry.hh:110
static constexpr DiscretizationMethod discMethod
Definition: discretization/staggered/fvgridgeometry.hh:56
const ActualGridGeometry * gridGeometry_
Definition: discretization/staggered/fvgridgeometry.hh:114
const auto & connectivityMap() const
Returns the connectivity map of which dofs have derivatives with respect to a given dof.
Definition: discretization/staggered/fvgridgeometry.hh:92
static constexpr auto cellCenterIdx()
Return an integral constant index for cell centered dofs.
Definition: discretization/staggered/fvgridgeometry.hh:73
const auto & gridView() const
Return the gridView this grid geometry object lives on.
Definition: discretization/staggered/fvgridgeometry.hh:85
typename ActualGridGeometry::LocalView LocalView
Definition: discretization/staggered/fvgridgeometry.hh:58
GridGeometryView(const ActualGridGeometry *actualGridGeometry)
Definition: discretization/staggered/fvgridgeometry.hh:48
const auto & vertexMapper() const
Returns the mapper for vertices to indices for possibly adaptive grids.
Definition: discretization/staggered/fvgridgeometry.hh:98
typename ActualGridGeometry::GridView GridView
export the GridView type and the discretization method
Definition: discretization/staggered/fvgridgeometry.hh:52
static constexpr bool isFace()
Returns true if this view if related to face dofs.
Definition: discretization/staggered/fvgridgeometry.hh:68
Cell center specific auxiliary FvGridGeometry classes. Required for the Dumux multi-domain framework.
Definition: discretization/staggered/fvgridgeometry.hh:125
std::size_t numDofs() const
The total number of cell centered dofs.
Definition: discretization/staggered/fvgridgeometry.hh:139
static constexpr bool isCellCenter()
Returns true because this view is related to cell centered dofs.
Definition: discretization/staggered/fvgridgeometry.hh:134
Face specific auxiliary FvGridGeometry classes. Required for the Dumux multi-domain framework.
Definition: discretization/staggered/fvgridgeometry.hh:150
static constexpr bool isFace()
Returns true because this view is related to face dofs.
Definition: discretization/staggered/fvgridgeometry.hh:159
std::size_t numDofs() const
The total number of cell centered dofs.
Definition: discretization/staggered/fvgridgeometry.hh:164
Base class for the finite volume geometry vector for staggered models This builds up the sub control ...
Definition: discretization/staggered/fvgridgeometry.hh:177
Base class for the finite volume geometry vector for staggered models This builds up the sub control ...
Definition: discretization/staggered/fvgridgeometry.hh:188
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:350
std::size_t numDofs() const
the total number of dofs
Definition: discretization/staggered/fvgridgeometry.hh:280
const SubControlVolumeFace & scvf(GridIndexType scvfIdx) const
Get a sub control volume face with a global scvf index.
Definition: discretization/staggered/fvgridgeometry.hh:321
CellCenterFVGridGeometry< ThisType > cellCenterFVGridGeometry() const
Return a copy of the cell center specific auxiliary class.
Definition: discretization/staggered/fvgridgeometry.hh:362
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:327
typename T::PublicTraits Traits
export the traits
Definition: discretization/staggered/fvgridgeometry.hh:201
std::size_t numBoundaryScvf() const
The total number of boundary sub control volume faces.
Definition: discretization/staggered/fvgridgeometry.hh:267
typename T::DofTypeIndices DofTypeIndices
export the dof type indices
Definition: discretization/staggered/fvgridgeometry.hh:222
std::size_t numFaceDofs() const
Definition: discretization/staggered/fvgridgeometry.hh:286
static constexpr int upwindStencilOrder()
The order of the stencil built.
Definition: discretization/staggered/fvgridgeometry.hh:233
typename T::SubControlVolume SubControlVolume
export the type of sub control volume
Definition: discretization/staggered/fvgridgeometry.hh:214
std::tuple< CellCenterFVGridGeometry< ThisType >, FaceFVGridGeometry< ThisType > > FVGridGeometryTuple
Definition: discretization/staggered/fvgridgeometry.hh:239
void update(const GridView &gridView)
update all fvElementGeometries (call this after grid adaption)
Definition: discretization/staggered/fvgridgeometry.hh:299
StaggeredFVGridGeometry(const GridView &gridView, const std::string &paramGroup="")
Constructor.
Definition: discretization/staggered/fvgridgeometry.hh:242
std::size_t numScvf() const
The total number of sub control volume faces.
Definition: discretization/staggered/fvgridgeometry.hh:261
typename T::SubControlVolumeFace SubControlVolumeFace
export the type of sub control volume
Definition: discretization/staggered/fvgridgeometry.hh:216
std::size_t numIntersections() const
The total number of intersections.
Definition: discretization/staggered/fvgridgeometry.hh:274
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:356
std::size_t numCellCenterDofs() const
Definition: discretization/staggered/fvgridgeometry.hh:283
const SubControlVolumeFace & scvf(GridIndexType eIdx, LocalIndexType localScvfIdx) const
Definition: discretization/staggered/fvgridgeometry.hh:337
FaceFVGridGeometry< ThisType > faceFVGridGeometry() const
Return a copy of the face specific auxiliary class.
Definition: discretization/staggered/fvgridgeometry.hh:368
static constexpr auto cellCenterIdx()
return a integral constant for cell center dofs
Definition: discretization/staggered/fvgridgeometry.hh:225
GV GridView
export the grid view type
Definition: discretization/staggered/fvgridgeometry.hh:220
const ConnectivityMap & connectivityMap() const
Returns the connectivity map of which dofs have derivatives with respect to a given dof.
Definition: discretization/staggered/fvgridgeometry.hh:346
bool hasBoundaryScvf(GridIndexType eIdx) const
Returns whether one of the geometry's scvfs lies on a boundary.
Definition: discretization/staggered/fvgridgeometry.hh:374
static constexpr auto faceIdx()
return a integral constant for face dofs
Definition: discretization/staggered/fvgridgeometry.hh:229
Extrusion_t< T > Extrusion
export the type of extrusion
Definition: discretization/staggered/fvgridgeometry.hh:218
std::size_t numScv() const
The total number of sub control volumes.
Definition: discretization/staggered/fvgridgeometry.hh:255
GridIndexType localToGlobalScvfIndex(GridIndexType eIdx, LocalIndexType localScvfIdx) const
Definition: discretization/staggered/fvgridgeometry.hh:332
typename T::template LocalView< ThisType, true > LocalView
export the type of the fv element geometry (the local view type)
Definition: discretization/staggered/fvgridgeometry.hh:212
const SubControlVolume & scv(GridIndexType scvIdx) const
Get a sub control volume with a global scv index.
Definition: discretization/staggered/fvgridgeometry.hh:315
void update(GridView &&gridView)
update all fvElementGeometries (call this after grid adaption)
Definition: discretization/staggered/fvgridgeometry.hh:307
void update()
update all fvElementGeometries (do this again after grid adaption)
Definition: discretization/staggered/fvgridgeometry.hh:291
Base class for the finite volume geometry vector for staggered models This builds up the sub control ...
Definition: discretization/staggered/fvgridgeometry.hh:488
typename T::template LocalView< ThisType, false > LocalView
export the type of the fv element geometry (the local view type)
Definition: discretization/staggered/fvgridgeometry.hh:513
static constexpr auto faceIdx()
return a integral constant for face dofs
Definition: discretization/staggered/fvgridgeometry.hh:530
typename T::DofTypeIndices DofTypeIndices
export the dof type indices
Definition: discretization/staggered/fvgridgeometry.hh:523
typename T::PublicTraits Traits
export the traits
Definition: discretization/staggered/fvgridgeometry.hh:500
void update(const GridView &gridView)
update all fvElementGeometries (call this after grid adaption)
Definition: discretization/staggered/fvgridgeometry.hh:565
GridIndexType localToGlobalScvfIndex(GridIndexType eIdx, LocalIndexType localScvfIdx) const
Definition: discretization/staggered/fvgridgeometry.hh:617
std::size_t numCellCenterDofs() const
Definition: discretization/staggered/fvgridgeometry.hh:608
typename T::GeometryHelper GeometryHelper
Definition: discretization/staggered/fvgridgeometry.hh:510
const ConnectivityMap & connectivityMap() const
Returns the connectivity map of which dofs have derivatives with respect to a given dof.
Definition: discretization/staggered/fvgridgeometry.hh:626
std::size_t numFaceDofs() const
Definition: discretization/staggered/fvgridgeometry.hh:611
CellCenterFVGridGeometry< ThisType > cellCenterFVGridGeometry() const
Return a copy of the cell center specific auxiliary class.
Definition: discretization/staggered/fvgridgeometry.hh:642
static constexpr int upwindStencilOrder()
The order of the stencil built.
Definition: discretization/staggered/fvgridgeometry.hh:534
std::tuple< CellCenterFVGridGeometry< ThisType >, FaceFVGridGeometry< ThisType > > FVGridGeometryTuple
Definition: discretization/staggered/fvgridgeometry.hh:540
const std::vector< GridIndexType > & scvfIndicesOfScv(GridIndexType scvIdx) const
Definition: discretization/staggered/fvgridgeometry.hh:614
GV GridView
export the grid view type
Definition: discretization/staggered/fvgridgeometry.hh:521
typename T::SubControlVolumeFace SubControlVolumeFace
export the type of sub control volume
Definition: discretization/staggered/fvgridgeometry.hh:517
const IntersectionMapper & intersectionMapper() const
Return a reference to the intersection mapper.
Definition: discretization/staggered/fvgridgeometry.hh:654
StaggeredFVGridGeometry(const GridView &gridView, const std::string &paramGroup="")
Constructor.
Definition: discretization/staggered/fvgridgeometry.hh:543
typename T::SubControlVolume SubControlVolume
export the type of sub control volume
Definition: discretization/staggered/fvgridgeometry.hh:515
void update(GridView &&gridView)
update all fvElementGeometries (call this after grid adaption)
Definition: discretization/staggered/fvgridgeometry.hh:573
std::size_t numIntersections() const
The total number of intersections.
Definition: discretization/staggered/fvgridgeometry.hh:599
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:636
std::size_t numBoundaryScvf() const
The total number of boundary sub control volume faces.
Definition: discretization/staggered/fvgridgeometry.hh:593
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:630
FaceFVGridGeometry< ThisType > faceFVGridGeometry() const
Return a copy of the face specific auxiliary class.
Definition: discretization/staggered/fvgridgeometry.hh:648
Extrusion_t< T > Extrusion
export the type of extrusion
Definition: discretization/staggered/fvgridgeometry.hh:519
static constexpr auto cellCenterIdx()
return a integral constant for cell center dofs
Definition: discretization/staggered/fvgridgeometry.hh:526
void update()
update all fvElementGeometries (do this again after grid adaption)
Definition: discretization/staggered/fvgridgeometry.hh:557
std::size_t numDofs() const
the total number of dofs
Definition: discretization/staggered/fvgridgeometry.hh:605
std::size_t numScv() const
The total number of sub control volumes.
Definition: discretization/staggered/fvgridgeometry.hh:581
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:660
std::size_t numScvf() const
The total number of sub control volume faces.
Definition: discretization/staggered/fvgridgeometry.hh:587