mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-02-25 18:55:30 -06:00
Merge pull request #770 from blattms/call-writeInit-before-distributing-grid
Call writeInit with global grid and properties.
This commit is contained in:
@@ -145,6 +145,7 @@ namespace Opm
|
|||||||
asImpl().extractMessages();
|
asImpl().extractMessages();
|
||||||
asImpl().runDiagnostics();
|
asImpl().runDiagnostics();
|
||||||
asImpl().setupState();
|
asImpl().setupState();
|
||||||
|
asImpl().writeInit();
|
||||||
asImpl().distributeData();
|
asImpl().distributeData();
|
||||||
asImpl().setupOutputWriter();
|
asImpl().setupOutputWriter();
|
||||||
asImpl().setupLinearSolver();
|
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.
|
// Setup output writer.
|
||||||
@@ -746,7 +760,6 @@ namespace Opm
|
|||||||
fullReport.reportParam(tot_os);
|
fullReport.reportParam(tot_os);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
output_writer_->writeInit(geoprops_->simProps(grid_init_->grid()) , geoprops_->nonCartesianConnections( ));
|
|
||||||
if (output_cout_) {
|
if (output_cout_) {
|
||||||
std::cout << "\n\n================ Simulation turned off ===============\n" << std::flush;
|
std::cout << "\n\n================ Simulation turned off ===============\n" << std::flush;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -111,10 +111,6 @@ namespace Opm
|
|||||||
adaptiveTimeStepping.reset( new AdaptiveTimeStepping( param_, terminal_output_ ) );
|
adaptiveTimeStepping.reset( new AdaptiveTimeStepping( param_, terminal_output_ ) );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
output_writer_.writeInit( geo_.simProps(grid_) , geo_.nonCartesianConnections( ) );
|
|
||||||
|
|
||||||
std::string restorefilename = param_.getDefault("restorefile", std::string("") );
|
std::string restorefilename = param_.getDefault("restorefile", std::string("") );
|
||||||
if( ! restorefilename.empty() )
|
if( ! restorefilename.empty() )
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -72,9 +72,6 @@ namespace Opm
|
|||||||
adaptiveTimeStepping.reset( new AdaptiveTimeStepping( param_, terminal_output_ ) );
|
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("") );
|
std::string restorefilename = param_.getDefault("restorefile", std::string("") );
|
||||||
if( ! restorefilename.empty() )
|
if( ! restorefilename.empty() )
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -245,15 +245,6 @@ namespace Opm
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
void
|
|
||||||
BlackoilOutputWriter::
|
|
||||||
writeInit(const std::vector<data::CellData>& simProps, const NNC& nnc)
|
|
||||||
{
|
|
||||||
if( eclWriter_ ) {
|
|
||||||
eclWriter_->writeInitAndEgrid(simProps, nnc);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
namespace detail {
|
namespace detail {
|
||||||
|
|||||||
@@ -215,9 +215,6 @@ namespace Opm
|
|||||||
const Opm::PhaseUsage &phaseUsage,
|
const Opm::PhaseUsage &phaseUsage,
|
||||||
const double* permeability );
|
const double* permeability );
|
||||||
|
|
||||||
/** \copydoc Opm::OutputWriter::writeInit */
|
|
||||||
void writeInit(const std::vector<data::CellData>& simProps, const NNC& nnc);
|
|
||||||
|
|
||||||
/** \copydoc Opm::OutputWriter::writeTimeStep */
|
/** \copydoc Opm::OutputWriter::writeTimeStep */
|
||||||
void writeTimeStep(const SimulatorTimerInterface& timer,
|
void writeTimeStep(const SimulatorTimerInterface& timer,
|
||||||
const SimulationDataContainer& reservoirState,
|
const SimulationDataContainer& reservoirState,
|
||||||
|
|||||||
Reference in New Issue
Block a user