Skip to content
Snippets Groups Projects
Commit ddd7256c authored by Timo Koch's avatar Timo Koch Committed by Kilian Weishaupt
Browse files

[io] Add new property IOFields to replace VtkOutputFields

parent 80d37e23
No related branches found
No related tags found
1 merge request!1212Feature/iofields
...@@ -48,7 +48,9 @@ NEW_PROP_TAG(ModelTraits); //!< Traits class encapsulating model spec ...@@ -48,7 +48,9 @@ NEW_PROP_TAG(ModelTraits); //!< Traits class encapsulating model spec
NEW_PROP_TAG(Problem); //!< Property to specify the type of a problem which has to be solved NEW_PROP_TAG(Problem); //!< Property to specify the type of a problem which has to be solved
NEW_PROP_TAG(PointSource); //!< Property defining the type of point source used NEW_PROP_TAG(PointSource); //!< Property defining the type of point source used
NEW_PROP_TAG(PointSourceHelper); //!< Property defining the class that computes which sub control volume point sources belong to NEW_PROP_TAG(PointSourceHelper); //!< Property defining the class that computes which sub control volume point sources belong to
// TODO: Remove deprecated property VtkOutputFields
NEW_PROP_TAG(VtkOutputFields); //!< A class helping models to define default vtk output parameters NEW_PROP_TAG(VtkOutputFields); //!< A class helping models to define default vtk output parameters
NEW_PROP_TAG(IOFields); //!< A class helping models to define input and output fields
NEW_PROP_TAG(BaseLocalResidual); //!< The type of the base class of the local residual (specific to a discretization scheme) NEW_PROP_TAG(BaseLocalResidual); //!< The type of the base class of the local residual (specific to a discretization scheme)
NEW_PROP_TAG(JacobianMatrix); //!< Type of the global jacobian matrix NEW_PROP_TAG(JacobianMatrix); //!< Type of the global jacobian matrix
NEW_PROP_TAG(SolutionVector); //!< Vector containing all primary variable vector of the grid NEW_PROP_TAG(SolutionVector); //!< Vector containing all primary variable vector of the grid
......
...@@ -25,10 +25,11 @@ ...@@ -25,10 +25,11 @@
#define DUMUX_MODEL_PROPERTIES_HH #define DUMUX_MODEL_PROPERTIES_HH
#include <dune/common/fvector.hh> #include <dune/common/fvector.hh>
#include <dune/common/deprecated.hh>
#include <dumux/common/properties.hh> #include <dumux/common/properties.hh>
#include <dumux/common/balanceequationopts.hh> #include <dumux/common/balanceequationopts.hh>
#include <dumux/io/defaultvtkoutputfields.hh> #include <dumux/io/defaultiofields.hh>
// Forward declaration // Forward declaration
namespace Dune { class ParameterTree; } namespace Dune { class ParameterTree; }
...@@ -54,8 +55,13 @@ SET_PROP(ModelProperties, ModelDefaultParameters) ...@@ -54,8 +55,13 @@ SET_PROP(ModelProperties, ModelDefaultParameters)
static void defaultParams(Dune::ParameterTree& tree, const std::string& group = "") { } static void defaultParams(Dune::ParameterTree& tree, const std::string& group = "") { }
}; };
//! Set the default to a function throwing a NotImplemented error //! \todo this property is deprecated use IOFields instead!
SET_TYPE_PROP(ModelProperties, VtkOutputFields, DefaultVtkOutputFields); SET_PROP(ModelProperties, VtkOutputFields) {
using type DUNE_DEPRECATED_MSG("This property is deprecated use property IOFields instead") = typename GET_PROP_TYPE(TypeTag, IOFields);
};
//! Set the default to an implementation throwing a NotImplemented error
SET_TYPE_PROP(ModelProperties, IOFields, DefaultIOFields);
//! Set the default class for the balance equation options //! Set the default class for the balance equation options
SET_TYPE_PROP(ModelProperties, BalanceEqOpts, BalanceEquationOptions<TypeTag>); SET_TYPE_PROP(ModelProperties, BalanceEqOpts, BalanceEquationOptions<TypeTag>);
......
...@@ -5,7 +5,7 @@ add_subdirectory(xml) ...@@ -5,7 +5,7 @@ add_subdirectory(xml)
install(FILES install(FILES
adaptivegridrestart.hh adaptivegridrestart.hh
container.hh container.hh
defaultvtkoutputfields.hh defaultiofields.hh
fieldnames.hh fieldnames.hh
gnuplotinterface.hh gnuplotinterface.hh
loadsolution.hh loadsolution.hh
......
...@@ -19,28 +19,33 @@ ...@@ -19,28 +19,33 @@
/*! /*!
* \file * \file
* \ingroup InputOutput * \ingroup InputOutput
* \brief Adds vtk output fields specific to a model, this is the default if a * \brief Adds output fields to a given output module, this is the default if a
model doesn't implement this functionality model doesn't implement this functionality
*/ */
#ifndef DUMUX_DEFAULT_VTK_OUTPUT_FIELDS_HH #ifndef DUMUX_IO_DEFAULT_IO_FIELDS_HH
#define DUMUX_DEFAULT_VTK_OUTPUT_FIELDS_HH #define DUMUX_IO_DEFAULT_IO_FIELDS_HH
#include <dune/common/exceptions.hh> #include <dune/common/exceptions.hh>
namespace Dumux namespace Dumux {
{
/*! /*!
* \ingroup InputOutput * \ingroup InputOutput
* \brief Adds vtk output fields specific to a model * \brief Adds output fields to a given output module
*/ */
class DefaultVtkOutputFields class DefaultIOFields
{ {
public: public:
template<class VtkOutputModule> template<class OutputModule>
static void init(VtkOutputModule& vtk) static void initOutputModule(OutputModule& out)
{
DUNE_THROW(Dune::NotImplemented, "This model doesn't implement default output fields!");
}
template <class FluidSystem = void, class SolidSystem = void>
static std::string primaryVariableName(int pvIdx = 0, int state = 0)
{ {
DUNE_THROW(Dune::NotImplemented, "This model doesn't implement default vtk fields!"); DUNE_THROW(Dune::NotImplemented, "This model doesn't implement primaryVariableName!");
} }
}; };
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment