Merge pull request #3031 from totto82/relperm_diag

Removing explicit usage of the Grid in the relperm diagnostics
This commit is contained in:
Bård Skaflestad
2021-01-27 09:18:16 +01:00
committed by GitHub
7 changed files with 71 additions and 65 deletions

View File

@@ -407,7 +407,6 @@ namespace Opm
setupParallelism();
setupEbosSimulator();
runDiagnostics();
createSimulator();
// if run, do the actual work, else just initialize
@@ -545,35 +544,6 @@ namespace Opm
const Schedule& schedule() const
{ return ebosSimulator_->vanguard().schedule(); }
// Run diagnostics.
// Writes to:
// OpmLog singleton.
void runDiagnostics()
{
if (!this->output_cout_) {
return;
}
// Run relperm diagnostics if we have more than one phase.
if (FluidSystem::numActivePhases() > 1) {
RelpermDiagnostics diagnostic;
if (mpi_size_ > 1) {
#if HAVE_MPI
this->grid().switchToGlobalView();
static_cast<ParallelEclipseState&>(this->eclState()).switchToGlobalProps();
#endif
}
diagnostic.diagnosis(eclState(), this->grid());
if (mpi_size_ > 1) {
#if HAVE_MPI
this->grid().switchToDistributedView();
static_cast<ParallelEclipseState&>(this->eclState()).switchToDistributedProps();
#endif
}
}
}
// Run the simulator.
int runSimulator()
{