3.6-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
34
35namespace Dumux {
36
42template<class ActualGridGeometry>
44{
45public:
46
47 explicit GridGeometryView(const ActualGridGeometry* actualGridGeometry)
49
51 using GridView = typename ActualGridGeometry::GridView;
52
55 static constexpr DiscretizationMethod discMethod{};
56
57 using LocalView = typename ActualGridGeometry::LocalView;
58
62 static constexpr bool isCellCenter() { return false; }
63
67 static constexpr bool isFace() {return false; }
68
72 static constexpr auto cellCenterIdx()
73 { return typename ActualGridGeometry::DofTypeIndices::CellCenterIdx{}; }
74
78 static constexpr auto faceIdx()
79 { return typename ActualGridGeometry::DofTypeIndices::FaceIdx{}; }
80
84 const auto& gridView() const
85 { return gridGeometry_->gridView(); }
86
91 const auto& connectivityMap() const // TODO return correct map
92 { return gridGeometry_->connectivityMap(); }
93
97 const auto& vertexMapper() const
98 { return gridGeometry_->vertexMapper(); }
99
103 const auto& elementMapper() const
104 { return gridGeometry_->elementMapper(); }
105
109 const ActualGridGeometry& actualGridGeometry() const
110 { return *gridGeometry_; }
111
112protected:
113 const ActualGridGeometry* gridGeometry_;
114
115};
116
122template <class ActualGridGeometry>
123class CellCenterFVGridGeometry : public GridGeometryView<ActualGridGeometry>
124{
126public:
127
128 using ParentType::ParentType;
129
133 static constexpr bool isCellCenter() { return true; }
134
138 std::size_t numDofs() const
139 { return this->gridGeometry_->numCellCenterDofs(); }
140};
141
147template <class ActualGridGeometry>
148class FaceFVGridGeometry : public GridGeometryView<ActualGridGeometry>
149{
151public:
152
153 using ParentType::ParentType;
154
158 static constexpr bool isFace() {return true; }
159
163 std::size_t numDofs() const
164 { return this->gridGeometry_->numFaceDofs(); }
165};
166
173template<class GridView,
174 bool cachingEnabled,
175 class Traits>
177
184template<class GV, class T>
185class StaggeredFVGridGeometry<GV, true, T>
186: public BaseGridGeometry<GV, T>
187{
190 using GridIndexType = typename IndexTraits<GV>::GridIndex;
191 using LocalIndexType = typename IndexTraits<GV>::LocalIndex;
192 using Element = typename GV::template Codim<0>::Entity;
193
194 using IntersectionMapper = typename T::IntersectionMapper;
195 using GeometryHelper = typename T::GeometryHelper;
196 using ConnectivityMap = typename T::template ConnectivityMap<ThisType>;
197
198public:
200 using Traits = typename T::PublicTraits;
201
204 static constexpr DiscretizationMethod discMethod{};
205
206 static constexpr int upwindSchemeOrder = T::upwindSchemeOrder;
207 static constexpr bool useHigherOrder = upwindSchemeOrder > 1;
208 static constexpr bool cachingEnabled = true;
209
211 using LocalView = typename T::template LocalView<ThisType, true>;
213 using SubControlVolume = typename T::SubControlVolume;
215 using SubControlVolumeFace = typename T::SubControlVolumeFace;
219 using GridView = GV;
221 using DofTypeIndices = typename T::DofTypeIndices;
222
224 static constexpr auto cellCenterIdx()
225 { return typename DofTypeIndices::CellCenterIdx{}; }
226
228 static constexpr auto faceIdx()
229 { return typename DofTypeIndices::FaceIdx{}; }
230
232 static constexpr int upwindStencilOrder()
233 { return upwindSchemeOrder; }
234
237
238 using FVGridGeometryTuple = std::tuple< CellCenterFVGridGeometry<ThisType>, FaceFVGridGeometry<ThisType> >;
239
241 StaggeredFVGridGeometry(const GridView& gridView, const std::string& paramGroup = "")
242 : ParentType(gridView)
243 , intersectionMapper_(gridView)
244 {
245 // Check if the overlap size is what we expect
247 DUNE_THROW(Dune::InvalidStateException, "The staggered discretization method needs at least an overlap of 1 for parallel computations. "
248 << " Set the parameter \"Grid.Overlap\" in the input file.");
249
250 update_();
251 }
252
254 std::size_t numScv() const
255 {
256 return scvs_.size();
257 }
258
260 std::size_t numScvf() const
261 {
262 return scvfs_.size();
263 }
264
266 std::size_t numBoundaryScvf() const
267 {
268 return numBoundaryScvf_;
269 }
270
271
273 std::size_t numIntersections() const
274 {
275 return intersectionMapper_.numIntersections();
276 }
277
279 std::size_t numDofs() const
280 { return numCellCenterDofs() + numFaceDofs(); }
281
282 std::size_t numCellCenterDofs() const
283 { return this->gridView().size(0); }
284
285 std::size_t numFaceDofs() const
286 { return this->gridView().size(1); }
287
289 void update(const GridView& gridView)
290 {
291 ParentType::update(gridView);
292 updateIntersectionMapper_();
293 update_();
294 }
295
297 void update(GridView&& gridView)
298 {
299 ParentType::update(std::move(gridView));
300 updateIntersectionMapper_();
301 update_();
302 }
303
305 const SubControlVolume& scv(GridIndexType scvIdx) const
306 {
307 return scvs_[scvIdx];
308 }
309
311 const SubControlVolumeFace& scvf(GridIndexType scvfIdx) const
312 {
313 return scvfs_[scvfIdx];
314 }
315
317 const std::vector<GridIndexType>& scvfIndicesOfScv(GridIndexType scvIdx) const
318 {
319 return scvfIndicesOfScv_[scvIdx];
320 }
321
322 GridIndexType localToGlobalScvfIndex(GridIndexType eIdx, LocalIndexType localScvfIdx) const
323 {
324 return localToGlobalScvfIndices_[eIdx][localScvfIdx];
325 }
326
327 const SubControlVolumeFace& scvf(GridIndexType eIdx, LocalIndexType localScvfIdx) const
328 {
329 return scvf(localToGlobalScvfIndex(eIdx, localScvfIdx));
330 }
331
336 const ConnectivityMap &connectivityMap() const
337 { return connectivityMap_; }
338
340 std::unique_ptr<CellCenterFVGridGeometry<ThisType>> cellCenterFVGridGeometryPtr() const
341 {
342 return std::make_unique<CellCenterFVGridGeometry<ThisType>>(this);
343 }
344
346 std::unique_ptr<FaceFVGridGeometry<ThisType>> faceFVGridGeometryPtr() const
347 {
348 return std::make_unique<FaceFVGridGeometry<ThisType>>(this);
349 }
350
353 {
355 }
356
359 {
360 return FaceFVGridGeometry<ThisType>(this);
361 }
362
364 bool hasBoundaryScvf(GridIndexType eIdx) const
365 { return hasBoundaryScvf_[eIdx]; }
366
367private:
368
369 void updateIntersectionMapper_()
370 {
371 intersectionMapper_.update(this->gridView());
372 }
373
374 void update_()
375 {
376 // clear containers (necessary after grid refinement)
377 scvs_.clear();
378 scvfs_.clear();
379 scvfIndicesOfScv_.clear();
380 localToGlobalScvfIndices_.clear();
381
382 // determine size of containers
383 std::size_t numScvs = this->gridView().size(0);
384 std::size_t numScvf = 0;
385 for (const auto& element : elements(this->gridView()))
386 numScvf += element.subEntities(1);
387
388 // reserve memory
389 scvs_.resize(numScvs);
390 scvfs_.reserve(numScvf);
391 scvfIndicesOfScv_.resize(numScvs);
392 localToGlobalScvfIndices_.resize(numScvs);
393 hasBoundaryScvf_.assign(numScvs, false);
394
395 // Build the scvs and scv faces
396 GridIndexType scvfIdx = 0;
397 numBoundaryScvf_ = 0;
398 for (const auto& element : elements(this->gridView()))
399 {
400 auto eIdx = this->elementMapper().index(element);
401
402 // reserve memory for the localToGlobalScvfIdx map
403 auto numLocalFaces = intersectionMapper_.numFaces(element);
404 localToGlobalScvfIndices_[eIdx].resize(numLocalFaces);
405
406 scvs_[eIdx] = SubControlVolume(element.geometry(), eIdx);
407
408 // the element-wise index sets for finite volume geometry
409 std::vector<GridIndexType> scvfsIndexSet;
410 scvfsIndexSet.reserve(numLocalFaces);
411
412 GeometryHelper geometryHelper(element, this->gridView());
413
414 for (const auto& intersection : intersections(this->gridView(), element))
415 {
416 geometryHelper.updateLocalFace(intersectionMapper_, intersection);
417 const int localFaceIndex = geometryHelper.localFaceIndex();
418
419 // inner sub control volume faces
420 if (intersection.neighbor())
421 {
422 auto nIdx = this->elementMapper().index(intersection.outside());
423 scvfs_.emplace_back(intersection,
424 intersection.geometry(),
425 scvfIdx,
426 std::vector<GridIndexType>({eIdx, nIdx}),
427 geometryHelper);
428 localToGlobalScvfIndices_[eIdx][localFaceIndex] = scvfIdx;
429 scvfsIndexSet.push_back(scvfIdx++);
430 }
431 // boundary sub control volume faces
432 else if (intersection.boundary())
433 {
434 scvfs_.emplace_back(intersection,
435 intersection.geometry(),
436 scvfIdx,
437 std::vector<GridIndexType>({eIdx, this->gridView().size(0) + numBoundaryScvf_++}),
438 geometryHelper);
439 localToGlobalScvfIndices_[eIdx][localFaceIndex] = scvfIdx;
440 scvfsIndexSet.push_back(scvfIdx++);
441
442 hasBoundaryScvf_[eIdx] = true;
443 }
444 }
445
446 // Save the scvf indices belonging to this scv to build up fv element geometries fast
447 scvfIndicesOfScv_[eIdx] = scvfsIndexSet;
448 }
449
450 // build the connectivity map for an efficient assembly
451 connectivityMap_.update(*this);
452 }
453
454 // mappers
455 ConnectivityMap connectivityMap_;
456 IntersectionMapper intersectionMapper_;
457
458 std::vector<SubControlVolume> scvs_;
459 std::vector<SubControlVolumeFace> scvfs_;
460 std::vector<std::vector<GridIndexType>> scvfIndicesOfScv_;
461 std::vector<std::vector<GridIndexType>> localToGlobalScvfIndices_;
462 GridIndexType numBoundaryScvf_;
463 std::vector<bool> hasBoundaryScvf_;
464};
465
472template<class GV, class T>
473class StaggeredFVGridGeometry<GV, false, T>
474: public BaseGridGeometry<GV, T>
475{
478 using GridIndexType = typename IndexTraits<GV>::GridIndex;
479 using LocalIndexType = typename IndexTraits<GV>::LocalIndex;
480 using Element = typename GV::template Codim<0>::Entity;
481
482 using IntersectionMapper = typename T::IntersectionMapper;
483 using ConnectivityMap = typename T::template ConnectivityMap<ThisType>;
484
485public:
487 using Traits = typename T::PublicTraits;
488
491 static constexpr DiscretizationMethod discMethod{};
492
493 static constexpr int upwindSchemeOrder = T::upwindSchemeOrder;
494 static constexpr bool useHigherOrder = upwindSchemeOrder > 1;
495 static constexpr bool cachingEnabled = false;
496
497 using GeometryHelper = typename T::GeometryHelper;
498
500 using LocalView = typename T::template LocalView<ThisType, false>;
502 using SubControlVolume = typename T::SubControlVolume;
504 using SubControlVolumeFace = typename T::SubControlVolumeFace;
508 using GridView = GV;
510 using DofTypeIndices = typename T::DofTypeIndices;
511
513 static constexpr auto cellCenterIdx()
514 { return typename DofTypeIndices::CellCenterIdx{}; }
515
517 static constexpr auto faceIdx()
518 { return typename DofTypeIndices::FaceIdx{}; }
519
521 static constexpr int upwindStencilOrder()
522 { return upwindSchemeOrder; }
523
526
527 using FVGridGeometryTuple = std::tuple< CellCenterFVGridGeometry<ThisType>, FaceFVGridGeometry<ThisType> >;
528
530 StaggeredFVGridGeometry(const GridView& gridView, const std::string& paramGroup = "")
531 : ParentType(gridView)
532 , intersectionMapper_(gridView)
533 {
534 // Check if the overlap size is what we expect
536 DUNE_THROW(Dune::InvalidStateException, "The staggered discretization method needs at least an overlap of 1 for parallel computations. "
537 << " Set the parameter \"Grid.Overlap\" in the input file.");
538
539 update_();
540 }
541
542
544 void update(const GridView& gridView)
545 {
546 ParentType::update(gridView);
547 updateIntersectionMapper_();
548 update_();
549 }
550
552 void update(GridView&& gridView)
553 {
554 ParentType::update(std::move(gridView));
555 updateIntersectionMapper_();
556 update_();
557 }
558
560 std::size_t numScv() const
561 {
562 return numScvs_;
563 }
564
566 std::size_t numScvf() const
567 {
568 return numScvf_;
569 }
570
572 std::size_t numBoundaryScvf() const
573 {
574 return numBoundaryScvf_;
575 }
576
578 std::size_t numIntersections() const
579 {
580 return intersectionMapper_.numIntersections();
581 }
582
584 std::size_t numDofs() const
585 { return numCellCenterDofs() + numFaceDofs(); }
586
587 std::size_t numCellCenterDofs() const
588 { return this->gridView().size(0); }
589
590 std::size_t numFaceDofs() const
591 { return this->gridView().size(1); }
592
593 const std::vector<GridIndexType>& scvfIndicesOfScv(GridIndexType scvIdx) const
594 { return scvfIndicesOfScv_[scvIdx]; }
595
596 GridIndexType localToGlobalScvfIndex(GridIndexType eIdx, LocalIndexType localScvfIdx) const
597 {
598 return localToGlobalScvfIndices_[eIdx][localScvfIdx];
599 }
600
605 const ConnectivityMap &connectivityMap() const
606 { return connectivityMap_; }
607
609 std::unique_ptr<CellCenterFVGridGeometry<ThisType>> cellCenterFVGridGeometryPtr() const
610 {
611 return std::make_unique<CellCenterFVGridGeometry<ThisType>>(this);
612 }
613
615 std::unique_ptr<FaceFVGridGeometry<ThisType>> faceFVGridGeometryPtr() const
616 {
617 return std::make_unique<FaceFVGridGeometry<ThisType>>(this);
618 }
619
622 {
624 }
625
628 {
629 return FaceFVGridGeometry<ThisType>(this);
630 }
631
633 const IntersectionMapper& intersectionMapper() const
634 {
635 return intersectionMapper_;
636 }
637
639 const std::vector<GridIndexType>& neighborVolVarIndices(GridIndexType scvIdx) const
640 { return neighborVolVarIndices_[scvIdx]; }
641
642private:
643
644 void updateIntersectionMapper_()
645 {
646 intersectionMapper_.update(this->gridView());
647 }
648
649 void update_()
650 {
651 // clear containers (necessary after grid refinement)
652 scvfIndicesOfScv_.clear();
653 neighborVolVarIndices_.clear();
654 localToGlobalScvfIndices_.clear();
655
656 numScvs_ = numCellCenterDofs();
657 numScvf_ = 0;
658 numBoundaryScvf_ = 0;
659 scvfIndicesOfScv_.resize(numScvs_);
660 localToGlobalScvfIndices_.resize(numScvs_);
661 neighborVolVarIndices_.resize(numScvs_);
662
663 // Build the scvs and scv faces
664 for (const auto& element : elements(this->gridView()))
665 {
666 auto eIdx = this->elementMapper().index(element);
667
668 // the element-wise index sets for finite volume geometry
669 auto numLocalFaces = intersectionMapper_.numFaces(element);
670 std::vector<GridIndexType> scvfsIndexSet;
671 scvfsIndexSet.reserve(numLocalFaces);
672 localToGlobalScvfIndices_[eIdx].resize(numLocalFaces);
673
674 std::vector<GridIndexType> neighborVolVarIndexSet;
675 neighborVolVarIndexSet.reserve(numLocalFaces);
676
677 for (const auto& intersection : intersections(this->gridView(), element))
678 {
679 const auto localFaceIndex = intersection.indexInInside();
680 localToGlobalScvfIndices_[eIdx][localFaceIndex] = numScvf_;
681 scvfsIndexSet.push_back(numScvf_++);
682
683 if (intersection.neighbor())
684 {
685 const auto nIdx = this->elementMapper().index(intersection.outside());
686 neighborVolVarIndexSet.emplace_back(nIdx);
687 }
688 else
689 neighborVolVarIndexSet.emplace_back(numScvs_ + numBoundaryScvf_++);
690 }
691
692 // Save the scvf indices belonging to this scv to build up fv element geometries fast
693 scvfIndicesOfScv_[eIdx] = scvfsIndexSet;
694 neighborVolVarIndices_[eIdx] = neighborVolVarIndexSet;
695 }
696
697 // build the connectivity map for an efficient assembly
698 connectivityMap_.update(*this);
699 }
700
702 std::size_t numScvs_;
703 std::size_t numScvf_;
704 std::size_t numBoundaryScvf_;
705 std::vector<std::vector<GridIndexType>> localToGlobalScvfIndices_;
706 std::vector<std::vector<GridIndexType>> neighborVolVarIndices_;
707
708 // mappers
709 ConnectivityMap connectivityMap_;
710 IntersectionMapper intersectionMapper_;
711
713 std::vector<std::vector<GridIndexType>> scvfIndicesOfScv_;
714};
715
716} // end namespace
717
718#endif
Defines the index types used for grid and local indices.
Check the overlap size for different discretization methods.
Base class for grid geometries.
Helper classes to compute the integration elements.
The available discretization methods in Dumux.
Adaption of the non-isothermal two-phase two-component flow model to problems with CO2.
Definition: adapt.hh:29
typename Extrusion< T >::type Extrusion_t
Convenience alias for obtaining the extrusion type.
Definition: extrusion.hh:251
Structure to define the index types used for grid and local indices.
Definition: indextraits.hh:38
Base class for all grid geometries.
Definition: basegridgeometry.hh:61
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:44
static constexpr auto faceIdx()
Return an integral constant index for face dofs.
Definition: discretization/staggered/fvgridgeometry.hh:78
const auto & elementMapper() const
Returns the mapper for elements to indices for constant grids.
Definition: discretization/staggered/fvgridgeometry.hh:103
static constexpr bool isCellCenter()
Returns true if this view if related to cell centered dofs.
Definition: discretization/staggered/fvgridgeometry.hh:62
const ActualGridGeometry & actualGridGeometry() const
Returns the actual gridGeometry we are a restriction of.
Definition: discretization/staggered/fvgridgeometry.hh:109
static constexpr DiscretizationMethod discMethod
Definition: discretization/staggered/fvgridgeometry.hh:55
const ActualGridGeometry * gridGeometry_
Definition: discretization/staggered/fvgridgeometry.hh:113
const auto & connectivityMap() const
Returns the connectivity map of which dofs have derivatives with respect to a given dof.
Definition: discretization/staggered/fvgridgeometry.hh:91
static constexpr auto cellCenterIdx()
Return an integral constant index for cell centered dofs.
Definition: discretization/staggered/fvgridgeometry.hh:72
const auto & gridView() const
Return the gridView this grid geometry object lives on.
Definition: discretization/staggered/fvgridgeometry.hh:84
typename ActualGridGeometry::LocalView LocalView
Definition: discretization/staggered/fvgridgeometry.hh:57
GridGeometryView(const ActualGridGeometry *actualGridGeometry)
Definition: discretization/staggered/fvgridgeometry.hh:47
const auto & vertexMapper() const
Returns the mapper for vertices to indices for possibly adaptive grids.
Definition: discretization/staggered/fvgridgeometry.hh:97
typename ActualGridGeometry::GridView GridView
export the GridView type and the discretization method
Definition: discretization/staggered/fvgridgeometry.hh:51
static constexpr bool isFace()
Returns true if this view if related to face dofs.
Definition: discretization/staggered/fvgridgeometry.hh:67
Cell center specific auxiliary FvGridGeometry classes. Required for the Dumux multi-domain framework.
Definition: discretization/staggered/fvgridgeometry.hh:124
std::size_t numDofs() const
The total number of cell centered dofs.
Definition: discretization/staggered/fvgridgeometry.hh:138
static constexpr bool isCellCenter()
Returns true because this view is related to cell centered dofs.
Definition: discretization/staggered/fvgridgeometry.hh:133
Face specific auxiliary FvGridGeometry classes. Required for the Dumux multi-domain framework.
Definition: discretization/staggered/fvgridgeometry.hh:149
static constexpr bool isFace()
Returns true because this view is related to face dofs.
Definition: discretization/staggered/fvgridgeometry.hh:158
std::size_t numDofs() const
The total number of cell centered dofs.
Definition: discretization/staggered/fvgridgeometry.hh:163
Base class for the finite volume geometry vector for staggered models This builds up the sub control ...
Definition: discretization/staggered/fvgridgeometry.hh:176
Base class for the finite volume geometry vector for staggered models This builds up the sub control ...
Definition: discretization/staggered/fvgridgeometry.hh:187
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:340
std::size_t numDofs() const
the total number of dofs
Definition: discretization/staggered/fvgridgeometry.hh:279
const SubControlVolumeFace & scvf(GridIndexType scvfIdx) const
Get a sub control volume face with a global scvf index.
Definition: discretization/staggered/fvgridgeometry.hh:311
CellCenterFVGridGeometry< ThisType > cellCenterFVGridGeometry() const
Return a copy of the cell center specific auxiliary class.
Definition: discretization/staggered/fvgridgeometry.hh:352
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:317
typename T::PublicTraits Traits
export the traits
Definition: discretization/staggered/fvgridgeometry.hh:200
std::size_t numBoundaryScvf() const
The total number of boundary sub control volume faces.
Definition: discretization/staggered/fvgridgeometry.hh:266
typename T::DofTypeIndices DofTypeIndices
export the dof type indices
Definition: discretization/staggered/fvgridgeometry.hh:221
std::size_t numFaceDofs() const
Definition: discretization/staggered/fvgridgeometry.hh:285
static constexpr int upwindStencilOrder()
The order of the stencil built.
Definition: discretization/staggered/fvgridgeometry.hh:232
typename T::SubControlVolume SubControlVolume
export the type of sub control volume
Definition: discretization/staggered/fvgridgeometry.hh:213
std::tuple< CellCenterFVGridGeometry< ThisType >, FaceFVGridGeometry< ThisType > > FVGridGeometryTuple
Definition: discretization/staggered/fvgridgeometry.hh:238
void update(const GridView &gridView)
update all fvElementGeometries (call this after grid adaption)
Definition: discretization/staggered/fvgridgeometry.hh:289
StaggeredFVGridGeometry(const GridView &gridView, const std::string &paramGroup="")
Constructor.
Definition: discretization/staggered/fvgridgeometry.hh:241
std::size_t numScvf() const
The total number of sub control volume faces.
Definition: discretization/staggered/fvgridgeometry.hh:260
typename T::SubControlVolumeFace SubControlVolumeFace
export the type of sub control volume
Definition: discretization/staggered/fvgridgeometry.hh:215
std::size_t numIntersections() const
The total number of intersections.
Definition: discretization/staggered/fvgridgeometry.hh:273
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:346
std::size_t numCellCenterDofs() const
Definition: discretization/staggered/fvgridgeometry.hh:282
const SubControlVolumeFace & scvf(GridIndexType eIdx, LocalIndexType localScvfIdx) const
Definition: discretization/staggered/fvgridgeometry.hh:327
FaceFVGridGeometry< ThisType > faceFVGridGeometry() const
Return a copy of the face specific auxiliary class.
Definition: discretization/staggered/fvgridgeometry.hh:358
static constexpr auto cellCenterIdx()
return a integral constant for cell center dofs
Definition: discretization/staggered/fvgridgeometry.hh:224
GV GridView
export the grid view type
Definition: discretization/staggered/fvgridgeometry.hh:219
const ConnectivityMap & connectivityMap() const
Returns the connectivity map of which dofs have derivatives with respect to a given dof.
Definition: discretization/staggered/fvgridgeometry.hh:336
bool hasBoundaryScvf(GridIndexType eIdx) const
Returns whether one of the geometry's scvfs lies on a boundary.
Definition: discretization/staggered/fvgridgeometry.hh:364
static constexpr auto faceIdx()
return a integral constant for face dofs
Definition: discretization/staggered/fvgridgeometry.hh:228
Extrusion_t< T > Extrusion
export the type of extrusion
Definition: discretization/staggered/fvgridgeometry.hh:217
std::size_t numScv() const
The total number of sub control volumes.
Definition: discretization/staggered/fvgridgeometry.hh:254
GridIndexType localToGlobalScvfIndex(GridIndexType eIdx, LocalIndexType localScvfIdx) const
Definition: discretization/staggered/fvgridgeometry.hh:322
typename T::template LocalView< ThisType, true > LocalView
export the type of the fv element geometry (the local view type)
Definition: discretization/staggered/fvgridgeometry.hh:211
const SubControlVolume & scv(GridIndexType scvIdx) const
Get a sub control volume with a global scv index.
Definition: discretization/staggered/fvgridgeometry.hh:305
void update(GridView &&gridView)
update all fvElementGeometries (call this after grid adaption)
Definition: discretization/staggered/fvgridgeometry.hh:297
Base class for the finite volume geometry vector for staggered models This builds up the sub control ...
Definition: discretization/staggered/fvgridgeometry.hh:475
typename T::template LocalView< ThisType, false > LocalView
export the type of the fv element geometry (the local view type)
Definition: discretization/staggered/fvgridgeometry.hh:500
static constexpr auto faceIdx()
return a integral constant for face dofs
Definition: discretization/staggered/fvgridgeometry.hh:517
typename T::DofTypeIndices DofTypeIndices
export the dof type indices
Definition: discretization/staggered/fvgridgeometry.hh:510
typename T::PublicTraits Traits
export the traits
Definition: discretization/staggered/fvgridgeometry.hh:487
void update(const GridView &gridView)
update all fvElementGeometries (call this after grid adaption)
Definition: discretization/staggered/fvgridgeometry.hh:544
GridIndexType localToGlobalScvfIndex(GridIndexType eIdx, LocalIndexType localScvfIdx) const
Definition: discretization/staggered/fvgridgeometry.hh:596
std::size_t numCellCenterDofs() const
Definition: discretization/staggered/fvgridgeometry.hh:587
typename T::GeometryHelper GeometryHelper
Definition: discretization/staggered/fvgridgeometry.hh:497
const ConnectivityMap & connectivityMap() const
Returns the connectivity map of which dofs have derivatives with respect to a given dof.
Definition: discretization/staggered/fvgridgeometry.hh:605
std::size_t numFaceDofs() const
Definition: discretization/staggered/fvgridgeometry.hh:590
CellCenterFVGridGeometry< ThisType > cellCenterFVGridGeometry() const
Return a copy of the cell center specific auxiliary class.
Definition: discretization/staggered/fvgridgeometry.hh:621
static constexpr int upwindStencilOrder()
The order of the stencil built.
Definition: discretization/staggered/fvgridgeometry.hh:521
std::tuple< CellCenterFVGridGeometry< ThisType >, FaceFVGridGeometry< ThisType > > FVGridGeometryTuple
Definition: discretization/staggered/fvgridgeometry.hh:527
const std::vector< GridIndexType > & scvfIndicesOfScv(GridIndexType scvIdx) const
Definition: discretization/staggered/fvgridgeometry.hh:593
GV GridView
export the grid view type
Definition: discretization/staggered/fvgridgeometry.hh:508
typename T::SubControlVolumeFace SubControlVolumeFace
export the type of sub control volume
Definition: discretization/staggered/fvgridgeometry.hh:504
const IntersectionMapper & intersectionMapper() const
Return a reference to the intersection mapper.
Definition: discretization/staggered/fvgridgeometry.hh:633
StaggeredFVGridGeometry(const GridView &gridView, const std::string &paramGroup="")
Constructor.
Definition: discretization/staggered/fvgridgeometry.hh:530
typename T::SubControlVolume SubControlVolume
export the type of sub control volume
Definition: discretization/staggered/fvgridgeometry.hh:502
void update(GridView &&gridView)
update all fvElementGeometries (call this after grid adaption)
Definition: discretization/staggered/fvgridgeometry.hh:552
std::size_t numIntersections() const
The total number of intersections.
Definition: discretization/staggered/fvgridgeometry.hh:578
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:615
std::size_t numBoundaryScvf() const
The total number of boundary sub control volume faces.
Definition: discretization/staggered/fvgridgeometry.hh:572
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:609
FaceFVGridGeometry< ThisType > faceFVGridGeometry() const
Return a copy of the face specific auxiliary class.
Definition: discretization/staggered/fvgridgeometry.hh:627
Extrusion_t< T > Extrusion
export the type of extrusion
Definition: discretization/staggered/fvgridgeometry.hh:506
static constexpr auto cellCenterIdx()
return a integral constant for cell center dofs
Definition: discretization/staggered/fvgridgeometry.hh:513
std::size_t numDofs() const
the total number of dofs
Definition: discretization/staggered/fvgridgeometry.hh:584
std::size_t numScv() const
The total number of sub control volumes.
Definition: discretization/staggered/fvgridgeometry.hh:560
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:639
std::size_t numScvf() const
The total number of sub control volume faces.
Definition: discretization/staggered/fvgridgeometry.hh:566