mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-02-25 18:55:30 -06:00
Merge pull request #2426 from blattms/shrink-eclequilinitializer
Shrink EclEquilInitializer::initialFluidStates_.
This commit is contained in:
commit
ae0ace4b5a
@ -109,7 +109,6 @@ public:
|
|||||||
const auto& eclState = vanguard.eclState();
|
const auto& eclState = vanguard.eclState();
|
||||||
|
|
||||||
unsigned numElems = vanguard.grid().size(0);
|
unsigned numElems = vanguard.grid().size(0);
|
||||||
unsigned numCartesianElems = vanguard.cartesianSize();
|
|
||||||
|
|
||||||
EQUIL::DeckDependent::InitialStateComputer<TypeTag> initialState(materialLawManager,
|
EQUIL::DeckDependent::InitialStateComputer<TypeTag> initialState(materialLawManager,
|
||||||
eclState,
|
eclState,
|
||||||
@ -117,10 +116,9 @@ public:
|
|||||||
simulator.problem().gravity()[dimWorld - 1]);
|
simulator.problem().gravity()[dimWorld - 1]);
|
||||||
|
|
||||||
// copy the result into the array of initial fluid states
|
// copy the result into the array of initial fluid states
|
||||||
initialFluidStates_.resize(numCartesianElems);
|
initialFluidStates_.resize(numElems);
|
||||||
for (unsigned int elemIdx = 0; elemIdx < numElems; ++elemIdx) {
|
for (unsigned int elemIdx = 0; elemIdx < numElems; ++elemIdx) {
|
||||||
unsigned cartesianElemIdx = vanguard.cartesianIndex(elemIdx);
|
auto& fluidState = initialFluidStates_[elemIdx];
|
||||||
auto& fluidState = initialFluidStates_[cartesianElemIdx];
|
|
||||||
|
|
||||||
// get the PVT region index of the current element
|
// get the PVT region index of the current element
|
||||||
unsigned regionIdx = simulator_.problem().pvtRegionIndex(elemIdx);
|
unsigned regionIdx = simulator_.problem().pvtRegionIndex(elemIdx);
|
||||||
@ -173,10 +171,7 @@ public:
|
|||||||
*/
|
*/
|
||||||
const ScalarFluidState& initialFluidState(unsigned elemIdx) const
|
const ScalarFluidState& initialFluidState(unsigned elemIdx) const
|
||||||
{
|
{
|
||||||
const auto& vanguard = simulator_.vanguard();
|
return initialFluidStates_[elemIdx];
|
||||||
|
|
||||||
unsigned cartesianElemIdx = vanguard.cartesianIndex(elemIdx);
|
|
||||||
return initialFluidStates_[cartesianElemIdx];
|
|
||||||
}
|
}
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
|
Loading…
Reference in New Issue
Block a user