Skip to content
Snippets Groups Projects
Commit f89016a9 authored by Elias Pipping's avatar Elias Pipping Committed by Elias Pipping
Browse files

Produce a stream of data

parent a73445a1
No related branches found
No related tags found
No related merge requests found
......@@ -43,6 +43,8 @@
#include <dune/tectonic/myconvexproblem.hh>
#include <dune/tectonic/myblockproblem.hh>
#include "boost/format.hpp"
int const dim = 2;
template <class GridView>
......@@ -225,6 +227,14 @@ int main() {
solver_tolerance, &energyNorm,
Solver::FULL); // Solver::QUIET);
solver.solve();
Dune::VTKWriter<GridType::LeafGridView> writer(leafView);
std::string filename((boost::format("obs%d") % run).str());
Dune::shared_ptr<Dune::VTKBasisGridFunction<P1Basis, VectorType>> ptr(
new Dune::VTKBasisGridFunction<P1Basis, VectorType>(
p1Basis, u1, "displacement"));
writer.addVertexData(ptr);
writer.write(filename.c_str());
}
// Use a linear solver for comparison; should return roughly the
......@@ -242,13 +252,6 @@ int main() {
}
}
Dune::shared_ptr<Dune::VTKBasisGridFunction<P1Basis, VectorType>> ptr(
new Dune::VTKBasisGridFunction<P1Basis, VectorType>(p1Basis, u1,
"displacement"));
Dune::VTKWriter<GridType::LeafGridView> writer(leafView);
writer.addVertexData(ptr);
writer.write("weeee");
VectorType diff = u2;
diff -= u1;
std::cout << "Infinity norm of the difference of the two solutions: "
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment