Skip to content
Snippets Groups Projects
Commit cec5ff82 authored by Dennis Gläser's avatar Dennis Gläser Committed by Timo Koch
Browse files

[tpfa][fvgeomvec] return fvgeoms only for elements

parent aa4dca33
No related branches found
No related tags found
Loading
...@@ -124,8 +124,8 @@ public: ...@@ -124,8 +124,8 @@ public:
assemblyMap_[globalI].reserve(neighborStencil.size()); assemblyMap_[globalI].reserve(neighborStencil.size());
for (auto globalJ : neighborStencil) for (auto globalJ : neighborStencil)
{ {
const auto& fvGeometry = this->model_().fvGeometries(globalJ);
const auto& elementJ = this->model_().fvGeometries().element(globalJ); const auto& elementJ = this->model_().fvGeometries().element(globalJ);
const auto& fvGeometry = this->model_().fvGeometries(elementJ);
// 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;
...@@ -166,7 +166,7 @@ public: ...@@ -166,7 +166,7 @@ public:
// finite volume geometry // finite volume geometry
globalI_ = this->problem_().elementMapper().index(element); globalI_ = this->problem_().elementMapper().index(element);
const auto& fvGeometry = fvElemGeom_(); const auto& fvGeometry = this->model_().fvGeometries(element);
bcTypes_.update(this->problem_(), element, fvGeometry); bcTypes_.update(this->problem_(), element, fvGeometry);
// calculate the local residual // calculate the local residual
...@@ -339,12 +339,6 @@ public: ...@@ -339,12 +339,6 @@ public:
} }
} }
const FVElementGeometry& fvElemGeom_() const
{
return this->model_().fvGeometries(globalI_);
}
IndexType globalI_; IndexType globalI_;
ElementBoundaryTypes bcTypes_; ElementBoundaryTypes bcTypes_;
......
...@@ -64,9 +64,9 @@ public: ...@@ -64,9 +64,9 @@ public:
* \note The finite volume geometry offers iterators over the sub control volumes * \note The finite volume geometry offers iterators over the sub control volumes
* and the sub control volume faces of an element. * and the sub control volume faces of an element.
*/ */
const FVElementGeometry& fvGeometry(IndexType eIdx) const const FVElementGeometry& fvGeometry(const Element& element) const
{ {
return fvGeometries_[eIdx]; return fvGeometries_[problem_().elementMapper().index(element)];
} }
//! Get a sub control volume with a global scv index //! Get a sub control volume with a global scv index
...@@ -197,11 +197,6 @@ public: ...@@ -197,11 +197,6 @@ public:
* \note The finite volume geometry offers iterators over the sub control volumes * \note The finite volume geometry offers iterators over the sub control volumes
* and the sub control volume faces of an element. * and the sub control volume faces of an element.
*/ */
const FVElementGeometry& fvGeometry(IndexType eIdx) const
{
return fvGeometries_[getStencilScvIdx_(eIdx)];
}
const FVElementGeometry& fvGeometry(const Element& element) const const FVElementGeometry& fvGeometry(const Element& element) const
{ {
return fvGeometries_[getStencilScvIdx_(problem_().elementMapper().index(element))]; return fvGeometries_[getStencilScvIdx_(problem_().elementMapper().index(element))];
......
...@@ -793,10 +793,7 @@ public: ...@@ -793,10 +793,7 @@ public:
{ return *fvGeometryVector_; } { return *fvGeometryVector_; }
const FVElementGeometry& fvGeometries(const Element& element) const const FVElementGeometry& fvGeometries(const Element& element) const
{ return fvGeometryVector_->fvGeometry(elementMapper().index(element)); } { return fvGeometryVector_->fvGeometry(element); }
const FVElementGeometry& fvGeometries(unsigned int eIdx) const
{ return fvGeometryVector_->fvGeometry(eIdx); }
protected: protected:
......
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