Skip to content
Snippets Groups Projects
Commit 7f6afd8a authored by Bernd Flemisch's avatar Bernd Flemisch Committed by Kilian Weishaupt
Browse files

[io][1p] add IOFields

Adapt and rename OnePVtkOutputFields. Adapt model.hh.
parent 70d18407
No related branches found
No related tags found
1 merge request!1212Feature/iofields
...@@ -21,22 +21,42 @@ ...@@ -21,22 +21,42 @@
* \ingroup OnePModel * \ingroup OnePModel
* \brief Adds vtk output fields specific to the one phase model * \brief Adds vtk output fields specific to the one phase model
*/ */
#ifndef DUMUX_ONEP_VTK_OUTPUT_FIELDS_HH #ifndef DUMUX_ONEP_IO_FIELDS_HH
#define DUMUX_ONEP_VTK_OUTPUT_FIELDS_HH #define DUMUX_ONEP_IO_FIELDS_HH
#include <dune/common/deprecated.hh>
#include <dumux/io/fieldnames.hh>
namespace Dumux { namespace Dumux {
using namespace IOFieldNames;
/*! /*!
* \ingroup OnePModel * \ingroup OnePModel
* \brief Adds vtk output fields specific to the one phase model * \brief Adds I/O fields specific to the one phase model
*/ */
class OnePVtkOutputFields class OnePIOFields
{ {
public: public:
template <class VtkOutputModule> template <class OutputModule>
static void init(VtkOutputModule& vtk) static void initOutputModule(OutputModule& out)
{
out.addVolumeVariable([](const auto& volVars){ return volVars.pressure(); },
pressure());
}
template <class OutputModule>
DUNE_DEPRECATED_MSG("use initOutputModule instead")
static void init(OutputModule& out)
{
initOutputModule(out);
}
template <class FluidSystem = void, class SolidSystem = void>
static std::string primaryVariableName(int pvIdx = 0, int state = 0)
{ {
vtk.addVolumeVariable([](const auto& volVars){ return volVars.pressure(); }, "p"); return pressure();
} }
}; };
......
...@@ -54,7 +54,7 @@ ...@@ -54,7 +54,7 @@
#include "indices.hh" #include "indices.hh"
#include "volumevariables.hh" #include "volumevariables.hh"
#include "vtkoutputfields.hh" #include "iofields.hh"
namespace Dumux { namespace Dumux {
...@@ -119,7 +119,7 @@ NEW_TYPE_TAG(OnePNI, INHERITS_FROM(OneP)); ...@@ -119,7 +119,7 @@ NEW_TYPE_TAG(OnePNI, INHERITS_FROM(OneP));
/////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////
// properties for the isothermal single phase model // properties for the isothermal single phase model
/////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////
SET_TYPE_PROP(OneP, VtkOutputFields, OnePVtkOutputFields); //!< default vtk output fields specific to this model SET_TYPE_PROP(OneP, IOFields, OnePIOFields); //!< default I/O fields specific to this model
SET_TYPE_PROP(OneP, LocalResidual, ImmiscibleLocalResidual<TypeTag>); //!< the local residual function SET_TYPE_PROP(OneP, LocalResidual, ImmiscibleLocalResidual<TypeTag>); //!< the local residual function
SET_TYPE_PROP(OneP, ModelTraits, OnePModelTraits); //!< states some specifics of the one-phase model SET_TYPE_PROP(OneP, ModelTraits, OnePModelTraits); //!< states some specifics of the one-phase model
...@@ -160,7 +160,7 @@ public: ...@@ -160,7 +160,7 @@ public:
/////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////
//! Add temperature to the output //! Add temperature to the output
SET_TYPE_PROP(OnePNI, VtkOutputFields, EnergyVtkOutputFields<OnePVtkOutputFields>); SET_TYPE_PROP(OnePNI, VtkOutputFields, EnergyVtkOutputFields<OnePIOFields>);
//! The model traits of the non-isothermal model //! The model traits of the non-isothermal model
SET_TYPE_PROP(OnePNI, ModelTraits, PorousMediumFlowNIModelTraits<OnePModelTraits>); SET_TYPE_PROP(OnePNI, ModelTraits, PorousMediumFlowNIModelTraits<OnePModelTraits>);
......
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