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
bd68d93d
Commit
bd68d93d
authored
Sep 30, 2020
by
Dennis Gläser
Browse files
[test][facet][gravity] outsource props
parent
aca0fe32
Changes
5
Hide whitespace changes
Inline
Side-by-side
test/multidomain/facet/1p_1p/gravity/main.cc
View file @
bd68d93d
...
...
@@ -45,8 +45,8 @@
#include
<dumux/io/vtkoutputmodule.hh>
#include
"pro
blem
_bulk.hh"
#include
"pro
blem
_lowdim.hh"
#include
"pro
perties
_bulk.hh"
#include
"pro
perties
_lowdim.hh"
namespace
Dumux
{
...
...
test/multidomain/facet/1p_1p/gravity/problem_bulk.hh
View file @
bd68d93d
...
...
@@ -24,64 +24,9 @@
#ifndef DUMUX_TEST_TPFAFACETCOUPLING_ONEP_BULKPROBLEM_HH
#define DUMUX_TEST_TPFAFACETCOUPLING_ONEP_BULKPROBLEM_HH
#include
<dune/alugrid/grid.hh>
#include
<dumux/common/boundarytypes.hh>
#include
<dumux/material/components/constant.hh>
#include
<dumux/material/fluidsystems/1pliquid.hh>
#include
<dumux/multidomain/facet/box/properties.hh>
#include
<dumux/multidomain/facet/cellcentered/tpfa/properties.hh>
#include
<dumux/multidomain/facet/cellcentered/mpfa/properties.hh>
#include
<dumux/porousmediumflow/problem.hh>
#include
<dumux/porousmediumflow/1p/model.hh>
#include
"spatialparams.hh"
// default for the bulk grid type
#ifndef BULKGRIDTYPE
#define BULKGRIDTYPE Dune::ALUGrid<2, 2, Dune::cube, Dune::nonconforming>
#endif
namespace
Dumux
{
// forward declarations
template
<
class
TypeTag
>
class
OnePBulkProblem
;
namespace
Properties
{
// create the type tag nodes
namespace
TTag
{
struct
OnePBulk
{
using
InheritsFrom
=
std
::
tuple
<
OneP
>
;
};
struct
OnePBulkTpfa
{
using
InheritsFrom
=
std
::
tuple
<
CCTpfaFacetCouplingModel
,
OnePBulk
>
;
};
struct
OnePBulkMpfa
{
using
InheritsFrom
=
std
::
tuple
<
CCMpfaFacetCouplingModel
,
OnePBulk
>
;
};
}
// end namespace TTag
// Set the grid type
template
<
class
TypeTag
>
struct
Grid
<
TypeTag
,
TTag
::
OnePBulk
>
{
using
type
=
BULKGRIDTYPE
;
};
// Set the problem type
template
<
class
TypeTag
>
struct
Problem
<
TypeTag
,
TTag
::
OnePBulk
>
{
using
type
=
OnePBulkProblem
<
TypeTag
>
;
};
// set the spatial params
template
<
class
TypeTag
>
struct
SpatialParams
<
TypeTag
,
TTag
::
OnePBulk
>
{
using
type
=
OnePSpatialParams
<
GetPropType
<
TypeTag
,
Properties
::
GridGeometry
>
,
GetPropType
<
TypeTag
,
Properties
::
Scalar
>
>
;
};
// the fluid system
template
<
class
TypeTag
>
struct
FluidSystem
<
TypeTag
,
TTag
::
OnePBulk
>
{
private:
using
Scalar
=
GetPropType
<
TypeTag
,
Properties
::
Scalar
>
;
public:
using
type
=
FluidSystems
::
OnePLiquid
<
Scalar
,
Components
::
Constant
<
1
,
Scalar
>
>
;
};
}
// end namespace Properties
/*!
* \ingroup FacetTests
...
...
test/multidomain/facet/1p_1p/gravity/problem_lowdim.hh
View file @
bd68d93d
...
...
@@ -24,65 +24,9 @@
#ifndef DUMUX_TEST_TPFAFACETCOUPLING_ONEP_LOWDIMPROBLEM_HH
#define DUMUX_TEST_TPFAFACETCOUPLING_ONEP_LOWDIMPROBLEM_HH
#include
<dune/foamgrid/foamgrid.hh>
#include
<dumux/common/boundarytypes.hh>
#include
<dumux/material/components/constant.hh>
#include
<dumux/material/fluidsystems/1pliquid.hh>
#include
<dumux/discretization/box.hh>
#include
<dumux/discretization/cctpfa.hh>
#include
<dumux/porousmediumflow/problem.hh>
#include
<dumux/porousmediumflow/1p/model.hh>
#include
"spatialparams.hh"
// default for the grid type
#ifndef LOWDIMGRIDTYPE
#define LOWDIMGRIDTYPE Dune::FoamGrid<1, 2>
#endif
namespace
Dumux
{
// forward declarations
template
<
class
TypeTag
>
class
OnePLowDimProblem
;
namespace
Properties
{
// create the type tag nodes
namespace
TTag
{
struct
OnePLowDim
{
using
InheritsFrom
=
std
::
tuple
<
OneP
>
;
};
struct
OnePLowDimTpfa
{
using
InheritsFrom
=
std
::
tuple
<
OnePLowDim
,
CCTpfaModel
>
;
};
// we need an additional type tag for the test using mpfa in the bulk domain
struct
OnePLowDimMpfa
{
using
InheritsFrom
=
std
::
tuple
<
OnePLowDim
,
CCTpfaModel
>
;
};
}
// end namespace TTag
// Set the grid type
template
<
class
TypeTag
>
struct
Grid
<
TypeTag
,
TTag
::
OnePLowDim
>
{
using
type
=
LOWDIMGRIDTYPE
;
};
// Set the problem type
template
<
class
TypeTag
>
struct
Problem
<
TypeTag
,
TTag
::
OnePLowDim
>
{
using
type
=
OnePLowDimProblem
<
TypeTag
>
;
};
// set the spatial params
template
<
class
TypeTag
>
struct
SpatialParams
<
TypeTag
,
TTag
::
OnePLowDim
>
{
using
type
=
OnePSpatialParams
<
GetPropType
<
TypeTag
,
Properties
::
GridGeometry
>
,
GetPropType
<
TypeTag
,
Properties
::
Scalar
>
>
;
};
// the fluid system
template
<
class
TypeTag
>
struct
FluidSystem
<
TypeTag
,
TTag
::
OnePLowDim
>
{
private:
using
Scalar
=
GetPropType
<
TypeTag
,
Properties
::
Scalar
>
;
public:
using
type
=
FluidSystems
::
OnePLiquid
<
Scalar
,
Components
::
Constant
<
1
,
Scalar
>
>
;
};
}
// end namespace Properties
/*!
* \ingroup FacetTests
...
...
test/multidomain/facet/1p_1p/gravity/properties_bulk.hh
0 → 100644
View file @
bd68d93d
// -*- 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 FacetTests
* \brief The properties for the bulk domain in the single-phase facet coupling test.
*/
#ifndef DUMUX_TEST_TPFAFACETCOUPLING_ONEP_BULK_PROPERTIES_HH
#define DUMUX_TEST_TPFAFACETCOUPLING_ONEP_BULK_PROPERTIES_HH
#include
<dune/alugrid/grid.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/multidomain/facet/box/properties.hh>
#include
<dumux/multidomain/facet/cellcentered/tpfa/properties.hh>
#include
<dumux/multidomain/facet/cellcentered/mpfa/properties.hh>
#include
"spatialparams.hh"
#include
"problem_bulk.hh"
// default for the bulk grid type
#ifndef BULKGRIDTYPE
#define BULKGRIDTYPE Dune::ALUGrid<2, 2, Dune::cube, Dune::nonconforming>
#endif
namespace
Dumux
::
Properties
{
// create the type tag nodes
namespace
TTag
{
struct
OnePBulk
{
using
InheritsFrom
=
std
::
tuple
<
OneP
>
;
};
struct
OnePBulkTpfa
{
using
InheritsFrom
=
std
::
tuple
<
CCTpfaFacetCouplingModel
,
OnePBulk
>
;
};
struct
OnePBulkMpfa
{
using
InheritsFrom
=
std
::
tuple
<
CCMpfaFacetCouplingModel
,
OnePBulk
>
;
};
}
// end namespace TTag
// Set the grid type
template
<
class
TypeTag
>
struct
Grid
<
TypeTag
,
TTag
::
OnePBulk
>
{
using
type
=
BULKGRIDTYPE
;
};
// Set the problem type
template
<
class
TypeTag
>
struct
Problem
<
TypeTag
,
TTag
::
OnePBulk
>
{
using
type
=
OnePBulkProblem
<
TypeTag
>
;
};
// set the spatial params
template
<
class
TypeTag
>
struct
SpatialParams
<
TypeTag
,
TTag
::
OnePBulk
>
{
using
type
=
OnePSpatialParams
<
GetPropType
<
TypeTag
,
Properties
::
GridGeometry
>
,
GetPropType
<
TypeTag
,
Properties
::
Scalar
>
>
;
};
// the fluid system
template
<
class
TypeTag
>
struct
FluidSystem
<
TypeTag
,
TTag
::
OnePBulk
>
{
private:
using
Scalar
=
GetPropType
<
TypeTag
,
Properties
::
Scalar
>
;
public:
using
type
=
FluidSystems
::
OnePLiquid
<
Scalar
,
Components
::
Constant
<
1
,
Scalar
>
>
;
};
}
// end namespace Dumux::Properties
#endif
test/multidomain/facet/1p_1p/gravity/properties_lowdim.hh
0 → 100644
View file @
bd68d93d
// -*- 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 FacetTests
* \brief The properties for the lower-dimensional domain in the single-phase facet coupling test.
*/
#ifndef DUMUX_TEST_TPFAFACETCOUPLING_ONEP_LOWDIM_PROPERTIES_HH
#define DUMUX_TEST_TPFAFACETCOUPLING_ONEP_LOWDIM_PROPERTIES_HH
#include
<dune/foamgrid/foamgrid.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/discretization/box.hh>
#include
<dumux/discretization/cctpfa.hh>
#include
"spatialparams.hh"
#include
"problem_lowdim.hh"
// default for the grid type
#ifndef LOWDIMGRIDTYPE
#define LOWDIMGRIDTYPE Dune::FoamGrid<1, 2>
#endif
namespace
Dumux
::
Properties
{
// create the type tag nodes
namespace
TTag
{
struct
OnePLowDim
{
using
InheritsFrom
=
std
::
tuple
<
OneP
>
;
};
struct
OnePLowDimTpfa
{
using
InheritsFrom
=
std
::
tuple
<
OnePLowDim
,
CCTpfaModel
>
;
};
// we need an additional type tag for the test using mpfa in the bulk domain
struct
OnePLowDimMpfa
{
using
InheritsFrom
=
std
::
tuple
<
OnePLowDim
,
CCTpfaModel
>
;
};
}
// end namespace TTag
// Set the grid type
template
<
class
TypeTag
>
struct
Grid
<
TypeTag
,
TTag
::
OnePLowDim
>
{
using
type
=
LOWDIMGRIDTYPE
;
};
// Set the problem type
template
<
class
TypeTag
>
struct
Problem
<
TypeTag
,
TTag
::
OnePLowDim
>
{
using
type
=
OnePLowDimProblem
<
TypeTag
>
;
};
// set the spatial params
template
<
class
TypeTag
>
struct
SpatialParams
<
TypeTag
,
TTag
::
OnePLowDim
>
{
using
type
=
OnePSpatialParams
<
GetPropType
<
TypeTag
,
Properties
::
GridGeometry
>
,
GetPropType
<
TypeTag
,
Properties
::
Scalar
>
>
;
};
// the fluid system
template
<
class
TypeTag
>
struct
FluidSystem
<
TypeTag
,
TTag
::
OnePLowDim
>
{
private:
using
Scalar
=
GetPropType
<
TypeTag
,
Properties
::
Scalar
>
;
public:
using
type
=
FluidSystems
::
OnePLiquid
<
Scalar
,
Components
::
Constant
<
1
,
Scalar
>
>
;
};
}
// 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