Commit f620b55f authored by Alexander Kissinger's avatar Alexander Kissinger
Browse files

Added new property in basicproperties.hh called VTKMultiWriter, which can be...

Added new property in basicproperties.hh called VTKMultiWriter, which can be used to change the type of output files either ascii (default) or appendedraw (binary format which saves space). For the implicit problems the VTKMultiWriter type is set in implicitproblem.hh by calling the property.
Reviewed by Bernd.

git-svn-id: svn:// 2fb0f335-1f38-0410-981e-8018bf24f1b0
parent 603606d9
......@@ -31,6 +31,7 @@
#include <dumux/common/propertysystem.hh>
#include <dumux/common/parameters.hh>
#include <dumux/io/dgfgridcreator.hh>
#include <dumux/io/vtkmultiwriter.hh>
namespace Dumux
......@@ -96,6 +97,9 @@ NEW_PROP_TAG(TimeManagerMaxTimeStepSize);
//! Property to define the output level
//! the type of VTK Writer to be used, i.e. ascii or binary (Dune::VTK::appendraw) format
// Default values for properties:
......@@ -154,6 +158,16 @@ SET_TYPE_PROP(NumericModel, GridCreator, Dumux::DgfGridCreator<TypeTag>);
//! Set default output level to 0 -> only primary variables are added to output
SET_INT_PROP(NumericModel, VtkOutputLevel, 0);
//! set the VtkMultiWriter such that it uses the ascii format by default
SET_PROP(NumericModel, VtkMultiWriter)
typedef typename GET_PROP_TYPE(TypeTag, GridView) GridView;
typedef typename Dumux::VtkMultiWriter<GridView> type;
} // namespace Properties
} // namespace Dumux
......@@ -26,7 +26,6 @@
#include "implicitproperties.hh"
#include "implicitmodel.hh"
#include <dumux/io/vtkmultiwriter.hh>
#include <dumux/io/restart.hh>
namespace Dumux
......@@ -47,7 +46,8 @@ private:
typedef typename GET_PROP_TYPE(TypeTag, Problem) Implementation;
typedef typename GET_PROP_TYPE(TypeTag, GridView) GridView;
typedef Dumux::VtkMultiWriter<GridView> VtkMultiWriter;
typedef typename GET_PROP_TYPE(TypeTag, VtkMultiWriter) VtkMultiWriter;
typedef typename GET_PROP_TYPE(TypeTag, NewtonMethod) NewtonMethod;
typedef typename GET_PROP_TYPE(TypeTag, NewtonController) NewtonController;
......@@ -50,7 +50,7 @@ namespace Dumux {
* simplifies writing datasets consisting of multiple files. (i.e.
* multiple time steps or grid refinements within a time step.)
template<class GridView>
template<class GridView, Dune::VTK::OutputType OutputValue = Dune::VTK::ascii >
class VtkMultiWriter
enum { dim = GridView::dimension };
......@@ -245,7 +245,8 @@ public:
void endWrite(bool onlyDiscard = false)
if (!onlyDiscard) {
curWriter_->write(curOutFileName_.c_str(), Dune::VTK::ascii);
curWriter_->write(curOutFileName_.c_str(), OutputValue);
// determine name to write into the multi-file for the
// current time step
Supports Markdown
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