[dune-pdelab] VTKWriter for DG method

Carsten Gräser graeser at mi.fu-berlin.de
Fri Jun 4 10:18:25 CEST 2021


Hi Amir,

Am 04.06.21 um 09:49 schrieb Dmitry Mazilkin:
> I'm using in DG the following:
> 
> using UDGF = Dune::PDELab::DiscreteGridFunction<GFS,U>;
> UDGF udgf( gfs, u );
> 
> refinement=std::max(dg_degree-1,0);
> 
> Dune::SubsamplingVTKWriter<GridView> vtkwriter( gridview, Dune::refinementLevels(refinement));
> 
> vtkwriter.addVertexData(std::make_shared<Dune::PDELab::VTKGridFunctionAdapter<UDGF>>(udgf,"u"));
> 
> In your case, I'd expect to do the same for each component.
I don't know if PDELab supports this conveniently. But there's also
Simon Praetorius' dune-vtk module. This one allows to directly
write polynomial data. Then you do not need to do a-priori
subsampling but can adjust a subsampling level for the visualization
in paraview. This is not only more efficient but also allows
to use finer subsampling without rerunning your simulation if
this is needed at a later stage.

Small caveat:
This a relatively new feature of paraview, so you will need a recent version.

Best,
Carsten




More information about the dune-pdelab mailing list