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
3c6fe82b
Commit
3c6fe82b
authored
Jan 22, 2016
by
Bernd Flemisch
Browse files
[folder structure] rename and move files from decoupled, adapt includes
parent
cd353ddc
Changes
272
Expand all
Hide whitespace changes
Inline
Side-by-side
dumux/decoupled/1p/1pindices.hh
View file @
3c6fe82b
// -*- 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 2 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/>. *
*****************************************************************************/
#ifndef DUMUX_DECOUPLED_1P_INDICES_HH_OLD
#define DUMUX_DECOUPLED_1P_INDICES_HH_OLD
/*!
* \file
*
* \brief Defines the indices required for the decoupled one-phase model.
*/
#ifndef DUMUX_DECOUPLED_1P_INDICES_HH
#define DUMUX_DECOUPLED_1P_INDICES_HH
namespace
Dumux
{
/*!
* \ingroup OnePhase
*/
// \{
/*!
* \brief The common indices for the 1-p models.
*/
struct
DecoupledOnePCommonIndices
{
// Formulations
static
const
int
pressureEqIdx
=
0
;
//!< Index of the pressure equation
};
// \}
}
// namespace Dumux
#warning this header is deprecated, use dumux/porousmediumflow/1p/sequential/indices.hh instead
#include
<dumux/porousmediumflow/1p/sequential/indices.hh>
#endif
dumux/decoupled/1p/1pproperties.hh
View file @
3c6fe82b
// -*- 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 2 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/>. *
*****************************************************************************/
#ifndef DUMUX_1PPROPERTIES_HH_OLD
#define DUMUX_1PPROPERTIES_HH_OLD
/*!
* \ingroup OnePhase
* \ingroup IMPETProperties
* \file
*
* \brief Defines the properties required for the single phase sequential model.
*/
#warning this header is deprecated, use dumux/porousmediumflow/1p/sequential/properties.hh instead
#ifndef DUMUX_1PPROPERTIES_HH
#define DUMUX_1PPROPERTIES_HH
#include
<dumux/porousmediumflow/1p/sequential/properties.hh>
//Dumux-includes
#include
<dumux/decoupled/common/decoupledproperties.hh>
#include
<dumux/material/spatialparams/fv1p.hh>
namespace
Dumux
{
////////////////////////////////
// forward declarations
////////////////////////////////
template
<
class
TypeTag
>
class
CellData1P
;
////////////////////////////////
// properties
////////////////////////////////
namespace
Properties
{
//////////////////////////////////////////////////////////////////
// Type tags
//////////////////////////////////////////////////////////////////
//! The type tag for the single-phase problem
NEW_TYPE_TAG
(
DecoupledOneP
,
INHERITS_FROM
(
DecoupledModel
));
//////////////////////////////////////////////////////////////////
// Property tags
//////////////////////////////////////////////////////////////////
NEW_PROP_TAG
(
SpatialParams
);
//!< The type of the spatial parameters object
NEW_PROP_TAG
(
ProblemEnableGravity
);
//!< Returns whether gravity is considered in the problem
NEW_PROP_TAG
(
Fluid
);
//!< The fluid for one-phase models
NEW_PROP_TAG
(
Indices
);
//!< Set of indices for the one-phase model
NEW_PROP_TAG
(
CellData
);
//!< The cell data storage class
}
}
#include
<dumux/linear/seqsolverbackend.hh>
#include
<dumux/decoupled/common/variableclass.hh>
#include
<dumux/decoupled/1p/celldata1p.hh>
#include
<dumux/decoupled/1p/1pindices.hh>
namespace
Dumux
{
namespace
Properties
{
//////////////////////////////////////////////////////////////////
// Properties
//////////////////////////////////////////////////////////////////
//! Set number of equations to 1 for isothermal one-phase models
SET_INT_PROP
(
DecoupledOneP
,
NumEq
,
1
);
//! Set number of phases to 1 for one-phase models
SET_INT_PROP
(
DecoupledOneP
,
NumPhases
,
1
);
//! Each phase consists of 1 pure component
SET_INT_PROP
(
DecoupledOneP
,
NumComponents
,
1
);
//! Chose the set of indices for the one-phase formulation
SET_TYPE_PROP
(
DecoupledOneP
,
Indices
,
DecoupledOnePCommonIndices
);
//! Set general decoupled VariableClass as default
SET_TYPE_PROP
(
DecoupledOneP
,
Variables
,
VariableClass
<
TypeTag
>
);
//! Set standart CellData of immiscible one-phase models as default
SET_TYPE_PROP
(
DecoupledOneP
,
CellData
,
CellData1P
<
TypeTag
>
);
//! The spatial parameters to be employed. Use BoxSpatialParams by default.
SET_TYPE_PROP
(
DecoupledOneP
,
SpatialParams
,
FVSpatialParamsOneP
<
TypeTag
>
);
//! Enable gravity by default
SET_BOOL_PROP
(
DecoupledOneP
,
ProblemEnableGravity
,
true
);
}
}
#endif
dumux/decoupled/1p/celldata1p.hh
View file @
3c6fe82b
// -*- 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 2 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/>. *
*****************************************************************************/
#ifndef DUMUX_CELLDATA1P_HH
#define DUMUX_CELLDATA1P_HH
#ifndef DUMUX_CELLDATA1P_HH_OLD
#define DUMUX_CELLDATA1P_HH_OLD
#include
"1pproperties.hh"
#include
"fluxdata1p.hh"
#warning this header is deprecated, use dumux/porousmediumflow/1p/sequential/celldata.hh instead
/**
* \file
* \brief Class including data of one grid cell
*/
#include
<dumux/porousmediumflow/1p/sequential/celldata.hh>
namespace
Dumux
{
template
<
class
TypeTag
>
class
FluxData1P
;
/*!
* \ingroup OnePhase
*/
//! Class including data of one grid cell.
/*! The variables of one-phase flow, which are the pressure as well as additional data assigned to
*! cell-cell interfaces, so-called flux-data, are stored.
*
* \tparam TypeTag The problem TypeTag
*/
template
<
class
TypeTag
>
class
CellData1P
{
private:
typedef
typename
GET_PROP_TYPE
(
TypeTag
,
Scalar
)
Scalar
;
typedef
FluxData1P
<
TypeTag
>
FluxData
;
private:
Scalar
pressure_
;
FluxData
fluxData_
;
public:
//! Constructs a CellData1P object
CellData1P
()
:
pressure_
(
0.0
)
{
}
//! Returns the flux data of the cell
FluxData
&
fluxData
()
{
return
fluxData_
;
}
//! Returns the flux data of the cell
const
FluxData
&
fluxData
()
const
{
return
fluxData_
;
}
////////////////////////////////////////////////////////////
// functions returning primary variables
////////////////////////////////////////////////////////////
//!\brief Returns the cell pressure
Scalar
pressure
()
{
return
pressure_
;
}
//!\brief Returns the cell pressure
Scalar
pressure
()
const
{
return
pressure_
;
}
//!Sets the cell pressure
void
setPressure
(
Scalar
press
)
{
pressure_
=
press
;
}
};
}
#endif
dumux/decoupled/1p/diffusion/diffusionproblem1p.hh
View file @
3c6fe82b
// -*- 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 2 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
* \brief Base class for all single phase diffusion problem
*/
#ifndef DUMUX_DIFFUSIONPROBLEM_1P_HH
#define DUMUX_DIFFUSIONPROBLEM_1P_HH
#ifndef DUMUX_DIFFUSIONPROBLEM_1P_HH_OLD
#define DUMUX_DIFFUSIONPROBLEM_1P_HH_OLD
#include
<dumux/decoupled/common/onemodelproblem.hh>
#include
<dumux/decoupled/common/variableclass.hh>
#include
<dumux/decoupled/1p/diffusion/diffusionproperties1p.hh>
#include
<dumux/decoupled/1p/celldata1p.hh>
#warning this header is deprecated, use dumux/porousmediumflow/1p/sequential/diffusion/problem.hh instead
namespace
Dumux
{
namespace
Properties
{
SET_TYPE_PROP
(
PressureOneP
,
Model
,
typename
GET_PROP_TYPE
(
TypeTag
,
PressureModel
));
}
/*!
* \ingroup Pressure1P
* \ingroup IMPETproblems
*
* \brief Base class for all single phase diffusion problem
*
* \tparam TypeTag The Type Tag
*/
template
<
class
TypeTag
>
class
DiffusionProblem1P
:
public
OneModelProblem
<
TypeTag
>
{
typedef
typename
GET_PROP_TYPE
(
TypeTag
,
Problem
)
Implementation
;
typedef
OneModelProblem
<
TypeTag
>
ParentType
;
typedef
typename
GET_PROP_TYPE
(
TypeTag
,
GridView
)
GridView
;
typedef
typename
GridView
::
Grid
Grid
;
typedef
typename
GET_PROP_TYPE
(
TypeTag
,
Scalar
)
Scalar
;
typedef
typename
GET_PROP_TYPE
(
TypeTag
,
TimeManager
)
TimeManager
;
// material properties
typedef
typename
GET_PROP_TYPE
(
TypeTag
,
SpatialParams
)
SpatialParams
;
typedef
typename
GridView
::
Traits
::
template
Codim
<
0
>
::
Entity
Element
;
enum
{
dim
=
Grid
::
dimension
,
dimWorld
=
Grid
::
dimensionworld
};
typedef
Dune
::
FieldVector
<
Scalar
,
dimWorld
>
GlobalPosition
;
public:
/*!
* \brief Constructs a DiffusionProblem1P object
*
* \param timeManager the time manager
* \param gridView The grid view
*/
DiffusionProblem1P
(
TimeManager
&
timeManager
,
const
GridView
&
gridView
)
:
ParentType
(
timeManager
,
gridView
),
gravity_
(
0
)
{
spatialParams_
=
std
::
make_shared
<
SpatialParams
>
(
gridView
);
gravity_
=
0
;
if
(
GET_PARAM_FROM_GROUP
(
TypeTag
,
bool
,
Problem
,
EnableGravity
))
gravity_
[
dim
-
1
]
=
-
9.81
;
}
/*!
* \brief Constructs a DiffusionProblem1P object
*
* \param timeManager the time manager
* \param gridView The grid view
* \param spatialParams SpatialParams instantiation
*/
DiffusionProblem1P
(
TimeManager
&
timeManager
,
const
GridView
&
gridView
,
SpatialParams
&
spatialParams
)
:
ParentType
(
timeManager
,
gridView
),
gravity_
(
0
)
{
spatialParams_
=
Dune
::
stackobject_to_shared_ptr
<
SpatialParams
>
(
spatialParams
);
gravity_
=
0
;
if
(
GET_PARAM_FROM_GROUP
(
TypeTag
,
bool
,
Problem
,
EnableGravity
))
gravity_
[
dim
-
1
]
=
-
9.81
;
}
/*!
* \brief The constructor
*
* \param gridView The grid view
*/
DiffusionProblem1P
(
const
GridView
&
gridView
)
:
ParentType
(
gridView
,
false
),
gravity_
(
0
)
{
spatialParams_
=
std
::
make_shared
<
SpatialParams
>
(
gridView
);
gravity_
=
0
;
if
(
GET_PARAM_FROM_GROUP
(
TypeTag
,
bool
,
Problem
,
EnableGravity
))
gravity_
[
dim
-
1
]
=
-
9.81
;
}
/*!
* \brief The constructor
*
* \param gridView The grid view
* \param spatialParams SpatialParams instantiation
*/
DiffusionProblem1P
(
const
GridView
&
gridView
,
SpatialParams
&
spatialParams
)
:
ParentType
(
gridView
,
false
),
gravity_
(
0
)
{
spatialParams_
=
Dune
::
stackobject_to_shared_ptr
<
SpatialParams
>
(
spatialParams
);
gravity_
=
0
;
if
(
GET_PARAM_FROM_GROUP
(
TypeTag
,
bool
,
Problem
,
EnableGravity
))
gravity_
[
dim
-
1
]
=
-
9.81
;
}
/*!
* \name Problem parameters
*/
// \{
//! \cond \private
void
timeIntegration
()
{
//end simulation -> no time dependent problem!
this
->
timeManager
().
setFinished
();
return
;
}
void
serialize
()
{
return
;
}
void
deserialize
(
double
t
)
{
return
;
}
//! \endcond
/*!
* \brief Returns the temperature within the domain.
*
* \param element The element
*
*/
Scalar
temperature
(
const
Element
&
element
)
const
{
return
asImp_
().
temperatureAtPos
(
element
.
geometry
().
center
());
}
/*!
* \brief Returns the temperature within the domain.
*
* \param globalPos The position of the center of an element
*
*/
Scalar
temperatureAtPos
(
const
GlobalPosition
&
globalPos
)
const
{
// Throw an exception (there is no initial condition)
DUNE_THROW
(
Dune
::
InvalidStateException
,
"The problem does not provide "
"a temperatureAtPos() method."
);
}
/*!
* \brief Returns the reference pressure for evaluation of constitutive relations.
*
* \param element The element
*
*/
Scalar
referencePressure
(
const
Element
&
element
)
const
{
return
asImp_
().
referencePressureAtPos
(
element
.
geometry
().
center
());
}
/*!
* \brief Returns the reference pressure for evaluation of constitutive relations.
*
* \param globalPos The position of the center of an element
*
*/
Scalar
referencePressureAtPos
(
const
GlobalPosition
&
globalPos
)
const
{
// Throw an exception (there is no initial condition)
DUNE_THROW
(
Dune
::
InvalidStateException
,
"The problem does not provide "
"a referencePressureAtPos() method."
);
}
/*!
* \brief Returns the acceleration due to gravity.
*
* If the <tt>EnableGravity</tt> property is true, this means
* \f$\boldsymbol{g} = ( 0,\dots,\ -9.81)^T \f$, else \f$\boldsymbol{g} = ( 0,\dots, 0)^T \f$
*/
const
GlobalPosition
&
gravity
()
const
{
return
gravity_
;
}
/*!
* \brief Returns the spatial parameters object.
*/
SpatialParams
&
spatialParams
()
{
return
*
spatialParams_
;
}
/*!
* \brief Returns the spatial parameters object.
*/
const
SpatialParams
&
spatialParams
()
const
{
return
*
spatialParams_
;
}
// \}
private:
//! Returns the implementation of the problem (i.e. static polymorphism)
Implementation
&
asImp_
()
{
return
*
static_cast
<
Implementation
*>
(
this
);
}
//! \copydoc Dumux::IMPETProblem::asImp_()
const
Implementation
&
asImp_
()
const
{
return
*
static_cast
<
const
Implementation
*>
(
this
);
}
GlobalPosition
gravity_
;
// fluids and material properties
std
::
shared_ptr
<
SpatialParams
>
spatialParams_
;
};
}
#include
<dumux/porousmediumflow/1p/sequential/diffusion/problem.hh>
#endif
dumux/decoupled/1p/diffusion/diffusionproperties1p.hh
View file @
3c6fe82b
// -*- 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 2 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/>. *
*****************************************************************************/
#ifndef DUMUX_DIFFUSION_PROPERTIES_1P_HH
#define DUMUX_DIFFUSION_PROPERTIES_1P_HH
#ifndef DUMUX_DIFFUSION_PROPERTIES_1P_HH_OLD
#define DUMUX_DIFFUSION_PROPERTIES_1P_HH_OLD
#include
<dumux/decoupled/common/pressureproperties.hh>
#include
<dumux/decoupled/1p/1pproperties.hh>
#warning this header is deprecated, use dumux/porousmediumflow/1p/sequential/diffusion/properties.hh instead
/*!
* \ingroup Pressure1p
* \ingroup IMPETProperties
*/
/*!
* \file
* \brief Specifies the properties for 1p pressure models
*/
namespace
Dumux
{
namespace
Properties
{
// \{
//////////////////////////////////////////////////////////////////
// Type tags tags
//////////////////////////////////////////////////////////////////
//! The type tag for 1p pressure models
NEW_TYPE_TAG
(
PressureOneP
,
INHERITS_FROM
(
Pressure
,
DecoupledOneP
));
//////////////////////////////////////////////////////////////////
// Property tags
//////////////////////////////////////////////////////////////////
}
}
namespace
Dumux
{
namespace
Properties
{
//////////////////////////////////////////////////////////////////
// Property tags
//////////////////////////////////////////////////////////////////
}
}
#include
<dumux/porousmediumflow/1p/sequential/diffusion/properties.hh>
#endif
dumux/decoupled/1p/diffusion/fv/fvpressure1p.hh
View file @
3c6fe82b
// -*- 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 2 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/>. *
*****************************************************************************/
#ifndef DUMUX_FVPRESSURE1P_HH
#define DUMUX_FVPRESSURE1P_HH
#ifndef DUMUX_FVPRESSURE1P_HH_OLD
#define DUMUX_FVPRESSURE1P_HH_OLD
#warning this header is deprecated, use dumux/porousmediumflow/1p/sequential/diffusion/cellcentered/pressure.hh instead
// dumux environment
#include
<dumux/decoupled/common/fv/fvpressure.hh>
#include
<dumux/decoupled/1p/1pproperties.hh>
#include
<dumux/porousmediumflow/1p/sequential/diffusion/cellcentered/pressure.hh>