3.4
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
33
34namespace Dumux {
35
41template<class ActualGridGeometry>
43{
44public:
45
46 explicit GridGeometryView(const ActualGridGeometry* actualGridGeometry)
48
50 using GridView = typename ActualGridGeometry::GridView;
52 using LocalView = typename ActualGridGeometry::LocalView;
53
57 static constexpr bool isCellCenter() { return false; }
58
62 static constexpr bool isFace() {return false; }
63
67 static constexpr auto cellCenterIdx()
68 { return typename ActualGridGeometry::DofTypeIndices::CellCenterIdx{}; }
69
73 static constexpr auto faceIdx()
74 { return typename ActualGridGeometry::DofTypeIndices::FaceIdx{}; }
75
79 const auto& gridView() const
80 { return gridGeometry_->gridView(); }
81
86 const auto& connectivityMap() const // TODO return correct map
87 { return gridGeometry_->connectivityMap(); }
88
92 const auto& vertexMapper() const
93 { return gridGeometry_->vertexMapper(); }
94
98 const auto& elementMapper() const
99 { return gridGeometry_->elementMapper(); }
100
104 const ActualGridGeometry& actualGridGeometry() const
105 { return *gridGeometry_; }
106
107protected:
108 const ActualGridGeometry* gridGeometry_;
109
110};
111
117template <class ActualGridGeometry>
118class CellCenterFVGridGeometry : public GridGeometryView<ActualGridGeometry>
119{
121public:
122
123 using ParentType::ParentType;
124
128 static constexpr bool isCellCenter() { return true; }
129
133 std::size_t numDofs() const
134 { return this->gridGeometry_->numCellCenterDofs(); }
135};
136
142template <class ActualGridGeometry>
143class FaceFVGridGeometry : public GridGeometryView<ActualGridGeometry>
144{
146public:
147
148 using ParentType::ParentType;
149
153 static constexpr bool isFace() {return true; }
154
158 std::size_t numDofs() const
159 { return this->gridGeometry_->numFaceDofs(); }
160};
161
168template<class GridView,
169 bool cachingEnabled,
170 class Traits>
172
179template<class GV, class T>
180class StaggeredFVGridGeometry<GV, true, T>
181: public BaseGridGeometry<GV, T>
182{
185 using GridIndexType = typename IndexTraits<GV>::GridIndex;
186 using LocalIndexType = typename IndexTraits<GV>::LocalIndex;
187 using Element = typename GV::template Codim<0>::Entity;
188
189 using IntersectionMapper = typename T::IntersectionMapper;
190 using GeometryHelper = typename T::GeometryHelper;
191 using ConnectivityMap = typename T::template ConnectivityMap<ThisType>;
192
193public:
195 using Traits = typename T::PublicTraits;
196
199 static constexpr int upwindSchemeOrder = T::upwindSchemeOrder;
200 static constexpr bool useHigherOrder = upwindSchemeOrder > 1;
201 static constexpr bool cachingEnabled = true;
202
204 using LocalView = typename T::template LocalView<ThisType, true>;
206 using SubControlVolume = typename T::SubControlVolume;
208 using SubControlVolumeFace = typename T::SubControlVolumeFace;
212 using GridView = GV;
214 using DofTypeIndices = typename T::DofTypeIndices;
215
217 static constexpr auto cellCenterIdx()
218 { return typename DofTypeIndices::CellCenterIdx{}; }
219
221 static constexpr auto faceIdx()
222 { return typename DofTypeIndices::FaceIdx{}; }
223
225 static constexpr int upwindStencilOrder()
226 { return upwindSchemeOrder; }
227
230
231 using FVGridGeometryTuple = std::tuple< CellCenterFVGridGeometry<ThisType>, FaceFVGridGeometry<ThisType> >;
232
234 StaggeredFVGridGeometry(const GridView& gridView, const std::string& paramGroup = "")
235 : ParentType(gridView)
236 , intersectionMapper_(gridView)
237 {
238 // Check if the overlap size is what we expect
240 DUNE_THROW(Dune::InvalidStateException, "The staggered discretization method needs at least an overlap of 1 for parallel computations. "
241 << " Set the parameter \"Grid.Overlap\" in the input file.");
242 }
243
245 std::size_t numScv() const
246 {
247 return scvs_.size();
248 }
249
251 std::size_t numScvf() const
252 {
253 return scvfs_.size();
254 }
255
257 std::size_t numBoundaryScvf() const
258 {
259 return numBoundaryScvf_;
260 }
261
262
264 std::size_t numIntersections() const
265 {
266 return intersectionMapper_.numIntersections();
267 }
268
270 std::size_t numDofs() const
271 { return numCellCenterDofs() + numFaceDofs(); }
272
273 std::size_t numCellCenterDofs() const
274 { return this->gridView().size(0); }
275
276 std::size_t numFaceDofs() const
277 { return this->gridView().size(1); }
278
280 void update()
281 {
282 // clear containers (necessary after grid refinement)
283 scvs_.clear();
284 scvfs_.clear();
285 scvfIndicesOfScv_.clear();
286 if constexpr (Deprecated::hasUpdateGridView<IntersectionMapper, GridView>())
287 intersectionMapper_.update(this->gridView());
288 else
289 Deprecated::update(intersectionMapper_);
290 // determine size of containers
291 std::size_t numScvs = this->gridView().size(0);
292 std::size_t numScvf = 0;
293 for (const auto& element : elements(this->gridView()))
294 numScvf += element.subEntities(1);
295
296 // reserve memory
297 scvs_.resize(numScvs);
298 scvfs_.reserve(numScvf);
299 scvfIndicesOfScv_.resize(numScvs);
300 localToGlobalScvfIndices_.resize(numScvs);
301 hasBoundaryScvf_.resize(numScvs, false);
302
303 // Build the scvs and scv faces
304 GridIndexType scvfIdx = 0;
305 numBoundaryScvf_ = 0;
306 for (const auto& element : elements(this->gridView()))
307 {
308 auto eIdx = this->elementMapper().index(element);
309
310 // reserve memory for the localToGlobalScvfIdx map
311 auto numLocalFaces = intersectionMapper_.numFaces(element);
312 localToGlobalScvfIndices_[eIdx].resize(numLocalFaces);
313
314 scvs_[eIdx] = SubControlVolume(element.geometry(), eIdx);
315
316 // the element-wise index sets for finite volume geometry
317 std::vector<GridIndexType> scvfsIndexSet;
318 scvfsIndexSet.reserve(numLocalFaces);
319
320 GeometryHelper geometryHelper(element, this->gridView());
321
322 for (const auto& intersection : intersections(this->gridView(), element))
323 {
324 geometryHelper.updateLocalFace(intersectionMapper_, intersection);
325 const int localFaceIndex = geometryHelper.localFaceIndex();
326
327 // inner sub control volume faces
328 if (intersection.neighbor())
329 {
330 auto nIdx = this->elementMapper().index(intersection.outside());
331 scvfs_.emplace_back(intersection,
332 intersection.geometry(),
333 scvfIdx,
334 std::vector<GridIndexType>({eIdx, nIdx}),
335 geometryHelper);
336 localToGlobalScvfIndices_[eIdx][localFaceIndex] = scvfIdx;
337 scvfsIndexSet.push_back(scvfIdx++);
338 }
339 // boundary sub control volume faces
340 else if (intersection.boundary())
341 {
342 scvfs_.emplace_back(intersection,
343 intersection.geometry(),
344 scvfIdx,
345 std::vector<GridIndexType>({eIdx, this->gridView().size(0) + numBoundaryScvf_++}),
346 geometryHelper);
347 localToGlobalScvfIndices_[eIdx][localFaceIndex] = scvfIdx;
348 scvfsIndexSet.push_back(scvfIdx++);
349
350 hasBoundaryScvf_[eIdx] = true;
351 }
352 }
353
354 // Save the scvf indices belonging to this scv to build up fv element geometries fast
355 scvfIndicesOfScv_[eIdx] = scvfsIndexSet;
356 }
357
358 // build the connectivity map for an effecient assembly
359 connectivityMap_.update(*this);
360 }
361
363 const SubControlVolume& scv(GridIndexType scvIdx) const
364 {
365 return scvs_[scvIdx];
366 }
367
369 const SubControlVolumeFace& scvf(GridIndexType scvfIdx) const
370 {
371 return scvfs_[scvfIdx];
372 }
373
375 const std::vector<GridIndexType>& scvfIndicesOfScv(GridIndexType scvIdx) const
376 {
377 return scvfIndicesOfScv_[scvIdx];
378 }
379
380 GridIndexType localToGlobalScvfIndex(GridIndexType eIdx, LocalIndexType localScvfIdx) const
381 {
382 return localToGlobalScvfIndices_[eIdx][localScvfIdx];
383 }
384
385 const SubControlVolumeFace& scvf(GridIndexType eIdx, LocalIndexType localScvfIdx) const
386 {
387 return scvf(localToGlobalScvfIndex(eIdx, localScvfIdx));
388 }
389
394 const ConnectivityMap &connectivityMap() const
395 { return connectivityMap_; }
396
398 std::unique_ptr<CellCenterFVGridGeometry<ThisType>> cellCenterFVGridGeometryPtr() const
399 {
400 return std::make_unique<CellCenterFVGridGeometry<ThisType>>(this);
401 }
402
404 std::unique_ptr<FaceFVGridGeometry<ThisType>> faceFVGridGeometryPtr() const
405 {
406 return std::make_unique<FaceFVGridGeometry<ThisType>>(this);
407 }
408
411 {
413 }
414
417 {
418 return FaceFVGridGeometry<ThisType>(this);
419 }
420
422 bool hasBoundaryScvf(GridIndexType eIdx) const
423 { return hasBoundaryScvf_[eIdx]; }
424
425private:
426
427 // mappers
428 ConnectivityMap connectivityMap_;
429 IntersectionMapper intersectionMapper_;
430
431 std::vector<SubControlVolume> scvs_;
432 std::vector<SubControlVolumeFace> scvfs_;
433 std::vector<std::vector<GridIndexType>> scvfIndicesOfScv_;
434 std::vector<std::vector<GridIndexType>> localToGlobalScvfIndices_;
435 GridIndexType numBoundaryScvf_;
436 std::vector<bool> hasBoundaryScvf_;
437};
438
445template<class GV, class T>
446class StaggeredFVGridGeometry<GV, false, T>
447: public BaseGridGeometry<GV, T>
448{
451 using GridIndexType = typename IndexTraits<GV>::GridIndex;
452 using LocalIndexType = typename IndexTraits<GV>::LocalIndex;
453 using Element = typename GV::template Codim<0>::Entity;
454
455 using IntersectionMapper = typename T::IntersectionMapper;
456 using ConnectivityMap = typename T::template ConnectivityMap<ThisType>;
457
458public:
460 using Traits = typename T::PublicTraits;
461
464 static constexpr int upwindSchemeOrder = T::upwindSchemeOrder;
465 static constexpr bool useHigherOrder = upwindSchemeOrder > 1;
466 static constexpr bool cachingEnabled = false;
467
468 using GeometryHelper = typename T::GeometryHelper;
469
471 using LocalView = typename T::template LocalView<ThisType, false>;
473 using SubControlVolume = typename T::SubControlVolume;
475 using SubControlVolumeFace = typename T::SubControlVolumeFace;
479 using GridView = GV;
481 using DofTypeIndices = typename T::DofTypeIndices;
482
484 static constexpr auto cellCenterIdx()
485 { return typename DofTypeIndices::CellCenterIdx{}; }
486
488 static constexpr auto faceIdx()
489 { return typename DofTypeIndices::FaceIdx{}; }
490
492 static constexpr int upwindStencilOrder()
493 { return upwindSchemeOrder; }
494
497
498 using FVGridGeometryTuple = std::tuple< CellCenterFVGridGeometry<ThisType>, FaceFVGridGeometry<ThisType> >;
499
501 StaggeredFVGridGeometry(const GridView& gridView, const std::string& paramGroup = "")
502 : ParentType(gridView)
503 , intersectionMapper_(gridView)
504 {
505 // Check if the overlap size is what we expect
507 DUNE_THROW(Dune::InvalidStateException, "The staggered discretization method needs at least an overlap of 1 for parallel computations. "
508 << " Set the parameter \"Grid.Overlap\" in the input file.");
509 }
510
512 void update()
513 {
514 // clear containers (necessary after grid refinement)
515 scvfIndicesOfScv_.clear();
516 if constexpr (Deprecated::hasUpdateGridView<IntersectionMapper, GridView>())
517 intersectionMapper_.update(this->gridView());
518 else
519 Deprecated::update(intersectionMapper_);
520 neighborVolVarIndices_.clear();
521
522 numScvs_ = numCellCenterDofs();
523 numScvf_ = 0;
524 numBoundaryScvf_ = 0;
525 scvfIndicesOfScv_.resize(numScvs_);
526 localToGlobalScvfIndices_.resize(numScvs_);
527 neighborVolVarIndices_.resize(numScvs_);
528
529 // Build the scvs and scv faces
530 for (const auto& element : elements(this->gridView()))
531 {
532 auto eIdx = this->elementMapper().index(element);
533
534 // the element-wise index sets for finite volume geometry
535 auto numLocalFaces = intersectionMapper_.numFaces(element);
536 std::vector<GridIndexType> scvfsIndexSet;
537 scvfsIndexSet.reserve(numLocalFaces);
538 localToGlobalScvfIndices_[eIdx].resize(numLocalFaces);
539
540 std::vector<GridIndexType> neighborVolVarIndexSet;
541 neighborVolVarIndexSet.reserve(numLocalFaces);
542
543 for (const auto& intersection : intersections(this->gridView(), element))
544 {
545 const auto localFaceIndex = intersection.indexInInside();
546 localToGlobalScvfIndices_[eIdx][localFaceIndex] = numScvf_;
547 scvfsIndexSet.push_back(numScvf_++);
548
549 if (intersection.neighbor())
550 {
551 const auto nIdx = this->elementMapper().index(intersection.outside());
552 neighborVolVarIndexSet.emplace_back(nIdx);
553 }
554 else
555 neighborVolVarIndexSet.emplace_back(numScvs_ + numBoundaryScvf_++);
556 }
557
558 // Save the scvf indices belonging to this scv to build up fv element geometries fast
559 scvfIndicesOfScv_[eIdx] = scvfsIndexSet;
560 neighborVolVarIndices_[eIdx] = neighborVolVarIndexSet;
561 }
562
563 // build the connectivity map for an effecient assembly
564 connectivityMap_.update(*this);
565 }
566
568 std::size_t numScv() const
569 {
570 return numScvs_;
571 }
572
574 std::size_t numScvf() const
575 {
576 return numScvf_;
577 }
578
580 std::size_t numBoundaryScvf() const
581 {
582 return numBoundaryScvf_;
583 }
584
586 std::size_t numIntersections() const
587 {
588 return intersectionMapper_.numIntersections();
589 }
590
592 std::size_t numDofs() const
593 { return numCellCenterDofs() + numFaceDofs(); }
594
595 std::size_t numCellCenterDofs() const
596 { return this->gridView().size(0); }
597
598 std::size_t numFaceDofs() const
599 { return this->gridView().size(1); }
600
601 const std::vector<GridIndexType>& scvfIndicesOfScv(GridIndexType scvIdx) const
602 { return scvfIndicesOfScv_[scvIdx]; }
603
604 GridIndexType localToGlobalScvfIndex(GridIndexType eIdx, LocalIndexType localScvfIdx) const
605 {
606 return localToGlobalScvfIndices_[eIdx][localScvfIdx];
607 }
608
613 const ConnectivityMap &connectivityMap() const
614 { return connectivityMap_; }
615
617 std::unique_ptr<CellCenterFVGridGeometry<ThisType>> cellCenterFVGridGeometryPtr() const
618 {
619 return std::make_unique<CellCenterFVGridGeometry<ThisType>>(this);
620 }
621
623 std::unique_ptr<FaceFVGridGeometry<ThisType>> faceFVGridGeometryPtr() const
624 {
625 return std::make_unique<FaceFVGridGeometry<ThisType>>(this);
626 }
627
630 {
632 }
633
636 {
637 return FaceFVGridGeometry<ThisType>(this);
638 }
639
641 const IntersectionMapper& intersectionMapper() const
642 {
643 return intersectionMapper_;
644 }
645
647 const std::vector<GridIndexType>& neighborVolVarIndices(GridIndexType scvIdx) const
648 { return neighborVolVarIndices_[scvIdx]; }
649
650private:
651
653 std::size_t numScvs_;
654 std::size_t numScvf_;
655 std::size_t numBoundaryScvf_;
656 std::vector<std::vector<GridIndexType>> localToGlobalScvfIndices_;
657 std::vector<std::vector<GridIndexType>> neighborVolVarIndices_;
658
659 // mappers
660 ConnectivityMap connectivityMap_;
661 IntersectionMapper intersectionMapper_;
662
664 std::vector<std::vector<GridIndexType>> scvfIndicesOfScv_;
665};
666
667} // end namespace
668
669#endif
Defines the index types used for grid and local indices.
Helpers for deprecation.
Check the overlap size for different discretization methods.
The available discretization methods in Dumux.
Helper classes to compute the integration elements.
Base class for grid geometries.
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:224
Base class for all finite volume grid geometries.
Definition: basegridgeometry.hh:50
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:43
static constexpr auto faceIdx()
Return an integral constant index for face dofs.
Definition: discretization/staggered/fvgridgeometry.hh:73
const auto & elementMapper() const
Returns the mapper for elements to indices for constant grids.
Definition: discretization/staggered/fvgridgeometry.hh:98
static constexpr bool isCellCenter()
Returns true if this view if related to cell centered dofs.
Definition: discretization/staggered/fvgridgeometry.hh:57
const ActualGridGeometry & actualGridGeometry() const
Returns the actual gridGeometry we are a restriction of.
Definition: discretization/staggered/fvgridgeometry.hh:104
static constexpr DiscretizationMethod discMethod
Definition: discretization/staggered/fvgridgeometry.hh:51
const ActualGridGeometry * gridGeometry_
Definition: discretization/staggered/fvgridgeometry.hh:108
const auto & connectivityMap() const
Returns the connectivity map of which dofs have derivatives with respect to a given dof.
Definition: discretization/staggered/fvgridgeometry.hh:86
static constexpr auto cellCenterIdx()
Return an integral constant index for cell centered dofs.
Definition: discretization/staggered/fvgridgeometry.hh:67
const auto & gridView() const
Return the gridView this grid geometry object lives on.
Definition: discretization/staggered/fvgridgeometry.hh:79
typename ActualGridGeometry::LocalView LocalView
Definition: discretization/staggered/fvgridgeometry.hh:52
GridGeometryView(const ActualGridGeometry *actualGridGeometry)
Definition: discretization/staggered/fvgridgeometry.hh:46
const auto & vertexMapper() const
Returns the mapper for vertices to indices for possibly adaptive grids.
Definition: discretization/staggered/fvgridgeometry.hh:92
typename ActualGridGeometry::GridView GridView
export the GridView type and the discretization method
Definition: discretization/staggered/fvgridgeometry.hh:50
static constexpr bool isFace()
Returns true if this view if related to face dofs.
Definition: discretization/staggered/fvgridgeometry.hh:62
Cell center specific auxiliary FvGridGeometry classes. Required for the Dumux multi-domain framework.
Definition: discretization/staggered/fvgridgeometry.hh:119
std::size_t numDofs() const
The total number of cell centered dofs.
Definition: discretization/staggered/fvgridgeometry.hh:133
static constexpr bool isCellCenter()
Returns true because this view is related to cell centered dofs.
Definition: discretization/staggered/fvgridgeometry.hh:128
Face specific auxiliary FvGridGeometry classes. Required for the Dumux multi-domain framework.
Definition: discretization/staggered/fvgridgeometry.hh:144
static constexpr bool isFace()
Returns true because this view is related to face dofs.
Definition: discretization/staggered/fvgridgeometry.hh:153
std::size_t numDofs() const
The total number of cell centered dofs.
Definition: discretization/staggered/fvgridgeometry.hh:158
Base class for the finite volume geometry vector for staggered models This builds up the sub control ...
Definition: discretization/staggered/fvgridgeometry.hh:171
Base class for the finite volume geometry vector for staggered models This builds up the sub control ...
Definition: discretization/staggered/fvgridgeometry.hh:182
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:398
std::size_t numDofs() const
the total number of dofs
Definition: discretization/staggered/fvgridgeometry.hh:270
const SubControlVolumeFace & scvf(GridIndexType scvfIdx) const
Get a sub control volume face with a global scvf index.
Definition: discretization/staggered/fvgridgeometry.hh:369
CellCenterFVGridGeometry< ThisType > cellCenterFVGridGeometry() const
Return a copy of the cell center specific auxiliary class.
Definition: discretization/staggered/fvgridgeometry.hh:410
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:375
typename T::PublicTraits Traits
export the traits
Definition: discretization/staggered/fvgridgeometry.hh:195
std::size_t numBoundaryScvf() const
The total number of boundary sub control volume faces.
Definition: discretization/staggered/fvgridgeometry.hh:257
typename T::DofTypeIndices DofTypeIndices
export the dof type indices
Definition: discretization/staggered/fvgridgeometry.hh:214
std::size_t numFaceDofs() const
Definition: discretization/staggered/fvgridgeometry.hh:276
static constexpr int upwindStencilOrder()
The order of the stencil built.
Definition: discretization/staggered/fvgridgeometry.hh:225
typename T::SubControlVolume SubControlVolume
export the type of sub control volume
Definition: discretization/staggered/fvgridgeometry.hh:206
std::tuple< CellCenterFVGridGeometry< ThisType >, FaceFVGridGeometry< ThisType > > FVGridGeometryTuple
Definition: discretization/staggered/fvgridgeometry.hh:231
StaggeredFVGridGeometry(const GridView &gridView, const std::string &paramGroup="")
Constructor.
Definition: discretization/staggered/fvgridgeometry.hh:234
std::size_t numScvf() const
The total number of sub control volume faces.
Definition: discretization/staggered/fvgridgeometry.hh:251
typename T::SubControlVolumeFace SubControlVolumeFace
export the type of sub control volume
Definition: discretization/staggered/fvgridgeometry.hh:208
std::size_t numIntersections() const
The total number of intersections.
Definition: discretization/staggered/fvgridgeometry.hh:264
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:404
std::size_t numCellCenterDofs() const
Definition: discretization/staggered/fvgridgeometry.hh:273
const SubControlVolumeFace & scvf(GridIndexType eIdx, LocalIndexType localScvfIdx) const
Definition: discretization/staggered/fvgridgeometry.hh:385
FaceFVGridGeometry< ThisType > faceFVGridGeometry() const
Return a copy of the face specific auxiliary class.
Definition: discretization/staggered/fvgridgeometry.hh:416
static constexpr auto cellCenterIdx()
return a integral constant for cell center dofs
Definition: discretization/staggered/fvgridgeometry.hh:217
GV GridView
export the grid view type
Definition: discretization/staggered/fvgridgeometry.hh:212
const ConnectivityMap & connectivityMap() const
Returns the connectivity map of which dofs have derivatives with respect to a given dof.
Definition: discretization/staggered/fvgridgeometry.hh:394
bool hasBoundaryScvf(GridIndexType eIdx) const
Returns whether one of the geometry's scvfs lies on a boundary.
Definition: discretization/staggered/fvgridgeometry.hh:422
static constexpr auto faceIdx()
return a integral constant for face dofs
Definition: discretization/staggered/fvgridgeometry.hh:221
Extrusion_t< T > Extrusion
export the type of extrusion
Definition: discretization/staggered/fvgridgeometry.hh:210
std::size_t numScv() const
The total number of sub control volumes.
Definition: discretization/staggered/fvgridgeometry.hh:245
GridIndexType localToGlobalScvfIndex(GridIndexType eIdx, LocalIndexType localScvfIdx) const
Definition: discretization/staggered/fvgridgeometry.hh:380
typename T::template LocalView< ThisType, true > LocalView
export the type of the fv element geometry (the local view type)
Definition: discretization/staggered/fvgridgeometry.hh:204
const SubControlVolume & scv(GridIndexType scvIdx) const
Get a sub control volume with a global scv index.
Definition: discretization/staggered/fvgridgeometry.hh:363
void update()
update all fvElementGeometries (do this again after grid adaption)
Definition: discretization/staggered/fvgridgeometry.hh:280
Base class for the finite volume geometry vector for staggered models This builds up the sub control ...
Definition: discretization/staggered/fvgridgeometry.hh:448
typename T::template LocalView< ThisType, false > LocalView
export the type of the fv element geometry (the local view type)
Definition: discretization/staggered/fvgridgeometry.hh:471
static constexpr auto faceIdx()
return a integral constant for face dofs
Definition: discretization/staggered/fvgridgeometry.hh:488
typename T::DofTypeIndices DofTypeIndices
export the dof type indices
Definition: discretization/staggered/fvgridgeometry.hh:481
typename T::PublicTraits Traits
export the traits
Definition: discretization/staggered/fvgridgeometry.hh:460
GridIndexType localToGlobalScvfIndex(GridIndexType eIdx, LocalIndexType localScvfIdx) const
Definition: discretization/staggered/fvgridgeometry.hh:604
std::size_t numCellCenterDofs() const
Definition: discretization/staggered/fvgridgeometry.hh:595
typename T::GeometryHelper GeometryHelper
Definition: discretization/staggered/fvgridgeometry.hh:468
const ConnectivityMap & connectivityMap() const
Returns the connectivity map of which dofs have derivatives with respect to a given dof.
Definition: discretization/staggered/fvgridgeometry.hh:613
std::size_t numFaceDofs() const
Definition: discretization/staggered/fvgridgeometry.hh:598
CellCenterFVGridGeometry< ThisType > cellCenterFVGridGeometry() const
Return a copy of the cell center specific auxiliary class.
Definition: discretization/staggered/fvgridgeometry.hh:629
static constexpr int upwindStencilOrder()
The order of the stencil built.
Definition: discretization/staggered/fvgridgeometry.hh:492
std::tuple< CellCenterFVGridGeometry< ThisType >, FaceFVGridGeometry< ThisType > > FVGridGeometryTuple
Definition: discretization/staggered/fvgridgeometry.hh:498
const std::vector< GridIndexType > & scvfIndicesOfScv(GridIndexType scvIdx) const
Definition: discretization/staggered/fvgridgeometry.hh:601
GV GridView
export the grid view type
Definition: discretization/staggered/fvgridgeometry.hh:479
typename T::SubControlVolumeFace SubControlVolumeFace
export the type of sub control volume
Definition: discretization/staggered/fvgridgeometry.hh:475
const IntersectionMapper & intersectionMapper() const
Return a reference to the intersection mapper.
Definition: discretization/staggered/fvgridgeometry.hh:641
StaggeredFVGridGeometry(const GridView &gridView, const std::string &paramGroup="")
Constructor.
Definition: discretization/staggered/fvgridgeometry.hh:501
typename T::SubControlVolume SubControlVolume
export the type of sub control volume
Definition: discretization/staggered/fvgridgeometry.hh:473
std::size_t numIntersections() const
The total number of intersections.
Definition: discretization/staggered/fvgridgeometry.hh:586
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:623
std::size_t numBoundaryScvf() const
The total number of boundary sub control volume faces.
Definition: discretization/staggered/fvgridgeometry.hh:580
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:617
FaceFVGridGeometry< ThisType > faceFVGridGeometry() const
Return a copy of the face specific auxiliary class.
Definition: discretization/staggered/fvgridgeometry.hh:635
Extrusion_t< T > Extrusion
export the type of extrusion
Definition: discretization/staggered/fvgridgeometry.hh:477
static constexpr auto cellCenterIdx()
return a integral constant for cell center dofs
Definition: discretization/staggered/fvgridgeometry.hh:484
void update()
update all fvElementGeometries (do this again after grid adaption)
Definition: discretization/staggered/fvgridgeometry.hh:512
std::size_t numDofs() const
the total number of dofs
Definition: discretization/staggered/fvgridgeometry.hh:592
std::size_t numScv() const
The total number of sub control volumes.
Definition: discretization/staggered/fvgridgeometry.hh:568
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:647
std::size_t numScvf() const
The total number of sub control volume faces.
Definition: discretization/staggered/fvgridgeometry.hh:574