Commit e09f0b28 authored by Lukas Riedel's avatar Lukas Riedel

Merge branch 'feature/41-enable-vtk-vertex-plotting' into 'master'

Add new config key 'output.vertexData' for plotting vertex data

Closes #41

See merge request !21

(cherry picked from commit af162122)
parent 047b6016
...@@ -50,6 +50,17 @@ adding an empty line, make text **bold** or ``monospaced``. ...@@ -50,6 +50,17 @@ adding an empty line, make text **bold** or ``monospaced``.
<values> string </values> <values> string </values>
</parameter> </parameter>
<parameter name="vertexData">
<definition> Plot vertex based (``true``) or cell-centered (``false``)
data into VTK files. Vertex based data might render sharp
parameterization boundaries inappropriately.
System tests and plotting functions (``dorie plot``) require
cell-centered data.
</definition>
<values> true, false </values>
<suggestion> false </suggestion>
</parameter>
<parameter name="asciiVtk"> <parameter name="asciiVtk">
<definition> Defines whether VTK files should be written as ASCII (``true``) <definition> Defines whether VTK files should be written as ASCII (``true``)
or binary (``false``). ASCII is easier to parse in case you want to write or binary (``false``). ASCII is easier to parse in case you want to write
......
...@@ -77,11 +77,20 @@ public: ...@@ -77,11 +77,20 @@ public:
auto waterdgf_vtk = std::make_shared<Dune::PDELab::VTKGridFunctionAdapter<WaterDGF>>(waterdgf,"theta_w"); auto waterdgf_vtk = std::make_shared<Dune::PDELab::VTKGridFunctionAdapter<WaterDGF>>(waterdgf,"theta_w");
auto satdgf_vtk = std::make_shared<Dune::PDELab::VTKGridFunctionAdapter<SatDGF>>(satdgf,"Theta"); auto satdgf_vtk = std::make_shared<Dune::PDELab::VTKGridFunctionAdapter<SatDGF>>(satdgf,"Theta");
vtkwriter.addCellData(udgf_vtk); if (_inifile.get<bool>("output.vertexData")) {
vtkwriter.addCellData(fluxdgf_vtk); vtkwriter.addVertexData(udgf_vtk);
vtkwriter.addCellData(condgf_vtk); vtkwriter.addVertexData(fluxdgf_vtk);
vtkwriter.addCellData(waterdgf_vtk); vtkwriter.addVertexData(condgf_vtk);
vtkwriter.addCellData(satdgf_vtk); vtkwriter.addVertexData(waterdgf_vtk);
vtkwriter.addVertexData(satdgf_vtk);
}
else {
vtkwriter.addCellData(udgf_vtk);
vtkwriter.addCellData(fluxdgf_vtk);
vtkwriter.addCellData(condgf_vtk);
vtkwriter.addCellData(waterdgf_vtk);
vtkwriter.addCellData(satdgf_vtk);
}
} }
/// Write the VTK files for the current solution unew /// Write the VTK files for the current solution unew
......
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