3.2-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 const ActualGridGeometry& actualGridGeometry() const
103 { return *gridGeometry_; }
104
105protected:
106 const ActualGridGeometry* gridGeometry_;
107
108};
109
115template <class ActualGridGeometry>
116class CellCenterFVGridGeometry : public GridGeometryView<ActualGridGeometry>
117{
119public:
120
121 using ParentType::ParentType;
122
126 static constexpr bool isCellCenter() { return true; }
127
131 std::size_t numDofs() const
132 { return this->gridGeometry_->numCellCenterDofs(); }
133};
134
140template <class ActualGridGeometry>
141class FaceFVGridGeometry : public GridGeometryView<ActualGridGeometry>
142{
144public:
145
146 using ParentType::ParentType;
147
151 static constexpr bool isFace() {return true; }
152
156 std::size_t numDofs() const
157 { return this->gridGeometry_->numFaceDofs(); }
158};
159
166template<class GridView,
167 bool cachingEnabled,
168 class Traits>
170
177template<class GV, class Traits>
178class StaggeredFVGridGeometry<GV, true, Traits>
179: public BaseGridGeometry<GV, Traits>
180{
183 using GridIndexType = typename IndexTraits<GV>::GridIndex;
184 using LocalIndexType = typename IndexTraits<GV>::LocalIndex;
185 using Element = typename GV::template Codim<0>::Entity;
186
187 using IntersectionMapper = typename Traits::IntersectionMapper;
188 using GeometryHelper = typename Traits::GeometryHelper;
189 using ConnectivityMap = typename Traits::template ConnectivityMap<ThisType>;
190
191public:
194 static constexpr int upwindSchemeOrder = Traits::upwindSchemeOrder;
195 static constexpr bool useHigherOrder = upwindSchemeOrder > 1;
196
198 using LocalView = typename Traits::template LocalView<ThisType, true>;
200 using SubControlVolume = typename Traits::SubControlVolume;
202 using SubControlVolumeFace = typename Traits::SubControlVolumeFace;
204 using GridView = GV;
206 using DofTypeIndices = typename Traits::DofTypeIndices;
207
209 static constexpr auto cellCenterIdx()
210 { return typename DofTypeIndices::CellCenterIdx{}; }
211
213 static constexpr auto faceIdx()
214 { return typename DofTypeIndices::FaceIdx{}; }
215
217 static constexpr int upwindStencilOrder()
218 { return upwindSchemeOrder; }
219
222
223 using FVGridGeometryTuple = std::tuple< CellCenterFVGridGeometry<ThisType>, FaceFVGridGeometry<ThisType> >;
224
226 StaggeredFVGridGeometry(const GridView& gridView, const std::string& paramGroup = "")
227 : ParentType(gridView)
228 , intersectionMapper_(gridView)
229 {
230 // Check if the overlap size is what we expect
232 DUNE_THROW(Dune::InvalidStateException, "The staggered discretization method needs at least an overlap of 1 for parallel computations. "
233 << " Set the parameter \"Grid.Overlap\" in the input file.");
234 }
235
237 std::size_t numScv() const
238 {
239 return scvs_.size();
240 }
241
243 std::size_t numScvf() const
244 {
245 return scvfs_.size();
246 }
247
249 std::size_t numBoundaryScvf() const
250 {
251 return numBoundaryScvf_;
252 }
253
254
256 std::size_t numIntersections() const
257 {
258 return intersectionMapper_.numIntersections();
259 }
260
262 std::size_t numDofs() const
263 { return numCellCenterDofs() + numFaceDofs(); }
264
265 std::size_t numCellCenterDofs() const
266 { return this->gridView().size(0); }
267
268 std::size_t numFaceDofs() const
269 { return this->gridView().size(1); }
270
272 void update()
273 {
274 // clear containers (necessary after grid refinement)
275 scvs_.clear();
276 scvfs_.clear();
277 scvfIndicesOfScv_.clear();
278 intersectionMapper_.update();
279
280 // determine size of containers
281 std::size_t numScvs = this->gridView().size(0);
282 std::size_t numScvf = 0;
283 for (const auto& element : elements(this->gridView()))
284 numScvf += element.subEntities(1);
285
286 // reserve memory
287 scvs_.resize(numScvs);
288 scvfs_.reserve(numScvf);
289 scvfIndicesOfScv_.resize(numScvs);
290 localToGlobalScvfIndices_.resize(numScvs);
291 hasBoundaryScvf_.resize(numScvs, false);
292
293 // Build the scvs and scv faces
294 GridIndexType scvfIdx = 0;
295 numBoundaryScvf_ = 0;
296 for (const auto& element : elements(this->gridView()))
297 {
298 auto eIdx = this->elementMapper().index(element);
299
300 // reserve memory for the localToGlobalScvfIdx map
301 auto numLocalFaces = intersectionMapper_.numFaces(element);
302 localToGlobalScvfIndices_[eIdx].resize(numLocalFaces);
303
304 scvs_[eIdx] = SubControlVolume(element.geometry(), eIdx);
305
306 // the element-wise index sets for finite volume geometry
307 std::vector<GridIndexType> scvfsIndexSet;
308 scvfsIndexSet.reserve(numLocalFaces);
309
310 GeometryHelper geometryHelper(element, this->gridView());
311
312 for (const auto& intersection : intersections(this->gridView(), element))
313 {
314 geometryHelper.updateLocalFace(intersectionMapper_, intersection);
315 const int localFaceIndex = geometryHelper.localFaceIndex();
316
317 // inner sub control volume faces
318 if (intersection.neighbor())
319 {
320 auto nIdx = this->elementMapper().index(intersection.outside());
321 scvfs_.emplace_back(intersection,
322 intersection.geometry(),
323 scvfIdx,
324 std::vector<GridIndexType>({eIdx, nIdx}),
325 geometryHelper);
326 localToGlobalScvfIndices_[eIdx][localFaceIndex] = scvfIdx;
327 scvfsIndexSet.push_back(scvfIdx++);
328 }
329 // boundary sub control volume faces
330 else if (intersection.boundary())
331 {
332 scvfs_.emplace_back(intersection,
333 intersection.geometry(),
334 scvfIdx,
335 std::vector<GridIndexType>({eIdx, this->gridView().size(0) + numBoundaryScvf_++}),
336 geometryHelper);
337 localToGlobalScvfIndices_[eIdx][localFaceIndex] = scvfIdx;
338 scvfsIndexSet.push_back(scvfIdx++);
339
340 hasBoundaryScvf_[eIdx] = true;
341 }
342 }
343
344 // Save the scvf indices belonging to this scv to build up fv element geometries fast
345 scvfIndicesOfScv_[eIdx] = scvfsIndexSet;
346 }
347
348 // build the connectivity map for an effecient assembly
349 connectivityMap_.update(*this);
350 }
351
353 const SubControlVolume& scv(GridIndexType scvIdx) const
354 {
355 return scvs_[scvIdx];
356 }
357
359 const SubControlVolumeFace& scvf(GridIndexType scvfIdx) const
360 {
361 return scvfs_[scvfIdx];
362 }
363
365 const std::vector<GridIndexType>& scvfIndicesOfScv(GridIndexType scvIdx) const
366 {
367 return scvfIndicesOfScv_[scvIdx];
368 }
369
370 GridIndexType localToGlobalScvfIndex(GridIndexType eIdx, LocalIndexType localScvfIdx) const
371 {
372 return localToGlobalScvfIndices_[eIdx][localScvfIdx];
373 }
374
375 const SubControlVolumeFace& scvf(GridIndexType eIdx, LocalIndexType localScvfIdx) const
376 {
377 return scvf(localToGlobalScvfIndex(eIdx, localScvfIdx));
378 }
379
384 const ConnectivityMap &connectivityMap() const
385 { return connectivityMap_; }
386
388 std::unique_ptr<CellCenterFVGridGeometry<ThisType>> cellCenterFVGridGeometryPtr() const
389 {
390 return std::make_unique<CellCenterFVGridGeometry<ThisType>>(this);
391 }
392
394 std::unique_ptr<FaceFVGridGeometry<ThisType>> faceFVGridGeometryPtr() const
395 {
396 return std::make_unique<FaceFVGridGeometry<ThisType>>(this);
397 }
398
401 {
403 }
404
407 {
408 return FaceFVGridGeometry<ThisType>(this);
409 }
410
412 bool hasBoundaryScvf(GridIndexType eIdx) const
413 { return hasBoundaryScvf_[eIdx]; }
414
415private:
416
417 // mappers
418 ConnectivityMap connectivityMap_;
419 IntersectionMapper intersectionMapper_;
420
421 std::vector<SubControlVolume> scvs_;
422 std::vector<SubControlVolumeFace> scvfs_;
423 std::vector<std::vector<GridIndexType>> scvfIndicesOfScv_;
424 std::vector<std::vector<GridIndexType>> localToGlobalScvfIndices_;
425 GridIndexType numBoundaryScvf_;
426 std::vector<bool> hasBoundaryScvf_;
427};
428
435template<class GV, class Traits>
436class StaggeredFVGridGeometry<GV, false, Traits>
437: public BaseGridGeometry<GV, Traits>
438{
441 using GridIndexType = typename IndexTraits<GV>::GridIndex;
442 using LocalIndexType = typename IndexTraits<GV>::LocalIndex;
443 using Element = typename GV::template Codim<0>::Entity;
444
445 using IntersectionMapper = typename Traits::IntersectionMapper;
446 using ConnectivityMap = typename Traits::template ConnectivityMap<ThisType>;
447
448public:
451 static constexpr int upwindSchemeOrder = Traits::upwindSchemeOrder;
452 static constexpr bool useHigherOrder = upwindSchemeOrder > 1;
453
454 using GeometryHelper = typename Traits::GeometryHelper;
455
457 using LocalView = typename Traits::template LocalView<ThisType, false>;
459 using SubControlVolume = typename Traits::SubControlVolume;
461 using SubControlVolumeFace = typename Traits::SubControlVolumeFace;
463 using GridView = GV;
465 using DofTypeIndices = typename Traits::DofTypeIndices;
466
468 static constexpr auto cellCenterIdx()
469 { return typename DofTypeIndices::CellCenterIdx{}; }
470
472 static constexpr auto faceIdx()
473 { return typename DofTypeIndices::FaceIdx{}; }
474
476 static constexpr int upwindStencilOrder()
477 { return upwindSchemeOrder; }
478
481
482 using FVGridGeometryTuple = std::tuple< CellCenterFVGridGeometry<ThisType>, FaceFVGridGeometry<ThisType> >;
483
485 StaggeredFVGridGeometry(const GridView& gridView, const std::string& paramGroup = "")
486 : ParentType(gridView)
487 , intersectionMapper_(gridView)
488 {
489 // Check if the overlap size is what we expect
491 DUNE_THROW(Dune::InvalidStateException, "The staggered discretization method needs at least an overlap of 1 for parallel computations. "
492 << " Set the parameter \"Grid.Overlap\" in the input file.");
493 }
494
496 void update()
497 {
498 // clear containers (necessary after grid refinement)
499 scvfIndicesOfScv_.clear();
500 intersectionMapper_.update();
501 neighborVolVarIndices_.clear();
502
503 numScvs_ = numCellCenterDofs();
504 numScvf_ = 0;
505 numBoundaryScvf_ = 0;
506 scvfIndicesOfScv_.resize(numScvs_);
507 localToGlobalScvfIndices_.resize(numScvs_);
508 neighborVolVarIndices_.resize(numScvs_);
509
510 // Build the scvs and scv faces
511 for (const auto& element : elements(this->gridView()))
512 {
513 auto eIdx = this->elementMapper().index(element);
514
515 // the element-wise index sets for finite volume geometry
516 auto numLocalFaces = intersectionMapper_.numFaces(element);
517 std::vector<GridIndexType> scvfsIndexSet;
518 scvfsIndexSet.reserve(numLocalFaces);
519 localToGlobalScvfIndices_[eIdx].resize(numLocalFaces);
520
521 std::vector<GridIndexType> neighborVolVarIndexSet;
522 neighborVolVarIndexSet.reserve(numLocalFaces);
523
524 for (const auto& intersection : intersections(this->gridView(), element))
525 {
526 const auto localFaceIndex = intersection.indexInInside();
527 localToGlobalScvfIndices_[eIdx][localFaceIndex] = numScvf_;
528 scvfsIndexSet.push_back(numScvf_++);
529
530 if (intersection.neighbor())
531 {
532 const auto nIdx = this->elementMapper().index(intersection.outside());
533 neighborVolVarIndexSet.emplace_back(nIdx);
534 }
535 else
536 neighborVolVarIndexSet.emplace_back(numScvs_ + numBoundaryScvf_++);
537 }
538
539 // Save the scvf indices belonging to this scv to build up fv element geometries fast
540 scvfIndicesOfScv_[eIdx] = scvfsIndexSet;
541 neighborVolVarIndices_[eIdx] = neighborVolVarIndexSet;
542 }
543
544 // build the connectivity map for an effecient assembly
545 connectivityMap_.update(*this);
546 }
547
549 std::size_t numScv() const
550 {
551 return numScvs_;
552 }
553
555 std::size_t numScvf() const
556 {
557 return numScvf_;
558 }
559
561 std::size_t numBoundaryScvf() const
562 {
563 return numBoundaryScvf_;
564 }
565
567 std::size_t numIntersections() const
568 {
569 return intersectionMapper_.numIntersections();
570 }
571
573 std::size_t numDofs() const
574 { return numCellCenterDofs() + numFaceDofs(); }
575
576 std::size_t numCellCenterDofs() const
577 { return this->gridView().size(0); }
578
579 std::size_t numFaceDofs() const
580 { return this->gridView().size(1); }
581
582 const std::vector<GridIndexType>& scvfIndicesOfScv(GridIndexType scvIdx) const
583 { return scvfIndicesOfScv_[scvIdx]; }
584
585 GridIndexType localToGlobalScvfIndex(GridIndexType eIdx, LocalIndexType localScvfIdx) const
586 {
587 return localToGlobalScvfIndices_[eIdx][localScvfIdx];
588 }
589
594 const ConnectivityMap &connectivityMap() const
595 { return connectivityMap_; }
596
598 std::unique_ptr<CellCenterFVGridGeometry<ThisType>> cellCenterFVGridGeometryPtr() const
599 {
600 return std::make_unique<CellCenterFVGridGeometry<ThisType>>(this);
601 }
602
604 std::unique_ptr<FaceFVGridGeometry<ThisType>> faceFVGridGeometryPtr() const
605 {
606 return std::make_unique<FaceFVGridGeometry<ThisType>>(this);
607 }
608
611 {
613 }
614
617 {
618 return FaceFVGridGeometry<ThisType>(this);
619 }
620
622 const IntersectionMapper& intersectionMapper() const
623 {
624 return intersectionMapper_;
625 }
626
628 const std::vector<GridIndexType>& neighborVolVarIndices(GridIndexType scvIdx) const
629 { return neighborVolVarIndices_[scvIdx]; }
630
631private:
632
634 std::size_t numScvs_;
635 std::size_t numScvf_;
636 std::size_t numBoundaryScvf_;
637 std::vector<std::vector<GridIndexType>> localToGlobalScvfIndices_;
638 std::vector<std::vector<GridIndexType>> neighborVolVarIndices_;
639
640 // mappers
641 ConnectivityMap connectivityMap_;
642 IntersectionMapper intersectionMapper_;
643
645 std::vector<std::vector<GridIndexType>> scvfIndicesOfScv_;
646};
647
648} // end namespace
649
650#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.
DiscretizationMethod
The available discretization methods in Dumux.
Definition: method.hh:37
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:102
static constexpr DiscretizationMethod discMethod
Definition: discretization/staggered/fvgridgeometry.hh:49
const ActualGridGeometry * gridGeometry_
Definition: discretization/staggered/fvgridgeometry.hh:106
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
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:117
std::size_t numDofs() const
The total number of cell centered dofs.
Definition: discretization/staggered/fvgridgeometry.hh:131
static constexpr bool isCellCenter()
Returns true because this view is related to cell centered dofs.
Definition: discretization/staggered/fvgridgeometry.hh:126
Face specific auxiliary FvGridGeometry classes. Required for the Dumux multi-domain framework.
Definition: discretization/staggered/fvgridgeometry.hh:142
static constexpr bool isFace()
Returns true because this view is related to face dofs.
Definition: discretization/staggered/fvgridgeometry.hh:151
std::size_t numDofs() const
The total number of cell centered dofs.
Definition: discretization/staggered/fvgridgeometry.hh:156
Base class for the finite volume geometry vector for staggered models This builds up the sub control ...
Definition: discretization/staggered/fvgridgeometry.hh:169
Base class for the finite volume geometry vector for staggered models This builds up the sub control ...
Definition: discretization/staggered/fvgridgeometry.hh:180
const SubControlVolumeFace & scvf(GridIndexType eIdx, LocalIndexType localScvfIdx) const
Definition: discretization/staggered/fvgridgeometry.hh:375
CellCenterFVGridGeometry< ThisType > cellCenterFVGridGeometry() const
Return a copy of the cell center specific auxiliary class.
Definition: discretization/staggered/fvgridgeometry.hh:400
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:388
typename Traits::SubControlVolumeFace SubControlVolumeFace
export the type of sub control volume
Definition: discretization/staggered/fvgridgeometry.hh:202
static constexpr auto faceIdx()
return a integral constant for face dofs
Definition: discretization/staggered/fvgridgeometry.hh:213
GridIndexType localToGlobalScvfIndex(GridIndexType eIdx, LocalIndexType localScvfIdx) const
Definition: discretization/staggered/fvgridgeometry.hh:370
std::size_t numCellCenterDofs() const
Definition: discretization/staggered/fvgridgeometry.hh:265
void update()
update all fvElementGeometries (do this again after grid adaption)
Definition: discretization/staggered/fvgridgeometry.hh:272
bool hasBoundaryScvf(GridIndexType eIdx) const
Returns whether one of the geometry's scvfs lies on a boundary.
Definition: discretization/staggered/fvgridgeometry.hh:412
const ConnectivityMap & connectivityMap() const
Returns the connectivity map of which dofs have derivatives with respect to a given dof.
Definition: discretization/staggered/fvgridgeometry.hh:384
typename Traits::template LocalView< ThisType, true > LocalView
export the type of the fv element geometry (the local view type)
Definition: discretization/staggered/fvgridgeometry.hh:198
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:365
typename Traits::DofTypeIndices DofTypeIndices
export the dof type indices
Definition: discretization/staggered/fvgridgeometry.hh:206
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:394
StaggeredFVGridGeometry(const GridView &gridView, const std::string &paramGroup="")
Constructor.
Definition: discretization/staggered/fvgridgeometry.hh:226
std::size_t numScvf() const
The total number of sub control volume faces.
Definition: discretization/staggered/fvgridgeometry.hh:243
static constexpr int upwindStencilOrder()
The order of the stencil built.
Definition: discretization/staggered/fvgridgeometry.hh:217
std::size_t numDofs() const
the total number of dofs
Definition: discretization/staggered/fvgridgeometry.hh:262
std::tuple< CellCenterFVGridGeometry< ThisType >, FaceFVGridGeometry< ThisType > > FVGridGeometryTuple
Definition: discretization/staggered/fvgridgeometry.hh:223
std::size_t numBoundaryScvf() const
The total number of boundary sub control volume faces.
Definition: discretization/staggered/fvgridgeometry.hh:249
const SubControlVolume & scv(GridIndexType scvIdx) const
Get a sub control volume with a global scv index.
Definition: discretization/staggered/fvgridgeometry.hh:353
std::size_t numScv() const
The total number of sub control volumes.
Definition: discretization/staggered/fvgridgeometry.hh:237
std::size_t numFaceDofs() const
Definition: discretization/staggered/fvgridgeometry.hh:268
typename Traits::SubControlVolume SubControlVolume
export the type of sub control volume
Definition: discretization/staggered/fvgridgeometry.hh:200
std::size_t numIntersections() const
The total number of intersections.
Definition: discretization/staggered/fvgridgeometry.hh:256
const SubControlVolumeFace & scvf(GridIndexType scvfIdx) const
Get a sub control volume face with a global scvf index.
Definition: discretization/staggered/fvgridgeometry.hh:359
FaceFVGridGeometry< ThisType > faceFVGridGeometry() const
Return a copy of the face specific auxiliary class.
Definition: discretization/staggered/fvgridgeometry.hh:406
static constexpr auto cellCenterIdx()
return a integral constant for cell center dofs
Definition: discretization/staggered/fvgridgeometry.hh:209
Base class for the finite volume geometry vector for staggered models This builds up the sub control ...
Definition: discretization/staggered/fvgridgeometry.hh:438
const IntersectionMapper & intersectionMapper() const
Return a reference to the intersection mapper.
Definition: discretization/staggered/fvgridgeometry.hh:622
std::size_t numScv() const
The total number of sub control volumes.
Definition: discretization/staggered/fvgridgeometry.hh:549
typename Traits::template LocalView< ThisType, false > LocalView
export the type of the fv element geometry (the local view type)
Definition: discretization/staggered/fvgridgeometry.hh:457
static constexpr int upwindStencilOrder()
The order of the stencil built.
Definition: discretization/staggered/fvgridgeometry.hh:476
typename Traits::SubControlVolumeFace SubControlVolumeFace
export the type of sub control volume
Definition: discretization/staggered/fvgridgeometry.hh:461
typename Traits::GeometryHelper GeometryHelper
Definition: discretization/staggered/fvgridgeometry.hh:454
const ConnectivityMap & connectivityMap() const
Returns the connectivity map of which dofs have derivatives with respect to a given dof.
Definition: discretization/staggered/fvgridgeometry.hh:594
std::size_t numBoundaryScvf() const
The total number of boundary sub control volume faces.
Definition: discretization/staggered/fvgridgeometry.hh:561
std::size_t numScvf() const
The total number of sub control volume faces.
Definition: discretization/staggered/fvgridgeometry.hh:555
void update()
update all fvElementGeometries (do this again after grid adaption)
Definition: discretization/staggered/fvgridgeometry.hh:496
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:604
CellCenterFVGridGeometry< ThisType > cellCenterFVGridGeometry() const
Return a copy of the cell center specific auxiliary class.
Definition: discretization/staggered/fvgridgeometry.hh:610
std::size_t numFaceDofs() const
Definition: discretization/staggered/fvgridgeometry.hh:579
static constexpr auto cellCenterIdx()
return a integral constant for cell center dofs
Definition: discretization/staggered/fvgridgeometry.hh:468
GridIndexType localToGlobalScvfIndex(GridIndexType eIdx, LocalIndexType localScvfIdx) const
Definition: discretization/staggered/fvgridgeometry.hh:585
const std::vector< GridIndexType > & scvfIndicesOfScv(GridIndexType scvIdx) const
Definition: discretization/staggered/fvgridgeometry.hh:582
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:598
FaceFVGridGeometry< ThisType > faceFVGridGeometry() const
Return a copy of the face specific auxiliary class.
Definition: discretization/staggered/fvgridgeometry.hh:616
std::tuple< CellCenterFVGridGeometry< ThisType >, FaceFVGridGeometry< ThisType > > FVGridGeometryTuple
Definition: discretization/staggered/fvgridgeometry.hh:482
std::size_t numIntersections() const
The total number of intersections.
Definition: discretization/staggered/fvgridgeometry.hh:567
std::size_t numDofs() const
the total number of dofs
Definition: discretization/staggered/fvgridgeometry.hh:573
StaggeredFVGridGeometry(const GridView &gridView, const std::string &paramGroup="")
Constructor.
Definition: discretization/staggered/fvgridgeometry.hh:485
typename Traits::SubControlVolume SubControlVolume
export the type of sub control volume
Definition: discretization/staggered/fvgridgeometry.hh:459
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:628
typename Traits::DofTypeIndices DofTypeIndices
export the dof type indices
Definition: discretization/staggered/fvgridgeometry.hh:465
static constexpr auto faceIdx()
return a integral constant for face dofs
Definition: discretization/staggered/fvgridgeometry.hh:472
std::size_t numCellCenterDofs() const
Definition: discretization/staggered/fvgridgeometry.hh:576