Merge pull request #106 from andlaus/sim_fibo_ad_remove_outputwriter_from_simulator

don't pass the eclipsewriter to the simulator anymore
This commit is contained in:
Atgeirr Flø Rasmussen 2014-03-25 19:01:28 +01:00
commit a2e3ee0a81
3 changed files with 8 additions and 28 deletions

View File

@ -242,16 +242,11 @@ try
rock_comp->isActive() ? rock_comp.get() : 0, rock_comp->isActive() ? rock_comp.get() : 0,
wells, wells,
linsolver, linsolver,
grav, grav);
outputWriter);
SimulatorReport episodeReport = simulator.run(simtimer, state, well_state); SimulatorReport episodeReport = simulator.run(simtimer, state, well_state);
outputWriter.writeTimeStep(simtimer, state, well_state.basicWellState()); outputWriter.writeTimeStep(simtimer, state, well_state.basicWellState());
fullReport += episodeReport; fullReport += episodeReport;
if (output) {
episodeReport.reportParam(outStream);
}
} }
std::cout << "\n\n================ End of simulation ===============\n\n"; std::cout << "\n\n================ End of simulation ===============\n\n";
@ -318,8 +313,7 @@ try
rock_comp->isActive() ? rock_comp.get() : 0, rock_comp->isActive() ? rock_comp.get() : 0,
wells, wells,
linsolver, linsolver,
grav, grav);
outputWriter);
outputWriter.writeTimeStep(simtimer, state, well_state.basicWellState()); outputWriter.writeTimeStep(simtimer, state, well_state.basicWellState());
if (epoch == 0) { if (epoch == 0) {

View File

@ -38,7 +38,6 @@
#include <opm/core/simulator/SimulatorReport.hpp> #include <opm/core/simulator/SimulatorReport.hpp>
#include <opm/core/simulator/SimulatorTimer.hpp> #include <opm/core/simulator/SimulatorTimer.hpp>
#include <opm/core/utility/StopWatch.hpp> #include <opm/core/utility/StopWatch.hpp>
#include <opm/core/io/eclipse/EclipseWriter.hpp>
#include <opm/core/io/vtk/writeVtkData.hpp> #include <opm/core/io/vtk/writeVtkData.hpp>
#include <opm/core/utility/miscUtilities.hpp> #include <opm/core/utility/miscUtilities.hpp>
#include <opm/core/utility/miscUtilitiesBlackoil.hpp> #include <opm/core/utility/miscUtilitiesBlackoil.hpp>
@ -72,8 +71,7 @@ namespace Opm
const RockCompressibility* rock_comp_props, const RockCompressibility* rock_comp_props,
WellsManager& wells_manager, WellsManager& wells_manager,
LinearSolverInterface& linsolver, LinearSolverInterface& linsolver,
const double* gravity, const double* gravity);
EclipseWriter &writer);
SimulatorReport run(SimulatorTimer& timer, SimulatorReport run(SimulatorTimer& timer,
BlackoilState& state, BlackoilState& state,
@ -102,7 +100,6 @@ namespace Opm
FullyImplicitBlackoilSolver solver_; FullyImplicitBlackoilSolver solver_;
// Misc. data // Misc. data
std::vector<int> allcells_; std::vector<int> allcells_;
EclipseWriter &eclipseWriter_;
}; };
@ -114,11 +111,10 @@ namespace Opm
const RockCompressibility* rock_comp_props, const RockCompressibility* rock_comp_props,
WellsManager& wells_manager, WellsManager& wells_manager,
LinearSolverInterface& linsolver, LinearSolverInterface& linsolver,
const double* gravity, const double* gravity)
EclipseWriter &eclipseWriter)
{ {
pimpl_.reset(new Impl(param, grid, props, rock_comp_props, wells_manager, linsolver, gravity, eclipseWriter)); pimpl_.reset(new Impl(param, grid, props, rock_comp_props, wells_manager, linsolver, gravity));
} }
@ -262,8 +258,7 @@ namespace Opm
const RockCompressibility* rock_comp_props, const RockCompressibility* rock_comp_props,
WellsManager& wells_manager, WellsManager& wells_manager,
LinearSolverInterface& linsolver, LinearSolverInterface& linsolver,
const double* gravity, const double* gravity)
EclipseWriter &eclipseWriter)
: grid_(grid), : grid_(grid),
props_(props), props_(props),
rock_comp_props_(rock_comp_props), rock_comp_props_(rock_comp_props),
@ -271,9 +266,7 @@ namespace Opm
wells_(wells_manager.c_wells()), wells_(wells_manager.c_wells()),
gravity_(gravity), gravity_(gravity),
geo_(grid_, props_, gravity_), geo_(grid_, props_, gravity_),
solver_(grid_, props_, geo_, rock_comp_props, *wells_manager.c_wells(), linsolver), solver_(grid_, props_, geo_, rock_comp_props, *wells_manager.c_wells(), linsolver)
eclipseWriter_(eclipseWriter)
/* param.getDefault("nl_pressure_residual_tolerance", 0.0), /* param.getDefault("nl_pressure_residual_tolerance", 0.0),
param.getDefault("nl_pressure_change_tolerance", 1.0), param.getDefault("nl_pressure_change_tolerance", 1.0),
param.getDefault("nl_pressure_maxiter", 10), param.getDefault("nl_pressure_maxiter", 10),
@ -419,11 +412,6 @@ namespace Opm
// advance to next timestep before reporting at this location // advance to next timestep before reporting at this location
++timer; ++timer;
// write an output file for later inspection
if (output_) {
eclipseWriter_.writeTimeStep(timer, state, well_state.basicWellState());
}
} }
total_timer.stop(); total_timer.stop();

View File

@ -31,7 +31,6 @@ namespace Opm
{ {
namespace parameter { class ParameterGroup; } namespace parameter { class ParameterGroup; }
class BlackoilPropsAdInterface; class BlackoilPropsAdInterface;
class EclipseWriter;
class RockCompressibility; class RockCompressibility;
class WellsManager; class WellsManager;
class LinearSolverInterface; class LinearSolverInterface;
@ -72,8 +71,7 @@ namespace Opm
const RockCompressibility* rock_comp_props, const RockCompressibility* rock_comp_props,
WellsManager& wells_manager, WellsManager& wells_manager,
LinearSolverInterface& linsolver, LinearSolverInterface& linsolver,
const double* gravity, const double* gravity);
EclipseWriter &writer);
/// Run the simulation. /// Run the simulation.
/// This will run succesive timesteps until timer.done() is true. It will /// This will run succesive timesteps until timer.done() is true. It will