Commit 4fcc415b authored by Lukas Riedel's avatar Lukas Riedel

Add SubsamplingVTKWriter to OutputWriter.

Subsampling level is read from the config file and defaults to 0.
parent a6b89056
...@@ -9,6 +9,7 @@ ...@@ -9,6 +9,7 @@
#include <dune/common/parametertree.hh> #include <dune/common/parametertree.hh>
#include <dune/grid/io/file/vtk/vtksequencewriter.hh> #include <dune/grid/io/file/vtk/vtksequencewriter.hh>
#include <dune/grid/io/file/vtk/subsamplingvtkwriter.hh>
#include <dune/pdelab/gridfunctionspace/gridfunctionspaceutilities.hh> #include <dune/pdelab/gridfunctionspace/gridfunctionspaceutilities.hh>
...@@ -46,6 +47,7 @@ private: ...@@ -46,6 +47,7 @@ private:
using GV = typename Traits::GV; using GV = typename Traits::GV;
using VTKWriter = Dune::VTKSequenceWriter<GV>; using VTKWriter = Dune::VTKSequenceWriter<GV>;
using SubVTK = Dune::SubsamplingVTKWriter<GV>;
using UDGF = Dune::PDELab::DiscreteGridFunction<GFS,U>; using UDGF = Dune::PDELab::DiscreteGridFunction<GFS,U>;
using FluxDGF = Dune::Dorie::GradientFluxAdapter<GFS,U,Param>; using FluxDGF = Dune::Dorie::GradientFluxAdapter<GFS,U,Param>;
using ConDGF = Dune::Dorie::ConductivityAdapter<Traits,Param>; using ConDGF = Dune::Dorie::ConductivityAdapter<Traits,Param>;
...@@ -72,11 +74,12 @@ public: ...@@ -72,11 +74,12 @@ public:
*/ */
OutputWriter (Dune::ParameterTree& _inifile, GV& gv, GFS& gfs, Param& param, U& unew) OutputWriter (Dune::ParameterTree& _inifile, GV& gv, GFS& gfs, Param& param, U& unew)
: OutputWriterBase<Traits>(), : OutputWriterBase<Traits>(),
vtkwriter(gv, vtkwriter(std::make_shared<SubVTK>(gv,
Dune::refinementLevels(_inifile.get<int>(
"output.subsamplingLevel", 0))),
_inifile.get<std::string>("output.fileName"), _inifile.get<std::string>("output.fileName"),
_inifile.get<std::string>("output.outputPath"), _inifile.get<std::string>("output.outputPath"),
"./", "./"),
Dune::VTK::nonconforming),
udgf(gfs,unew), udgf(gfs,unew),
fluxdgf(gfs,unew,param,udgf), fluxdgf(gfs,unew,param,udgf),
condgf(gv,param), condgf(gv,param),
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment