Replace comment with "ifdef DISABLE_OUTPUT"

This commit is contained in:
Kjell W. Kongsvik 2016-03-18 13:17:39 +01:00
parent 8e68a4d815
commit 77a6c4229a
8 changed files with 219 additions and 164 deletions

View File

@ -35,7 +35,9 @@
#include <opm/core/simulator/SimulatorTimer.hpp> #include <opm/core/simulator/SimulatorTimer.hpp>
#include <opm/core/utility/StopWatch.hpp> #include <opm/core/utility/StopWatch.hpp>
// 17.03.2016 Temporarily removed while moving functionality to opm-output // 17.03.2016 Temporarily removed while moving functionality to opm-output
// #include <opm/core/io/vtk/writeVtkData.hpp> #ifdef DISABLE_OUTPUT
#include <opm/core/io/vtk/writeVtkData.hpp>
#endif
#include <opm/core/utility/miscUtilities.hpp> #include <opm/core/utility/miscUtilities.hpp>
#include <opm/core/utility/miscUtilitiesBlackoil.hpp> #include <opm/core/utility/miscUtilitiesBlackoil.hpp>
@ -140,71 +142,75 @@ namespace Opm
// 17.03.2016 Temporarily removed while moving functionality to opm-output // 17.03.2016 Temporarily removed while moving functionality to opm-output
// static void outputStateVtk(const UnstructuredGrid& grid, #ifdef DISABLE_OUTPUT
// const Opm::BlackoilState& state, static void outputStateVtk(const UnstructuredGrid& grid,
// const int step, const Opm::BlackoilState& state,
// const std::string& output_dir) const int step,
// { const std::string& output_dir)
// // Write data in VTK format. {
// std::ostringstream vtkfilename; // Write data in VTK format.
// vtkfilename << output_dir << "/vtk_files"; std::ostringstream vtkfilename;
// boost::filesystem::path fpath(vtkfilename.str()); vtkfilename << output_dir << "/vtk_files";
// try { boost::filesystem::path fpath(vtkfilename.str());
// create_directories(fpath); try {
// } create_directories(fpath);
// catch (...) { }
// OPM_THROW(std::runtime_error, "Creating directories failed: " << fpath); catch (...) {
// } OPM_THROW(std::runtime_error, "Creating directories failed: " << fpath);
// vtkfilename << "/output-" << std::setw(3) << std::setfill('0') << step << ".vtu"; }
// std::ofstream vtkfile(vtkfilename.str().c_str()); vtkfilename << "/output-" << std::setw(3) << std::setfill('0') << step << ".vtu";
// if (!vtkfile) { std::ofstream vtkfile(vtkfilename.str().c_str());
// OPM_THROW(std::runtime_error, "Failed to open " << vtkfilename.str()); if (!vtkfile) {
// } OPM_THROW(std::runtime_error, "Failed to open " << vtkfilename.str());
// Opm::DataMap dm; }
// dm["saturation"] = &state.saturation(); Opm::DataMap dm;
// dm["pressure"] = &state.pressure(); dm["saturation"] = &state.saturation();
// std::vector<double> cell_velocity; dm["pressure"] = &state.pressure();
// Opm::estimateCellVelocity(grid, state.faceflux(), cell_velocity); std::vector<double> cell_velocity;
// dm["velocity"] = &cell_velocity; Opm::estimateCellVelocity(grid, state.faceflux(), cell_velocity);
// Opm::writeVtkData(grid, dm, vtkfile); dm["velocity"] = &cell_velocity;
// } Opm::writeVtkData(grid, dm, vtkfile);
}
#endif
// 17.03.2016 Temporarily removed while moving functionality to opm-output // 17.03.2016 Temporarily removed while moving functionality to opm-output
// static void outputStateMatlab(const UnstructuredGrid& grid, #ifdef DISABLE_OUTPUT
// const Opm::BlackoilState& state, static void outputStateMatlab(const UnstructuredGrid& grid,
// const int step, const Opm::BlackoilState& state,
// const std::string& output_dir) const int step,
// { const std::string& output_dir)
// Opm::DataMap dm; {
// dm["saturation"] = &state.saturation(); Opm::DataMap dm;
// dm["pressure"] = &state.pressure(); dm["saturation"] = &state.saturation();
// dm["surfvolume"] = &state.surfacevol(); dm["pressure"] = &state.pressure();
// std::vector<double> cell_velocity; dm["surfvolume"] = &state.surfacevol();
// Opm::estimateCellVelocity(grid, state.faceflux(), cell_velocity); std::vector<double> cell_velocity;
// dm["velocity"] = &cell_velocity; Opm::estimateCellVelocity(grid, state.faceflux(), cell_velocity);
// dm["velocity"] = &cell_velocity;
// // Write data (not grid) in Matlab format
// for (Opm::DataMap::const_iterator it = dm.begin(); it != dm.end(); ++it) { // Write data (not grid) in Matlab format
// std::ostringstream fname; for (Opm::DataMap::const_iterator it = dm.begin(); it != dm.end(); ++it) {
// fname << output_dir << "/" << it->first; std::ostringstream fname;
// boost::filesystem::path fpath = fname.str(); fname << output_dir << "/" << it->first;
// try { boost::filesystem::path fpath = fname.str();
// create_directories(fpath); try {
// } create_directories(fpath);
// catch (...) { }
// OPM_THROW(std::runtime_error, "Creating directories failed: " << fpath); catch (...) {
// } OPM_THROW(std::runtime_error, "Creating directories failed: " << fpath);
// fname << "/" << std::setw(3) << std::setfill('0') << step << ".txt"; }
// std::ofstream file(fname.str().c_str()); fname << "/" << std::setw(3) << std::setfill('0') << step << ".txt";
// if (!file) { std::ofstream file(fname.str().c_str());
// OPM_THROW(std::runtime_error, "Failed to open " << fname.str()); if (!file) {
// } OPM_THROW(std::runtime_error, "Failed to open " << fname.str());
// file.precision(15); }
// const std::vector<double>& d = *(it->second); file.precision(15);
// std::copy(d.begin(), d.end(), std::ostream_iterator<double>(file, "\n")); const std::vector<double>& d = *(it->second);
// } std::copy(d.begin(), d.end(), std::ostream_iterator<double>(file, "\n"));
// } }
}
#endif
static void outputWaterCut(const Opm::Watercut& watercut, static void outputWaterCut(const Opm::Watercut& watercut,
@ -351,9 +357,13 @@ namespace Opm
timer.report(std::cout); timer.report(std::cout);
if (output_ && (timer.currentStepNum() % output_interval_ == 0)) { if (output_ && (timer.currentStepNum() % output_interval_ == 0)) {
if (output_vtk_) { if (output_vtk_) {
// outputStateVtk(grid_, state, timer.currentStepNum(), output_dir_); #ifdef DISABLE_OUTPUT
outputStateVtk(grid_, state, timer.currentStepNum(), output_dir_);
#endif
} }
// outputStateMatlab(grid_, state, timer.currentStepNum(), output_dir_); #ifdef DISABLE_OUTPUT
outputStateMatlab(grid_, state, timer.currentStepNum(), output_dir_);
#endif
} }
SimulatorReport sreport; SimulatorReport sreport;
@ -518,9 +528,13 @@ namespace Opm
if (output_) { if (output_) {
if (output_vtk_) { if (output_vtk_) {
// outputStateVtk(grid_, state, timer.currentStepNum(), output_dir_); #ifdef DISABLE_OUTPUT
outputStateVtk(grid_, state, timer.currentStepNum(), output_dir_);
#endif
} }
// outputStateMatlab(grid_, state, timer.currentStepNum(), output_dir_); #ifdef DISABLE_OUTPUT
outputStateMatlab(grid_, state, timer.currentStepNum(), output_dir_);
#endif
outputWaterCut(watercut, output_dir_); outputWaterCut(watercut, output_dir_);
if (wells_) { if (wells_) {
outputWellReport(wellreport, output_dir_); outputWellReport(wellreport, output_dir_);

View File

@ -36,7 +36,9 @@
#include <opm/core/simulator/SimulatorTimer.hpp> #include <opm/core/simulator/SimulatorTimer.hpp>
#include <opm/core/utility/StopWatch.hpp> #include <opm/core/utility/StopWatch.hpp>
// 17.03.2016 Temporarily removed while moving functionality to opm-output // 17.03.2016 Temporarily removed while moving functionality to opm-output
// #include <opm/core/io/vtk/writeVtkData.hpp> #ifdef DISABLE_OUTPUT
#include <opm/core/io/vtk/writeVtkData.hpp>
#endif
#include <opm/core/utility/miscUtilities.hpp> #include <opm/core/utility/miscUtilities.hpp>
#include <opm/core/utility/Event.hpp> #include <opm/core/utility/Event.hpp>
@ -182,35 +184,36 @@ namespace Opm
// 17.03.2016 Temporarily removed while moving functionality to opm-output // 17.03.2016 Temporarily removed while moving functionality to opm-output
// static void outputStateVtk(const UnstructuredGrid& grid, #ifdef DISABLE_OUTPUT
// const Opm::TwophaseState& state, static void outputStateVtk(const UnstructuredGrid& grid,
// const int step, const Opm::TwophaseState& state,
// const std::string& output_dir) const int step,
// { const std::string& output_dir)
// // Write data in VTK format. {
// std::ostringstream vtkfilename; // Write data in VTK format.
// vtkfilename << output_dir << "/vtk_files"; std::ostringstream vtkfilename;
// boost::filesystem::path fpath(vtkfilename.str()); vtkfilename << output_dir << "/vtk_files";
// try { boost::filesystem::path fpath(vtkfilename.str());
// create_directories(fpath); try {
// } create_directories(fpath);
// catch (...) { }
// OPM_THROW(std::runtime_error, "Creating directories failed: " << fpath); catch (...) {
// } OPM_THROW(std::runtime_error, "Creating directories failed: " << fpath);
// vtkfilename << "/output-" << std::setw(3) << std::setfill('0') << step << ".vtu"; }
// std::ofstream vtkfile(vtkfilename.str().c_str()); vtkfilename << "/output-" << std::setw(3) << std::setfill('0') << step << ".vtu";
// if (!vtkfile) { std::ofstream vtkfile(vtkfilename.str().c_str());
// OPM_THROW(std::runtime_error, "Failed to open " << vtkfilename.str()); if (!vtkfile) {
// } OPM_THROW(std::runtime_error, "Failed to open " << vtkfilename.str());
// Opm::DataMap dm; }
// dm["saturation"] = &state.saturation(); Opm::DataMap dm;
// dm["pressure"] = &state.pressure(); dm["saturation"] = &state.saturation();
// std::vector<double> cell_velocity; dm["pressure"] = &state.pressure();
// Opm::estimateCellVelocity(grid, state.faceflux(), cell_velocity); std::vector<double> cell_velocity;
// dm["velocity"] = &cell_velocity; Opm::estimateCellVelocity(grid, state.faceflux(), cell_velocity);
// Opm::writeVtkData(grid, dm, vtkfile); dm["velocity"] = &cell_velocity;
// } Opm::writeVtkData(grid, dm, vtkfile);
}
#endif
static void outputVectorMatlab(const std::string& name, static void outputVectorMatlab(const std::string& name,
const std::vector<int>& vec, const std::vector<int>& vec,
const int step, const int step,
@ -234,39 +237,41 @@ namespace Opm
} }
// 17.03.2016 Temporarily removed while moving functionality to opm-output // 17.03.2016 Temporarily removed while moving functionality to opm-output
// static void outputStateMatlab(const UnstructuredGrid& grid, #ifdef DISABLE_OUTPUT
// const Opm::TwophaseState& state, static void outputStateMatlab(const UnstructuredGrid& grid,
// const int step, const Opm::TwophaseState& state,
// const std::string& output_dir) const int step,
// { const std::string& output_dir)
// Opm::DataMap dm; {
// dm["saturation"] = &state.saturation(); Opm::DataMap dm;
// dm["pressure"] = &state.pressure(); dm["saturation"] = &state.saturation();
// std::vector<double> cell_velocity; dm["pressure"] = &state.pressure();
// Opm::estimateCellVelocity(grid, state.faceflux(), cell_velocity); std::vector<double> cell_velocity;
// dm["velocity"] = &cell_velocity; Opm::estimateCellVelocity(grid, state.faceflux(), cell_velocity);
// dm["velocity"] = &cell_velocity;
// // Write data (not grid) in Matlab format
// for (Opm::DataMap::const_iterator it = dm.begin(); it != dm.end(); ++it) { // Write data (not grid) in Matlab format
// std::ostringstream fname; for (Opm::DataMap::const_iterator it = dm.begin(); it != dm.end(); ++it) {
// fname << output_dir << "/" << it->first; std::ostringstream fname;
// boost::filesystem::path fpath = fname.str(); fname << output_dir << "/" << it->first;
// try { boost::filesystem::path fpath = fname.str();
// create_directories(fpath); try {
// } create_directories(fpath);
// catch (...) { }
// OPM_THROW(std::runtime_error, "Creating directories failed: " << fpath); catch (...) {
// } OPM_THROW(std::runtime_error, "Creating directories failed: " << fpath);
// fname << "/" << std::setw(3) << std::setfill('0') << step << ".txt"; }
// std::ofstream file(fname.str().c_str()); fname << "/" << std::setw(3) << std::setfill('0') << step << ".txt";
// if (!file) { std::ofstream file(fname.str().c_str());
// OPM_THROW(std::runtime_error, "Failed to open " << fname.str()); if (!file) {
// } OPM_THROW(std::runtime_error, "Failed to open " << fname.str());
// file.precision(15); }
// const std::vector<double>& d = *(it->second); file.precision(15);
// std::copy(d.begin(), d.end(), std::ostream_iterator<double>(file, "\n")); const std::vector<double>& d = *(it->second);
// } std::copy(d.begin(), d.end(), std::ostream_iterator<double>(file, "\n"));
// } }
}
#endif
static void outputWaterCut(const Opm::Watercut& watercut, static void outputWaterCut(const Opm::Watercut& watercut,
@ -464,9 +469,13 @@ namespace Opm
timer.report(*log_); timer.report(*log_);
if (output_ && (timer.currentStepNum() % output_interval_ == 0)) { if (output_ && (timer.currentStepNum() % output_interval_ == 0)) {
if (output_vtk_) { if (output_vtk_) {
// outputStateVtk(grid_, state, timer.currentStepNum(), output_dir_); #ifdef DISABLE_OUTPUT
outputStateVtk(grid_, state, timer.currentStepNum(), output_dir_);
#endif
} }
// outputStateMatlab(grid_, state, timer.currentStepNum(), output_dir_); #ifdef DISABLE_OUTPUT
outputStateMatlab(grid_, state, timer.currentStepNum(), output_dir_);
#endif
if (use_reorder_) { if (use_reorder_) {
// This use of dynamic_cast is not ideal, but should be safe. // This use of dynamic_cast is not ideal, but should be safe.
outputVectorMatlab(std::string("reorder_it"), outputVectorMatlab(std::string("reorder_it"),
@ -624,9 +633,13 @@ namespace Opm
if (output_) { if (output_) {
if (output_vtk_) { if (output_vtk_) {
// outputStateVtk(grid_, state, timer.currentStepNum(), output_dir_); #ifdef DISABLE_OUTPUT
outputStateVtk(grid_, state, timer.currentStepNum(), output_dir_);
#endif
} }
// outputStateMatlab(grid_, state, timer.currentStepNum(), output_dir_); #ifdef DISABLE_OUTPUT
outputStateMatlab(grid_, state, timer.currentStepNum(), output_dir_);
#endif
if (use_reorder_) { if (use_reorder_) {
// This use of dynamic_cast is not ideal, but should be safe. // This use of dynamic_cast is not ideal, but should be safe.
outputVectorMatlab(std::string("reorder_it"), outputVectorMatlab(std::string("reorder_it"),

View File

@ -22,7 +22,9 @@
// we need complete definitions for these types // we need complete definitions for these types
#include <opm/parser/eclipse/EclipseState/Schedule/TimeMap.hpp> #include <opm/parser/eclipse/EclipseState/Schedule/TimeMap.hpp>
// 17.03.2016 Temporarily removed while moving functionality to opm-output // 17.03.2016 Temporarily removed while moving functionality to opm-output
// #include <opm/core/io/OutputWriter.hpp> #ifdef DISABLE_OUTPUT
#include <opm/core/io/OutputWriter.hpp>
#endif
#include <opm/core/simulator/SimulatorTimer.hpp> #include <opm/core/simulator/SimulatorTimer.hpp>
#include <numeric> // partial_sum #include <numeric> // partial_sum
@ -47,14 +49,17 @@ SimulatorOutputBase::SimulatorOutputBase (
// process parameters into a writer. we don't setup a new chain in // process parameters into a writer. we don't setup a new chain in
// every timestep! // every timestep!
// 17.03.2016 Temporarily removed while moving functionality to opm-output // 17.03.2016 Temporarily removed while moving functionality to opm-output
// , writer_ (std::move (OutputWriter::create (params, eclipseState, phaseUsage, grid))) #ifdef DISABLE_OUTPUT
, writer_ (std::move (OutputWriter::create (params, eclipseState, phaseUsage, grid)))
#endif
// always start from the first timestep // always start from the first timestep
, next_ (0) { , next_ (0) {
// write the static initialization files, even before simulation starts // write the static initialization files, even before simulation starts
// 17.03.2016 Temporarily removed while moving functionality to opm-output // 17.03.2016 Temporarily removed while moving functionality to opm-output
// writer_->writeInit (*timer); #ifdef DISABLE_OUTPUT
writer_->writeInit (*timer);
#endif
} }
// default destructor is OK, just need to be defined // default destructor is OK, just need to be defined
@ -92,7 +97,9 @@ SimulatorOutputBase::writeOutput () {
// relay the request to the handlers (setup in the constructor // relay the request to the handlers (setup in the constructor
// from parameters) // from parameters)
// 17.03.2016 Temporarily removed while moving functionality to opm-output // 17.03.2016 Temporarily removed while moving functionality to opm-output
// writer_->writeTimeStep (*timer_, *reservoirState_, *wellState_ , false); #ifdef DISABLE_OUTPUT
writer_->writeTimeStep (*timer_, *reservoirState_, *wellState_ , false);
#endif
// advance to the next reporting time // advance to the next reporting time
++next_; ++next_;

View File

@ -35,7 +35,9 @@ namespace Opm {
class Deck; class Deck;
class EclipseState; class EclipseState;
// 17.03.2016 Temporarily removed while moving functionality to opm-output // 17.03.2016 Temporarily removed while moving functionality to opm-output
//class OutputWriter; #ifdef DISABLE_OUTPUT
class OutputWriter;
#endif
namespace parameter { class ParameterGroup; } namespace parameter { class ParameterGroup; }
class SimulationDataContainer; class SimulationDataContainer;
class SimulatorTimer; class SimulatorTimer;
@ -85,8 +87,9 @@ protected:
std::shared_ptr <const WellState> wellState_; std::shared_ptr <const WellState> wellState_;
/// Created locally and destructed together with us /// Created locally and destructed together with us
// 17.03.2016 Temporarily removed while moving functionality to opm-output #ifdef DISABLE_OUTPUT
// std::unique_ptr <OutputWriter> writer_; std::unique_ptr <OutputWriter> writer_;
#endif
/// Call the writers that were created based on the parameters /// Call the writers that were created based on the parameters
virtual void writeOutput (); virtual void writeOutput ();

View File

@ -38,7 +38,9 @@
#include <opm/core/grid.h> #include <opm/core/grid.h>
#include <opm/core/grid/GridManager.hpp> #include <opm/core/grid/GridManager.hpp>
// 17.03.2016 Temporarily removed while moving functionality to opm-output // 17.03.2016 Temporarily removed while moving functionality to opm-output
//#include <opm/core/io/vtk/writeVtkData.hpp> #ifdef DISABLE_OUTPUT
#include <opm/core/io/vtk/writeVtkData.hpp>
#endif
#include <iostream> #include <iostream>
#include <fstream> #include <fstream>
#include <vector> #include <vector>
@ -96,7 +98,9 @@ try
/// \snippet tutorial1.cpp data map /// \snippet tutorial1.cpp data map
/// \internal [data map] /// \internal [data map]
// 17.03.2016 Temporarily removed while moving functionality to opm-output // 17.03.2016 Temporarily removed while moving functionality to opm-output
// Opm::DataMap dm; #ifdef DISABLE_OUTPUT
Opm::DataMap dm;
#endif
/// \internal [data map] /// \internal [data map]
/// \endinternal /// \endinternal
/// \page tutorial1 /// \page tutorial1
@ -104,7 +108,9 @@ try
/// \snippet tutorial1.cpp write vtk /// \snippet tutorial1.cpp write vtk
/// \internal [write vtk] /// \internal [write vtk]
// 17.03.2016 Temporarily removed while moving functionality to opm-output // 17.03.2016 Temporarily removed while moving functionality to opm-output
// Opm::writeVtkData(*grid.c_grid(), dm, vtkfile); #ifdef DISABLE_OUTPUT
Opm::writeVtkData(*grid.c_grid(), dm, vtkfile);
#endif
/// \internal [write vtk] /// \internal [write vtk]
/// \endinternal /// \endinternal
} }

View File

@ -35,7 +35,9 @@
#include <opm/core/grid.h> #include <opm/core/grid.h>
#include <opm/core/grid/GridManager.hpp> #include <opm/core/grid/GridManager.hpp>
// 17.03.2016 Temporarily removed while moving functionality to opm-output // 17.03.2016 Temporarily removed while moving functionality to opm-output
//#include <opm/core/io/vtk/writeVtkData.hpp> #ifdef DISABLE_OUTPUT
#include <opm/core/io/vtk/writeVtkData.hpp>
#endif
#include <iostream> #include <iostream>
#include <fstream> #include <fstream>
#include <vector> #include <vector>
@ -188,13 +190,15 @@ try
/// \snippet tutorial2.cpp write output /// \snippet tutorial2.cpp write output
/// \internal [write output] /// \internal [write output]
// 17.03.2016 Temporarily removed while moving functionality to opm-output // 17.03.2016 Temporarily removed while moving functionality to opm-output
// std::ofstream vtkfile("tutorial2.vtu"); #ifdef DISABLE_OUTPUT
// Opm::DataMap dm; std::ofstream vtkfile("tutorial2.vtu");
// dm["pressure"] = &state.pressure(); Opm::DataMap dm;
// std::vector<double> cell_velocity; dm["pressure"] = &state.pressure();
// Opm::estimateCellVelocity(*grid.c_grid(), state.faceflux(), cell_velocity); std::vector<double> cell_velocity;
// dm["velocity"] = &cell_velocity; Opm::estimateCellVelocity(*grid.c_grid(), state.faceflux(), cell_velocity);
// Opm::writeVtkData(*grid.c_grid(), dm, vtkfile); dm["velocity"] = &cell_velocity;
Opm::writeVtkData(*grid.c_grid(), dm, vtkfile);
#endif
/// \internal [write output] /// \internal [write output]
/// \endinternal /// \endinternal
} }

View File

@ -30,7 +30,9 @@
#include <opm/core/grid.h> #include <opm/core/grid.h>
#include <opm/core/grid/GridManager.hpp> #include <opm/core/grid/GridManager.hpp>
// 17.03.2016 Temporarily removed while moving functionality to opm-output // 17.03.2016 Temporarily removed while moving functionality to opm-output
//#include <opm/core/io/vtk/writeVtkData.hpp> #ifdef DISABLE_OUTPUT
#include <opm/core/io/vtk/writeVtkData.hpp>
#endif
#include <opm/core/linalg/LinearSolverUmfpack.hpp> #include <opm/core/linalg/LinearSolverUmfpack.hpp>
#include <opm/core/pressure/IncompTpfa.hpp> #include <opm/core/pressure/IncompTpfa.hpp>
#include <opm/core/pressure/FlowBCManager.hpp> #include <opm/core/pressure/FlowBCManager.hpp>
@ -315,11 +317,13 @@ try
vtkfilename.str(""); vtkfilename.str("");
vtkfilename << "tutorial3-" << std::setw(3) << std::setfill('0') << i << ".vtu"; vtkfilename << "tutorial3-" << std::setw(3) << std::setfill('0') << i << ".vtu";
// 17.03.2016 Temporarily removed while moving functionality to opm-output // 17.03.2016 Temporarily removed while moving functionality to opm-output
// std::ofstream vtkfile(vtkfilename.str().c_str()); #ifdef DISABLE_OUTPUT
// Opm::DataMap dm; std::ofstream vtkfile(vtkfilename.str().c_str());
// dm["saturation"] = &state.saturation(); Opm::DataMap dm;
// dm["pressure"] = &state.pressure(); dm["saturation"] = &state.saturation();
// Opm::writeVtkData(grid, dm, vtkfile); dm["pressure"] = &state.pressure();
Opm::writeVtkData(grid, dm, vtkfile);
#endif
} }
} }
catch (const std::exception &e) { catch (const std::exception &e) {

View File

@ -30,7 +30,9 @@
#include <opm/core/grid.h> #include <opm/core/grid.h>
#include <opm/core/grid/GridManager.hpp> #include <opm/core/grid/GridManager.hpp>
// 17.03.2016 Temporarily removed while moving functionality to opm-output // 17.03.2016 Temporarily removed while moving functionality to opm-output
//#include <opm/core/io/vtk/writeVtkData.hpp> #ifdef DISABLE_OUTPUT
#include <opm/core/io/vtk/writeVtkData.hpp>
#endif
#include <opm/core/linalg/LinearSolverUmfpack.hpp> #include <opm/core/linalg/LinearSolverUmfpack.hpp>
#include <opm/core/pressure/IncompTpfa.hpp> #include <opm/core/pressure/IncompTpfa.hpp>
#include <opm/core/pressure/FlowBCManager.hpp> #include <opm/core/pressure/FlowBCManager.hpp>
@ -436,10 +438,12 @@ try
vtkfilename << "tutorial4-" << std::setw(3) << std::setfill('0') << i << ".vtu"; vtkfilename << "tutorial4-" << std::setw(3) << std::setfill('0') << i << ".vtu";
std::ofstream vtkfile(vtkfilename.str().c_str()); std::ofstream vtkfile(vtkfilename.str().c_str());
// 17.03.2016 Temporarily removed while moving functionality to opm-output // 17.03.2016 Temporarily removed while moving functionality to opm-output
// Opm::DataMap dm; #ifdef DISABLE_OUTPUT
// dm["saturation"] = &state.saturation(); Opm::DataMap dm;
// dm["pressure"] = &state.pressure(); dm["saturation"] = &state.saturation();
// Opm::writeVtkData(grid, dm, vtkfile); dm["pressure"] = &state.pressure();
Opm::writeVtkData(grid, dm, vtkfile);
#endif
} }
destroy_wells(wells); destroy_wells(wells);