Skip to content
Snippets Groups Projects
Commit 0eeb3161 authored by Timo Koch's avatar Timo Koch
Browse files

[fvGeometry] Make range generators free functions / friend functions

We iterate over all scvs of a fvElementGeometry like this
for (const auto& scv : scvs(fvGeometry))
This is closer to the way we speak "For each scv in all scvs of the fvElementGeometry do..."
and analogously to how we iterate over elements of a gridView.
parent 2a63d3f4
No related branches found
No related tags found
1 merge request!617[WIP] Next
Showing
with 83 additions and 54 deletions
...@@ -317,15 +317,15 @@ public: ...@@ -317,15 +317,15 @@ public:
auto fvGeometry = problem.model().fvGeometries(element); auto fvGeometry = problem.model().fvGeometries(element);
const auto globalPos = source.position(); const auto globalPos = source.position();
// loop over all sub control volumes and check if the point source is inside // loop over all sub control volumes and check if the point source is inside
std::vector<unsigned int> scvs; std::vector<unsigned int> scvIndices;
for (auto&& scv : fvGeometry.scvs()) for (const auto& scv : scvs(fvGeometry))
{ {
if (BoundingBoxTreeHelper<dimworld>::pointInGeometry(scv.geometry(), globalPos)) if (BoundingBoxTreeHelper<dimworld>::pointInGeometry(scv.geometry(), globalPos))
scvs.push_back(scv.indexInElement()); scvIndices.push_back(scv.indexInElement());
} }
// for all scvs that where tested positiv add the point sources // for all scvs that where tested positiv add the point sources
// to the element/scv to point source map // to the element/scv to point source map
for (auto scvIdx : scvs) for (auto scvIdx : scvIndices)
{ {
const auto key = std::make_pair(eIdx, scvIdx); const auto key = std::make_pair(eIdx, scvIdx);
if (pointSourceMap.count(key)) if (pointSourceMap.count(key))
......
...@@ -91,7 +91,7 @@ public: ...@@ -91,7 +91,7 @@ public:
// evaluate gradP - rho*g at integration point // evaluate gradP - rho*g at integration point
DimVector gradP(0.0); DimVector gradP(0.0);
for (const auto& scv : fvGeometry.scvs()) for (const auto& scv : scvs(fvGeometry))
{ {
// the global shape function gradient // the global shape function gradient
DimVector gradI; DimVector gradI;
......
...@@ -56,7 +56,7 @@ public: ...@@ -56,7 +56,7 @@ public:
const auto& elementGeometry = element.geometry(); const auto& elementGeometry = element.geometry();
const auto& localBasis = problem.model().fvGeometries().feLocalBasis(elementGeometry.type()); const auto& localBasis = problem.model().fvGeometries().feLocalBasis(elementGeometry.type());
const auto& fvGeometry = problem.model().fvGeometries(element); const auto& fvGeometry = problem.model().fvGeometries(element);
for (const auto& scvf : fvGeometry.scvfs()) for (const auto& scvf : scvfs(fvGeometry))
{ {
(*this)[scvf].update(problem, element, elementGeometry, localBasis, scvf); (*this)[scvf].update(problem, element, elementGeometry, localBasis, scvf);
} }
...@@ -88,7 +88,7 @@ public: ...@@ -88,7 +88,7 @@ public:
const auto numScvf = fvGeometry.numScvf(); const auto numScvf = fvGeometry.numScvf();
fluxVarsCache_.resize(numScvf); fluxVarsCache_.resize(numScvf);
IndexType localScvfIdx = 0; IndexType localScvfIdx = 0;
for (const auto& scvf : fvGeometry.scvfs()) for (const auto& scvf : scvfs(fvGeometry))
fluxVarsCache_[localScvfIdx++].update(problem_(), element, elementGeometry, localBasis, scvf); fluxVarsCache_[localScvfIdx++].update(problem_(), element, elementGeometry, localBasis, scvf);
} }
......
...@@ -144,13 +144,13 @@ public: ...@@ -144,13 +144,13 @@ public:
problem.model().fvGeometries_().bindElement(element); problem.model().fvGeometries_().bindElement(element);
const auto& fvGeometry = problem.model().fvGeometries(element); const auto& fvGeometry = problem.model().fvGeometries(element);
for (const auto& scv : fvGeometry.scvs()) for (const auto& scv : scvs(fvGeometry))
{ {
auto vIdxGlobal = scv.dofIndex(); auto vIdxGlobal = scv.dofIndex();
vertexStencils_[vIdxGlobal].vertexScvs().push_back(scv.index()); vertexStencils_[vIdxGlobal].vertexScvs().push_back(scv.index());
vertexStencils_[vIdxGlobal].elementIndices().push_back(eIdx); vertexStencils_[vIdxGlobal].elementIndices().push_back(eIdx);
for (const auto& scvJ : fvGeometry.scvs()) for (const auto& scvJ : scvs(fvGeometry))
{ {
auto vIdxGlobalJ = scvJ.dofIndex(); auto vIdxGlobalJ = scvJ.dofIndex();
......
...@@ -79,7 +79,7 @@ public: ...@@ -79,7 +79,7 @@ public:
problem.model().fvGeometries_().bindElement(element); problem.model().fvGeometries_().bindElement(element);
const auto& fvGeometry = problem.model().fvGeometries(element); const auto& fvGeometry = problem.model().fvGeometries(element);
for (const auto& scv : fvGeometry.scvs()) for (const auto& scv : scvs(fvGeometry))
{ {
(*this)[scv].update(sol[scv.dofIndex()], (*this)[scv].update(sol[scv.dofIndex()],
problem, problem,
...@@ -223,7 +223,7 @@ public: ...@@ -223,7 +223,7 @@ public:
} }
// Update boundary volume variables // Update boundary volume variables
for (const auto& scvFace : fvGeometry.scvfs()) for (const auto& scvFace : scvfs(fvGeometry))
{ {
// if we are not on a boundary, skip the rest // if we are not on a boundary, skip the rest
if (!scvFace.boundary()) if (!scvFace.boundary())
...@@ -306,7 +306,7 @@ public: ...@@ -306,7 +306,7 @@ public:
// volVarIndices_.resize(numDofs); // volVarIndices_.resize(numDofs);
int localIdx = 0; int localIdx = 0;
for (const auto& scv : fvGeometry.scvs()) for (const auto& scv : scvs(fvGeometry))
{ {
// std::cout << "scv index: " << scv.index() << ", dofIdx: " << scv.dofIndex() << ", localIdx: " << scv.indexInElement() << std::endl; // std::cout << "scv index: " << scv.index() << ", dofIdx: " << scv.dofIndex() << ", localIdx: " << scv.indexInElement() << std::endl;
const auto& sol = problem_().model().curSol()[scv.dofIndex()]; const auto& sol = problem_().model().curSol()[scv.dofIndex()];
...@@ -451,7 +451,7 @@ public: ...@@ -451,7 +451,7 @@ public:
// volVarIndices_.resize(numDofs); // volVarIndices_.resize(numDofs);
int localIdx = 0; int localIdx = 0;
for (const auto& scv : fvGeometry.scvs()) for (const auto& scv : scvs(fvGeometry))
{ {
const auto& sol = problem_().model().prevSol()[scv.dofIndex()]; const auto& sol = problem_().model().prevSol()[scv.dofIndex()];
// let the interface solver update the volvars // let the interface solver update the volvars
......
...@@ -56,7 +56,7 @@ public: ...@@ -56,7 +56,7 @@ public:
problem.model().fvGeometries_().bind(element); problem.model().fvGeometries_().bind(element);
const auto& fvGeometry = problem.model().fvGeometries(element); const auto& fvGeometry = problem.model().fvGeometries(element);
for (const auto& scvf : fvGeometry.scvfs()) for (const auto& scvf : scvfs(fvGeometry))
{ {
(*this)[scvf].update(problem, element, scvf); (*this)[scvf].update(problem, element, scvf);
} }
...@@ -84,7 +84,7 @@ public: ...@@ -84,7 +84,7 @@ public:
IndexType localScvfIdx = 0; IndexType localScvfIdx = 0;
// fill the containers // fill the containers
for (const auto& scvf : fvGeometry.scvfs()) for (const auto& scvf : scvfs(fvGeometry))
{ {
fluxVarsCache_[localScvfIdx].update(problem_(), element, scvf); fluxVarsCache_[localScvfIdx].update(problem_(), element, scvf);
globalScvfIndices_[localScvfIdx] = scvf.index(); globalScvfIndices_[localScvfIdx] = scvf.index();
...@@ -118,7 +118,7 @@ public: ...@@ -118,7 +118,7 @@ public:
fluxVarsCache_.resize(numScvf); fluxVarsCache_.resize(numScvf);
globalScvfIndices_.resize(numScvf); globalScvfIndices_.resize(numScvf);
IndexType localScvfIdx = 0; IndexType localScvfIdx = 0;
for (const auto& scvf : fvGeometry.scvfs()) for (const auto& scvf : scvfs(fvGeometry))
{ {
fluxVarsCache_[localScvfIdx].update(problem_(), element, scvf); fluxVarsCache_[localScvfIdx].update(problem_(), element, scvf);
globalScvfIndices_[localScvfIdx] = scvf.index(); globalScvfIndices_[localScvfIdx] = scvf.index();
......
...@@ -49,7 +49,7 @@ public: ...@@ -49,7 +49,7 @@ public:
const auto& fvGeometry = problem.model().fvGeometries(element); const auto& fvGeometry = problem.model().fvGeometries(element);
// loop over sub control faces // loop over sub control faces
for (const auto& scvf : fvGeometry.scvfs()) for (const auto& scvf : scvfs(fvGeometry))
{ {
FluxVariables fluxVars; FluxVariables fluxVars;
const auto& stencil = fluxVars.computeStencil(problem, element, scvf); const auto& stencil = fluxVars.computeStencil(problem, element, scvf);
......
...@@ -78,7 +78,7 @@ public: ...@@ -78,7 +78,7 @@ public:
{ {
problem.model().fvGeometries_().bindElement(element); problem.model().fvGeometries_().bindElement(element);
const auto& fvGeometry = problem.model().fvGeometries(element); const auto& fvGeometry = problem.model().fvGeometries(element);
for (const auto& scv : fvGeometry.scvs()) for (const auto& scv : scvs(fvGeometry))
{ {
(*this)[scv].update(sol[scv.dofIndex()], (*this)[scv].update(sol[scv.dofIndex()],
problem, problem,
...@@ -87,7 +87,7 @@ public: ...@@ -87,7 +87,7 @@ public:
} }
// handle the boundary volume variables // handle the boundary volume variables
for (const auto& scvFace : fvGeometry.scvfs()) for (const auto& scvFace : scvfs(fvGeometry))
{ {
// if we are not on a boundary, skip the rest // if we are not on a boundary, skip the rest
if (!scvFace.boundary()) if (!scvFace.boundary())
...@@ -221,7 +221,7 @@ public: ...@@ -221,7 +221,7 @@ public:
// Update boundary volume variables // Update boundary volume variables
const auto& fvGeometry = problem_().model().fvGeometries(element); const auto& fvGeometry = problem_().model().fvGeometries(element);
for (const auto& scvFace : fvGeometry.scvfs()) for (const auto& scvFace : scvfs(fvGeometry))
{ {
// if we are not on a boundary, skip the rest // if we are not on a boundary, skip the rest
if (!scvFace.boundary()) if (!scvFace.boundary())
......
...@@ -133,31 +133,44 @@ class FVElementGeometry ...@@ -133,31 +133,44 @@ class FVElementGeometry
using ScvfIterator = Dumux::ScvfIterator<SubControlVolumeFace, std::vector<IndexType>, FVElementGeometryVector>; using ScvfIterator = Dumux::ScvfIterator<SubControlVolumeFace, std::vector<IndexType>, FVElementGeometryVector>;
public: public:
// This class in not default-constructible
FVElementGeometry() = delete;
// Constructor with vectors // Constructor with vectors
FVElementGeometry(const FVElementGeometryVector& fvGeometryVector, FVElementGeometry(const FVElementGeometryVector& localFvGeometry,
const std::vector<IndexType>& scvIndices, const std::vector<IndexType>& scvIndices,
const std::vector<IndexType>& scvfIndices) const std::vector<IndexType>& scvfIndices)
: fvGeometryVector_(fvGeometryVector), scvIndices_(scvIndices), scvfIndices_(scvfIndices) : localFvGeometry_(localFvGeometry),
scvIndices_(scvIndices),
scvfIndices_(scvfIndices)
{} {}
//! iterator range for sub control volumes //! iterator range for sub control volumes
inline Dune::IteratorRange<ScvIterator> scvs() const //! This is a free function found by means of ADL
//! To iterate over all sub control volumes of this FVElementGeometry use
//! for (const auto& scv : scvs(fvGeometry))
friend inline Dune::IteratorRange<ScvIterator>
scvs(const FVElementGeometry& g)
{ {
return Dune::IteratorRange<ScvIterator>(ScvIterator(scvIndices_.begin(), fvGeometryVector_), return Dune::IteratorRange<ScvIterator>(ScvIterator(g.scvIndices().begin(), g.localFvGeometry()),
ScvIterator(scvIndices_.end(), fvGeometryVector_)); ScvIterator(g.scvIndices().end(), g.localFvGeometry()));
} }
//! number of sub control volumes in this fv element geometry //! iterator range for sub control volume faces
std::size_t numScv() const //! This is a free function found by means of ADL
//! To iterate over all sub control volume faces of this FVElementGeometry use
//! for (const auto& scvf : scvfs(fvGeometry))
friend inline Dune::IteratorRange<ScvfIterator>
scvfs(const FVElementGeometry& g)
{ {
return scvIndices_.size(); return Dune::IteratorRange<ScvfIterator>(ScvfIterator(g.scvfIndices().begin(), g.localFvGeometry()),
ScvfIterator(g.scvfIndices().end(), g.localFvGeometry()));
} }
//! iterator range for sub control volume faces //! number of sub control volumes in this fv element geometry
inline Dune::IteratorRange<ScvfIterator> scvfs() const std::size_t numScv() const
{ {
return Dune::IteratorRange<ScvfIterator>(ScvfIterator(scvfIndices_.begin(), fvGeometryVector_), return scvIndices_.size();
ScvfIterator(scvfIndices_.end(), fvGeometryVector_));
} }
//! number of sub control volumes in this fv element geometry //! number of sub control volumes in this fv element geometry
...@@ -167,7 +180,24 @@ public: ...@@ -167,7 +180,24 @@ public:
} }
private: private:
const FVElementGeometryVector& fvGeometryVector_;
//! The sub control volume indices
//! Depending on the type of discretization and caching
//! these may be local or global indices
const std::vector<IndexType>& scvIndices() const
{ return scvIndices_; }
//! The sub control volume face indices
//! Depending on the type of discretization and caching
//! these may be local or global indices
const std::vector<IndexType>& scvfIndices() const
{ return scvfIndices_; }
//! The LocalFvGeometry object this FvElementGeometry belongs to
const FVElementGeometryVector& localFvGeometry() const
{ return localFvGeometry_; }
const FVElementGeometryVector& localFvGeometry_;
std::vector<IndexType> scvIndices_; std::vector<IndexType> scvIndices_;
std::vector<IndexType> scvfIndices_; std::vector<IndexType> scvfIndices_;
}; };
......
...@@ -89,7 +89,7 @@ public: ...@@ -89,7 +89,7 @@ public:
hasNeumann_ = false; hasNeumann_ = false;
hasOutflow_ = false; hasOutflow_ = false;
for (auto&& scv : fvGeometry.scvs()) for (const auto& scv : scvs(fvGeometry))
{ {
int scvIdxLocal = scv.indexInElement(); int scvIdxLocal = scv.indexInElement();
(*this)[scvIdxLocal].reset(); (*this)[scvIdxLocal].reset();
......
...@@ -126,7 +126,7 @@ public: ...@@ -126,7 +126,7 @@ public:
this->model_().updatePVWeights(fvGeometry); this->model_().updatePVWeights(fvGeometry);
// calculation of the derivatives // calculation of the derivatives
for (const auto& scv : fvGeometry.scvs()) for (const auto& scv : scvs(fvGeometry))
{ {
// dof index and corresponding actual pri vars // dof index and corresponding actual pri vars
const auto dofIdx = scv.dofIndex(); const auto dofIdx = scv.dofIndex();
...@@ -264,7 +264,7 @@ protected: ...@@ -264,7 +264,7 @@ protected:
// update the global stiffness matrix with the current partial derivatives // update the global stiffness matrix with the current partial derivatives
const auto& fvGeometry = this->model_().fvGeometries(element); const auto& fvGeometry = this->model_().fvGeometries(element);
for (const auto& scvJ : fvGeometry.scvs()) for (const auto& scvJ : scvs(fvGeometry))
this->updateGlobalJacobian_(matrix, scvJ.dofIndex(), dofIdx, pvIdx, partialDeriv[scvJ.indexInElement()]); this->updateGlobalJacobian_(matrix, scvJ.dofIndex(), dofIdx, pvIdx, partialDeriv[scvJ.indexInElement()]);
} }
......
...@@ -73,7 +73,7 @@ protected: ...@@ -73,7 +73,7 @@ protected:
{ {
// calculate the mass flux over the scv faces and subtract // calculate the mass flux over the scv faces and subtract
const auto& fvGeometry = this->fvGeometry_(); const auto& fvGeometry = this->fvGeometry_();
for (const auto& scvf : fvGeometry.scvfs()) for (const auto& scvf : scvfs(fvGeometry))
{ {
if (!scvf.boundary()) if (!scvf.boundary())
{ {
...@@ -187,8 +187,7 @@ protected: ...@@ -187,8 +187,7 @@ protected:
const auto& fvGeometry = this->fvGeometry_(); const auto& fvGeometry = this->fvGeometry_();
if (this->bcTypes_().hasNeumann() || this->bcTypes_().hasOutflow()) if (this->bcTypes_().hasNeumann() || this->bcTypes_().hasOutflow())
{ {
for (const auto& scvf : scvfs(fvGeometry))
for (const auto& scvf : fvGeometry.scvfs())
{ {
if (scvf.boundary()) if (scvf.boundary())
{ {
...@@ -201,7 +200,7 @@ protected: ...@@ -201,7 +200,7 @@ protected:
// additionally treat mixed D/N conditions in a strong sense // additionally treat mixed D/N conditions in a strong sense
if (this->bcTypes_().hasDirichlet()) if (this->bcTypes_().hasDirichlet())
{ {
for (const auto& scv : fvGeometry.scvs()) for (const auto& scv : scvs(fvGeometry))
{ {
BoundaryTypes bcTypes = this->bcTypes_(scv.indexInElement()); BoundaryTypes bcTypes = this->bcTypes_(scv.indexInElement());
if (!bcTypes.hasDirichlet()) if (!bcTypes.hasDirichlet())
......
...@@ -87,12 +87,12 @@ public: ...@@ -87,12 +87,12 @@ public:
(*this)[0].reset(); (*this)[0].reset();
for (const auto& scv : fvGeometry.scvs()) for (const auto& scv : scvs(fvGeometry))
{ {
if (!problem.model().onBoundary(scv)) if (!problem.model().onBoundary(scv))
return; return;
for (const auto& scvFace : fvGeometry.scvfs()) for (const auto& scvFace : scvfs(fvGeometry))
{ {
if (!scvFace.boundary()) if (!scvFace.boundary())
continue; continue;
......
...@@ -128,7 +128,7 @@ public: ...@@ -128,7 +128,7 @@ public:
// find the flux vars needed for the calculation of the flux into element // find the flux vars needed for the calculation of the flux into element
std::vector<IndexType> fluxVarIndices; std::vector<IndexType> fluxVarIndices;
for (const auto& scvFaceJ : fvGeometry.scvfs()) for (const auto& scvFaceJ : scvfs(fvGeometry))
{ {
auto fluxVarsIdx = scvFaceJ.index(); auto fluxVarsIdx = scvFaceJ.index();
......
...@@ -74,7 +74,7 @@ protected: ...@@ -74,7 +74,7 @@ protected:
{ {
// calculate the mass flux over the scv faces // calculate the mass flux over the scv faces
const auto& fvGeometry = this->fvGeometry_(); const auto& fvGeometry = this->fvGeometry_();
for (const auto& scvf : fvGeometry.scvfs()) for (const auto& scvf : scvfs(fvGeometry))
{ {
this->residual_[0] += this->asImp_().computeFlux_(scvf); this->residual_[0] += this->asImp_().computeFlux_(scvf);
} }
...@@ -93,7 +93,7 @@ protected: ...@@ -93,7 +93,7 @@ protected:
{ {
const auto& fvGeometry = this->fvGeometry_(); const auto& fvGeometry = this->fvGeometry_();
for (const auto& scvf : fvGeometry.scvfs()) for (const auto& scvf : scvfs(fvGeometry))
{ {
if (scvf.boundary()) if (scvf.boundary())
this->residual_[0] += evalBoundaryFluxes_(scvf); this->residual_[0] += evalBoundaryFluxes_(scvf);
...@@ -102,7 +102,7 @@ protected: ...@@ -102,7 +102,7 @@ protected:
// additionally treat mixed D/N conditions in a strong sense // additionally treat mixed D/N conditions in a strong sense
if (this->bcTypes_().hasDirichlet()) if (this->bcTypes_().hasDirichlet())
{ {
for (const auto& scvf : fvGeometry.scvfs()) for (const auto& scvf : scvfs(fvGeometry))
{ {
if (scvf.boundary()) if (scvf.boundary())
this->asImp_().evalDirichlet_(scvf); this->asImp_().evalDirichlet_(scvf);
......
...@@ -292,7 +292,7 @@ protected: ...@@ -292,7 +292,7 @@ protected:
// calculate the amount of conservation each quantity inside // calculate the amount of conservation each quantity inside
// all sub control volumes // all sub control volumes
const auto& fvGeometry = fvGeometry_(); const auto& fvGeometry = fvGeometry_();
for (const auto& scv : fvGeometry.scvs()) for (const auto& scv : scvs(fvGeometry))
{ {
auto scvIdx = scv.indexInElement(); auto scvIdx = scv.indexInElement();
...@@ -305,7 +305,7 @@ protected: ...@@ -305,7 +305,7 @@ protected:
{ {
PrimaryVariables source(0); PrimaryVariables source(0);
const auto& fvGeometry = fvGeometry_(); const auto& fvGeometry = fvGeometry_();
for (const auto& scv : fvGeometry) for (const auto& scv : scvs(fvGeometry))
{ {
source += this->problem_().source(element_(), scv); source += this->problem_().source(element_(), scv);
...@@ -327,7 +327,7 @@ protected: ...@@ -327,7 +327,7 @@ protected:
{ {
// evaluate the volume terms (storage + source terms) // evaluate the volume terms (storage + source terms)
const auto& fvGeometry = fvGeometry_(); const auto& fvGeometry = fvGeometry_();
for (const auto& scv : fvGeometry.scvs()) for (const auto& scv : scvs(fvGeometry))
{ {
auto scvIdx = scv.indexInElement(); auto scvIdx = scv.indexInElement();
auto curExtrusionFactor = model_().curVolVars(scv).extrusionFactor(); auto curExtrusionFactor = model_().curVolVars(scv).extrusionFactor();
...@@ -351,7 +351,7 @@ protected: ...@@ -351,7 +351,7 @@ protected:
{ {
// evaluate the volume terms (storage + source terms) // evaluate the volume terms (storage + source terms)
const auto& fvGeometry = fvGeometry_(); const auto& fvGeometry = fvGeometry_();
for (const auto& scv : fvGeometry.scvs()) for (const auto& scv : scvs(fvGeometry))
{ {
auto scvIdx = scv.indexInElement(); auto scvIdx = scv.indexInElement();
auto prevExtrusionFactor = model_().prevVolVars(scv).extrusionFactor(); auto prevExtrusionFactor = model_().prevVolVars(scv).extrusionFactor();
......
...@@ -862,7 +862,7 @@ protected: ...@@ -862,7 +862,7 @@ protected:
const auto& fvGeometry = fvGeometries(element); const auto& fvGeometry = fvGeometries(element);
// loop over sub control volumes // loop over sub control volumes
for(const auto& scv : fvGeometry.scvs()) for (const auto& scv : scvs(fvGeometry))
{ {
// let the problem do the dirty work of nailing down // let the problem do the dirty work of nailing down
// the initial solution. // the initial solution.
......
...@@ -98,7 +98,7 @@ public: ...@@ -98,7 +98,7 @@ public:
this->curVolVars_().bindElement(element); this->curVolVars_().bindElement(element);
const auto& fvGeometry = this->fvGeometries(element); const auto& fvGeometry = this->fvGeometries(element);
for (const auto& scv : fvGeometry.scvs()) for (const auto& scv : scvs(fvGeometry))
{ {
const auto& spatialParams = this->problem_().spatialParams(); const auto& spatialParams = this->problem_().spatialParams();
auto dofIdxGlobal = scv.dofIndex(); auto dofIdxGlobal = scv.dofIndex();
......
...@@ -162,7 +162,7 @@ public: ...@@ -162,7 +162,7 @@ public:
this->curVolVars_().bindElement(element); this->curVolVars_().bindElement(element);
const auto& fvGeometry = this->fvGeometries(element); const auto& fvGeometry = this->fvGeometries(element);
for (const auto& scv : fvGeometry.scvs()) for (const auto& scv : scvs(fvGeometry))
{ {
auto dofIdxGlobal = scv.dofIndex(); auto dofIdxGlobal = scv.dofIndex();
const auto& volVars = this->curVolVars(scv); const auto& volVars = this->curVolVars(scv);
......
...@@ -148,7 +148,7 @@ public: ...@@ -148,7 +148,7 @@ public:
this->curVolVars_().bindElement(element); this->curVolVars_().bindElement(element);
const auto& fvGeometry = this->fvGeometries(element); const auto& fvGeometry = this->fvGeometries(element);
for (const auto& scv : fvGeometry.scvs()) for (const auto& scv : scvs(fvGeometry))
{ {
auto eIdx = scv.elementIndex(); auto eIdx = scv.elementIndex();
auto dofIdxGlobal = scv.dofIndex(); auto dofIdxGlobal = scv.dofIndex();
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment