3.1-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
31
32namespace Dumux {
33
39template<class ActualGridGeometry>
41{
42public:
43
44 explicit GridGeometryView(const ActualGridGeometry* actualGridGeometry)
46
48 using GridView = typename ActualGridGeometry::GridView;
50 using LocalView = typename ActualGridGeometry::LocalView;
51
55 static constexpr bool isCellCenter() { return false; }
56
60 static constexpr bool isFace() {return false; }
61
65 static constexpr auto cellCenterIdx()
66 { return typename ActualGridGeometry::DofTypeIndices::CellCenterIdx{}; }
67
71 static constexpr auto faceIdx()
72 { return typename ActualGridGeometry::DofTypeIndices::FaceIdx{}; }
73
77 const auto& gridView() const
78 { return gridGeometry_->gridView(); }
79
84 const auto& connectivityMap() const // TODO return correct map
85 { return gridGeometry_->connectivityMap(); }
86
90 const auto& vertexMapper() const
91 { return gridGeometry_->vertexMapper(); }
92
96 const auto& elementMapper() const
97 { return gridGeometry_->elementMapper(); }
98
102 [[deprecated("Use actualGridGeometry instead")]]
103 const ActualGridGeometry& actualfvGridGeometry() const
104 { return actualGridGeometry(); }
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 Traits>
185class StaggeredFVGridGeometry<GV, true, Traits>
186: public BaseGridGeometry<GV, Traits>
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 Traits::IntersectionMapper;
195 using GeometryHelper = typename Traits::GeometryHelper;
196 using ConnectivityMap = typename Traits::template ConnectivityMap<ThisType>;
197
198public:
201 static constexpr int upwindSchemeOrder = Traits::upwindSchemeOrder;
202 static constexpr bool useHigherOrder = upwindSchemeOrder > 1;
203
205 using LocalView = typename Traits::template LocalView<ThisType, true>;
207 using SubControlVolume = typename Traits::SubControlVolume;
209 using SubControlVolumeFace = typename Traits::SubControlVolumeFace;
211 using GridView = GV;
213 using DofTypeIndices = typename Traits::DofTypeIndices;
214
216 static constexpr auto cellCenterIdx()
217 { return typename DofTypeIndices::CellCenterIdx{}; }
218
220 static constexpr auto faceIdx()
221 { return typename DofTypeIndices::FaceIdx{}; }
222
224 static constexpr int upwindStencilOrder()
225 { return upwindSchemeOrder; }
226
229
230 using FVGridGeometryTuple = std::tuple< CellCenterFVGridGeometry<ThisType>, FaceFVGridGeometry<ThisType> >;
231
233 StaggeredFVGridGeometry(const GridView& gridView, const std::string& paramGroup = "")
234 : ParentType(gridView)
235 , intersectionMapper_(gridView)
236 {
237 // Check if the overlap size is what we expect
239 DUNE_THROW(Dune::InvalidStateException, "The staggered discretization method needs at least an overlap of 1 for parallel computations. "
240 << " Set the parameter \"Grid.Overlap\" in the input file.");
241 }
242
244 std::size_t numScv() const
245 {
246 return scvs_.size();
247 }
248
250 std::size_t numScvf() const
251 {
252 return scvfs_.size();
253 }
254
256 std::size_t numBoundaryScvf() const
257 {
258 return numBoundaryScvf_;
259 }
260
261
263 std::size_t numIntersections() const
264 {
265 return intersectionMapper_.numIntersections();
266 }
267
269 std::size_t numDofs() const
270 { return numCellCenterDofs() + numFaceDofs(); }
271
272 std::size_t numCellCenterDofs() const
273 { return this->gridView().size(0); }
274
275 std::size_t numFaceDofs() const
276 { return this->gridView().size(1); }
277
279 void update()
280 {
281 // clear containers (necessary after grid refinement)
282 scvs_.clear();
283 scvfs_.clear();
284 scvfIndicesOfScv_.clear();
285 intersectionMapper_.update();
286
287 // determine size of containers
288 std::size_t numScvs = this->gridView().size(0);
289 std::size_t numScvf = 0;
290 for (const auto& element : elements(this->gridView()))
291 numScvf += element.subEntities(1);
292
293 // reserve memory
294 scvs_.resize(numScvs);
295 scvfs_.reserve(numScvf);
296 scvfIndicesOfScv_.resize(numScvs);
297 localToGlobalScvfIndices_.resize(numScvs);
298 hasBoundaryScvf_.resize(numScvs, false);
299
300 // Build the scvs and scv faces
301 GridIndexType scvfIdx = 0;
302 numBoundaryScvf_ = 0;
303 for (const auto& element : elements(this->gridView()))
304 {
305 auto eIdx = this->elementMapper().index(element);
306
307 // reserve memory for the localToGlobalScvfIdx map
308 auto numLocalFaces = intersectionMapper_.numFaces(element);
309 localToGlobalScvfIndices_[eIdx].resize(numLocalFaces);
310
311 scvs_[eIdx] = SubControlVolume(element.geometry(), eIdx);
312
313 // the element-wise index sets for finite volume geometry
314 std::vector<GridIndexType> scvfsIndexSet;
315 scvfsIndexSet.reserve(numLocalFaces);
316
317 GeometryHelper geometryHelper(element, this->gridView());
318
319 for (const auto& intersection : intersections(this->gridView(), element))
320 {
321 geometryHelper.updateLocalFace(intersectionMapper_, intersection);
322 const int localFaceIndex = geometryHelper.localFaceIndex();
323
324 // inner sub control volume faces
325 if (intersection.neighbor())
326 {
327 auto nIdx = this->elementMapper().index(intersection.outside());
328 scvfs_.emplace_back(intersection,
329 intersection.geometry(),
330 scvfIdx,
331 std::vector<GridIndexType>({eIdx, nIdx}),
332 geometryHelper);
333 localToGlobalScvfIndices_[eIdx][localFaceIndex] = scvfIdx;
334 scvfsIndexSet.push_back(scvfIdx++);
335 }
336 // boundary sub control volume faces
337 else if (intersection.boundary())
338 {
339 scvfs_.emplace_back(intersection,
340 intersection.geometry(),
341 scvfIdx,
342 std::vector<GridIndexType>({eIdx, this->gridView().size(0) + numBoundaryScvf_++}),
343 geometryHelper);
344 localToGlobalScvfIndices_[eIdx][localFaceIndex] = scvfIdx;
345 scvfsIndexSet.push_back(scvfIdx++);
346
347 hasBoundaryScvf_[eIdx] = true;
348 }
349 }
350
351 // Save the scvf indices belonging to this scv to build up fv element geometries fast
352 scvfIndicesOfScv_[eIdx] = scvfsIndexSet;
353 }
354
355 // build the connectivity map for an effecient assembly
356 connectivityMap_.update(*this);
357 }
358
360 const SubControlVolume& scv(GridIndexType scvIdx) const
361 {
362 return scvs_[scvIdx];
363 }
364
366 const SubControlVolumeFace& scvf(GridIndexType scvfIdx) const
367 {
368 return scvfs_[scvfIdx];
369 }
370
372 const std::vector<GridIndexType>& scvfIndicesOfScv(GridIndexType scvIdx) const
373 {
374 return scvfIndicesOfScv_[scvIdx];
375 }
376
377 GridIndexType localToGlobalScvfIndex(GridIndexType eIdx, LocalIndexType localScvfIdx) const
378 {
379 return localToGlobalScvfIndices_[eIdx][localScvfIdx];
380 }
381
382 const SubControlVolumeFace& scvf(GridIndexType eIdx, LocalIndexType localScvfIdx) const
383 {
384 return scvf(localToGlobalScvfIndex(eIdx, localScvfIdx));
385 }
386
391 const ConnectivityMap &connectivityMap() const
392 { return connectivityMap_; }
393
395 std::unique_ptr<CellCenterFVGridGeometry<ThisType>> cellCenterFVGridGeometryPtr() const
396 {
397 return std::make_unique<CellCenterFVGridGeometry<ThisType>>(this);
398 }
399
401 std::unique_ptr<FaceFVGridGeometry<ThisType>> faceFVGridGeometryPtr() const
402 {
403 return std::make_unique<FaceFVGridGeometry<ThisType>>(this);
404 }
405
408 {
410 }
411
414 {
415 return FaceFVGridGeometry<ThisType>(this);
416 }
417
419 bool hasBoundaryScvf(GridIndexType eIdx) const
420 { return hasBoundaryScvf_[eIdx]; }
421
422private:
423
424 // mappers
425 ConnectivityMap connectivityMap_;
426 IntersectionMapper intersectionMapper_;
427
428 std::vector<SubControlVolume> scvs_;
429 std::vector<SubControlVolumeFace> scvfs_;
430 std::vector<std::vector<GridIndexType>> scvfIndicesOfScv_;
431 std::vector<std::vector<GridIndexType>> localToGlobalScvfIndices_;
432 GridIndexType numBoundaryScvf_;
433 std::vector<bool> hasBoundaryScvf_;
434};
435
442template<class GV, class Traits>
443class StaggeredFVGridGeometry<GV, false, Traits>
444: public BaseGridGeometry<GV, Traits>
445{
448 using GridIndexType = typename IndexTraits<GV>::GridIndex;
449 using LocalIndexType = typename IndexTraits<GV>::LocalIndex;
450 using Element = typename GV::template Codim<0>::Entity;
451
452 using IntersectionMapper = typename Traits::IntersectionMapper;
453 using ConnectivityMap = typename Traits::template ConnectivityMap<ThisType>;
454
455public:
458 static constexpr int upwindSchemeOrder = Traits::upwindSchemeOrder;
459 static constexpr bool useHigherOrder = upwindSchemeOrder > 1;
460
461 using GeometryHelper = typename Traits::GeometryHelper;
462
464 using LocalView = typename Traits::template LocalView<ThisType, false>;
466 using SubControlVolume = typename Traits::SubControlVolume;
468 using SubControlVolumeFace = typename Traits::SubControlVolumeFace;
470 using GridView = GV;
472 using DofTypeIndices = typename Traits::DofTypeIndices;
473
475 static constexpr auto cellCenterIdx()
476 { return typename DofTypeIndices::CellCenterIdx{}; }
477
479 static constexpr auto faceIdx()
480 { return typename DofTypeIndices::FaceIdx{}; }
481
483 static constexpr int upwindStencilOrder()
484 { return upwindSchemeOrder; }
485
488
489 using FVGridGeometryTuple = std::tuple< CellCenterFVGridGeometry<ThisType>, FaceFVGridGeometry<ThisType> >;
490
492 StaggeredFVGridGeometry(const GridView& gridView, const std::string& paramGroup = "")
493 : ParentType(gridView)
494 , intersectionMapper_(gridView)
495 {
496 // Check if the overlap size is what we expect
498 DUNE_THROW(Dune::InvalidStateException, "The staggered discretization method needs at least an overlap of 1 for parallel computations. "
499 << " Set the parameter \"Grid.Overlap\" in the input file.");
500 }
501
503 void update()
504 {
505 // clear containers (necessary after grid refinement)
506 scvfIndicesOfScv_.clear();
507 intersectionMapper_.update();
508 neighborVolVarIndices_.clear();
509
510 numScvs_ = numCellCenterDofs();
511 numScvf_ = 0;
512 numBoundaryScvf_ = 0;
513 scvfIndicesOfScv_.resize(numScvs_);
514 localToGlobalScvfIndices_.resize(numScvs_);
515 neighborVolVarIndices_.resize(numScvs_);
516
517 // Build the scvs and scv faces
518 for (const auto& element : elements(this->gridView()))
519 {
520 auto eIdx = this->elementMapper().index(element);
521
522 // the element-wise index sets for finite volume geometry
523 auto numLocalFaces = intersectionMapper_.numFaces(element);
524 std::vector<GridIndexType> scvfsIndexSet;
525 scvfsIndexSet.reserve(numLocalFaces);
526 localToGlobalScvfIndices_[eIdx].resize(numLocalFaces);
527
528 std::vector<GridIndexType> neighborVolVarIndexSet;
529 neighborVolVarIndexSet.reserve(numLocalFaces);
530
531 for (const auto& intersection : intersections(this->gridView(), element))
532 {
533 const auto localFaceIndex = intersection.indexInInside();
534 localToGlobalScvfIndices_[eIdx][localFaceIndex] = numScvf_;
535 scvfsIndexSet.push_back(numScvf_++);
536
537 if (intersection.neighbor())
538 {
539 const auto nIdx = this->elementMapper().index(intersection.outside());
540 neighborVolVarIndexSet.emplace_back(nIdx);
541 }
542 else
543 neighborVolVarIndexSet.emplace_back(numScvs_ + numBoundaryScvf_++);
544 }
545
546 // Save the scvf indices belonging to this scv to build up fv element geometries fast
547 scvfIndicesOfScv_[eIdx] = scvfsIndexSet;
548 neighborVolVarIndices_[eIdx] = neighborVolVarIndexSet;
549 }
550
551 // build the connectivity map for an effecient assembly
552 connectivityMap_.update(*this);
553 }
554
556 std::size_t numScv() const
557 {
558 return numScvs_;
559 }
560
562 std::size_t numScvf() const
563 {
564 return numScvf_;
565 }
566
568 std::size_t numBoundaryScvf() const
569 {
570 return numBoundaryScvf_;
571 }
572
574 std::size_t numIntersections() const
575 {
576 return intersectionMapper_.numIntersections();
577 }
578
580 std::size_t numDofs() const
581 { return numCellCenterDofs() + numFaceDofs(); }
582
583 std::size_t numCellCenterDofs() const
584 { return this->gridView().size(0); }
585
586 std::size_t numFaceDofs() const
587 { return this->gridView().size(1); }
588
589 const std::vector<GridIndexType>& scvfIndicesOfScv(GridIndexType scvIdx) const
590 { return scvfIndicesOfScv_[scvIdx]; }
591
592 GridIndexType localToGlobalScvfIndex(GridIndexType eIdx, LocalIndexType localScvfIdx) const
593 {
594 return localToGlobalScvfIndices_[eIdx][localScvfIdx];
595 }
596
601 const ConnectivityMap &connectivityMap() const
602 { return connectivityMap_; }
603
605 std::unique_ptr<CellCenterFVGridGeometry<ThisType>> cellCenterFVGridGeometryPtr() const
606 {
607 return std::make_unique<CellCenterFVGridGeometry<ThisType>>(this);
608 }
609
611 std::unique_ptr<FaceFVGridGeometry<ThisType>> faceFVGridGeometryPtr() const
612 {
613 return std::make_unique<FaceFVGridGeometry<ThisType>>(this);
614 }
615
618 {
620 }
621
624 {
625 return FaceFVGridGeometry<ThisType>(this);
626 }
627
629 const IntersectionMapper& intersectionMapper() const
630 {
631 return intersectionMapper_;
632 }
633
635 const std::vector<GridIndexType>& neighborVolVarIndices(GridIndexType scvIdx) const
636 { return neighborVolVarIndices_[scvIdx]; }
637
638private:
639
641 std::size_t numScvs_;
642 std::size_t numScvf_;
643 std::size_t numBoundaryScvf_;
644 std::vector<std::vector<GridIndexType>> localToGlobalScvfIndices_;
645 std::vector<std::vector<GridIndexType>> neighborVolVarIndices_;
646
647 // mappers
648 ConnectivityMap connectivityMap_;
649 IntersectionMapper intersectionMapper_;
650
652 std::vector<std::vector<GridIndexType>> scvfIndicesOfScv_;
653};
654
655} // end namespace
656
657#endif
Defines the index types used for grid and local indices.
Base class for grid geometries.
Check the overlap size for different discretization methods.
The available discretization methods in Dumux.
DiscretizationMethod
The available discretization methods in Dumux.
Definition: method.hh:37
Dune::IteratorRange< typename MultiDomainGlue< DomainGridView, TargetGridView, DomainMapper, TargetMapper >::Intersections::const_iterator > intersections(const MultiDomainGlue< DomainGridView, TargetGridView, DomainMapper, TargetMapper > &glue)
Range generator to iterate with range-based for loops over all intersections as follows: for (const a...
Definition: glue.hh:62
make the local view function available whenever we use the grid geometry
Definition: adapt.hh:29
Struture to define the index types used for grid and local indices.
Definition: indextraits.hh:38
defines an intersection mapper for mapping of global DOFs assigned to faces which also works for adap...
Definition: intersectionmapper.hh:185
Base class for all finite volume grid geometries.
Definition: basegridgeometry.hh:49
GV GridView
export the grid view type
Definition: basegridgeometry.hh:64
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:41
static constexpr auto faceIdx()
Return an integral constant index for face dofs.
Definition: discretization/staggered/fvgridgeometry.hh:71
const auto & elementMapper() const
Returns the mapper for elements to indices for constant grids.
Definition: discretization/staggered/fvgridgeometry.hh:96
static constexpr bool isCellCenter()
Returns true if this view if related to cell centered dofs.
Definition: discretization/staggered/fvgridgeometry.hh:55
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:49
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:84
static constexpr auto cellCenterIdx()
Return an integral constant index for cell centered dofs.
Definition: discretization/staggered/fvgridgeometry.hh:65
const auto & gridView() const
Return the gridView this grid geometry object lives on.
Definition: discretization/staggered/fvgridgeometry.hh:77
typename ActualGridGeometry::LocalView LocalView
Definition: discretization/staggered/fvgridgeometry.hh:50
GridGeometryView(const ActualGridGeometry *actualGridGeometry)
Definition: discretization/staggered/fvgridgeometry.hh:44
const auto & vertexMapper() const
Returns the mapper for vertices to indices for possibly adaptive grids.
Definition: discretization/staggered/fvgridgeometry.hh:90
const ActualGridGeometry & actualfvGridGeometry() const
Returns the actual gridGeometry we are a restriction of.
Definition: discretization/staggered/fvgridgeometry.hh:103
typename ActualGridGeometry::GridView GridView
export the GridView type and the discretization method
Definition: discretization/staggered/fvgridgeometry.hh:48
static constexpr bool isFace()
Returns true if this view if related to face dofs.
Definition: discretization/staggered/fvgridgeometry.hh:60
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
const SubControlVolumeFace & scvf(GridIndexType eIdx, LocalIndexType localScvfIdx) const
Definition: discretization/staggered/fvgridgeometry.hh:382
CellCenterFVGridGeometry< ThisType > cellCenterFVGridGeometry() const
Return a copy of the cell center specific auxiliary class.
Definition: discretization/staggered/fvgridgeometry.hh:407
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:395
typename Traits::SubControlVolumeFace SubControlVolumeFace
export the type of sub control volume
Definition: discretization/staggered/fvgridgeometry.hh:209
static constexpr auto faceIdx()
return a integral constant for face dofs
Definition: discretization/staggered/fvgridgeometry.hh:220
GridIndexType localToGlobalScvfIndex(GridIndexType eIdx, LocalIndexType localScvfIdx) const
Definition: discretization/staggered/fvgridgeometry.hh:377
std::size_t numCellCenterDofs() const
Definition: discretization/staggered/fvgridgeometry.hh:272
void update()
update all fvElementGeometries (do this again after grid adaption)
Definition: discretization/staggered/fvgridgeometry.hh:279
bool hasBoundaryScvf(GridIndexType eIdx) const
Returns whether one of the geometry's scvfs lies on a boundary.
Definition: discretization/staggered/fvgridgeometry.hh:419
const ConnectivityMap & connectivityMap() const
Returns the connectivity map of which dofs have derivatives with respect to a given dof.
Definition: discretization/staggered/fvgridgeometry.hh:391
typename Traits::template LocalView< ThisType, true > LocalView
export the type of the fv element geometry (the local view type)
Definition: discretization/staggered/fvgridgeometry.hh:205
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:372
typename Traits::DofTypeIndices DofTypeIndices
export the dof type indices
Definition: discretization/staggered/fvgridgeometry.hh:213
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:401
StaggeredFVGridGeometry(const GridView &gridView, const std::string &paramGroup="")
Constructor.
Definition: discretization/staggered/fvgridgeometry.hh:233
std::size_t numScvf() const
The total number of sub control volume faces.
Definition: discretization/staggered/fvgridgeometry.hh:250
static constexpr int upwindStencilOrder()
The order of the stencil built.
Definition: discretization/staggered/fvgridgeometry.hh:224
std::size_t numDofs() const
the total number of dofs
Definition: discretization/staggered/fvgridgeometry.hh:269
std::tuple< CellCenterFVGridGeometry< ThisType >, FaceFVGridGeometry< ThisType > > FVGridGeometryTuple
Definition: discretization/staggered/fvgridgeometry.hh:230
std::size_t numBoundaryScvf() const
The total number of boundary sub control volume faces.
Definition: discretization/staggered/fvgridgeometry.hh:256
const SubControlVolume & scv(GridIndexType scvIdx) const
Get a sub control volume with a global scv index.
Definition: discretization/staggered/fvgridgeometry.hh:360
std::size_t numScv() const
The total number of sub control volumes.
Definition: discretization/staggered/fvgridgeometry.hh:244
std::size_t numFaceDofs() const
Definition: discretization/staggered/fvgridgeometry.hh:275
typename Traits::SubControlVolume SubControlVolume
export the type of sub control volume
Definition: discretization/staggered/fvgridgeometry.hh:207
std::size_t numIntersections() const
The total number of intersections.
Definition: discretization/staggered/fvgridgeometry.hh:263
const SubControlVolumeFace & scvf(GridIndexType scvfIdx) const
Get a sub control volume face with a global scvf index.
Definition: discretization/staggered/fvgridgeometry.hh:366
FaceFVGridGeometry< ThisType > faceFVGridGeometry() const
Return a copy of the face specific auxiliary class.
Definition: discretization/staggered/fvgridgeometry.hh:413
static constexpr auto cellCenterIdx()
return a integral constant for cell center dofs
Definition: discretization/staggered/fvgridgeometry.hh:216
Base class for the finite volume geometry vector for staggered models This builds up the sub control ...
Definition: discretization/staggered/fvgridgeometry.hh:445
const IntersectionMapper & intersectionMapper() const
Return a reference to the intersection mapper.
Definition: discretization/staggered/fvgridgeometry.hh:629
std::size_t numScv() const
The total number of sub control volumes.
Definition: discretization/staggered/fvgridgeometry.hh:556
typename Traits::template LocalView< ThisType, false > LocalView
export the type of the fv element geometry (the local view type)
Definition: discretization/staggered/fvgridgeometry.hh:464
static constexpr int upwindStencilOrder()
The order of the stencil built.
Definition: discretization/staggered/fvgridgeometry.hh:483
typename Traits::SubControlVolumeFace SubControlVolumeFace
export the type of sub control volume
Definition: discretization/staggered/fvgridgeometry.hh:468
typename Traits::GeometryHelper GeometryHelper
Definition: discretization/staggered/fvgridgeometry.hh:461
const ConnectivityMap & connectivityMap() const
Returns the connectivity map of which dofs have derivatives with respect to a given dof.
Definition: discretization/staggered/fvgridgeometry.hh:601
std::size_t numBoundaryScvf() const
The total number of boundary sub control volume faces.
Definition: discretization/staggered/fvgridgeometry.hh:568
std::size_t numScvf() const
The total number of sub control volume faces.
Definition: discretization/staggered/fvgridgeometry.hh:562
void update()
update all fvElementGeometries (do this again after grid adaption)
Definition: discretization/staggered/fvgridgeometry.hh:503
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:611
CellCenterFVGridGeometry< ThisType > cellCenterFVGridGeometry() const
Return a copy of the cell center specific auxiliary class.
Definition: discretization/staggered/fvgridgeometry.hh:617
std::size_t numFaceDofs() const
Definition: discretization/staggered/fvgridgeometry.hh:586
static constexpr auto cellCenterIdx()
return a integral constant for cell center dofs
Definition: discretization/staggered/fvgridgeometry.hh:475
GridIndexType localToGlobalScvfIndex(GridIndexType eIdx, LocalIndexType localScvfIdx) const
Definition: discretization/staggered/fvgridgeometry.hh:592
const std::vector< GridIndexType > & scvfIndicesOfScv(GridIndexType scvIdx) const
Definition: discretization/staggered/fvgridgeometry.hh:589
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:605
FaceFVGridGeometry< ThisType > faceFVGridGeometry() const
Return a copy of the face specific auxiliary class.
Definition: discretization/staggered/fvgridgeometry.hh:623
std::tuple< CellCenterFVGridGeometry< ThisType >, FaceFVGridGeometry< ThisType > > FVGridGeometryTuple
Definition: discretization/staggered/fvgridgeometry.hh:489
std::size_t numIntersections() const
The total number of intersections.
Definition: discretization/staggered/fvgridgeometry.hh:574
std::size_t numDofs() const
the total number of dofs
Definition: discretization/staggered/fvgridgeometry.hh:580
StaggeredFVGridGeometry(const GridView &gridView, const std::string &paramGroup="")
Constructor.
Definition: discretization/staggered/fvgridgeometry.hh:492
typename Traits::SubControlVolume SubControlVolume
export the type of sub control volume
Definition: discretization/staggered/fvgridgeometry.hh:466
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:635
typename Traits::DofTypeIndices DofTypeIndices
export the dof type indices
Definition: discretization/staggered/fvgridgeometry.hh:472
static constexpr auto faceIdx()
return a integral constant for face dofs
Definition: discretization/staggered/fvgridgeometry.hh:479
std::size_t numCellCenterDofs() const
Definition: discretization/staggered/fvgridgeometry.hh:583