mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-02-25 18:55:30 -06:00
Call writeInit with global grid and properties.
Previously, the call was made after the grid was distributed. This means that each process wrote it, but only with his cells active which was just a part of the whole domain. With this commit we make the writeInit call before distributing the grid and make sure that only one process calls it.
This commit is contained in:
parent
01ec7befb4
commit
d6aea1663d
@ -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();
|
||||||
@ -650,7 +651,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.
|
||||||
@ -748,7 +762,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 {
|
||||||
|
@ -216,9 +216,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,
|
||||||
|
Loading…
Reference in New Issue
Block a user