fixing the initialization of aquifer pressure for CT aquifer

This commit is contained in:
Kai Bao 2020-09-24 15:37:31 +02:00
parent 237b281f09
commit 91ec74dffc

View File

@ -266,7 +266,8 @@ protected:
}
// We take the average of the calculated equilibrium pressures.
Scalar aquifer_pres_avg = std::accumulate(pw_aquifer.begin(), pw_aquifer.end(), 0.) / pw_aquifer.size();
const Scalar sum_alpha = std::accumulate(this->alphai_.begin(), this->alphai_.end(), 0.);
const Scalar aquifer_pres_avg = std::accumulate(pw_aquifer.begin(), pw_aquifer.end(), 0.) / sum_alpha;
return aquifer_pres_avg;
}
}; // class AquiferCarterTracy