Merge pull request #770 from blattms/call-writeInit-before-distributing-grid

Call writeInit with global grid and properties.
This commit is contained in:
Atgeirr Flø Rasmussen 2016-09-07 11:29:19 +02:00 committed by GitHub
commit 98ec930a25
5 changed files with 15 additions and 21 deletions

View File

@ -145,6 +145,7 @@ namespace Opm
asImpl().extractMessages();
asImpl().runDiagnostics();
asImpl().setupState();
asImpl().writeInit();
asImpl().distributeData();
asImpl().setupOutputWriter();
asImpl().setupLinearSolver();
@ -649,7 +650,20 @@ namespace Opm
}
void writeInit()
{
bool output = param_.getDefault("output", true);
bool output_ecl = param_.getDefault("output_ecl", true);
const Grid& grid = grid_init_->grid();
if( output && output_ecl && output_cout_)
{
EclipseWriter writer(eclipse_state_,
Opm::UgGridHelpers::numCells(grid),
Opm::UgGridHelpers::globalCell(grid));
writer.writeInitAndEgrid(geoprops_->simProps(grid),
geoprops_->nonCartesianConnections());
}
}
// Setup output writer.
@ -746,7 +760,6 @@ namespace Opm
fullReport.reportParam(tot_os);
}
} else {
output_writer_->writeInit(geoprops_->simProps(grid_init_->grid()) , geoprops_->nonCartesianConnections( ));
if (output_cout_) {
std::cout << "\n\n================ Simulation turned off ===============\n" << std::flush;
}

View File

@ -111,10 +111,6 @@ namespace Opm
adaptiveTimeStepping.reset( new AdaptiveTimeStepping( param_, terminal_output_ ) );
}
output_writer_.writeInit( geo_.simProps(grid_) , geo_.nonCartesianConnections( ) );
std::string restorefilename = param_.getDefault("restorefile", std::string("") );
if( ! restorefilename.empty() )
{

View File

@ -72,9 +72,6 @@ namespace Opm
adaptiveTimeStepping.reset( new AdaptiveTimeStepping( param_, terminal_output_ ) );
}
// init output writer
output_writer_.writeInit( geo_.simProps(grid_) , geo_.nonCartesianConnections( ) );
std::string restorefilename = param_.getDefault("restorefile", std::string("") );
if( ! restorefilename.empty() )
{

View File

@ -245,15 +245,6 @@ namespace Opm
}
#endif
void
BlackoilOutputWriter::
writeInit(const std::vector<data::CellData>& simProps, const NNC& nnc)
{
if( eclWriter_ ) {
eclWriter_->writeInitAndEgrid(simProps, nnc);
}
}
namespace detail {

View File

@ -215,9 +215,6 @@ namespace Opm
const Opm::PhaseUsage &phaseUsage,
const double* permeability );
/** \copydoc Opm::OutputWriter::writeInit */
void writeInit(const std::vector<data::CellData>& simProps, const NNC& nnc);
/** \copydoc Opm::OutputWriter::writeTimeStep */
void writeTimeStep(const SimulatorTimerInterface& timer,
const SimulationDataContainer& reservoirState,