Output solvent saturation

-- Compat.hpp is moved to opm-simulators
-- add SSOL if solvent is present
This commit is contained in:
Tor Harald Sandve
2016-09-23 13:25:02 +02:00
parent 7f91eade7e
commit 45eae4bbc8
5 changed files with 18 additions and 6 deletions

View File

@@ -150,6 +150,7 @@ list (APPEND PUBLIC_HEADER_FILES
opm/autodiff/BlackoilPropsAdFromDeck.hpp
opm/autodiff/SolventPropsAdFromDeck.hpp
opm/autodiff/BlackoilPropsAdInterface.hpp
opm/autodiff/Compat.hpp
opm/autodiff/CPRPreconditioner.hpp
opm/autodiff/createGlobalCellArray.hpp
opm/autodiff/BlackoilSequentialModel.hpp

View File

@@ -1,5 +1,6 @@
/*
Copyright 2016 Statoil ASA
2016 IRIS
This file is part of the Open Porous Media project (OPM).
@@ -17,13 +18,14 @@
along with OPM. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef OPM_CORE_COMPAT_HPP
#define OPM_CORE_COMPAT_HPP
#ifndef OPM_SIMULATORS_COMPAT_HPP
#define OPM_SIMULATORS_COMPAT_HPP
#include <opm/common/data/SimulationDataContainer.hpp>
#include <opm/core/props/BlackoilPhases.hpp>
#include <opm/core/simulator/BlackoilState.hpp>
#include <opm/core/simulator/WellState.hpp>
#include <opm/autodiff/BlackoilSolventState.hpp>
#include <opm/output/Cells.hpp>
#include <opm/output/Wells.hpp>
@@ -97,6 +99,10 @@ inline data::Solution simToSolution( const SimulationDataContainer& reservoir,
sol.insert( ds::RV, reservoir.getCellData( BlackoilState::RV ) );
}
if (reservoir.hasCellData( BlackoilSolventState::SSOL)) {
sol.insert( ds::SSOL, reservoir.getCellData( BlackoilSolventState::SSOL ) );
}
sol.sdc = &reservoir;
return sol;
@@ -144,6 +150,11 @@ inline void solutionToSim( const data::Solution& sol,
if( sol.has( ds::RV ) ) {
state.getCellData( "RV" ) = sol[ ds::RV ];
}
if (sol.has( ds::SSOL ) ) {
state.getCellData("SSOL") = sol [ ds::SSOL];
}
}
@@ -170,4 +181,4 @@ inline void wellsToState( const data::Wells& wells, WellState& state ) {
}
#endif //OPM_CORE_COMPAT_HPP
#endif //OPM_SIMULATORS_COMPAT_HPP

View File

@@ -27,7 +27,7 @@
#include <opm/output/Cells.hpp>
#include <opm/core/simulator/BlackoilState.hpp>
#include <opm/core/utility/DataMap.hpp>
#include <opm/core/utility/Compat.hpp>
#include <opm/autodiff/Compat.hpp>
#include <opm/output/vtk/writeVtkData.hpp>
#include <opm/common/ErrorMacros.hpp>
#include <opm/core/utility/miscUtilities.hpp>

View File

@@ -22,7 +22,7 @@
#include <opm/core/grid.h>
#include <opm/core/simulator/SimulatorTimerInterface.hpp>
#include <opm/core/simulator/WellState.hpp>
#include <opm/core/utility/Compat.hpp>
#include <opm/autodiff/Compat.hpp>
#include <opm/core/utility/DataMap.hpp>
#include <opm/common/ErrorMacros.hpp>
#include <opm/common/OpmLog/OpmLog.hpp>

View File

@@ -36,7 +36,7 @@
#include <opm/core/simulator/SimulatorReport.hpp>
#include <opm/core/simulator/SimulatorTimer.hpp>
#include <opm/core/utility/StopWatch.hpp>
#include <opm/core/utility/Compat.hpp>
#include <opm/autodiff/Compat.hpp>
#include <opm/core/utility/DataMap.hpp>
#include <opm/output/vtk/writeVtkData.hpp>
#include <opm/core/utility/miscUtilities.hpp>