diff --git a/dumux/implicit/staggered/properties.hh b/dumux/implicit/staggered/properties.hh index a0ff8daabd21cd5f09331c376bfa93bbb4035197..924e222c48cd35f204535d6a571fa5788a15f2b3 100644 --- a/dumux/implicit/staggered/properties.hh +++ b/dumux/implicit/staggered/properties.hh @@ -58,6 +58,8 @@ NEW_PROP_TAG(DofTypeIndices); //!< Indices to choose between cell center and fac NEW_PROP_TAG(FaceVariables); //!< Variables associated to facets (equivalent to volVars) NEW_PROP_TAG(GlobalFaceVars); //!< Global vector of facet variables +NEW_PROP_TAG(VtkWriteFaceData); //!< Decide whether to write separate vtp files for face variables + } } diff --git a/dumux/implicit/staggered/propertydefaults.hh b/dumux/implicit/staggered/propertydefaults.hh index 84953f578f5b67fc2baf0b52222bcdd1f63edc7d..4ca6111fdfd2de0750b9c17a04ba0f561d503fd5 100644 --- a/dumux/implicit/staggered/propertydefaults.hh +++ b/dumux/implicit/staggered/propertydefaults.hh @@ -242,6 +242,8 @@ public: //! use the plain newton convergence writer by default SET_TYPE_PROP(StaggeredModel, NewtonConvergenceWriter, StaggeredNewtonConvergenceWriter<TypeTag>); +//! Write separate vtp files for face variables by default +SET_BOOL_PROP(StaggeredModel, VtkWriteFaceData, true); } // namespace Properties } // namespace Dumux diff --git a/dumux/io/staggeredvtkoutputmodule.hh b/dumux/io/staggeredvtkoutputmodule.hh index fb31f0622163de8754c87c26ae1a4af59af8dee2..3c2102c7c23247decd629c13504f112a6e699e4a 100644 --- a/dumux/io/staggeredvtkoutputmodule.hh +++ b/dumux/io/staggeredvtkoutputmodule.hh @@ -88,7 +88,9 @@ public: StaggeredVtkOutputModule(const Problem& problem, Dune::VTK::DataMode dm = Dune::VTK::conforming) : ParentType(problem, dm), faceWriter_(problem) - {} + { + writeFaceVars_ = GET_PARAM_FROM_GROUP(TypeTag, bool, Vtk, WriteFaceData); + } ////////////////////////////////////////////////////////////////////////////////////////////// //! Methods to conveniently add primary and secondary variables upon problem initialization @@ -115,7 +117,8 @@ public: void write(double time, Dune::VTK::OutputType type = Dune::VTK::ascii) { ParentType::write(time, type); - getFaceDataAndWrite_(); + if(writeFaceVars_) + getFaceDataAndWrite_(); } protected: @@ -259,6 +262,7 @@ private: StaggeredVtkWriter<TypeTag, WriterData> faceWriter_; WriterData faceData_; + bool writeFaceVars_; //! Returns the implementation of the problem (i.e. static polymorphism) Implementation &asImp_()