3.1-git
DUNE for Multi-{Phase, Component, Scale, Physics, ...} flow and transport in porous media
discretization/box/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 *****************************************************************************/
26#ifndef DUMUX_DISCRETIZATION_BOX_GRID_FVGEOMETRY_HH
27#define DUMUX_DISCRETIZATION_BOX_GRID_FVGEOMETRY_HH
28
29#include <unordered_map>
30
31#include <dune/geometry/referenceelements.hh>
32#include <dune/localfunctions/lagrange/pqkfactory.hh>
33
43
44namespace Dumux {
45
52template<class GridView, class MapperTraits = DefaultMapperTraits<GridView>>
54: public MapperTraits
55{
58
59 template<class GridGeometry, bool enableCache>
61};
62
69template<class Scalar,
70 class GridView,
71 bool enableGridGeometryCache = false,
74
81template<class Scalar, class GV, class Traits>
82class BoxFVGridGeometry<Scalar, GV, true, Traits>
83: public BaseGridGeometry<GV, Traits>
84{
87 using GridIndexType = typename IndexTraits<GV>::GridIndex;
88 using LocalIndexType = typename IndexTraits<GV>::LocalIndex;
89
90 using Element = typename GV::template Codim<0>::Entity;
91 using CoordScalar = typename GV::ctype;
92 static const int dim = GV::dimension;
93 static const int dimWorld = GV::dimensionworld;
94
95 using ReferenceElements = typename Dune::ReferenceElements<CoordScalar, dim>;
96
97 using GeometryHelper = BoxGeometryHelper<GV, dim,
98 typename Traits::SubControlVolume,
99 typename Traits::SubControlVolumeFace>;
100
101public:
103 static constexpr DiscretizationMethod discMethod = DiscretizationMethod::box;
104
106 using LocalView = typename Traits::template LocalView<ThisType, true>;
108 using SubControlVolume = typename Traits::SubControlVolume;
110 using SubControlVolumeFace = typename Traits::SubControlVolumeFace;
112 using DofMapper = typename Traits::VertexMapper;
114 using FeCache = Dune::PQkLocalFiniteElementCache<CoordScalar, Scalar, dim, 1>;
116 using GridView = GV;
117
120 : ParentType(gridView)
121 {
122 // Check if the overlap size is what we expect
124 DUNE_THROW(Dune::InvalidStateException, "The box discretization method only works with zero overlap for parallel computations. "
125 << " Set the parameter \"Grid.Overlap\" in the input file.");
126 }
127
130 const DofMapper& dofMapper() const
131 { return this->vertexMapper(); }
132
134 std::size_t numScv() const
135 { return numScv_; }
136
138 std::size_t numScvf() const
139 { return numScvf_; }
140
143 std::size_t numBoundaryScvf() const
144 { return numBoundaryScvf_; }
145
147 std::size_t numDofs() const
148 { return this->vertexMapper().size(); }
149
151 void update()
152 {
153 ParentType::update();
154
155 scvs_.clear();
156 scvfs_.clear();
157
158 auto numElements = this->gridView().size(0);
159 scvs_.resize(numElements);
160 scvfs_.resize(numElements);
161 hasBoundaryScvf_.resize(numElements, false);
162
163 boundaryDofIndices_.assign(numDofs(), false);
164
165 numScv_ = 0;
166 numScvf_ = 0;
167 numBoundaryScvf_ = 0;
168 // Build the SCV and SCV faces
169 for (const auto& element : elements(this->gridView()))
170 {
171 // fill the element map with seeds
172 auto eIdx = this->elementMapper().index(element);
173
174 // count
175 numScv_ += element.subEntities(dim);
176 numScvf_ += element.subEntities(dim-1);
177
178 // get the element geometry
179 auto elementGeometry = element.geometry();
180 const auto referenceElement = ReferenceElements::general(elementGeometry.type());
181
182 // instantiate the geometry helper
183 GeometryHelper geometryHelper(elementGeometry);
184
185 // construct the sub control volumes
186 scvs_[eIdx].resize(elementGeometry.corners());
187 for (LocalIndexType scvLocalIdx = 0; scvLocalIdx < elementGeometry.corners(); ++scvLocalIdx)
188 {
189 const auto dofIdxGlobal = this->vertexMapper().subIndex(element, scvLocalIdx, dim);
190
191 scvs_[eIdx][scvLocalIdx] = SubControlVolume(geometryHelper,
192 scvLocalIdx,
193 eIdx,
194 dofIdxGlobal);
195 }
196
197 // construct the sub control volume faces
198 LocalIndexType scvfLocalIdx = 0;
199 scvfs_[eIdx].resize(element.subEntities(dim-1));
200 for (; scvfLocalIdx < element.subEntities(dim-1); ++scvfLocalIdx)
201 {
202 // find the global and local scv indices this scvf is belonging to
203 std::vector<LocalIndexType> localScvIndices({static_cast<LocalIndexType>(referenceElement.subEntity(scvfLocalIdx, dim-1, 0, dim)),
204 static_cast<LocalIndexType>(referenceElement.subEntity(scvfLocalIdx, dim-1, 1, dim))});
205
206 scvfs_[eIdx][scvfLocalIdx] = SubControlVolumeFace(geometryHelper,
207 element,
208 elementGeometry,
209 scvfLocalIdx,
210 std::move(localScvIndices),
211 false);
212 }
213
214 // construct the sub control volume faces on the domain boundary
215 for (const auto& intersection : intersections(this->gridView(), element))
216 {
217 if (intersection.boundary() && !intersection.neighbor())
218 {
219 const auto isGeometry = intersection.geometry();
220 hasBoundaryScvf_[eIdx] = true;
221
222 // count
223 numScvf_ += isGeometry.corners();
224 numBoundaryScvf_ += isGeometry.corners();
225
226 for (unsigned int isScvfLocalIdx = 0; isScvfLocalIdx < isGeometry.corners(); ++isScvfLocalIdx)
227 {
228 // find the scvs this scvf is belonging to
229 const LocalIndexType insideScvIdx = static_cast<LocalIndexType>(referenceElement.subEntity(intersection.indexInInside(), 1, isScvfLocalIdx, dim));
230 std::vector<LocalIndexType> localScvIndices = {insideScvIdx, insideScvIdx};
231
232 scvfs_[eIdx].emplace_back(geometryHelper,
233 intersection,
234 isGeometry,
235 isScvfLocalIdx,
236 scvfLocalIdx,
237 std::move(localScvIndices),
238 true);
239
240 // increment local counter
241 scvfLocalIdx++;
242 }
243
244 // add all vertices on the intersection to the set of
245 // boundary vertices
246 const auto fIdx = intersection.indexInInside();
247 const auto numFaceVerts = referenceElement.size(fIdx, 1, dim);
248 for (int localVIdx = 0; localVIdx < numFaceVerts; ++localVIdx)
249 {
250 const auto vIdx = referenceElement.subEntity(fIdx, 1, localVIdx, dim);
251 const auto vIdxGlobal = this->vertexMapper().subIndex(element, vIdx, dim);
252 boundaryDofIndices_[vIdxGlobal] = true;
253 }
254 }
255
256 // inform the grid geometry if we have periodic boundaries
257 else if (intersection.boundary() && intersection.neighbor())
258 {
259 this->setPeriodic();
260
261 // find the mapped periodic vertex of all vertices on periodic boundaries
262 const auto fIdx = intersection.indexInInside();
263 const auto numFaceVerts = referenceElement.size(fIdx, 1, dim);
264 const auto eps = 1e-7*(elementGeometry.corner(1) - elementGeometry.corner(0)).two_norm();
265 for (int localVIdx = 0; localVIdx < numFaceVerts; ++localVIdx)
266 {
267 const auto vIdx = referenceElement.subEntity(fIdx, 1, localVIdx, dim);
268 const auto vIdxGlobal = this->vertexMapper().subIndex(element, vIdx, dim);
269 const auto vPos = elementGeometry.corner(vIdx);
270
271 const auto& outside = intersection.outside();
272 const auto outsideGeometry = outside.geometry();
273 for (const auto& isOutside : intersections(this->gridView(), outside))
274 {
275 // only check periodic vertices of the periodic neighbor
276 if (isOutside.boundary() && isOutside.neighbor())
277 {
278 const auto fIdxOutside = isOutside.indexInInside();
279 const auto numFaceVertsOutside = referenceElement.size(fIdxOutside, 1, dim);
280 for (int localVIdxOutside = 0; localVIdxOutside < numFaceVertsOutside; ++localVIdxOutside)
281 {
282 const auto vIdxOutside = referenceElement.subEntity(fIdxOutside, 1, localVIdxOutside, dim);
283 const auto vPosOutside = outsideGeometry.corner(vIdxOutside);
284 const auto shift = std::abs((this->bBoxMax()-this->bBoxMin())*intersection.centerUnitOuterNormal());
285 if (std::abs((vPosOutside-vPos).two_norm() - shift) < eps)
286 periodicVertexMap_[vIdxGlobal] = this->vertexMapper().subIndex(outside, vIdxOutside, dim);
287 }
288 }
289 }
290 }
291 }
292 }
293 }
294
295 // error check: periodic boundaries currently don't work for box in parallel
296 if (this->isPeriodic() && this->gridView().comm().size() > 1)
297 DUNE_THROW(Dune::NotImplemented, "Periodic boundaries for box method for parallel simulations!");
298 }
299
301 const FeCache& feCache() const
302 { return feCache_; }
303
305 const std::vector<SubControlVolume>& scvs(GridIndexType eIdx) const
306 { return scvs_[eIdx]; }
307
309 const std::vector<SubControlVolumeFace>& scvfs(GridIndexType eIdx) const
310 { return scvfs_[eIdx]; }
311
313 bool dofOnBoundary(GridIndexType dofIdx) const
314 { return boundaryDofIndices_[dofIdx]; }
315
317 bool dofOnPeriodicBoundary(GridIndexType dofIdx) const
318 { return periodicVertexMap_.count(dofIdx); }
319
321 GridIndexType periodicallyMappedDof(GridIndexType dofIdx) const
322 { return periodicVertexMap_.at(dofIdx); }
323
325 const std::unordered_map<GridIndexType, GridIndexType>& periodicVertexMap() const
326 { return periodicVertexMap_; }
327
329 bool hasBoundaryScvf(GridIndexType eIdx) const
330 { return hasBoundaryScvf_[eIdx]; }
331
332private:
333
334 const FeCache feCache_;
335
336 std::vector<std::vector<SubControlVolume>> scvs_;
337 std::vector<std::vector<SubControlVolumeFace>> scvfs_;
338 // TODO do we need those?
339 std::size_t numScv_;
340 std::size_t numScvf_;
341 std::size_t numBoundaryScvf_;
342
343 // vertices on the boudary
344 std::vector<bool> boundaryDofIndices_;
345 std::vector<bool> hasBoundaryScvf_;
346
347 // a map for periodic boundary vertices
348 std::unordered_map<GridIndexType, GridIndexType> periodicVertexMap_;
349};
350
358template<class Scalar, class GV, class Traits>
359class BoxFVGridGeometry<Scalar, GV, false, Traits>
360: public BaseGridGeometry<GV, Traits>
361{
364 using GridIndexType = typename IndexTraits<GV>::GridIndex;
365
366 static const int dim = GV::dimension;
367 static const int dimWorld = GV::dimensionworld;
368
369 using Element = typename GV::template Codim<0>::Entity;
370 using CoordScalar = typename GV::ctype;
371
372 using ReferenceElements = typename Dune::ReferenceElements<CoordScalar, dim>;
373
374public:
376 static constexpr DiscretizationMethod discMethod = DiscretizationMethod::box;
377
379 using LocalView = typename Traits::template LocalView<ThisType, false>;
381 using SubControlVolume = typename Traits::SubControlVolume;
383 using SubControlVolumeFace = typename Traits::SubControlVolumeFace;
385 using DofMapper = typename Traits::VertexMapper;
387 using FeCache = Dune::PQkLocalFiniteElementCache<CoordScalar, Scalar, dim, 1>;
389 using GridView = GV;
390
393 : ParentType(gridView)
394 {
395 // Check if the overlap size is what we expect
397 DUNE_THROW(Dune::InvalidStateException, "The box discretization method only works with zero overlap for parallel computations. "
398 << " Set the parameter \"Grid.Overlap\" in the input file.");
399 }
400
403 const DofMapper& dofMapper() const
404 { return this->vertexMapper(); }
405
407 std::size_t numScv() const
408 { return numScv_; }
409
411 std::size_t numScvf() const
412 { return numScvf_; }
413
416 std::size_t numBoundaryScvf() const
417 { return numBoundaryScvf_; }
418
420 std::size_t numDofs() const
421 { return this->vertexMapper().size(); }
422
424 void update()
425 {
426 ParentType::update();
427
428 boundaryDofIndices_.assign(numDofs(), false);
429
430 // save global data on the grid's scvs and scvfs
431 // TODO do we need those information?
432 numScv_ = 0;
433 numScvf_ = 0;
434 numBoundaryScvf_ = 0;
435 for (const auto& element : elements(this->gridView()))
436 {
437 numScv_ += element.subEntities(dim);
438 numScvf_ += element.subEntities(dim-1);
439
440 const auto elementGeometry = element.geometry();
441 const auto referenceElement = ReferenceElements::general(elementGeometry.type());
442
443 // store the sub control volume face indices on the domain boundary
444 for (const auto& intersection : intersections(this->gridView(), element))
445 {
446 if (intersection.boundary() && !intersection.neighbor())
447 {
448 const auto isGeometry = intersection.geometry();
449 numScvf_ += isGeometry.corners();
450 numBoundaryScvf_ += isGeometry.corners();
451
452 // add all vertices on the intersection to the set of
453 // boundary vertices
454 const auto fIdx = intersection.indexInInside();
455 const auto numFaceVerts = referenceElement.size(fIdx, 1, dim);
456 for (int localVIdx = 0; localVIdx < numFaceVerts; ++localVIdx)
457 {
458 const auto vIdx = referenceElement.subEntity(fIdx, 1, localVIdx, dim);
459 const auto vIdxGlobal = this->vertexMapper().subIndex(element, vIdx, dim);
460 boundaryDofIndices_[vIdxGlobal] = true;
461 }
462 }
463
464 // inform the grid geometry if we have periodic boundaries
465 else if (intersection.boundary() && intersection.neighbor())
466 {
467 this->setPeriodic();
468
469 // find the mapped periodic vertex of all vertices on periodic boundaries
470 const auto fIdx = intersection.indexInInside();
471 const auto numFaceVerts = referenceElement.size(fIdx, 1, dim);
472 const auto eps = 1e-7*(elementGeometry.corner(1) - elementGeometry.corner(0)).two_norm();
473 for (int localVIdx = 0; localVIdx < numFaceVerts; ++localVIdx)
474 {
475 const auto vIdx = referenceElement.subEntity(fIdx, 1, localVIdx, dim);
476 const auto vIdxGlobal = this->vertexMapper().subIndex(element, vIdx, dim);
477 const auto vPos = elementGeometry.corner(vIdx);
478
479 const auto& outside = intersection.outside();
480 const auto outsideGeometry = outside.geometry();
481 for (const auto& isOutside : intersections(this->gridView(), outside))
482 {
483 // only check periodic vertices of the periodic neighbor
484 if (isOutside.boundary() && isOutside.neighbor())
485 {
486 const auto fIdxOutside = isOutside.indexInInside();
487 const auto numFaceVertsOutside = referenceElement.size(fIdxOutside, 1, dim);
488 for (int localVIdxOutside = 0; localVIdxOutside < numFaceVertsOutside; ++localVIdxOutside)
489 {
490 const auto vIdxOutside = referenceElement.subEntity(fIdxOutside, 1, localVIdxOutside, dim);
491 const auto vPosOutside = outsideGeometry.corner(vIdxOutside);
492 const auto shift = std::abs((this->bBoxMax()-this->bBoxMin())*intersection.centerUnitOuterNormal());
493 if (std::abs((vPosOutside-vPos).two_norm() - shift) < eps)
494 periodicVertexMap_[vIdxGlobal] = this->vertexMapper().subIndex(outside, vIdxOutside, dim);
495 }
496 }
497 }
498 }
499 }
500 }
501 }
502
503 // error check: periodic boundaries currently don't work for box in parallel
504 if (this->isPeriodic() && this->gridView().comm().size() > 1)
505 DUNE_THROW(Dune::NotImplemented, "Periodic boundaries for box method for parallel simulations!");
506 }
507
509 const FeCache& feCache() const
510 { return feCache_; }
511
513 bool dofOnBoundary(GridIndexType dofIdx) const
514 { return boundaryDofIndices_[dofIdx]; }
515
517 bool dofOnPeriodicBoundary(GridIndexType dofIdx) const
518 { return periodicVertexMap_.count(dofIdx); }
519
521 GridIndexType periodicallyMappedDof(GridIndexType dofIdx) const
522 { return periodicVertexMap_.at(dofIdx); }
523
525 const std::unordered_map<GridIndexType, GridIndexType>& periodicVertexMap() const
526 { return periodicVertexMap_; }
527
528private:
529
530 const FeCache feCache_;
531
532 // Information on the global number of geometries
533 // TODO do we need those information?
534 std::size_t numScv_;
535 std::size_t numScvf_;
536 std::size_t numBoundaryScvf_;
537
538 // vertices on the boudary
539 std::vector<bool> boundaryDofIndices_;
540
541 // a map for periodic boundary vertices
542 std::unordered_map<GridIndexType, GridIndexType> periodicVertexMap_;
543};
544
545} // end namespace Dumux
546
547#endif
Defines the default element and vertex mapper types.
Defines the index types used for grid and local indices.
Helper class constructing the dual grid finite volume geometries for the box discretizazion method.
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
constexpr double eps
epsilon for checking direction of scvf normals
Definition: test_tpfafvgeometry_nonconforming.cc:44
Struture to define the index types used for grid and local indices.
Definition: indextraits.hh:38
Base class for all finite volume grid geometries.
Definition: basegridgeometry.hh:49
GV GridView
export the grid view type
Definition: basegridgeometry.hh:64
Create sub control volumes and sub control volume face geometries.
Definition: boxgeometryhelper.hh:37
Base class for the finite volume geometry vector for box models This builds up the sub control volume...
Definition: discretization/box/fvelementgeometry.hh:48
The default traits for the box finite volume grid geometry Defines the scv and scvf types and the map...
Definition: discretization/box/fvgridgeometry.hh:55
Base class for the finite volume geometry vector for box schemes This builds up the sub control volum...
Definition: discretization/box/fvgridgeometry.hh:73
Base class for the finite volume geometry vector for box schemes This builds up the sub control volum...
Definition: discretization/box/fvgridgeometry.hh:84
const std::vector< SubControlVolume > & scvs(GridIndexType eIdx) const
Get the local scvs for an element.
Definition: discretization/box/fvgridgeometry.hh:305
Dune::PQkLocalFiniteElementCache< CoordScalar, Scalar, dim, 1 > FeCache
export the finite element cache type
Definition: discretization/box/fvgridgeometry.hh:114
const std::vector< SubControlVolumeFace > & scvfs(GridIndexType eIdx) const
Get the local scvfs for an element.
Definition: discretization/box/fvgridgeometry.hh:309
const std::unordered_map< GridIndexType, GridIndexType > & periodicVertexMap() const
Returns the map between dofs across periodic boundaries.
Definition: discretization/box/fvgridgeometry.hh:325
GridIndexType periodicallyMappedDof(GridIndexType dofIdx) const
The index of the vertex / d.o.f. on the other side of the periodic boundary.
Definition: discretization/box/fvgridgeometry.hh:321
bool hasBoundaryScvf(GridIndexType eIdx) const
Returns whether one of the geometry's scvfs lies on a boundary.
Definition: discretization/box/fvgridgeometry.hh:329
std::size_t numDofs() const
The total number of degrees of freedom.
Definition: discretization/box/fvgridgeometry.hh:147
std::size_t numScv() const
The total number of sub control volumes.
Definition: discretization/box/fvgridgeometry.hh:134
void update()
update all fvElementGeometries (do this again after grid adaption)
Definition: discretization/box/fvgridgeometry.hh:151
const FeCache & feCache() const
The finite element cache for creating local FE bases.
Definition: discretization/box/fvgridgeometry.hh:301
std::size_t numBoundaryScvf() const
Definition: discretization/box/fvgridgeometry.hh:143
typename Traits::SubControlVolumeFace SubControlVolumeFace
export the type of sub control volume
Definition: discretization/box/fvgridgeometry.hh:110
const DofMapper & dofMapper() const
Definition: discretization/box/fvgridgeometry.hh:130
typename Traits::template LocalView< ThisType, true > LocalView
export the type of the fv element geometry (the local view type)
Definition: discretization/box/fvgridgeometry.hh:106
BoxFVGridGeometry(const GridView gridView)
Constructor.
Definition: discretization/box/fvgridgeometry.hh:119
bool dofOnBoundary(GridIndexType dofIdx) const
If a vertex / d.o.f. is on the boundary.
Definition: discretization/box/fvgridgeometry.hh:313
std::size_t numScvf() const
The total number of sun control volume faces.
Definition: discretization/box/fvgridgeometry.hh:138
bool dofOnPeriodicBoundary(GridIndexType dofIdx) const
If a vertex / d.o.f. is on a periodic boundary.
Definition: discretization/box/fvgridgeometry.hh:317
typename Traits::SubControlVolume SubControlVolume
export the type of sub control volume
Definition: discretization/box/fvgridgeometry.hh:108
typename Traits::VertexMapper DofMapper
export dof mapper type
Definition: discretization/box/fvgridgeometry.hh:112
Base class for the finite volume geometry vector for box schemes This builds up the sub control volum...
Definition: discretization/box/fvgridgeometry.hh:361
std::size_t numBoundaryScvf() const
Definition: discretization/box/fvgridgeometry.hh:416
bool dofOnPeriodicBoundary(GridIndexType dofIdx) const
If a vertex / d.o.f. is on a periodic boundary.
Definition: discretization/box/fvgridgeometry.hh:517
typename Traits::template LocalView< ThisType, false > LocalView
export the type of the fv element geometry (the local view type)
Definition: discretization/box/fvgridgeometry.hh:379
typename Traits::SubControlVolumeFace SubControlVolumeFace
export the type of sub control volume
Definition: discretization/box/fvgridgeometry.hh:383
void update()
update all fvElementGeometries (do this again after grid adaption)
Definition: discretization/box/fvgridgeometry.hh:424
typename Traits::SubControlVolume SubControlVolume
export the type of sub control volume
Definition: discretization/box/fvgridgeometry.hh:381
GridIndexType periodicallyMappedDof(GridIndexType dofIdx) const
The index of the vertex / d.o.f. on the other side of the periodic boundary.
Definition: discretization/box/fvgridgeometry.hh:521
Dune::PQkLocalFiniteElementCache< CoordScalar, Scalar, dim, 1 > FeCache
export the finite element cache type
Definition: discretization/box/fvgridgeometry.hh:387
const FeCache & feCache() const
The finite element cache for creating local FE bases.
Definition: discretization/box/fvgridgeometry.hh:509
std::size_t numScvf() const
The total number of sun control volume faces.
Definition: discretization/box/fvgridgeometry.hh:411
typename Traits::VertexMapper DofMapper
export dof mapper type
Definition: discretization/box/fvgridgeometry.hh:385
bool dofOnBoundary(GridIndexType dofIdx) const
If a vertex / d.o.f. is on the boundary.
Definition: discretization/box/fvgridgeometry.hh:513
BoxFVGridGeometry(const GridView gridView)
Constructor.
Definition: discretization/box/fvgridgeometry.hh:392
const DofMapper & dofMapper() const
Definition: discretization/box/fvgridgeometry.hh:403
std::size_t numDofs() const
The total number of degrees of freedom.
Definition: discretization/box/fvgridgeometry.hh:420
const std::unordered_map< GridIndexType, GridIndexType > & periodicVertexMap() const
Returns the map between dofs across periodic boundaries.
Definition: discretization/box/fvgridgeometry.hh:525
std::size_t numScv() const
The total number of sub control volumes.
Definition: discretization/box/fvgridgeometry.hh:407
the sub control volume for the box scheme
Definition: discretization/box/subcontrolvolume.hh:88
Class for a sub control volume face in the box method, i.e a part of the boundary of a sub control vo...
Definition: discretization/box/subcontrolvolumeface.hh:93
Check if the overlap size is valid for a given discretization method.
Definition: checkoverlapsize.hh:40
Base class for the local finite volume geometry for box models This builds up the sub control volumes...
the sub control volume for the box scheme
Base class for a sub control volume face.