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/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 <fstream>
#include <vector>
@ -94,14 +95,16 @@ try
/// Opm::writeVtkData() together with the grid
/// \snippet tutorial1.cpp 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]
/// \endinternal
/// \page tutorial1
/// Call Opm::writeVtkData() to write the output file.
/// \snippet tutorial1.cpp 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]
/// \endinternal
}

View File

@ -34,7 +34,8 @@
#include <opm/core/grid.h>
#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 <fstream>
#include <vector>
@ -186,13 +187,14 @@ try
/// (pressure) or a vector per cell (cell_velocity).
/// \snippet tutorial2.cpp write output
/// \internal [write output]
std::ofstream vtkfile("tutorial2.vtu");
Opm::DataMap dm;
dm["pressure"] = &state.pressure();
std::vector<double> cell_velocity;
Opm::estimateCellVelocity(*grid.c_grid(), state.faceflux(), cell_velocity);
dm["velocity"] = &cell_velocity;
Opm::writeVtkData(*grid.c_grid(), dm, vtkfile);
// 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<double> cell_velocity;
// Opm::estimateCellVelocity(*grid.c_grid(), state.faceflux(), cell_velocity);
// dm["velocity"] = &cell_velocity;
// Opm::writeVtkData(*grid.c_grid(), dm, vtkfile);
/// \internal [write output]
/// \endinternal
}

View File

@ -29,7 +29,8 @@
#include <cassert>
#include <opm/core/grid.h>
#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/pressure/IncompTpfa.hpp>
#include <opm/core/pressure/FlowBCManager.hpp>
@ -313,11 +314,12 @@ try
/// \internal [write output]
vtkfilename.str("");
vtkfilename << "tutorial3-" << std::setw(3) << std::setfill('0') << i << ".vtu";
std::ofstream vtkfile(vtkfilename.str().c_str());
Opm::DataMap dm;
dm["saturation"] = &state.saturation();
dm["pressure"] = &state.pressure();
Opm::writeVtkData(grid, dm, vtkfile);
// 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);
}
}
catch (const std::exception &e) {

View File

@ -29,7 +29,8 @@
#include <cassert>
#include <opm/core/grid.h>
#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/pressure/IncompTpfa.hpp>
#include <opm/core/pressure/FlowBCManager.hpp>
@ -434,10 +435,11 @@ try
vtkfilename.str("");
vtkfilename << "tutorial4-" << std::setw(3) << std::setfill('0') << i << ".vtu";
std::ofstream vtkfile(vtkfilename.str().c_str());
Opm::DataMap dm;
dm["saturation"] = &state.saturation();
dm["pressure"] = &state.pressure();
Opm::writeVtkData(grid, dm, vtkfile);
// 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);
}
destroy_wells(wells);