24#ifndef DUMUX_DISCRETIZATION_PNM_GRID_GEOMETRY_HH
25#define DUMUX_DISCRETIZATION_PNM_GRID_GEOMETRY_HH
28#include <unordered_map>
31#include <dune/common/exceptions.hh>
32#include <dune/localfunctions/lagrange/pqkfactory.hh>
53template<
class Scalar,
class Gr
idView>
58 using Label = std::int_least8_t;
59 using Vertex =
typename GridView::template Codim<GridView::dimension>::Entity;
60 using Element =
typename GridView::template Codim<0>::Entity;
62 static const int dim = GridView::dimension;
66 template<
class Gr
idData>
71 const auto numThroats = gridView.size(0);
72 throatInscribedRadius_.resize(numThroats);
73 throatLength_.resize(numThroats);
74 throatLabel_.resize(numThroats);
75 throatCrossSectionalArea_.resize(numThroats);
76 throatShapeFactor_.resize(numThroats);
78 useSameGeometryForAllPores_ =
true;
79 useSameShapeForAllThroats_ =
true;
80 overwriteGridDataWithShapeSpecificValues_ =
false;
85 const auto throatGeometryInput = getParamFromGroup<std::string>(gridData.
paramGroup(),
"Grid.ThroatCrossSectionShape");
87 throatGeometry_.resize(1);
88 throatGeometry_[0] = throatGeometry;
89 overwriteGridDataWithShapeSpecificValues_ = getParamFromGroup<bool>(gridData.
paramGroup(),
"Grid.OverwriteGridDataWithShapeSpecificValues",
true);
91 std::cout <<
"Using '" << throatGeometryInput <<
"' as cross-sectional shape for all throats." << std::endl;
95 std::cout <<
"Reading shape factors for throats from grid data." << std::endl;
96 useSameShapeForAllThroats_ =
false;
97 throatGeometry_.resize(numThroats);
101 const auto numPores = gridView.size(dim);
102 poreInscribedRadius_.resize(numPores);
103 poreLabel_.resize(numPores);
104 poreVolume_.resize(numPores);
109 const auto poreGeometryInput = getParamFromGroup<std::string>(gridData.
paramGroup(),
"Grid.PoreGeometry");
110 poreGeometry_.resize(1);
113 std::cout <<
"Using '" << poreGeometryInput <<
"' as geometry for all pores." << std::endl;
117 std::cout <<
"Reading pore shapes from grid data." << std::endl;
118 useSameGeometryForAllPores_ =
false;
119 poreGeometry_.resize(numPores);
123 for (
const auto& vertex : vertices(gridView))
125 static const auto poreInscribedRadiusIdx = gridData.
parameterIndex(
"PoreInscribedRadius");
126 static const auto poreLabelIdx = gridData.
parameterIndex(
"PoreLabel");
127 const auto vIdx = gridView.indexSet().index(vertex);
128 const auto& params = gridData.
parameters(vertex);
129 poreInscribedRadius_[vIdx] = params[poreInscribedRadiusIdx];
130 assert(poreInscribedRadius_[vIdx] > 0.0);
131 poreLabel_[vIdx] = params[poreLabelIdx];
134 poreGeometry_[vIdx] = getPoreGeometry_(gridData, vertex);
136 poreVolume_[vIdx] = getPoreVolume_(gridData, vertex, vIdx);
139 for (
const auto& element : elements(gridView))
141 const int eIdx = gridView.indexSet().index(element);
142 const auto& params = gridData.
parameters(element);
143 static const auto throatInscribedRadiusIdx = gridData.
parameterIndex(
"ThroatInscribedRadius");
144 static const auto throatLengthIdx = gridData.
parameterIndex(
"ThroatLength");
145 throatInscribedRadius_[eIdx] = params[throatInscribedRadiusIdx];
146 throatLength_[eIdx] = params[throatLengthIdx];
150 if (gridHasThroatLabel)
152 static const auto throatLabelIdx = gridData.
parameterIndex(
"ThroatLabel");
153 throatLabel_[eIdx] = params[throatLabelIdx];
157 const auto vIdx0 = gridView.indexSet().subIndex(element, 0, dim);
158 const auto vIdx1 = gridView.indexSet().subIndex(element, 1, dim);
160 const auto poreLabel0 =
poreLabel(vIdx0);
161 const auto poreLabel1 =
poreLabel(vIdx1);
163 if (poreLabel0 >= 0 && poreLabel1 >= 0)
165 std::cout <<
"\n Warning: Throat "
166 << eIdx <<
" connects two boundary pores with different pore labels. Using the greater pore label as throat label.\n"
167 <<
"Set the throat labels explicitly in your grid file, if needed." << std::endl;
171 throatLabel_[eIdx] = max(poreLabel0, poreLabel1);
176 static const auto throatShapeFactorIdx = gridData.
parameterIndex(
"ThroatShapeFactor");
177 static const auto throatAreaIdx = gridData.
parameterIndex(
"ThroatCrossSectionalArea");
178 throatShapeFactor_[eIdx] = params[throatShapeFactorIdx];
179 throatGeometry_[eIdx] =
Throat::shape(throatShapeFactor_[eIdx]);
180 throatCrossSectionalArea_[eIdx] = params[throatAreaIdx];
184 throatCrossSectionalArea_[eIdx] = getThroatCrossSectionalArea_(gridData, element, eIdx);
185 throatShapeFactor_[eIdx] = getThroatShapeFactor_(gridData, element, eIdx);
188 assert(throatInscribedRadius_[eIdx] > 0.0);
189 assert(throatLength_[eIdx] > 0.0);
190 assert(throatCrossSectionalArea_[eIdx] > 0.0);
192 static const bool addThroatVolumeToPoreVolume = getParamFromGroup<bool>(gridData.
paramGroup(),
"Grid.AddThroatVolumeToPoreVolume",
false);
193 if (addThroatVolumeToPoreVolume)
195 for (
int vIdxLocal = 0; vIdxLocal < 2; ++vIdxLocal)
197 const auto vIdx = gridView.indexSet().subIndex(element, vIdxLocal, dim);
198 poreVolume_[vIdx] += 0.5 * throatCrossSectionalArea_[eIdx] * throatLength_[eIdx];
203 maybeResizeContainers_();
208 {
return poreLabel_[dofIdxGlobal]; }
212 {
return poreLabel_; }
216 {
return poreInscribedRadius_[dofIdxGlobal]; }
220 {
return poreInscribedRadius_; }
224 {
return poreVolume_[dofIdxGlobal]; }
228 {
return poreVolume_; }
232 {
return throatInscribedRadius_[eIdx]; }
236 {
return throatInscribedRadius_; }
240 {
return throatLength_[eIdx]; }
244 {
return throatLength_; }
248 {
return throatLabel_[eIdx]; }
252 {
return throatLabel_; }
256 {
return coordinationNumber_[dofIdxGlobal]; }
260 {
return coordinationNumber_; }
273 const auto poreGeo = poreGeometry_[0];
274 poreGeometry_.resize(poreInscribedRadius_.size(), poreGeo);
277 return poreGeometry_;
291 const auto throatShape = throatGeometry_[0];
292 throatGeometry_.resize(throatInscribedRadius_.size(), throatShape);
295 return throatGeometry_;
300 {
return throatCrossSectionalArea_[eIdx]; }
304 {
return throatCrossSectionalArea_; }
318 throatShapeFactor_.resize(throatInscribedRadius_.size(),
shapeFactor);
321 return throatShapeFactor_;
326 {
return useSameGeometryForAllPores_; }
330 {
return useSameShapeForAllThroats_; }
335 template<
class Gr
idData>
338 static const auto poreGeometryIdx = gridData.
parameterIndex(
"PoreGeometry");
339 using T = std::underlying_type_t<Pore::Shape>;
340 const auto poreGeometryValue =
static_cast<T
>(gridData.
parameters(vertex)[poreGeometryIdx]);
341 return static_cast<Pore::Shape>(poreGeometryValue);
345 template<
class Gr
idData>
346 Scalar getPoreVolume_(
const GridData& gridData,
const Vertex& vertex,
const std::size_t vIdx)
const
348 static const bool gridHasPoreVolume = gridData.gridHasVertexParameter(
"PoreVolume");
350 if (gridHasPoreVolume)
352 static const auto poreVolumeIdx = gridData.parameterIndex(
"PoreVolume");
353 return gridData.
parameters(vertex)[poreVolumeIdx];
359 static const Scalar fixedHeight = getParamFromGroup<Scalar>(gridData.paramGroup(),
"Grid.PoreHeight", -1.0);
360 const Scalar h = fixedHeight > 0.0 ? fixedHeight : gridData.
getParameter(vertex,
"PoreHeight");
369 template<
class Gr
idData>
370 Scalar getThroatCrossSectionalArea_(
const GridData& gridData,
const Element& element,
const std::size_t eIdx)
const
372 static const bool gridHasThroatCrossSectionalArea = gridData.gridHasElementParameter(
"ThroatCrossSectionalArea");
373 if (gridHasThroatCrossSectionalArea && !overwriteGridDataWithShapeSpecificValues_)
375 static const auto throatAreaIdx = gridData.parameterIndex(
"ThroatCrossSectionalArea");
376 return gridData.parameters(element)[throatAreaIdx];
382 static const auto throatHeight = getParamFromGroup<Scalar>(gridData.paramGroup(),
"Grid.ThroatHeight");
391 template<
class Gr
idData>
392 Scalar getThroatShapeFactor_(
const GridData& gridData,
const Element& element,
const std::size_t eIdx)
const
394 static const bool gridHasThroatShapeFactor = gridData.gridHasElementParameter(
"ThroatShapeFactor");
395 if (gridHasThroatShapeFactor && !overwriteGridDataWithShapeSpecificValues_)
397 static const auto throatShapeFactorIdx = gridData.parameterIndex(
"ThroatShapeFactor");
398 return gridData.parameters(element)[throatShapeFactorIdx];
404 static const auto throatHeight = getParamFromGroup<Scalar>(gridData.paramGroup(),
"Grid.ThroatHeight");
409 static const auto shapeFactor = getParamFromGroup<Scalar>(gridData.paramGroup(),
"Grid.ThroatShapeFactor");
413 return Throat::shapeFactor<Scalar>(
shape, throatInscribedRadius_[eIdx]);
417 void maybeResizeContainers_()
421 std::adjacent_find(throatGeometry_.begin(), throatGeometry_.end(), std::not_equal_to<Throat::Shape>() ) == throatGeometry_.end())
423 std::cout <<
"All throats feature the same shape, resizing containers" << std::endl;
424 useSameShapeForAllThroats_ =
true;
426 const auto throatGeometry = throatGeometry_[0];
427 throatShapeFactor_.resize(1);
428 throatGeometry_.resize(1);
430 throatGeometry_[0] = throatGeometry;
435 std::adjacent_find(poreGeometry_.begin(), poreGeometry_.end(), std::not_equal_to<Pore::Shape>() ) == poreGeometry_.end())
437 std::cout <<
"All pores feature the same shape, resizing containers" << std::endl;
438 useSameGeometryForAllPores_ =
true;
440 poreGeometry_.resize(1);
445 mutable std::vector<Pore::Shape> poreGeometry_;
446 std::vector<Scalar> poreInscribedRadius_;
447 std::vector<Scalar> poreVolume_;
448 std::vector<Label> poreLabel_;
449 std::vector<SmallLocalIndex> coordinationNumber_;
450 mutable std::vector<Throat::Shape> throatGeometry_;
451 mutable std::vector<Scalar> throatShapeFactor_;
452 std::vector<Scalar> throatInscribedRadius_;
453 std::vector<Scalar> throatLength_;
454 std::vector<Label> throatLabel_;
455 std::vector<Scalar> throatCrossSectionalArea_;
456 bool useSameGeometryForAllPores_;
457 bool useSameShapeForAllThroats_;
458 bool overwriteGridDataWithShapeSpecificValues_;
466template<
class Gr
idView,
class MapperTraits = DefaultMapperTraits<Gr
idView>>
473 template<
class Gr
idGeometry,
bool enableCache>
484template<
class Scalar,
486 bool enableGridGeometryCache =
false,
495template<
class Scalar,
class GV,
class Traits>
498,
public Traits::PNMData
504 using PNMData =
typename Traits::PNMData;
506 using Element =
typename GV::template Codim<0>::Entity;
507 using CoordScalar =
typename GV::ctype;
508 static const int dim = GV::dimension;
509 static const int dimWorld = GV::dimensionworld;
526 using FeCache = Dune::PQkLocalFiniteElementCache<CoordScalar, Scalar, dim, 1>;
534 static_assert(GridView::dimension == 1,
"Porenetwork model only allow GridView::dimension == 1!");
540 {
return this->vertexMapper(); }
557 {
return this->vertexMapper().size(); }
560 template<
class Gr
idData>
563 ParentType::update();
564 PNMData::update(this->gridView(), gridData);
569 auto numElements = this->gridView().size(0);
570 scvs_.resize(numElements);
571 scvfs_.resize(numElements);
572 hasBoundaryScvf_.resize(numElements,
false);
574 boundaryDofIndices_.assign(numDofs(),
false);
576 numScvf_ = numElements;
577 numScv_ = 2*numElements;
580 for (
const auto& element : elements(this->gridView()))
583 auto eIdx = this->elementMapper().index(element);
584 auto elementGeometry = element.geometry();
587 for (LocalIndexType scvLocalIdx = 0; scvLocalIdx < elementGeometry.corners(); ++scvLocalIdx)
589 const auto dofIdxGlobal = this->vertexMapper().subIndex(element, scvLocalIdx, dim);
592 auto corners = std::array{elementGeometry.corner(scvLocalIdx), elementGeometry.center()};
595 const auto volume = this->poreVolume(dofIdxGlobal) / this->coordinationNumber(dofIdxGlobal);
603 if (this->poreLabel(dofIdxGlobal) > 0)
605 if (boundaryDofIndices_[dofIdxGlobal])
608 boundaryDofIndices_[dofIdxGlobal] =
true;
609 hasBoundaryScvf_[eIdx] =
true;
614 auto unitOuterNormal = elementGeometry.corner(1)-elementGeometry.corner(0);
615 unitOuterNormal /= unitOuterNormal.two_norm();
616 LocalIndexType scvfLocalIdx = 0;
618 std::move(unitOuterNormal),
619 this->throatCrossSectionalArea(this->elementMapper().index(element)),
621 std::array<LocalIndexType, 2>({0, 1}));
630 const std::array<SubControlVolume, 2>&
scvs(GridIndexType eIdx)
const
631 {
return scvs_[eIdx]; }
634 const std::array<SubControlVolumeFace, 1>&
scvfs(GridIndexType eIdx)
const
635 {
return scvfs_[eIdx]; }
639 {
return boundaryDofIndices_[dofIdx]; }
647 { DUNE_THROW(Dune::NotImplemented,
"Periodic boundaries"); }
651 {
return std::unordered_map<GridIndexType, GridIndexType>{}; }
655 {
return hasBoundaryScvf_[eIdx]; }
658 const FeCache feCache_;
660 std::vector<std::array<SubControlVolume, 2>> scvs_;
661 std::vector<std::array<SubControlVolumeFace, 1>> scvfs_;
664 std::size_t numScvf_;
667 std::vector<bool> boundaryDofIndices_;
668 std::vector<bool> hasBoundaryScvf_;
677template<
class Scalar,
class GV,
class Traits>
680,
public Traits::PNMData
686 using PNMData =
typename Traits::PNMData;
688 static const int dim = GV::dimension;
689 static const int dimWorld = GV::dimensionworld;
691 using Element =
typename GV::template Codim<0>::Entity;
692 using CoordScalar =
typename GV::ctype;
709 using FeCache = Dune::PQkLocalFiniteElementCache<CoordScalar, Scalar, dim, 1>;
717 static_assert(GridView::dimension == 1,
"Porenetwork model only allow GridView::dimension == 1!");
723 {
return this->vertexMapper(); }
740 {
return this->vertexMapper().size(); }
743 template<
class Gr
idData>
746 ParentType::update();
747 PNMData::update(this->gridView(), gridData);
749 boundaryDofIndices_.assign(numDofs(),
false);
752 numScvf_ = this->gridView().size(0);
753 numScv_ = 2*numScvf_;
755 for (
const auto& element : elements(this->gridView()))
758 for (LocalIndexType vIdxLocal = 0; vIdxLocal < 2; ++vIdxLocal)
760 const auto vIdxGlobal = this->vertexMapper().subIndex(element, vIdxLocal, dim);
761 if (this->poreLabel(vIdxGlobal) > 0)
763 if (boundaryDofIndices_[vIdxGlobal])
766 boundaryDofIndices_[vIdxGlobal] =
true;
778 {
return boundaryDofIndices_[dofIdx]; }
786 { DUNE_THROW(Dune::NotImplemented,
"Periodic boundaries"); }
790 {
return std::unordered_map<GridIndexType, GridIndexType>{}; }
794 const FeCache feCache_;
798 std::size_t numScvf_;
801 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.
The available discretization methods in Dumux.
Helper classes to compute the integration elements.
Base class for grid geometries.
This file contains functions related to calculate pore-body properties.
This file contains functions related to calculate pore-throat properties.
DiscretizationMethod
The available discretization methods in Dumux.
Definition: method.hh:37
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:374
typename Extrusion< T >::type Extrusion_t
Convenience alias for obtaining the extrusion type.
Definition: extrusion.hh:177
Definition: discretization/porenetwork/fvelementgeometry.hh:33
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:50
GV GridView
export the grid view type
Definition: basegridgeometry.hh:65
Base class for the local geometry for porenetworks.
Definition: discretization/porenetwork/fvelementgeometry.hh:42
Base class for geometry data extraction from the grid data format.
Definition: discretization/porenetwork/gridgeometry.hh:55
Scalar throatCrossSectionalArea(const GridIndex eIdx) const
Returns the throat's cross-sectional area.
Definition: discretization/porenetwork/gridgeometry.hh:299
const std::vector< Scalar > & poreVolume() const
Returns the vector of pore volumes.
Definition: discretization/porenetwork/gridgeometry.hh:227
const std::vector< Scalar > & throatInscribedRadius() const
Returns the vector of inscribed throat radii.
Definition: discretization/porenetwork/gridgeometry.hh:235
bool useSameGeometryForAllPores() const
Returns whether all pores feature the same shape.
Definition: discretization/porenetwork/gridgeometry.hh:325
const std::vector< Label > & poreLabel() const
Returns the vector of pore labels.
Definition: discretization/porenetwork/gridgeometry.hh:211
bool useSameShapeForAllThroats() const
Returns whether all throats feature the same cross-sectional shape.
Definition: discretization/porenetwork/gridgeometry.hh:329
SmallLocalIndex coordinationNumber(const GridIndex dofIdxGlobal) const
Returns the number of throats connected to a pore (coordination number)
Definition: discretization/porenetwork/gridgeometry.hh:255
void update(const GridView &gridView, const GridData &gridData)
Definition: discretization/porenetwork/gridgeometry.hh:67
const std::vector< SmallLocalIndex > & coordinationNumber() const
Returns the vector of coordination numbers.
Definition: discretization/porenetwork/gridgeometry.hh:259
const std::vector< Scalar > & throatShapeFactor() const
Returns the vector of throat shape factors.
Definition: discretization/porenetwork/gridgeometry.hh:311
const std::vector< Scalar > & throatCrossSectionalArea() const
Returns the vector of throat cross-sectional areas.
Definition: discretization/porenetwork/gridgeometry.hh:303
Pore::Shape poreGeometry(const GridIndex vIdx) const
the geometry of the pore
Definition: discretization/porenetwork/gridgeometry.hh:263
Throat::Shape throatCrossSectionShape(const GridIndex eIdx) const
Returns the throat's cross-sectional shape.
Definition: discretization/porenetwork/gridgeometry.hh:281
Label throatLabel(const GridIndex eIdx) const
Returns an index indicating if a throat is touching the domain boundary.
Definition: discretization/porenetwork/gridgeometry.hh:247
const std::vector< Label > & throatLabel() const
Returns the vector of throat labels.
Definition: discretization/porenetwork/gridgeometry.hh:251
Scalar throatLength(const GridIndex eIdx) const
Returns the length of the throat.
Definition: discretization/porenetwork/gridgeometry.hh:239
const std::vector< Throat::Shape > & throatCrossSectionShape() const
Returns the vector of cross-sectional shapes.
Definition: discretization/porenetwork/gridgeometry.hh:285
Scalar poreVolume(const GridIndex dofIdxGlobal) const
Returns the volume of the pore.
Definition: discretization/porenetwork/gridgeometry.hh:223
Scalar throatInscribedRadius(const GridIndex eIdx) const
Returns the inscribed radius of the throat.
Definition: discretization/porenetwork/gridgeometry.hh:231
Label poreLabel(const GridIndex dofIdxGlobal) const
Returns the pore label (e.g. used for setting BCs)
Definition: discretization/porenetwork/gridgeometry.hh:207
Scalar poreInscribedRadius(const GridIndex dofIdxGlobal) const
Returns the inscribed radius of the pore.
Definition: discretization/porenetwork/gridgeometry.hh:215
const std::vector< Scalar > & throatLength() const
Returns the vector of throat lengths.
Definition: discretization/porenetwork/gridgeometry.hh:243
const std::vector< Pore::Shape > & poreGeometry() const
Returns the vector of pore geometries.
Definition: discretization/porenetwork/gridgeometry.hh:267
Scalar throatShapeFactor(const GridIndex eIdx) const
Returns the throat's shape factor.
Definition: discretization/porenetwork/gridgeometry.hh:307
const std::vector< Scalar > & poreInscribedRadius() const
Returns the vector of inscribed pore radii.
Definition: discretization/porenetwork/gridgeometry.hh:219
The default traits.
Definition: discretization/porenetwork/gridgeometry.hh:469
Base class for the finite volume geometry for porenetwork models.
Definition: discretization/porenetwork/gridgeometry.hh:488
Base class for the finite volume geometry for porenetwork models.
Definition: discretization/porenetwork/gridgeometry.hh:499
std::size_t numDofs() const
The total number of degrees of freedom.
Definition: discretization/porenetwork/gridgeometry.hh:556
const std::array< SubControlVolume, 2 > & scvs(GridIndexType eIdx) const
Get the local scvs for an element.
Definition: discretization/porenetwork/gridgeometry.hh:630
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:646
std::unordered_map< GridIndexType, GridIndexType > periodicVertexMap() const
Returns the map between dofs across periodic boundaries.
Definition: discretization/porenetwork/gridgeometry.hh:650
typename Traits::SubControlVolumeFace SubControlVolumeFace
export the type of sub control volume
Definition: discretization/porenetwork/gridgeometry.hh:520
const DofMapper & dofMapper() const
Definition: discretization/porenetwork/gridgeometry.hh:539
std::size_t numScv() const
The total number of sub control volumes.
Definition: discretization/porenetwork/gridgeometry.hh:543
bool dofOnPeriodicBoundary(GridIndexType dofIdx) const
If a vertex / d.o.f. is on a periodic boundary (not implemented)
Definition: discretization/porenetwork/gridgeometry.hh:642
bool dofOnBoundary(GridIndexType dofIdx) const
If a vertex / d.o.f. is on the boundary.
Definition: discretization/porenetwork/gridgeometry.hh:638
typename Traits::SubControlVolume SubControlVolume
export the type of sub control volume
Definition: discretization/porenetwork/gridgeometry.hh:518
void update(const GridData &gridData)
update all fvElementGeometries (do this again after grid adaption)
Definition: discretization/porenetwork/gridgeometry.hh:561
typename Traits::template LocalView< ThisType, true > LocalView
export the type of the fv element geometry (the local view type)
Definition: discretization/porenetwork/gridgeometry.hh:516
std::size_t numScvf() const
The total number of sun control volume faces.
Definition: discretization/porenetwork/gridgeometry.hh:547
Extrusion_t< Traits > Extrusion
export the type of extrusion
Definition: discretization/porenetwork/gridgeometry.hh:522
GridGeometry(const GridView gridView)
Constructor.
Definition: discretization/porenetwork/gridgeometry.hh:531
const std::array< SubControlVolumeFace, 1 > & scvfs(GridIndexType eIdx) const
Get the local scvfs for an element.
Definition: discretization/porenetwork/gridgeometry.hh:634
std::size_t numBoundaryScvf() const
Definition: discretization/porenetwork/gridgeometry.hh:552
const FeCache & feCache() const
The finite element cache for creating local FE bases.
Definition: discretization/porenetwork/gridgeometry.hh:626
typename Traits::VertexMapper DofMapper
export dof mapper type
Definition: discretization/porenetwork/gridgeometry.hh:524
bool hasBoundaryScvf(GridIndexType eIdx) const
Returns whether one of the geometry's scvfs lies on a boundary.
Definition: discretization/porenetwork/gridgeometry.hh:654
Dune::PQkLocalFiniteElementCache< CoordScalar, Scalar, dim, 1 > FeCache
export the finite element cache type
Definition: discretization/porenetwork/gridgeometry.hh:526
Base class for the finite volume geometry for porenetwork models.
Definition: discretization/porenetwork/gridgeometry.hh:681
bool dofOnBoundary(GridIndexType dofIdx) const
If a vertex / d.o.f. is on the boundary.
Definition: discretization/porenetwork/gridgeometry.hh:777
std::size_t numDofs() const
The total number of degrees of freedom.
Definition: discretization/porenetwork/gridgeometry.hh:739
std::size_t numBoundaryScvf() const
Definition: discretization/porenetwork/gridgeometry.hh:735
Dune::PQkLocalFiniteElementCache< CoordScalar, Scalar, dim, 1 > FeCache
export the finite element cache type
Definition: discretization/porenetwork/gridgeometry.hh:709
std::size_t numScv() const
The total number of sub control volumes.
Definition: discretization/porenetwork/gridgeometry.hh:726
typename Traits::VertexMapper DofMapper
export dof mapper type
Definition: discretization/porenetwork/gridgeometry.hh:707
const FeCache & feCache() const
The finite element cache for creating local FE bases.
Definition: discretization/porenetwork/gridgeometry.hh:773
typename Traits::SubControlVolumeFace SubControlVolumeFace
export the type of sub control volume
Definition: discretization/porenetwork/gridgeometry.hh:703
std::unordered_map< GridIndexType, GridIndexType > periodicVertexMap() const
Returns the map between dofs across periodic boundaries.
Definition: discretization/porenetwork/gridgeometry.hh:789
Extrusion_t< Traits > Extrusion
export the type of extrusion
Definition: discretization/porenetwork/gridgeometry.hh:705
std::size_t numScvf() const
The total number of sun control volume faces.
Definition: discretization/porenetwork/gridgeometry.hh:730
typename Traits::SubControlVolume SubControlVolume
export the type of sub control volume
Definition: discretization/porenetwork/gridgeometry.hh:701
typename Traits::template LocalView< ThisType, false > LocalView
export the type of the fv element geometry (the local view type)
Definition: discretization/porenetwork/gridgeometry.hh:699
const DofMapper & dofMapper() const
Definition: discretization/porenetwork/gridgeometry.hh:722
void update(const GridData &gridData)
update all fvElementGeometries (do this again after grid adaption)
Definition: discretization/porenetwork/gridgeometry.hh:744
GridGeometry(const GridView gridView)
Constructor.
Definition: discretization/porenetwork/gridgeometry.hh:714
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:785
bool dofOnPeriodicBoundary(GridIndexType dofIdx) const
If a vertex / d.o.f. is on a periodic boundary (not implemented)
Definition: discretization/porenetwork/gridgeometry.hh:781
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.