fixed: pass the fipnum data into the adaptive timer stepper

summary substep reports requires FIP data
This commit is contained in:
Arne Morten Kvarving 2017-02-06 16:51:22 +01:00
parent b5b42faba4
commit a14f5392ee
7 changed files with 26 additions and 2 deletions

View File

@ -1005,6 +1005,14 @@ namespace Opm {
return fluid_.numPhases(); return fluid_.numPhases();
} }
/// Wrapper required due to not following generic API
template<class T>
std::vector<std::vector<double> >
computeFluidInPlace(const T&, const std::vector<int>& fipnum) const
{
return computeFluidInPlace(fipnum);
}
std::vector<std::vector<double> > std::vector<std::vector<double> >
computeFluidInPlace(const std::vector<int>& fipnum) const computeFluidInPlace(const std::vector<int>& fipnum) const
{ {

View File

@ -232,7 +232,8 @@ namespace Opm
// \Note: The report steps are met in any case // \Note: The report steps are met in any case
// \Note: The sub stepping will require a copy of the state variables // \Note: The sub stepping will require a copy of the state variables
if( adaptiveTimeStepping ) { if( adaptiveTimeStepping ) {
report += adaptiveTimeStepping->step( timer, *solver, state, well_state, output_writer_ ); report += adaptiveTimeStepping->step( timer, *solver, state, well_state, output_writer_,
output_writer_.requireFIPNUM() ? &fipnum : nullptr );
} }
else { else {
// solve for complete report step // solve for complete report step

View File

@ -282,7 +282,8 @@ public:
// \Note: The report steps are met in any case // \Note: The report steps are met in any case
// \Note: The sub stepping will require a copy of the state variables // \Note: The sub stepping will require a copy of the state variables
if( adaptiveTimeStepping ) { if( adaptiveTimeStepping ) {
report += adaptiveTimeStepping->step( timer, *solver, state, well_state, output_writer_ ); report += adaptiveTimeStepping->step( timer, *solver, state, well_state, output_writer_,
output_writer_.requireFIPNUM() ? &fipnum : nullptr );
} }
else { else {
// solve for complete report step // solve for complete report step

View File

@ -459,4 +459,9 @@ namespace Opm
const auto& initconfig = eclipseState_.getInitConfig(); const auto& initconfig = eclipseState_.getInitConfig();
return initconfig.restartRequested(); return initconfig.restartRequested();
} }
bool BlackoilOutputWriter::requireFIPNUM() const {
return eclipseState_.getSummaryConfig().requireFIPNUM();
}
} }

View File

@ -288,6 +288,8 @@ namespace Opm
bool isRestart() const; bool isRestart() const;
bool requireFIPNUM() const;
protected: protected:
const bool output_; const bool output_;
std::unique_ptr< ParallelDebugOutputInterface > parallelOutput_; std::unique_ptr< ParallelDebugOutputInterface > parallelOutput_;

View File

@ -299,4 +299,9 @@ namespace Opm
const auto& initconfig = eclipseState_.getInitConfig(); const auto& initconfig = eclipseState_.getInitConfig();
return initconfig.restartRequested(); return initconfig.restartRequested();
} }
bool BlackoilOutputWriterEbos::requireFIPNUM() const {
return eclipseState_.getSummaryConfig().requireFIPNUM();
}
} }

View File

@ -147,6 +147,8 @@ namespace Opm
bool isRestart() const; bool isRestart() const;
bool requireFIPNUM() const;
protected: protected:
const bool output_; const bool output_;
std::unique_ptr< ParallelDebugOutputInterface > parallelOutput_; std::unique_ptr< ParallelDebugOutputInterface > parallelOutput_;