3.3.0
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
32
33namespace Dumux {
34
40template<class ActualGridGeometry>
42{
43public:
44
45 explicit GridGeometryView(const ActualGridGeometry* actualGridGeometry)
47
49 using GridView = typename ActualGridGeometry::GridView;
51 using LocalView = typename ActualGridGeometry::LocalView;
52
56 static constexpr bool isCellCenter() { return false; }
57
61 static constexpr bool isFace() {return false; }
62
66 static constexpr auto cellCenterIdx()
67 { return typename ActualGridGeometry::DofTypeIndices::CellCenterIdx{}; }
68
72 static constexpr auto faceIdx()
73 { return typename ActualGridGeometry::DofTypeIndices::FaceIdx{}; }
74
78 const auto& gridView() const
79 { return gridGeometry_->gridView(); }
80
85 const auto& connectivityMap() const // TODO return correct map
86 { return gridGeometry_->connectivityMap(); }
87
91 const auto& vertexMapper() const
92 { return gridGeometry_->vertexMapper(); }
93
97 const auto& elementMapper() const
98 { return gridGeometry_->elementMapper(); }
99
103 const ActualGridGeometry& actualGridGeometry() const
104 { return *gridGeometry_; }
105
106protected:
107 const ActualGridGeometry* gridGeometry_;
108
109};
110
116template <class ActualGridGeometry>
117class CellCenterFVGridGeometry : public GridGeometryView<ActualGridGeometry>
118{
120public:
121
122 using ParentType::ParentType;
123
127 static constexpr bool isCellCenter() { return true; }
128
132 std::size_t numDofs() const
133 { return this->gridGeometry_->numCellCenterDofs(); }
134};
135
141template <class ActualGridGeometry>
142class FaceFVGridGeometry : public GridGeometryView<ActualGridGeometry>
143{
145public:
146
147 using ParentType::ParentType;
148
152 static constexpr bool isFace() {return true; }
153
157 std::size_t numDofs() const
158 { return this->gridGeometry_->numFaceDofs(); }
159};
160
167template<class GridView,
168 bool cachingEnabled,
169 class Traits>
171
178template<class GV, class T>
179class StaggeredFVGridGeometry<GV, true, T>
180: public BaseGridGeometry<GV, T>
181{
184 using GridIndexType = typename IndexTraits<GV>::GridIndex;
185 using LocalIndexType = typename IndexTraits<GV>::LocalIndex;
186 using Element = typename GV::template Codim<0>::Entity;
187
188 using IntersectionMapper = typename T::IntersectionMapper;
189 using GeometryHelper = typename T::GeometryHelper;
190 using ConnectivityMap = typename T::template ConnectivityMap<ThisType>;
191
192public:
194 using Traits = typename T::PublicTraits;
195
198 static constexpr int upwindSchemeOrder = T::upwindSchemeOrder;
199 static constexpr bool useHigherOrder = upwindSchemeOrder > 1;
200 static constexpr bool cachingEnabled = true;
201
203 using LocalView = typename T::template LocalView<ThisType, true>;
205 using SubControlVolume = typename T::SubControlVolume;
207 using SubControlVolumeFace = typename T::SubControlVolumeFace;
211 using GridView = GV;
213 using DofTypeIndices = typename T::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 T>
443class StaggeredFVGridGeometry<GV, false, T>
444: public BaseGridGeometry<GV, T>
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 T::IntersectionMapper;
453 using ConnectivityMap = typename T::template ConnectivityMap<ThisType>;
454
455public:
457 using Traits = typename T::PublicTraits;
458
461 static constexpr int upwindSchemeOrder = T::upwindSchemeOrder;
462 static constexpr bool useHigherOrder = upwindSchemeOrder > 1;
463 static constexpr bool cachingEnabled = false;
464
465 using GeometryHelper = typename T::GeometryHelper;
466
468 using LocalView = typename T::template LocalView<ThisType, false>;
470 using SubControlVolume = typename T::SubControlVolume;
472 using SubControlVolumeFace = typename T::SubControlVolumeFace;
476 using GridView = GV;
478 using DofTypeIndices = typename T::DofTypeIndices;
479
481 static constexpr auto cellCenterIdx()
482 { return typename DofTypeIndices::CellCenterIdx{}; }
483
485 static constexpr auto faceIdx()
486 { return typename DofTypeIndices::FaceIdx{}; }
487
489 static constexpr int upwindStencilOrder()
490 { return upwindSchemeOrder; }
491
494
495 using FVGridGeometryTuple = std::tuple< CellCenterFVGridGeometry<ThisType>, FaceFVGridGeometry<ThisType> >;
496
498 StaggeredFVGridGeometry(const GridView& gridView, const std::string& paramGroup = "")
499 : ParentType(gridView)
500 , intersectionMapper_(gridView)
501 {
502 // Check if the overlap size is what we expect
504 DUNE_THROW(Dune::InvalidStateException, "The staggered discretization method needs at least an overlap of 1 for parallel computations. "
505 << " Set the parameter \"Grid.Overlap\" in the input file.");
506 }
507
509 void update()
510 {
511 // clear containers (necessary after grid refinement)
512 scvfIndicesOfScv_.clear();
513 intersectionMapper_.update();
514 neighborVolVarIndices_.clear();
515
516 numScvs_ = numCellCenterDofs();
517 numScvf_ = 0;
518 numBoundaryScvf_ = 0;
519 scvfIndicesOfScv_.resize(numScvs_);
520 localToGlobalScvfIndices_.resize(numScvs_);
521 neighborVolVarIndices_.resize(numScvs_);
522
523 // Build the scvs and scv faces
524 for (const auto& element : elements(this->gridView()))
525 {
526 auto eIdx = this->elementMapper().index(element);
527
528 // the element-wise index sets for finite volume geometry
529 auto numLocalFaces = intersectionMapper_.numFaces(element);
530 std::vector<GridIndexType> scvfsIndexSet;
531 scvfsIndexSet.reserve(numLocalFaces);
532 localToGlobalScvfIndices_[eIdx].resize(numLocalFaces);
533
534 std::vector<GridIndexType> neighborVolVarIndexSet;
535 neighborVolVarIndexSet.reserve(numLocalFaces);
536
537 for (const auto& intersection : intersections(this->gridView(), element))
538 {
539 const auto localFaceIndex = intersection.indexInInside();
540 localToGlobalScvfIndices_[eIdx][localFaceIndex] = numScvf_;
541 scvfsIndexSet.push_back(numScvf_++);
542
543 if (intersection.neighbor())
544 {
545 const auto nIdx = this->elementMapper().index(intersection.outside());
546 neighborVolVarIndexSet.emplace_back(nIdx);
547 }
548 else
549 neighborVolVarIndexSet.emplace_back(numScvs_ + numBoundaryScvf_++);
550 }
551
552 // Save the scvf indices belonging to this scv to build up fv element geometries fast
553 scvfIndicesOfScv_[eIdx] = scvfsIndexSet;
554 neighborVolVarIndices_[eIdx] = neighborVolVarIndexSet;
555 }
556
557 // build the connectivity map for an effecient assembly
558 connectivityMap_.update(*this);
559 }
560
562 std::size_t numScv() const
563 {
564 return numScvs_;
565 }
566
568 std::size_t numScvf() const
569 {
570 return numScvf_;
571 }
572
574 std::size_t numBoundaryScvf() const
575 {
576 return numBoundaryScvf_;
577 }
578
580 std::size_t numIntersections() const
581 {
582 return intersectionMapper_.numIntersections();
583 }
584
586 std::size_t numDofs() const
587 { return numCellCenterDofs() + numFaceDofs(); }
588
589 std::size_t numCellCenterDofs() const
590 { return this->gridView().size(0); }
591
592 std::size_t numFaceDofs() const
593 { return this->gridView().size(1); }
594
595 const std::vector<GridIndexType>& scvfIndicesOfScv(GridIndexType scvIdx) const
596 { return scvfIndicesOfScv_[scvIdx]; }
597
598 GridIndexType localToGlobalScvfIndex(GridIndexType eIdx, LocalIndexType localScvfIdx) const
599 {
600 return localToGlobalScvfIndices_[eIdx][localScvfIdx];
601 }
602
607 const ConnectivityMap &connectivityMap() const
608 { return connectivityMap_; }
609
611 std::unique_ptr<CellCenterFVGridGeometry<ThisType>> cellCenterFVGridGeometryPtr() const
612 {
613 return std::make_unique<CellCenterFVGridGeometry<ThisType>>(this);
614 }
615
617 std::unique_ptr<FaceFVGridGeometry<ThisType>> faceFVGridGeometryPtr() const
618 {
619 return std::make_unique<FaceFVGridGeometry<ThisType>>(this);
620 }
621
624 {
626 }
627
630 {
631 return FaceFVGridGeometry<ThisType>(this);
632 }
633
635 const IntersectionMapper& intersectionMapper() const
636 {
637 return intersectionMapper_;
638 }
639
641 const std::vector<GridIndexType>& neighborVolVarIndices(GridIndexType scvIdx) const
642 { return neighborVolVarIndices_[scvIdx]; }
643
644private:
645
647 std::size_t numScvs_;
648 std::size_t numScvf_;
649 std::size_t numBoundaryScvf_;
650 std::vector<std::vector<GridIndexType>> localToGlobalScvfIndices_;
651 std::vector<std::vector<GridIndexType>> neighborVolVarIndices_;
652
653 // mappers
654 ConnectivityMap connectivityMap_;
655 IntersectionMapper intersectionMapper_;
656
658 std::vector<std::vector<GridIndexType>> scvfIndicesOfScv_;
659};
660
661} // end namespace
662
663#endif
Defines the index types used for grid and local indices.
Check the overlap size for different discretization methods.
The available discretization methods in Dumux.
Base class for grid geometries.
Helper classes to compute the integration elements.
DiscretizationMethod
The available discretization methods in Dumux.
Definition: method.hh:37
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
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
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:42
static constexpr auto faceIdx()
Return an integral constant index for face dofs.
Definition: discretization/staggered/fvgridgeometry.hh:72
const auto & elementMapper() const
Returns the mapper for elements to indices for constant grids.
Definition: discretization/staggered/fvgridgeometry.hh:97
static constexpr bool isCellCenter()
Returns true if this view if related to cell centered dofs.
Definition: discretization/staggered/fvgridgeometry.hh:56
const ActualGridGeometry & actualGridGeometry() const
Returns the actual gridGeometry we are a restriction of.
Definition: discretization/staggered/fvgridgeometry.hh:103
static constexpr DiscretizationMethod discMethod
Definition: discretization/staggered/fvgridgeometry.hh:50
const ActualGridGeometry * gridGeometry_
Definition: discretization/staggered/fvgridgeometry.hh:107
const auto & connectivityMap() const
Returns the connectivity map of which dofs have derivatives with respect to a given dof.
Definition: discretization/staggered/fvgridgeometry.hh:85
static constexpr auto cellCenterIdx()
Return an integral constant index for cell centered dofs.
Definition: discretization/staggered/fvgridgeometry.hh:66
const auto & gridView() const
Return the gridView this grid geometry object lives on.
Definition: discretization/staggered/fvgridgeometry.hh:78
typename ActualGridGeometry::LocalView LocalView
Definition: discretization/staggered/fvgridgeometry.hh:51
GridGeometryView(const ActualGridGeometry *actualGridGeometry)
Definition: discretization/staggered/fvgridgeometry.hh:45
const auto & vertexMapper() const
Returns the mapper for vertices to indices for possibly adaptive grids.
Definition: discretization/staggered/fvgridgeometry.hh:91
typename ActualGridGeometry::GridView GridView
export the GridView type and the discretization method
Definition: discretization/staggered/fvgridgeometry.hh:49
static constexpr bool isFace()
Returns true if this view if related to face dofs.
Definition: discretization/staggered/fvgridgeometry.hh:61
Cell center specific auxiliary FvGridGeometry classes. Required for the Dumux multi-domain framework.
Definition: discretization/staggered/fvgridgeometry.hh:118
std::size_t numDofs() const
The total number of cell centered dofs.
Definition: discretization/staggered/fvgridgeometry.hh:132
static constexpr bool isCellCenter()
Returns true because this view is related to cell centered dofs.
Definition: discretization/staggered/fvgridgeometry.hh:127
Face specific auxiliary FvGridGeometry classes. Required for the Dumux multi-domain framework.
Definition: discretization/staggered/fvgridgeometry.hh:143
static constexpr bool isFace()
Returns true because this view is related to face dofs.
Definition: discretization/staggered/fvgridgeometry.hh:152
std::size_t numDofs() const
The total number of cell centered dofs.
Definition: discretization/staggered/fvgridgeometry.hh:157
Base class for the finite volume geometry vector for staggered models This builds up the sub control ...
Definition: discretization/staggered/fvgridgeometry.hh:170
Base class for the finite volume geometry vector for staggered models This builds up the sub control ...
Definition: discretization/staggered/fvgridgeometry.hh:181
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
std::size_t numDofs() const
the total number of dofs
Definition: discretization/staggered/fvgridgeometry.hh:269
const SubControlVolumeFace & scvf(GridIndexType scvfIdx) const
Get a sub control volume face with a global scvf index.
Definition: discretization/staggered/fvgridgeometry.hh:366
CellCenterFVGridGeometry< ThisType > cellCenterFVGridGeometry() const
Return a copy of the cell center specific auxiliary class.
Definition: discretization/staggered/fvgridgeometry.hh:407
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 T::PublicTraits Traits
export the traits
Definition: discretization/staggered/fvgridgeometry.hh:194
std::size_t numBoundaryScvf() const
The total number of boundary sub control volume faces.
Definition: discretization/staggered/fvgridgeometry.hh:256
typename T::DofTypeIndices DofTypeIndices
export the dof type indices
Definition: discretization/staggered/fvgridgeometry.hh:213
std::size_t numFaceDofs() const
Definition: discretization/staggered/fvgridgeometry.hh:275
static constexpr int upwindStencilOrder()
The order of the stencil built.
Definition: discretization/staggered/fvgridgeometry.hh:224
typename T::SubControlVolume SubControlVolume
export the type of sub control volume
Definition: discretization/staggered/fvgridgeometry.hh:205
std::tuple< CellCenterFVGridGeometry< ThisType >, FaceFVGridGeometry< ThisType > > FVGridGeometryTuple
Definition: discretization/staggered/fvgridgeometry.hh:230
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
typename T::SubControlVolumeFace SubControlVolumeFace
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
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
std::size_t numCellCenterDofs() const
Definition: discretization/staggered/fvgridgeometry.hh:272
const SubControlVolumeFace & scvf(GridIndexType eIdx, LocalIndexType localScvfIdx) const
Definition: discretization/staggered/fvgridgeometry.hh:382
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
GV GridView
export the grid view type
Definition: discretization/staggered/fvgridgeometry.hh:211
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
bool hasBoundaryScvf(GridIndexType eIdx) const
Returns whether one of the geometry's scvfs lies on a boundary.
Definition: discretization/staggered/fvgridgeometry.hh:419
static constexpr auto faceIdx()
return a integral constant for face dofs
Definition: discretization/staggered/fvgridgeometry.hh:220
Extrusion_t< T > Extrusion
export the type of extrusion
Definition: discretization/staggered/fvgridgeometry.hh:209
std::size_t numScv() const
The total number of sub control volumes.
Definition: discretization/staggered/fvgridgeometry.hh:244
GridIndexType localToGlobalScvfIndex(GridIndexType eIdx, LocalIndexType localScvfIdx) const
Definition: discretization/staggered/fvgridgeometry.hh:377
typename T::template LocalView< ThisType, true > LocalView
export the type of the fv element geometry (the local view type)
Definition: discretization/staggered/fvgridgeometry.hh:203
const SubControlVolume & scv(GridIndexType scvIdx) const
Get a sub control volume with a global scv index.
Definition: discretization/staggered/fvgridgeometry.hh:360
void update()
update all fvElementGeometries (do this again after grid adaption)
Definition: discretization/staggered/fvgridgeometry.hh:279
Base class for the finite volume geometry vector for staggered models This builds up the sub control ...
Definition: discretization/staggered/fvgridgeometry.hh:445
typename T::template LocalView< ThisType, false > LocalView
export the type of the fv element geometry (the local view type)
Definition: discretization/staggered/fvgridgeometry.hh:468
static constexpr auto faceIdx()
return a integral constant for face dofs
Definition: discretization/staggered/fvgridgeometry.hh:485
typename T::DofTypeIndices DofTypeIndices
export the dof type indices
Definition: discretization/staggered/fvgridgeometry.hh:478
typename T::PublicTraits Traits
export the traits
Definition: discretization/staggered/fvgridgeometry.hh:457
GridIndexType localToGlobalScvfIndex(GridIndexType eIdx, LocalIndexType localScvfIdx) const
Definition: discretization/staggered/fvgridgeometry.hh:598
std::size_t numCellCenterDofs() const
Definition: discretization/staggered/fvgridgeometry.hh:589
typename T::GeometryHelper GeometryHelper
Definition: discretization/staggered/fvgridgeometry.hh:465
const ConnectivityMap & connectivityMap() const
Returns the connectivity map of which dofs have derivatives with respect to a given dof.
Definition: discretization/staggered/fvgridgeometry.hh:607
std::size_t numFaceDofs() const
Definition: discretization/staggered/fvgridgeometry.hh:592
CellCenterFVGridGeometry< ThisType > cellCenterFVGridGeometry() const
Return a copy of the cell center specific auxiliary class.
Definition: discretization/staggered/fvgridgeometry.hh:623
static constexpr int upwindStencilOrder()
The order of the stencil built.
Definition: discretization/staggered/fvgridgeometry.hh:489
std::tuple< CellCenterFVGridGeometry< ThisType >, FaceFVGridGeometry< ThisType > > FVGridGeometryTuple
Definition: discretization/staggered/fvgridgeometry.hh:495
const std::vector< GridIndexType > & scvfIndicesOfScv(GridIndexType scvIdx) const
Definition: discretization/staggered/fvgridgeometry.hh:595
GV GridView
export the grid view type
Definition: discretization/staggered/fvgridgeometry.hh:476
typename T::SubControlVolumeFace SubControlVolumeFace
export the type of sub control volume
Definition: discretization/staggered/fvgridgeometry.hh:472
const IntersectionMapper & intersectionMapper() const
Return a reference to the intersection mapper.
Definition: discretization/staggered/fvgridgeometry.hh:635
StaggeredFVGridGeometry(const GridView &gridView, const std::string &paramGroup="")
Constructor.
Definition: discretization/staggered/fvgridgeometry.hh:498
typename T::SubControlVolume SubControlVolume
export the type of sub control volume
Definition: discretization/staggered/fvgridgeometry.hh:470
std::size_t numIntersections() const
The total number of intersections.
Definition: discretization/staggered/fvgridgeometry.hh:580
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:617
std::size_t numBoundaryScvf() const
The total number of boundary sub control volume faces.
Definition: discretization/staggered/fvgridgeometry.hh:574
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:611
FaceFVGridGeometry< ThisType > faceFVGridGeometry() const
Return a copy of the face specific auxiliary class.
Definition: discretization/staggered/fvgridgeometry.hh:629
Extrusion_t< T > Extrusion
export the type of extrusion
Definition: discretization/staggered/fvgridgeometry.hh:474
static constexpr auto cellCenterIdx()
return a integral constant for cell center dofs
Definition: discretization/staggered/fvgridgeometry.hh:481
void update()
update all fvElementGeometries (do this again after grid adaption)
Definition: discretization/staggered/fvgridgeometry.hh:509
std::size_t numDofs() const
the total number of dofs
Definition: discretization/staggered/fvgridgeometry.hh:586
std::size_t numScv() const
The total number of sub control volumes.
Definition: discretization/staggered/fvgridgeometry.hh:562
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:641
std::size_t numScvf() const
The total number of sub control volume faces.
Definition: discretization/staggered/fvgridgeometry.hh:568