24#ifndef DUMUX_DISCRETIZATION_PNM_GRID_GEOMETRY_HH
25#define DUMUX_DISCRETIZATION_PNM_GRID_GEOMETRY_HH
29#include <unordered_map>
32#include <dune/common/exceptions.hh>
33#include <dune/localfunctions/lagrange/lagrangelfecache.hh>
54template<
class Scalar,
class Gr
idView>
59 using Label = std::int_least8_t;
60 using Vertex =
typename GridView::template Codim<GridView::dimension>::Entity;
61 using Element =
typename GridView::template Codim<0>::Entity;
63 static const int dim = GridView::dimension;
67 template<
class Gr
idData>
72 const auto numThroats = gridView.size(0);
73 throatInscribedRadius_.resize(numThroats);
74 throatLength_.resize(numThroats);
75 throatLabel_.resize(numThroats);
76 throatCrossSectionalArea_.resize(numThroats);
77 throatShapeFactor_.resize(numThroats);
79 useSameGeometryForAllPores_ =
true;
80 useSameShapeForAllThroats_ =
true;
81 overwriteGridDataWithShapeSpecificValues_ =
false;
86 const auto throatGeometryInput = getParamFromGroup<std::string>(gridData.
paramGroup(),
"Grid.ThroatCrossSectionShape");
88 throatGeometry_.resize(1);
89 throatGeometry_[0] = throatGeometry;
90 overwriteGridDataWithShapeSpecificValues_ = getParamFromGroup<bool>(gridData.
paramGroup(),
"Grid.OverwriteGridDataWithShapeSpecificValues",
true);
92 std::cout <<
"Using '" << throatGeometryInput <<
"' as cross-sectional shape for all throats." << std::endl;
96 std::cout <<
"Reading shape factors for throats from grid data." << std::endl;
97 useSameShapeForAllThroats_ =
false;
98 throatGeometry_.resize(numThroats);
102 const auto numPores = gridView.size(dim);
103 poreInscribedRadius_.resize(numPores);
104 poreLabel_.resize(numPores);
105 poreVolume_.resize(numPores);
110 const auto poreGeometryInput = getParamFromGroup<std::string>(gridData.
paramGroup(),
"Grid.PoreGeometry");
111 poreGeometry_.resize(1);
114 std::cout <<
"Using '" << poreGeometryInput <<
"' as geometry for all pores." << std::endl;
118 std::cout <<
"Reading pore shapes from grid data." << std::endl;
119 useSameGeometryForAllPores_ =
false;
120 poreGeometry_.resize(numPores);
124 for (
const auto& vertex : vertices(gridView))
126 static const auto poreInscribedRadiusIdx = gridData.
parameterIndex(
"PoreInscribedRadius");
127 static const auto poreLabelIdx = gridData.
parameterIndex(
"PoreLabel");
128 const auto vIdx = gridView.indexSet().index(vertex);
129 const auto& params = gridData.
parameters(vertex);
130 poreInscribedRadius_[vIdx] = params[poreInscribedRadiusIdx];
131 assert(poreInscribedRadius_[vIdx] > 0.0);
132 poreLabel_[vIdx] = params[poreLabelIdx];
135 poreGeometry_[vIdx] = getPoreGeometry_(gridData, vertex);
137 poreVolume_[vIdx] = getPoreVolume_(gridData, vertex, vIdx);
140 for (
const auto& element : elements(gridView))
142 const int eIdx = gridView.indexSet().index(element);
143 const auto& params = gridData.
parameters(element);
144 static const auto throatInscribedRadiusIdx = gridData.
parameterIndex(
"ThroatInscribedRadius");
145 static const auto throatLengthIdx = gridData.
parameterIndex(
"ThroatLength");
146 throatInscribedRadius_[eIdx] = params[throatInscribedRadiusIdx];
147 throatLength_[eIdx] = params[throatLengthIdx];
151 if (gridHasThroatLabel)
153 static const auto throatLabelIdx = gridData.
parameterIndex(
"ThroatLabel");
154 throatLabel_[eIdx] = params[throatLabelIdx];
158 const auto vIdx0 = gridView.indexSet().subIndex(element, 0, dim);
159 const auto vIdx1 = gridView.indexSet().subIndex(element, 1, dim);
161 const auto poreLabel0 =
poreLabel(vIdx0);
162 const auto poreLabel1 =
poreLabel(vIdx1);
164 if (poreLabel0 >= 0 && poreLabel1 >= 0)
166 std::cout <<
"\n Warning: Throat "
167 << eIdx <<
" connects two boundary pores with different pore labels. Using the greater pore label as throat label.\n"
168 <<
"Set the throat labels explicitly in your grid file, if needed." << std::endl;
172 throatLabel_[eIdx] = max(poreLabel0, poreLabel1);
177 static const auto throatShapeFactorIdx = gridData.
parameterIndex(
"ThroatShapeFactor");
178 static const auto throatAreaIdx = gridData.
parameterIndex(
"ThroatCrossSectionalArea");
179 throatShapeFactor_[eIdx] = params[throatShapeFactorIdx];
180 throatGeometry_[eIdx] =
Throat::shape(throatShapeFactor_[eIdx]);
181 throatCrossSectionalArea_[eIdx] = params[throatAreaIdx];
185 throatCrossSectionalArea_[eIdx] = getThroatCrossSectionalArea_(gridData, element, eIdx);
186 throatShapeFactor_[eIdx] = getThroatShapeFactor_(gridData, element, eIdx);
189 assert(throatInscribedRadius_[eIdx] > 0.0);
190 assert(throatLength_[eIdx] > 0.0);
191 assert(throatCrossSectionalArea_[eIdx] > 0.0);
193 static const bool addThroatVolumeToPoreVolume = getParamFromGroup<bool>(gridData.
paramGroup(),
"Grid.AddThroatVolumeToPoreVolume",
false);
194 if (addThroatVolumeToPoreVolume)
196 for (
int vIdxLocal = 0; vIdxLocal < 2; ++vIdxLocal)
198 const auto vIdx = gridView.indexSet().subIndex(element, vIdxLocal, dim);
199 poreVolume_[vIdx] += 0.5 * throatCrossSectionalArea_[eIdx] * throatLength_[eIdx];
204 maybeResizeContainers_();
209 {
return poreLabel_[dofIdxGlobal]; }
213 {
return poreLabel_; }
217 {
return poreInscribedRadius_[dofIdxGlobal]; }
221 {
return poreInscribedRadius_; }
225 {
return poreVolume_[dofIdxGlobal]; }
229 {
return poreVolume_; }
233 {
return throatInscribedRadius_[eIdx]; }
237 {
return throatInscribedRadius_; }
241 {
return throatLength_[eIdx]; }
245 {
return throatLength_; }
249 {
return throatLabel_[eIdx]; }
253 {
return throatLabel_; }
257 {
return coordinationNumber_[dofIdxGlobal]; }
261 {
return coordinationNumber_; }
274 const auto poreGeo = poreGeometry_[0];
275 poreGeometry_.resize(poreInscribedRadius_.size(), poreGeo);
278 return poreGeometry_;
292 const auto throatShape = throatGeometry_[0];
293 throatGeometry_.resize(throatInscribedRadius_.size(), throatShape);
296 return throatGeometry_;
301 {
return throatCrossSectionalArea_[eIdx]; }
305 {
return throatCrossSectionalArea_; }
319 throatShapeFactor_.resize(throatInscribedRadius_.size(),
shapeFactor);
322 return throatShapeFactor_;
327 {
return useSameGeometryForAllPores_; }
331 {
return useSameShapeForAllThroats_; }
336 template<
class Gr
idData>
339 static const auto poreGeometryIdx = gridData.
parameterIndex(
"PoreGeometry");
340 using T = std::underlying_type_t<Pore::Shape>;
341 const auto poreGeometryValue =
static_cast<T
>(gridData.
parameters(vertex)[poreGeometryIdx]);
342 return static_cast<Pore::Shape>(poreGeometryValue);
346 template<
class Gr
idData>
347 Scalar getPoreVolume_(
const GridData& gridData,
const Vertex& vertex,
const std::size_t vIdx)
const
349 static const bool gridHasPoreVolume = gridData.gridHasVertexParameter(
"PoreVolume");
351 if (gridHasPoreVolume)
353 static const auto poreVolumeIdx = gridData.parameterIndex(
"PoreVolume");
354 return gridData.
parameters(vertex)[poreVolumeIdx];
360 static const Scalar fixedHeight = getParamFromGroup<Scalar>(gridData.paramGroup(),
"Grid.PoreHeight", -1.0);
361 const Scalar h = fixedHeight > 0.0 ? fixedHeight : gridData.
getParameter(vertex,
"PoreHeight");
370 template<
class Gr
idData>
371 Scalar getThroatCrossSectionalArea_(
const GridData& gridData,
const Element& element,
const std::size_t eIdx)
const
373 static const bool gridHasThroatCrossSectionalArea = gridData.gridHasElementParameter(
"ThroatCrossSectionalArea");
374 if (gridHasThroatCrossSectionalArea && !overwriteGridDataWithShapeSpecificValues_)
376 static const auto throatAreaIdx = gridData.parameterIndex(
"ThroatCrossSectionalArea");
377 return gridData.parameters(element)[throatAreaIdx];
383 static const auto throatHeight = getParamFromGroup<Scalar>(gridData.paramGroup(),
"Grid.ThroatHeight");
392 template<
class Gr
idData>
393 Scalar getThroatShapeFactor_(
const GridData& gridData,
const Element& element,
const std::size_t eIdx)
const
395 static const bool gridHasThroatShapeFactor = gridData.gridHasElementParameter(
"ThroatShapeFactor");
396 if (gridHasThroatShapeFactor && !overwriteGridDataWithShapeSpecificValues_)
398 static const auto throatShapeFactorIdx = gridData.parameterIndex(
"ThroatShapeFactor");
399 return gridData.parameters(element)[throatShapeFactorIdx];
405 static const auto throatHeight = getParamFromGroup<Scalar>(gridData.paramGroup(),
"Grid.ThroatHeight");
410 static const auto shapeFactor = getParamFromGroup<Scalar>(gridData.paramGroup(),
"Grid.ThroatShapeFactor");
414 return Throat::shapeFactor<Scalar>(
shape, throatInscribedRadius_[eIdx]);
418 void maybeResizeContainers_()
422 std::adjacent_find(throatGeometry_.begin(), throatGeometry_.end(), std::not_equal_to<Throat::Shape>() ) == throatGeometry_.end())
424 std::cout <<
"All throats feature the same shape, resizing containers" << std::endl;
425 useSameShapeForAllThroats_ =
true;
427 const auto throatGeometry = throatGeometry_[0];
428 throatShapeFactor_.resize(1);
429 throatGeometry_.resize(1);
431 throatGeometry_[0] = throatGeometry;
436 std::adjacent_find(poreGeometry_.begin(), poreGeometry_.end(), std::not_equal_to<Pore::Shape>() ) == poreGeometry_.end())
438 std::cout <<
"All pores feature the same shape, resizing containers" << std::endl;
439 useSameGeometryForAllPores_ =
true;
441 poreGeometry_.resize(1);
446 mutable std::vector<Pore::Shape> poreGeometry_;
447 std::vector<Scalar> poreInscribedRadius_;
448 std::vector<Scalar> poreVolume_;
449 std::vector<Label> poreLabel_;
450 std::vector<SmallLocalIndex> coordinationNumber_;
451 mutable std::vector<Throat::Shape> throatGeometry_;
452 mutable std::vector<Scalar> throatShapeFactor_;
453 std::vector<Scalar> throatInscribedRadius_;
454 std::vector<Scalar> throatLength_;
455 std::vector<Label> throatLabel_;
456 std::vector<Scalar> throatCrossSectionalArea_;
457 bool useSameGeometryForAllPores_;
458 bool useSameShapeForAllThroats_;
459 bool overwriteGridDataWithShapeSpecificValues_;
467template<
class Gr
idView,
class MapperTraits = DefaultMapperTraits<Gr
idView>>
474 template<
class Gr
idGeometry,
bool enableCache>
485template<
class Scalar,
487 bool enableGridGeometryCache =
false,
496template<
class Scalar,
class GV,
class Traits>
499,
public Traits::PNMData
505 using PNMData =
typename Traits::PNMData;
507 using Element =
typename GV::template Codim<0>::Entity;
508 using CoordScalar =
typename GV::ctype;
509 static const int dim = GV::dimension;
510 static const int dimWorld = GV::dimensionworld;
528 using FeCache = Dune::LagrangeLocalFiniteElementCache<CoordScalar, Scalar, dim, 1>;
533 [[deprecated(
"Use GridGeometry(gridView, gridData) instead! Will be removed after release 3.5.")]]
537 static_assert(GridView::dimension == 1,
"Porenetwork model only allow GridView::dimension == 1!");
540 template<
class Gr
idData>
544 static_assert(GridView::dimension == 1,
"Porenetwork model only allow GridView::dimension == 1!");
551 {
return this->vertexMapper(); }
568 {
return this->vertexMapper().size(); }
571 template<
class Gr
idData>
572 [[deprecated(
"Use update(gridView, gridData) instead! Will be removed after release 3.5.")]]
575 ParentType::update();
580 template<
class Gr
idData>
583 ParentType::update(gridView);
588 template<
class Gr
idData>
591 ParentType::update(std::move(gridView));
600 const std::array<SubControlVolume, 2>&
scvs(GridIndexType eIdx)
const
601 {
return scvs_[eIdx]; }
604 const std::array<SubControlVolumeFace, 1>&
scvfs(GridIndexType eIdx)
const
605 {
return scvfs_[eIdx]; }
609 {
return boundaryDofIndices_[dofIdx]; }
617 { DUNE_THROW(Dune::NotImplemented,
"Periodic boundaries"); }
621 {
return std::unordered_map<GridIndexType, GridIndexType>{}; }
625 {
return hasBoundaryScvf_[eIdx]; }
629 template<
class Gr
idData>
630 void update_(
const GridData& gridData)
632 PNMData::update(this->gridView(), gridData);
637 auto numElements = this->gridView().size(0);
638 scvs_.resize(numElements);
639 scvfs_.resize(numElements);
640 hasBoundaryScvf_.resize(numElements,
false);
642 boundaryDofIndices_.assign(numDofs(),
false);
644 numScvf_ = numElements;
645 numScv_ = 2*numElements;
648 for (
const auto& element : elements(this->gridView()))
651 auto eIdx = this->elementMapper().index(element);
652 auto elementGeometry = element.geometry();
655 for (LocalIndexType scvLocalIdx = 0; scvLocalIdx < elementGeometry.corners(); ++scvLocalIdx)
657 const auto dofIdxGlobal = this->vertexMapper().subIndex(element, scvLocalIdx, dim);
660 auto corners = std::array{elementGeometry.corner(scvLocalIdx), elementGeometry.center()};
663 const auto volume = this->poreVolume(dofIdxGlobal) / this->coordinationNumber(dofIdxGlobal);
665 scvs_[eIdx][scvLocalIdx] = SubControlVolume(dofIdxGlobal,
671 if (this->poreLabel(dofIdxGlobal) > 0)
673 if (boundaryDofIndices_[dofIdxGlobal])
676 boundaryDofIndices_[dofIdxGlobal] =
true;
677 hasBoundaryScvf_[eIdx] =
true;
682 auto unitOuterNormal = elementGeometry.corner(1)-elementGeometry.corner(0);
683 unitOuterNormal /= unitOuterNormal.two_norm();
684 LocalIndexType scvfLocalIdx = 0;
685 scvfs_[eIdx][0] = SubControlVolumeFace(elementGeometry.center(),
686 std::move(unitOuterNormal),
687 this->throatCrossSectionalArea(this->elementMapper().index(element)),
689 std::array<LocalIndexType, 2>({0, 1}));
693 const FeCache feCache_;
695 std::vector<std::array<SubControlVolume, 2>> scvs_;
696 std::vector<std::array<SubControlVolumeFace, 1>> scvfs_;
699 std::size_t numScvf_;
702 std::vector<bool> boundaryDofIndices_;
703 std::vector<bool> hasBoundaryScvf_;
712template<
class Scalar,
class GV,
class Traits>
715,
public Traits::PNMData
721 using PNMData =
typename Traits::PNMData;
723 static const int dim = GV::dimension;
724 static const int dimWorld = GV::dimensionworld;
726 using Element =
typename GV::template Codim<0>::Entity;
727 using CoordScalar =
typename GV::ctype;
745 using FeCache = Dune::LagrangeLocalFiniteElementCache<CoordScalar, Scalar, dim, 1>;
750 [[deprecated(
"Use GridGeometry(gridView, gridData) instead! Will be removed after release 3.5.")]]
754 static_assert(GridView::dimension == 1,
"Porenetwork model only allow GridView::dimension == 1!");
757 template<
class Gr
idData>
761 static_assert(GridView::dimension == 1,
"Porenetwork model only allow GridView::dimension == 1!");
769 {
return this->vertexMapper(); }
786 {
return this->vertexMapper().size(); }
789 template<
class Gr
idData>
790 [[deprecated(
"Use update(gridView, gridData) instead! Will be removed after release 3.5.")]]
793 ParentType::update();
798 template<
class Gr
idData>
801 ParentType::update(gridView);
806 template<
class Gr
idData>
809 ParentType::update(std::move(gridView));
819 {
return boundaryDofIndices_[dofIdx]; }
827 { DUNE_THROW(Dune::NotImplemented,
"Periodic boundaries"); }
831 {
return std::unordered_map<GridIndexType, GridIndexType>{}; }
835 template<
class Gr
idData>
836 void update_(
const GridData& gridData)
838 PNMData::update(this->gridView(), gridData);
840 boundaryDofIndices_.assign(numDofs(),
false);
843 numScvf_ = this->gridView().size(0);
844 numScv_ = 2*numScvf_;
846 for (
const auto& element : elements(this->gridView()))
849 for (LocalIndexType vIdxLocal = 0; vIdxLocal < 2; ++vIdxLocal)
851 const auto vIdxGlobal = this->vertexMapper().subIndex(element, vIdxLocal, dim);
852 if (this->poreLabel(vIdxGlobal) > 0)
854 if (boundaryDofIndices_[vIdxGlobal])
857 boundaryDofIndices_[vIdxGlobal] =
true;
863 const FeCache feCache_;
867 std::size_t numScvf_;
870 std::vector<bool> boundaryDofIndices_;
Defines the default element and vertex mapper types.
Defines the index types used for grid and local indices.
The infrastructure to retrieve run-time parameters from Dune::ParameterTrees.
Helper classes to compute the integration elements.
Base class for grid geometries.
The available discretization methods in Dumux.
This file contains functions related to calculate pore-body properties.
This file contains functions related to calculate pore-throat properties.
bool hasParamInGroup(const std::string ¶mGroup, const std::string ¶m)
Check whether a key exists in the parameter tree with a model group prefix.
Definition: parameters.hh:177
typename Extrusion< T >::type Extrusion_t
Convenience alias for obtaining the extrusion type.
Definition: extrusion.hh:177
Definition: discretization/porenetwork/fvelementgeometry.hh:34
Shape shapeFromString(const std::string &s)
Get the shape from a string description of the shape.
Definition: poreproperties.hh:56
Scalar volume(Shape shape, Scalar inscribedRadius)
Returns the volume of a given geometry based on the inscribed radius.
Definition: poreproperties.hh:73
Shape
Collection of different pore-body shapes.
Definition: poreproperties.hh:35
constexpr Scalar totalCrossSectionalAreaForRectangle(const Scalar inscribedRadius, const Scalar height) noexcept
Returns the cross-sectional area of a rectangle.
Definition: throatproperties.hh:209
constexpr Shape shape(const Scalar shapeFactor) noexcept
Returns the shape for a given shape factor.
Definition: throatproperties.hh:176
constexpr Scalar shapeFactorRectangle(const Scalar inscribedRadius, const Scalar height) noexcept
Returns the value of the shape factor for a rectangle.
Definition: throatproperties.hh:143
Scalar totalCrossSectionalArea(const Shape shape, const Scalar inscribedRadius)
Returns the cross-sectional area of a given geometry.
Definition: throatproperties.hh:194
Shape shapeFromString(const std::string &s)
Get the shape from a string description of the shape.
Definition: throatproperties.hh:57
Shape
Collection of different pore-throat shapes.
Definition: throatproperties.hh:38
Scalar shapeFactor(Shape shape, const Scalar inscribedRadius)
Returns the value of the shape factor for a given shape.
Definition: throatproperties.hh:161
Struture to define the index types used for grid and local indices.
Definition: indextraits.hh:38
typename GridView::IndexSet::IndexType GridIndex
Definition: indextraits.hh:39
std::uint_least8_t SmallLocalIndex
Definition: indextraits.hh:41
Base class for all finite volume grid geometries.
Definition: basegridgeometry.hh:51
GV GridView
export the grid view type
Definition: basegridgeometry.hh:66
Base class for the local geometry for porenetworks.
Definition: discretization/porenetwork/fvelementgeometry.hh:43
Base class for geometry data extraction from the grid data format.
Definition: discretization/porenetwork/gridgeometry.hh:56
Scalar throatCrossSectionalArea(const GridIndex eIdx) const
Returns the throat's cross-sectional area.
Definition: discretization/porenetwork/gridgeometry.hh:300
const std::vector< Scalar > & poreVolume() const
Returns the vector of pore volumes.
Definition: discretization/porenetwork/gridgeometry.hh:228
const std::vector< Scalar > & throatInscribedRadius() const
Returns the vector of inscribed throat radii.
Definition: discretization/porenetwork/gridgeometry.hh:236
bool useSameGeometryForAllPores() const
Returns whether all pores feature the same shape.
Definition: discretization/porenetwork/gridgeometry.hh:326
const std::vector< Label > & poreLabel() const
Returns the vector of pore labels.
Definition: discretization/porenetwork/gridgeometry.hh:212
bool useSameShapeForAllThroats() const
Returns whether all throats feature the same cross-sectional shape.
Definition: discretization/porenetwork/gridgeometry.hh:330
SmallLocalIndex coordinationNumber(const GridIndex dofIdxGlobal) const
Returns the number of throats connected to a pore (coordination number)
Definition: discretization/porenetwork/gridgeometry.hh:256
void update(const GridView &gridView, const GridData &gridData)
Definition: discretization/porenetwork/gridgeometry.hh:68
const std::vector< SmallLocalIndex > & coordinationNumber() const
Returns the vector of coordination numbers.
Definition: discretization/porenetwork/gridgeometry.hh:260
const std::vector< Scalar > & throatShapeFactor() const
Returns the vector of throat shape factors.
Definition: discretization/porenetwork/gridgeometry.hh:312
const std::vector< Scalar > & throatCrossSectionalArea() const
Returns the vector of throat cross-sectional areas.
Definition: discretization/porenetwork/gridgeometry.hh:304
Pore::Shape poreGeometry(const GridIndex vIdx) const
the geometry of the pore
Definition: discretization/porenetwork/gridgeometry.hh:264
Throat::Shape throatCrossSectionShape(const GridIndex eIdx) const
Returns the throat's cross-sectional shape.
Definition: discretization/porenetwork/gridgeometry.hh:282
Label throatLabel(const GridIndex eIdx) const
Returns an index indicating if a throat is touching the domain boundary.
Definition: discretization/porenetwork/gridgeometry.hh:248
const std::vector< Label > & throatLabel() const
Returns the vector of throat labels.
Definition: discretization/porenetwork/gridgeometry.hh:252
Scalar throatLength(const GridIndex eIdx) const
Returns the length of the throat.
Definition: discretization/porenetwork/gridgeometry.hh:240
const std::vector< Throat::Shape > & throatCrossSectionShape() const
Returns the vector of cross-sectional shapes.
Definition: discretization/porenetwork/gridgeometry.hh:286
Scalar poreVolume(const GridIndex dofIdxGlobal) const
Returns the volume of the pore.
Definition: discretization/porenetwork/gridgeometry.hh:224
Scalar throatInscribedRadius(const GridIndex eIdx) const
Returns the inscribed radius of the throat.
Definition: discretization/porenetwork/gridgeometry.hh:232
Label poreLabel(const GridIndex dofIdxGlobal) const
Returns the pore label (e.g. used for setting BCs)
Definition: discretization/porenetwork/gridgeometry.hh:208
Scalar poreInscribedRadius(const GridIndex dofIdxGlobal) const
Returns the inscribed radius of the pore.
Definition: discretization/porenetwork/gridgeometry.hh:216
const std::vector< Scalar > & throatLength() const
Returns the vector of throat lengths.
Definition: discretization/porenetwork/gridgeometry.hh:244
const std::vector< Pore::Shape > & poreGeometry() const
Returns the vector of pore geometries.
Definition: discretization/porenetwork/gridgeometry.hh:268
Scalar throatShapeFactor(const GridIndex eIdx) const
Returns the throat's shape factor.
Definition: discretization/porenetwork/gridgeometry.hh:308
const std::vector< Scalar > & poreInscribedRadius() const
Returns the vector of inscribed pore radii.
Definition: discretization/porenetwork/gridgeometry.hh:220
The default traits.
Definition: discretization/porenetwork/gridgeometry.hh:470
Base class for the finite volume geometry for porenetwork models.
Definition: discretization/porenetwork/gridgeometry.hh:489
Base class for the finite volume geometry for porenetwork models.
Definition: discretization/porenetwork/gridgeometry.hh:500
Dune::LagrangeLocalFiniteElementCache< CoordScalar, Scalar, dim, 1 > FeCache
export the finite element cache type
Definition: discretization/porenetwork/gridgeometry.hh:528
std::size_t numDofs() const
The total number of degrees of freedom.
Definition: discretization/porenetwork/gridgeometry.hh:567
const std::array< SubControlVolume, 2 > & scvs(GridIndexType eIdx) const
Get the local scvs for an element.
Definition: discretization/porenetwork/gridgeometry.hh:600
GridIndexType periodicallyMappedDof(GridIndexType dofIdx) const
The index of the vertex / d.o.f. on the other side of the periodic boundary.
Definition: discretization/porenetwork/gridgeometry.hh:616
std::unordered_map< GridIndexType, GridIndexType > periodicVertexMap() const
Returns the map between dofs across periodic boundaries.
Definition: discretization/porenetwork/gridgeometry.hh:620
typename Traits::SubControlVolumeFace SubControlVolumeFace
export the type of sub control volume
Definition: discretization/porenetwork/gridgeometry.hh:522
const DofMapper & dofMapper() const
Definition: discretization/porenetwork/gridgeometry.hh:550
std::size_t numScv() const
The total number of sub control volumes.
Definition: discretization/porenetwork/gridgeometry.hh:554
bool dofOnPeriodicBoundary(GridIndexType dofIdx) const
If a vertex / d.o.f. is on a periodic boundary (not implemented)
Definition: discretization/porenetwork/gridgeometry.hh:612
bool dofOnBoundary(GridIndexType dofIdx) const
If a vertex / d.o.f. is on the boundary.
Definition: discretization/porenetwork/gridgeometry.hh:608
typename Traits::SubControlVolume SubControlVolume
export the type of sub control volume
Definition: discretization/porenetwork/gridgeometry.hh:520
void update(const GridData &gridData)
update all fvElementGeometries (do this again after grid adaption)
Definition: discretization/porenetwork/gridgeometry.hh:573
typename Traits::template LocalView< ThisType, true > LocalView
export the type of the fv element geometry (the local view type)
Definition: discretization/porenetwork/gridgeometry.hh:518
std::size_t numScvf() const
The total number of sun control volume faces.
Definition: discretization/porenetwork/gridgeometry.hh:558
Extrusion_t< Traits > Extrusion
export the type of extrusion
Definition: discretization/porenetwork/gridgeometry.hh:524
GridGeometry(const GridView gridView)
Constructor.
Definition: discretization/porenetwork/gridgeometry.hh:534
const std::array< SubControlVolumeFace, 1 > & scvfs(GridIndexType eIdx) const
Get the local scvfs for an element.
Definition: discretization/porenetwork/gridgeometry.hh:604
std::size_t numBoundaryScvf() const
Definition: discretization/porenetwork/gridgeometry.hh:563
void update(const GridView &gridView, const GridData &gridData)
update all fvElementGeometries (call this after grid adaption)
Definition: discretization/porenetwork/gridgeometry.hh:581
const FeCache & feCache() const
The finite element cache for creating local FE bases.
Definition: discretization/porenetwork/gridgeometry.hh:596
typename Traits::VertexMapper DofMapper
export dof mapper type
Definition: discretization/porenetwork/gridgeometry.hh:526
bool hasBoundaryScvf(GridIndexType eIdx) const
Returns whether one of the geometry's scvfs lies on a boundary.
Definition: discretization/porenetwork/gridgeometry.hh:624
GridGeometry(const GridView &gridView, const GridData &gridData)
Definition: discretization/porenetwork/gridgeometry.hh:541
void update(GridView &&gridView, const GridData &gridData)
update all fvElementGeometries (call this after grid adaption)
Definition: discretization/porenetwork/gridgeometry.hh:589
Base class for the finite volume geometry for porenetwork models.
Definition: discretization/porenetwork/gridgeometry.hh:716
bool dofOnBoundary(GridIndexType dofIdx) const
If a vertex / d.o.f. is on the boundary.
Definition: discretization/porenetwork/gridgeometry.hh:818
Dune::LagrangeLocalFiniteElementCache< CoordScalar, Scalar, dim, 1 > FeCache
export the finite element cache type
Definition: discretization/porenetwork/gridgeometry.hh:745
std::size_t numDofs() const
The total number of degrees of freedom.
Definition: discretization/porenetwork/gridgeometry.hh:785
std::size_t numBoundaryScvf() const
Definition: discretization/porenetwork/gridgeometry.hh:781
void update(GridView &&gridView, const GridData &gridData)
update all fvElementGeometries (call this after grid adaption)
Definition: discretization/porenetwork/gridgeometry.hh:807
void update(const GridView &gridView, const GridData &gridData)
update all fvElementGeometries (call this after grid adaption)
Definition: discretization/porenetwork/gridgeometry.hh:799
std::size_t numScv() const
The total number of sub control volumes.
Definition: discretization/porenetwork/gridgeometry.hh:772
typename Traits::VertexMapper DofMapper
export dof mapper type
Definition: discretization/porenetwork/gridgeometry.hh:743
GridGeometry(const GridView &gridView, const GridData &gridData)
Definition: discretization/porenetwork/gridgeometry.hh:758
const FeCache & feCache() const
The finite element cache for creating local FE bases.
Definition: discretization/porenetwork/gridgeometry.hh:814
typename Traits::SubControlVolumeFace SubControlVolumeFace
export the type of sub control volume
Definition: discretization/porenetwork/gridgeometry.hh:739
std::unordered_map< GridIndexType, GridIndexType > periodicVertexMap() const
Returns the map between dofs across periodic boundaries.
Definition: discretization/porenetwork/gridgeometry.hh:830
Extrusion_t< Traits > Extrusion
export the type of extrusion
Definition: discretization/porenetwork/gridgeometry.hh:741
std::size_t numScvf() const
The total number of sun control volume faces.
Definition: discretization/porenetwork/gridgeometry.hh:776
typename Traits::SubControlVolume SubControlVolume
export the type of sub control volume
Definition: discretization/porenetwork/gridgeometry.hh:737
typename Traits::template LocalView< ThisType, false > LocalView
export the type of the fv element geometry (the local view type)
Definition: discretization/porenetwork/gridgeometry.hh:735
const DofMapper & dofMapper() const
Definition: discretization/porenetwork/gridgeometry.hh:768
void update(const GridData &gridData)
update all fvElementGeometries (do this again after grid adaption)
Definition: discretization/porenetwork/gridgeometry.hh:791
GridGeometry(const GridView gridView)
Constructor.
Definition: discretization/porenetwork/gridgeometry.hh:751
GridIndexType periodicallyMappedDof(GridIndexType dofIdx) const
The index of the vertex / d.o.f. on the other side of the periodic boundary.
Definition: discretization/porenetwork/gridgeometry.hh:826
bool dofOnPeriodicBoundary(GridIndexType dofIdx) const
If a vertex / d.o.f. is on a periodic boundary (not implemented)
Definition: discretization/porenetwork/gridgeometry.hh:822
the sub control volume for porenetworks
Definition: discretization/porenetwork/subcontrolvolume.hh:65
Class for a sub control volume face for porenetworks.
Definition: discretization/porenetwork/subcontrolvolumeface.hh:62
Class for grid data attached to dgf or gmsh grid files.
Definition: griddata.hh:66
double getParameter(const Element &element, const std::string &fieldName) const
Get a element parameter.
Definition: griddata.hh:252
const std::vector< double > & parameters(const Vertex &vertex) const
Call the parameters function of the DGF grid pointer if available for vertex data.
Definition: griddata.hh:112
Class for grid data attached to dgf or gmsh grid files.
Definition: porenetwork/griddata.hh:55
bool gridHasElementParameter(const std::string ¶m) const
Return if a given element parameter is provided by the grid.
Definition: porenetwork/griddata.hh:265
std::vector< SmallLocalIndex > getCoordinationNumbers() const
Returns the coordination numbers for all pore bodies.
Definition: porenetwork/griddata.hh:150
int parameterIndex(const std::string ¶mName) const
Return the index for a given parameter name.
Definition: porenetwork/griddata.hh:233
const std::string & paramGroup() const
Return the parameter group.
Definition: porenetwork/griddata.hh:259
const std::vector< double > & parameters(const Vertex &vertex) const
Call the parameters function of the DGF grid pointer if available for vertex data.
Definition: porenetwork/griddata.hh:97
Base class for the local geometry for porenetworks.
the sub control volume for pore networks
Base class for a sub control volume face.