Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
dumux-repositories
dumux
Commits
ddd7256c
Commit
ddd7256c
authored
Aug 30, 2018
by
Timo Koch
Committed by
Kilian Weishaupt
Nov 09, 2018
Browse files
[io] Add new property IOFields to replace VtkOutputFields
parent
80d37e23
Changes
4
Hide whitespace changes
Inline
Side-by-side
dumux/common/properties.hh
View file @
ddd7256c
...
...
@@ -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
(
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
// TODO: Remove deprecated property VtkOutputFields
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
(
JacobianMatrix
);
//!< Type of the global jacobian matrix
NEW_PROP_TAG
(
SolutionVector
);
//!< Vector containing all primary variable vector of the grid
...
...
dumux/common/properties/model.hh
View file @
ddd7256c
...
...
@@ -25,10 +25,11 @@
#define DUMUX_MODEL_PROPERTIES_HH
#include
<dune/common/fvector.hh>
#include
<dune/common/deprecated.hh>
#include
<dumux/common/properties.hh>
#include
<dumux/common/balanceequationopts.hh>
#include
<dumux/io/default
vtkoutput
fields.hh>
#include
<dumux/io/default
io
fields.hh>
// Forward declaration
namespace
Dune
{
class
ParameterTree
;
}
...
...
@@ -54,8 +55,13 @@ SET_PROP(ModelProperties, ModelDefaultParameters)
static
void
defaultParams
(
Dune
::
ParameterTree
&
tree
,
const
std
::
string
&
group
=
""
)
{
}
};
//! Set the default to a function throwing a NotImplemented error
SET_TYPE_PROP
(
ModelProperties
,
VtkOutputFields
,
DefaultVtkOutputFields
);
//! \todo this property is deprecated use IOFields instead!
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_TYPE_PROP
(
ModelProperties
,
BalanceEqOpts
,
BalanceEquationOptions
<
TypeTag
>
);
...
...
dumux/io/CMakeLists.txt
View file @
ddd7256c
...
...
@@ -5,7 +5,7 @@ add_subdirectory(xml)
install
(
FILES
adaptivegridrestart.hh
container.hh
default
vtkoutput
fields.hh
default
io
fields.hh
fieldnames.hh
gnuplotinterface.hh
loadsolution.hh
...
...
dumux/io/default
vtkoutput
fields.hh
→
dumux/io/default
io
fields.hh
View file @
ddd7256c
...
...
@@ -19,28 +19,33 @@
/*!
* \file
* \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
*/
#ifndef DUMUX_DEFAULT_
VTK_OUTPUT
_FIELDS_HH
#define DUMUX_DEFAULT_
VTK_OUTPUT
_FIELDS_HH
#ifndef DUMUX_
IO_
DEFAULT_
IO
_FIELDS_HH
#define DUMUX_
IO_
DEFAULT_
IO
_FIELDS_HH
#include
<dune/common/exceptions.hh>
namespace
Dumux
{
namespace
Dumux
{
/*!
* \ingroup InputOutput
* \brief Adds
vtk
output fields
specific to a model
* \brief Adds output fields
to a given output module
*/
class
Default
VtkOutput
Fields
class
Default
IO
Fields
{
public:
template
<
class
VtkOutputModule
>
static
void
init
(
VtkOutputModule
&
vtk
)
template
<
class
OutputModule
>
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
!"
);
}
};
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment