Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion opm/models/discretization/common/fvbaseelementcontext.hh
Original file line number Diff line number Diff line change
Expand Up @@ -347,7 +347,7 @@ public:
* \param timeIdx The index of the solution vector used by the
* time discretization.
*/
const GlobalPosition& pos(unsigned dofIdx, unsigned) const
decltype(auto) pos(unsigned dofIdx, unsigned) const
{ return stencil_.subControlVolume(dofIdx).globalPos(); }

/*!
Expand Down
18 changes: 6 additions & 12 deletions opm/models/discretization/ecfv/ecfvstencil.hh
Original file line number Diff line number Diff line change
Expand Up @@ -101,29 +101,25 @@ public:
{ element_ = element; }

void update()
{
const auto& geometry = element_.geometry();
centerPos_ = geometry.center();
volume_ = geometry.volume();
}
{ }

/*!
* \brief The global position associated with the sub-control volume
*/
const GlobalPosition& globalPos() const
{ return centerPos_; }
decltype(auto) globalPos() const
{ return element_.geometry().center(); }

/*!
* \brief The center of the sub-control volume
*/
const GlobalPosition& center() const
{ return centerPos_; }
decltype(auto) center() const
{ return element_.geometry().center(); }

/*!
* \brief The volume [m^3] occupied by the sub-control volume
*/
Scalar volume() const
{ return volume_; }
{ return element_.geometry().volume(); }

/*!
* \brief The geometry of the sub-control volume.
Expand All @@ -138,8 +134,6 @@ public:
{ return element_.geometryInFather(); }

private:
GlobalPosition centerPos_;
Scalar volume_;
Element element_;
};

Expand Down
4 changes: 1 addition & 3 deletions opm/models/parallel/threadedentityiterator.hh
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,7 @@ class ThreadedEntityIterator
using EntityIterator = typename GridView::template Codim<codim>::Iterator;
public:
ThreadedEntityIterator(const GridView& gridView)
: gridView_(gridView)
, sequentialIt_(gridView_.template begin<codim>())
: sequentialIt_(gridView.template begin<codim>())
, sequentialEnd_(gridView.template end<codim>())
{ }

Expand Down Expand Up @@ -90,7 +89,6 @@ public:
}

private:
GridView gridView_;
EntityIterator sequentialIt_;
EntityIterator sequentialEnd_;

Expand Down