mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-02-25 18:55:30 -06:00
Added free function initSaturation().
The state argument is of type SimulatorState& - and no longer a template parameter.
This commit is contained in:
parent
4e81f95c87
commit
e5b20cb614
@ -37,6 +37,7 @@
|
||||
|
||||
#include <opm/core/transport/reorder/TransportSolverTwophaseReorder.hpp>
|
||||
|
||||
#include <opm/core/simulator/initState.hpp>
|
||||
#include <opm/core/simulator/TwophaseState.hpp>
|
||||
#include <opm/core/simulator/WellState.hpp>
|
||||
|
||||
@ -267,18 +268,7 @@ try
|
||||
/// \internal [two-phase state]
|
||||
TwophaseState state;
|
||||
state.init(grid.number_of_cells , grid.number_of_faces, 2);
|
||||
{
|
||||
std::vector<double> min_sat(allcells.size());
|
||||
std::vector<double> max_sat(allcells.size());
|
||||
std::vector<double> second_sat(allcells.size());
|
||||
|
||||
props.satRange(allcells.size() ,allcells.data() , min_sat.data() , max_sat.data());
|
||||
|
||||
std::transform( min_sat.begin() , min_sat.end() , second_sat.begin() , [](double s) { return 1 - s; });
|
||||
state.setCellDataComponent( "SATURATION" , 0 , allcells , min_sat );
|
||||
state.setCellDataComponent( "SATURATION" , 1 , allcells , second_sat );
|
||||
|
||||
}
|
||||
initSaturation( allcells , props , state , MinSat );
|
||||
|
||||
/// \internal [two-phase state]
|
||||
/// \endinternal
|
||||
|
@ -37,6 +37,7 @@
|
||||
|
||||
#include <opm/core/transport/reorder/TransportSolverTwophaseReorder.hpp>
|
||||
|
||||
#include <opm/core/simulator/initState.hpp>
|
||||
#include <opm/core/simulator/TwophaseState.hpp>
|
||||
#include <opm/core/simulator/WellState.hpp>
|
||||
|
||||
@ -214,18 +215,7 @@ try
|
||||
/// \internal[two-phase state]
|
||||
TwophaseState state;
|
||||
state.init(grid.number_of_cells , grid.number_of_faces, 2);
|
||||
{
|
||||
std::vector<double> min_sat(allcells.size());
|
||||
std::vector<double> max_sat(allcells.size());
|
||||
std::vector<double> second_sat(allcells.size());
|
||||
|
||||
props.satRange(allcells.size() ,allcells.data() , min_sat.data() , max_sat.data());
|
||||
|
||||
std::transform( min_sat.begin() , min_sat.end() , second_sat.begin() , [](double s) { return 1 - s; });
|
||||
state.setCellDataComponent( "SATURATION" , 0 , allcells , min_sat );
|
||||
state.setCellDataComponent( "SATURATION" , 1 , allcells , second_sat );
|
||||
|
||||
}
|
||||
initSaturation( allcells , props , state , MinSat );
|
||||
|
||||
|
||||
/// \internal[two-phase state]
|
||||
|
Loading…
Reference in New Issue
Block a user