diff --git a/tutorials/tutorial1.cpp b/tutorials/tutorial1.cpp index e4a572435..43216d172 100644 --- a/tutorials/tutorial1.cpp +++ b/tutorials/tutorial1.cpp @@ -38,7 +38,9 @@ #include #include // 17.03.2016 Temporarily removed while moving functionality to opm-output -//#include +#ifdef DISABLE_OUTPUT +#include +#endif #include #include #include @@ -96,7 +98,9 @@ try /// \snippet tutorial1.cpp data map /// \internal [data map] // 17.03.2016 Temporarily removed while moving functionality to opm-output -// Opm::DataMap dm; +#ifdef DISABLE_OUTPUT + Opm::DataMap dm; +#endif /// \internal [data map] /// \endinternal /// \page tutorial1 @@ -104,7 +108,9 @@ try /// \snippet tutorial1.cpp write vtk /// \internal [write vtk] // 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] /// \endinternal } diff --git a/tutorials/tutorial2.cpp b/tutorials/tutorial2.cpp index 445e76a63..6ab818135 100644 --- a/tutorials/tutorial2.cpp +++ b/tutorials/tutorial2.cpp @@ -35,7 +35,9 @@ #include #include // 17.03.2016 Temporarily removed while moving functionality to opm-output -//#include +#ifdef DISABLE_OUTPUT +#include +#endif #include #include #include @@ -188,13 +190,15 @@ try /// \snippet tutorial2.cpp write output /// \internal [write output] // 17.03.2016 Temporarily removed while moving functionality to opm-output -// std::ofstream vtkfile("tutorial2.vtu"); -// Opm::DataMap dm; -// dm["pressure"] = &state.pressure(); -// std::vector cell_velocity; -// Opm::estimateCellVelocity(*grid.c_grid(), state.faceflux(), cell_velocity); -// dm["velocity"] = &cell_velocity; -// Opm::writeVtkData(*grid.c_grid(), dm, vtkfile); +#ifdef DISABLE_OUTPUT + std::ofstream vtkfile("tutorial2.vtu"); + Opm::DataMap dm; + dm["pressure"] = &state.pressure(); + std::vector cell_velocity; + Opm::estimateCellVelocity(*grid.c_grid(), state.faceflux(), cell_velocity); + dm["velocity"] = &cell_velocity; + Opm::writeVtkData(*grid.c_grid(), dm, vtkfile); +#endif /// \internal [write output] /// \endinternal } diff --git a/tutorials/tutorial3.cpp b/tutorials/tutorial3.cpp index 398dbc44d..5bdb19583 100644 --- a/tutorials/tutorial3.cpp +++ b/tutorials/tutorial3.cpp @@ -30,7 +30,9 @@ #include #include // 17.03.2016 Temporarily removed while moving functionality to opm-output -//#include +#ifdef DISABLE_OUTPUT +#include +#endif #include #include #include @@ -315,11 +317,13 @@ try vtkfilename.str(""); vtkfilename << "tutorial3-" << std::setw(3) << std::setfill('0') << i << ".vtu"; // 17.03.2016 Temporarily removed while moving functionality to opm-output -// std::ofstream vtkfile(vtkfilename.str().c_str()); -// Opm::DataMap dm; -// dm["saturation"] = &state.saturation(); -// dm["pressure"] = &state.pressure(); -// Opm::writeVtkData(grid, dm, vtkfile); +#ifdef DISABLE_OUTPUT + std::ofstream vtkfile(vtkfilename.str().c_str()); + Opm::DataMap dm; + dm["saturation"] = &state.saturation(); + dm["pressure"] = &state.pressure(); + Opm::writeVtkData(grid, dm, vtkfile); +#endif } } catch (const std::exception &e) { diff --git a/tutorials/tutorial4.cpp b/tutorials/tutorial4.cpp index eee0de499..d1212a028 100644 --- a/tutorials/tutorial4.cpp +++ b/tutorials/tutorial4.cpp @@ -30,7 +30,9 @@ #include #include // 17.03.2016 Temporarily removed while moving functionality to opm-output -//#include +#ifdef DISABLE_OUTPUT +#include +#endif #include #include #include @@ -436,10 +438,12 @@ try vtkfilename << "tutorial4-" << std::setw(3) << std::setfill('0') << i << ".vtu"; std::ofstream vtkfile(vtkfilename.str().c_str()); // 17.03.2016 Temporarily removed while moving functionality to opm-output -// Opm::DataMap dm; -// dm["saturation"] = &state.saturation(); -// dm["pressure"] = &state.pressure(); -// Opm::writeVtkData(grid, dm, vtkfile); +#ifdef DISABLE_OUTPUT + Opm::DataMap dm; + dm["saturation"] = &state.saturation(); + dm["pressure"] = &state.pressure(); + Opm::writeVtkData(grid, dm, vtkfile); +#endif } destroy_wells(wells);