Add wellsToState() overload for dense well state class.

This commit is contained in:
Atgeirr Flø Rasmussen
2017-02-23 10:35:11 +01:00
parent 512ab189ee
commit 2577eee159
2 changed files with 21 additions and 0 deletions

View File

@@ -28,6 +28,7 @@
#include <opm/core/props/BlackoilPhases.hpp>
#include <opm/core/simulator/BlackoilState.hpp>
#include <opm/autodiff/WellStateFullyImplicitBlackoil.hpp>
#include <opm/autodiff/WellStateFullyImplicitBlackoilDense.hpp>
#include <opm/autodiff/BlackoilSolventState.hpp>
#include <opm/output/data/Cells.hpp>
#include <opm/output/data/Solution.hpp>
@@ -238,4 +239,19 @@ void wellsToState( const data::Wells& wells,
void wellsToState( const data::Wells& wells,
PhaseUsage phases,
WellStateFullyImplicitBlackoilDense& state )
{
// Set base class variables.
wellsToState(wells, phases, static_cast<WellStateFullyImplicitBlackoil&>(state));
// Set wellSolution() variable.
state.setWellSolutions(phases);
}
} // namespace Opm

View File

@@ -31,6 +31,7 @@ namespace Opm {
// Forward declarations
class SimulationDataContainer;
class WellStateFullyImplicitBlackoil;
class WellStateFullyImplicitBlackoilDense;
std::vector< double > destripe( const std::vector< double >& v,
size_t stride,
@@ -52,6 +53,10 @@ namespace Opm {
PhaseUsage phases,
WellStateFullyImplicitBlackoil& state );
void wellsToState( const data::Wells& wells,
PhaseUsage phases,
WellStateFullyImplicitBlackoilDense& state );
}
#endif //OPM_SIMULATORS_COMPAT_HPP