mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-02-25 18:55:30 -06:00
changed: use updateProperty_ in updateMaxPolymerAdsorption_
This commit is contained in:
parent
0841b2baf4
commit
2d33932160
@ -2755,25 +2755,13 @@ private:
|
|||||||
void updateMaxPolymerAdsorption_()
|
void updateMaxPolymerAdsorption_()
|
||||||
{
|
{
|
||||||
// we need to update the max polymer adsoption data for all elements
|
// we need to update the max polymer adsoption data for all elements
|
||||||
const auto& simulator = this->simulator();
|
this->updateProperty_("EclProblem::updateMaxPolymerAdsorption_() failed:",
|
||||||
ElementContext elemCtx(simulator);
|
[this](unsigned compressedDofIdx, const IntensiveQuantities& iq)
|
||||||
const auto& vanguard = simulator.vanguard();
|
{
|
||||||
auto elemIt = vanguard.gridView().template begin</*codim=*/0>();
|
const Scalar pa = scalarValue(iq.polymerAdsorption());
|
||||||
const auto& elemEndIt = vanguard.gridView().template end</*codim=*/0>();
|
auto& mpa = this->maxPolymerAdsorption_;
|
||||||
OPM_BEGIN_PARALLEL_TRY_CATCH();
|
mpa[compressedDofIdx] = std::max(mpa[compressedDofIdx], pa);
|
||||||
for (; elemIt != elemEndIt; ++elemIt) {
|
});
|
||||||
const Element& elem = *elemIt;
|
|
||||||
|
|
||||||
elemCtx.updatePrimaryStencil(elem);
|
|
||||||
elemCtx.updatePrimaryIntensiveQuantities(/*timeIdx=*/0);
|
|
||||||
|
|
||||||
unsigned compressedDofIdx = elemCtx.globalSpaceIndex(/*spaceIdx=*/0, /*timeIdx=*/0);
|
|
||||||
const auto& intQuants = elemCtx.intensiveQuantities(/*spaceIdx=*/0, /*timeIdx=*/0);
|
|
||||||
|
|
||||||
this->maxPolymerAdsorption_[compressedDofIdx] = std::max(this->maxPolymerAdsorption_[compressedDofIdx],
|
|
||||||
scalarValue(intQuants.polymerAdsorption()));
|
|
||||||
}
|
|
||||||
OPM_END_PARALLEL_TRY_CATCH("EclProblem::updateMaxPolymerAdsorption_(): ", vanguard.grid().comm());
|
|
||||||
}
|
}
|
||||||
|
|
||||||
struct PffDofData_
|
struct PffDofData_
|
||||||
|
Loading…
Reference in New Issue
Block a user