Replace comment with "ifdef DISABLE_OUTPUT"

This commit is contained in:
Kjell W. Kongsvik 2016-03-18 13:17:39 +01:00
parent cbef942d54
commit f294745fea
4 changed files with 40 additions and 22 deletions

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);