Commented out usage of OutputWriter in tutorials

This commit is contained in:
Kjell W. Kongsvik 2016-03-17 13:30:48 +01:00
parent 25e82cf160
commit cbef942d54
4 changed files with 31 additions and 22 deletions

View File

@ -37,7 +37,8 @@
#include <opm/core/grid.h> #include <opm/core/grid.h>
#include <opm/core/grid/GridManager.hpp> #include <opm/core/grid/GridManager.hpp>
#include <opm/core/io/vtk/writeVtkData.hpp> // 17.03.2016 Temporarily removed while moving functionality to opm-output
//#include <opm/core/io/vtk/writeVtkData.hpp>
#include <iostream> #include <iostream>
#include <fstream> #include <fstream>
#include <vector> #include <vector>
@ -94,14 +95,16 @@ try
/// Opm::writeVtkData() together with the grid /// Opm::writeVtkData() together with the grid
/// \snippet tutorial1.cpp data map /// \snippet tutorial1.cpp data map
/// \internal [data map] /// \internal [data map]
Opm::DataMap dm; // 17.03.2016 Temporarily removed while moving functionality to opm-output
// Opm::DataMap dm;
/// \internal [data map] /// \internal [data map]
/// \endinternal /// \endinternal
/// \page tutorial1 /// \page tutorial1
/// Call Opm::writeVtkData() to write the output file. /// Call Opm::writeVtkData() to write the output file.
/// \snippet tutorial1.cpp write vtk /// \snippet tutorial1.cpp write vtk
/// \internal [write vtk] /// \internal [write vtk]
Opm::writeVtkData(*grid.c_grid(), dm, vtkfile); // 17.03.2016 Temporarily removed while moving functionality to opm-output
// Opm::writeVtkData(*grid.c_grid(), dm, vtkfile);
/// \internal [write vtk] /// \internal [write vtk]
/// \endinternal /// \endinternal
} }

View File

@ -34,7 +34,8 @@
#include <opm/core/grid.h> #include <opm/core/grid.h>
#include <opm/core/grid/GridManager.hpp> #include <opm/core/grid/GridManager.hpp>
#include <opm/core/io/vtk/writeVtkData.hpp> // 17.03.2016 Temporarily removed while moving functionality to opm-output
//#include <opm/core/io/vtk/writeVtkData.hpp>
#include <iostream> #include <iostream>
#include <fstream> #include <fstream>
#include <vector> #include <vector>
@ -186,13 +187,14 @@ try
/// (pressure) or a vector per cell (cell_velocity). /// (pressure) or a vector per cell (cell_velocity).
/// \snippet tutorial2.cpp write output /// \snippet tutorial2.cpp write output
/// \internal [write output] /// \internal [write output]
std::ofstream vtkfile("tutorial2.vtu"); // 17.03.2016 Temporarily removed while moving functionality to opm-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);
/// \internal [write output] /// \internal [write output]
/// \endinternal /// \endinternal
} }

View File

@ -29,7 +29,8 @@
#include <cassert> #include <cassert>
#include <opm/core/grid.h> #include <opm/core/grid.h>
#include <opm/core/grid/GridManager.hpp> #include <opm/core/grid/GridManager.hpp>
#include <opm/core/io/vtk/writeVtkData.hpp> // 17.03.2016 Temporarily removed while moving functionality to opm-output
//#include <opm/core/io/vtk/writeVtkData.hpp>
#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>
@ -313,11 +314,12 @@ try
/// \internal [write output] /// \internal [write output]
vtkfilename.str(""); vtkfilename.str("");
vtkfilename << "tutorial3-" << std::setw(3) << std::setfill('0') << i << ".vtu"; vtkfilename << "tutorial3-" << 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; // 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);
} }
} }
catch (const std::exception &e) { catch (const std::exception &e) {

View File

@ -29,7 +29,8 @@
#include <cassert> #include <cassert>
#include <opm/core/grid.h> #include <opm/core/grid.h>
#include <opm/core/grid/GridManager.hpp> #include <opm/core/grid/GridManager.hpp>
#include <opm/core/io/vtk/writeVtkData.hpp> // 17.03.2016 Temporarily removed while moving functionality to opm-output
//#include <opm/core/io/vtk/writeVtkData.hpp>
#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>
@ -434,10 +435,11 @@ try
vtkfilename.str(""); vtkfilename.str("");
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());
Opm::DataMap dm; // 17.03.2016 Temporarily removed while moving functionality to opm-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);
} }
destroy_wells(wells); destroy_wells(wells);