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
3e32484e
Commit
3e32484e
authored
Aug 06, 2020
by
Dennis Gläser
Browse files
[test][1pconv][problem] put properties in separate header
parent
61c7d381
Changes
3
Hide whitespace changes
Inline
Side-by-side
test/porousmediumflow/1p/implicit/convergence/analyticsolution/main.cc
View file @
3e32484e
...
...
@@ -40,7 +40,7 @@
#include
<dumux/assembly/fvassembler.hh>
#include
"pro
blem
.hh"
#include
"pro
perties
.hh"
template
<
class
Problem
,
class
SolutionVector
>
void
printL2Error
(
const
Problem
&
problem
,
const
SolutionVector
&
x
)
...
...
test/porousmediumflow/1p/implicit/convergence/analyticsolution/problem.hh
View file @
3e32484e
...
...
@@ -19,79 +19,23 @@
/*!
* \file
* \ingroup OnePTests
* \brief The
properties &
problem setup for the convergence test with analytic solution
* \brief The problem setup for the convergence test with analytic solution
*/
#ifndef DUMUX_CONVERGENCE_TEST_ONEP_PROBLEM_HH
#define DUMUX_CONVERGENCE_TEST_ONEP_PROBLEM_HH
#include
<cmath>
#include
<dune/common/fvector.hh>
#include
<dune/grid/yaspgrid.hh>
#include
<dumux/discretization/cctpfa.hh>
#include
<dumux/discretization/ccmpfa.hh>
#include
<dumux/discretization/box.hh>
#include
<dumux/common/properties.hh>
#include
<dumux/common/boundarytypes.hh>
#include
<dumux/material/components/constant.hh>
#include
<dumux/material/fluidsystems/1pliquid.hh>
#include
<dumux/porousmediumflow/1p/model.hh>
#include
<dumux/porousmediumflow/problem.hh>
#include
"spatialparams.hh"
namespace
Dumux
{
template
<
class
TypeTag
>
class
ConvergenceProblem
;
namespace
Properties
{
// Create new type tags
namespace
TTag
{
struct
OnePConvergence
{
using
InheritsFrom
=
std
::
tuple
<
OneP
>
;
};
struct
OnePConvergenceTpfa
{
using
InheritsFrom
=
std
::
tuple
<
OnePConvergence
,
CCTpfaModel
>
;
};
struct
OnePConvergenceMpfa
{
using
InheritsFrom
=
std
::
tuple
<
OnePConvergence
,
CCMpfaModel
>
;
};
struct
OnePConvergenceBox
{
using
InheritsFrom
=
std
::
tuple
<
OnePConvergence
,
BoxModel
>
;
};
}
// end namespace TTag
// Set the problem property
template
<
class
TypeTag
>
struct
Problem
<
TypeTag
,
TTag
::
OnePConvergence
>
{
using
type
=
Dumux
::
ConvergenceProblem
<
TypeTag
>
;
};
// the fluid system
template
<
class
TypeTag
>
struct
FluidSystem
<
TypeTag
,
TTag
::
OnePConvergence
>
{
using
Scalar
=
GetPropType
<
TypeTag
,
Properties
::
Scalar
>
;
using
type
=
FluidSystems
::
OnePLiquid
<
Scalar
,
Dumux
::
Components
::
Constant
<
1
,
Scalar
>
>
;
};
// Set the grid type
template
<
class
TypeTag
>
struct
Grid
<
TypeTag
,
TTag
::
OnePConvergence
>
{
using
type
=
GRIDTYPE
;
};
template
<
class
TypeTag
>
struct
SpatialParams
<
TypeTag
,
TTag
::
OnePConvergence
>
{
using
GridGeometry
=
GetPropType
<
TypeTag
,
Properties
::
GridGeometry
>
;
using
Scalar
=
GetPropType
<
TypeTag
,
Properties
::
Scalar
>
;
using
type
=
ConvergenceTestSpatialParams
<
GridGeometry
,
Scalar
>
;
};
// Enable caching
template
<
class
TypeTag
>
struct
EnableGridVolumeVariablesCache
<
TypeTag
,
TTag
::
OnePConvergence
>
{
static
constexpr
bool
value
=
true
;
};
template
<
class
TypeTag
>
struct
EnableGridFluxVariablesCache
<
TypeTag
,
TTag
::
OnePConvergence
>
{
static
constexpr
bool
value
=
true
;
};
template
<
class
TypeTag
>
struct
EnableGridGeometryCache
<
TypeTag
,
TTag
::
OnePConvergence
>
{
static
constexpr
bool
value
=
true
;
};
}
// end namespace Properties
/*!
* \ingroup OnePTests
* \brief The
properties &
problem setup for the convergence test with analytic solution
* \brief The problem setup for the convergence test with analytic solution
*/
template
<
class
TypeTag
>
class
ConvergenceProblem
:
public
PorousMediumFlowProblem
<
TypeTag
>
...
...
@@ -235,6 +179,7 @@ private:
static
constexpr
Scalar
omega_
=
M_PI
;
Scalar
c_
;
};
}
// end namespace Dumux
#endif
test/porousmediumflow/1p/implicit/convergence/analyticsolution/properties.hh
0 → 100644
View file @
3e32484e
// -*- mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
// vi: set et ts=4 sw=4 sts=4:
/*****************************************************************************
* See the file COPYING for full copying permissions. *
* *
* This program is free software: you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
* the Free Software Foundation, either version 3 of the License, or *
* (at your option) any later version. *
* *
* This program is distributed in the hope that it will be useful, *
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
* GNU General Public License for more details. *
* *
* You should have received a copy of the GNU General Public License *
* along with this program. If not, see <http://www.gnu.org/licenses/>. *
*****************************************************************************/
/*!
* \file
* \ingroup OnePTests
* \brief The properties for the convergence test with analytic solution
*/
#ifndef DUMUX_CONVERGENCE_TEST_ONEP_PROPERTIES_HH
#define DUMUX_CONVERGENCE_TEST_ONEP_PROPERTIES_HH
#include
<dune/grid/yaspgrid.hh>
#if HAVE_UG
#include
<dune/grid/uggrid.hh>
#endif
#include
<dumux/discretization/cctpfa.hh>
#include
<dumux/discretization/ccmpfa.hh>
#include
<dumux/discretization/box.hh>
#include
<dumux/material/components/constant.hh>
#include
<dumux/material/fluidsystems/1pliquid.hh>
#include
<dumux/porousmediumflow/1p/model.hh>
#include
"spatialparams.hh"
#include
"problem.hh"
namespace
Dumux
::
Properties
{
// Create new type tags
namespace
TTag
{
struct
OnePConvergence
{
using
InheritsFrom
=
std
::
tuple
<
OneP
>
;
};
struct
OnePConvergenceTpfa
{
using
InheritsFrom
=
std
::
tuple
<
OnePConvergence
,
CCTpfaModel
>
;
};
struct
OnePConvergenceMpfa
{
using
InheritsFrom
=
std
::
tuple
<
OnePConvergence
,
CCMpfaModel
>
;
};
struct
OnePConvergenceBox
{
using
InheritsFrom
=
std
::
tuple
<
OnePConvergence
,
BoxModel
>
;
};
}
// end namespace TTag
// Set the problem property
template
<
class
TypeTag
>
struct
Problem
<
TypeTag
,
TTag
::
OnePConvergence
>
{
using
type
=
Dumux
::
ConvergenceProblem
<
TypeTag
>
;
};
// the fluid system
template
<
class
TypeTag
>
struct
FluidSystem
<
TypeTag
,
TTag
::
OnePConvergence
>
{
using
Scalar
=
GetPropType
<
TypeTag
,
Properties
::
Scalar
>
;
using
type
=
FluidSystems
::
OnePLiquid
<
Scalar
,
Dumux
::
Components
::
Constant
<
1
,
Scalar
>
>
;
};
// Set the grid type
template
<
class
TypeTag
>
struct
Grid
<
TypeTag
,
TTag
::
OnePConvergence
>
{
using
type
=
GRIDTYPE
;
};
template
<
class
TypeTag
>
struct
SpatialParams
<
TypeTag
,
TTag
::
OnePConvergence
>
{
using
GridGeometry
=
GetPropType
<
TypeTag
,
Properties
::
GridGeometry
>
;
using
Scalar
=
GetPropType
<
TypeTag
,
Properties
::
Scalar
>
;
using
type
=
ConvergenceTestSpatialParams
<
GridGeometry
,
Scalar
>
;
};
// Enable caching
template
<
class
TypeTag
>
struct
EnableGridVolumeVariablesCache
<
TypeTag
,
TTag
::
OnePConvergence
>
{
static
constexpr
bool
value
=
true
;
};
template
<
class
TypeTag
>
struct
EnableGridFluxVariablesCache
<
TypeTag
,
TTag
::
OnePConvergence
>
{
static
constexpr
bool
value
=
true
;
};
template
<
class
TypeTag
>
struct
EnableGridGeometryCache
<
TypeTag
,
TTag
::
OnePConvergence
>
{
static
constexpr
bool
value
=
true
;
};
}
// end namespace Dumux::Properties
#endif
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