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 @@
#include <dune/common/parametertree.hh>
#include <dune/grid/io/file/vtk/vtksequencewriter.hh>
#include <dune/grid/io/file/vtk/subsamplingvtkwriter.hh>
#include <dune/pdelab/gridfunctionspace/gridfunctionspaceutilities.hh>
......@@ -46,6 +47,7 @@ private:
using GV = typename Traits::GV;
using VTKWriter = Dune::VTKSequenceWriter<GV>;
using SubVTK = Dune::SubsamplingVTKWriter<GV>;
using UDGF = Dune::PDELab::DiscreteGridFunction<GFS,U>;
using FluxDGF = Dune::Dorie::GradientFluxAdapter<GFS,U,Param>;
using ConDGF = Dune::Dorie::ConductivityAdapter<Traits,Param>;
......@@ -72,11 +74,12 @@ public:
*/
OutputWriter (Dune::ParameterTree& _inifile, GV& gv, GFS& gfs, Param& param, U& unew)
: 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.outputPath"),
"./",
Dune::VTK::nonconforming),
"./"),
udgf(gfs,unew),
fluxdgf(gfs,unew,param,udgf),
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