Commit 365b46da authored by Kilian Weishaupt's avatar Kilian Weishaupt

Merge branch 'doc/staggered' into 'next'

Doc/staggered

See merge request !711
parents c0779a22 8dad8880
......@@ -70,7 +70,7 @@ class StaggeredLocalAssembler<TypeTag,
using NumEqVector = typename GET_PROP_TYPE(TypeTag, NumEqVector);
using ElementBoundaryTypes = typename GET_PROP_TYPE(TypeTag, ElementBoundaryTypes);
using FVElementGeometry = typename GET_PROP_TYPE(TypeTag, FVElementGeometry);
using GlobalFaceVars = typename GET_PROP_TYPE(TypeTag, GlobalFaceVars);
using GridFaceVariables = typename GET_PROP_TYPE(TypeTag, GridFaceVariables);
using ElementFluxVariablesCache = typename GET_PROP_TYPE(TypeTag, ElementFluxVariablesCache);
using Element = typename GET_PROP_TYPE(TypeTag, GridView)::template Codim<0>::Entity;
using SolutionVector = typename GET_PROP_TYPE(TypeTag, SolutionVector);
......@@ -649,14 +649,14 @@ private:
{ return gridVolVars.volVars(scv); }
template<class T = TypeTag>
static typename std::enable_if<!GET_PROP_VALUE(T, EnableGlobalFaceVariablesCache), FaceVariables&>::type
getFaceVarAccess(GlobalFaceVars& gridFaceVars, ElementFaceVariables& elemFaceVars, const SubControlVolumeFace& scvf)
static typename std::enable_if<!GET_PROP_VALUE(T, EnableGridFaceVariablesCache), FaceVariables&>::type
getFaceVarAccess(GridFaceVariables& GridFaceVariables, ElementFaceVariables& elemFaceVars, const SubControlVolumeFace& scvf)
{ return elemFaceVars[scvf]; }
template<class T = TypeTag>
static typename std::enable_if<GET_PROP_VALUE(T, EnableGlobalFaceVariablesCache), FaceVariables&>::type
getFaceVarAccess(GlobalFaceVars& gridFaceVars, ElementFaceVariables& elemFaceVars, const SubControlVolumeFace& scvf)
{ return gridFaceVars.faceVars(scvf.index()); }
static typename std::enable_if<GET_PROP_VALUE(T, EnableGridFaceVariablesCache), FaceVariables&>::type
getFaceVarAccess(GridFaceVariables& GridFaceVariables, ElementFaceVariables& elemFaceVars, const SubControlVolumeFace& scvf)
{ return GridFaceVariables.faceVars(scvf.index()); }
};
} // end namespace Dumux
......
......@@ -186,9 +186,7 @@ NEW_PROP_TAG(NumEqCellCenter); //!< The number of equations
NEW_PROP_TAG(NumEqFace); //!< The number of equations for face dofs
NEW_PROP_TAG(CellCenterSolutionVector); //!< The solution vector type for cell-centered dofs
NEW_PROP_TAG(FaceSolutionVector); //!< The solution vector type for face dofs
NEW_PROP_TAG(StaggeredFaceSolution); //!< The solution on the face
NEW_PROP_TAG(GlobalFaceVars); //!< Class containing face-related data
NEW_PROP_TAG(ElementFaceVariables); //!< Face data per element
NEW_PROP_TAG(GridFaceVariables); //!< Global vector containing face-related data
NEW_PROP_TAG(CellCenterPrimaryVariables); //!< The primary variables container type for cell-centered dofs
NEW_PROP_TAG(FacePrimaryVariables); //!< The primary variables container type for face dofs
NEW_PROP_TAG(IntersectionMapper); //!< Specifies the intersection mapper
......@@ -198,7 +196,9 @@ NEW_PROP_TAG(StaggeredPrimaryVariables); //!< The hybrid primary varia
NEW_PROP_TAG(BaseEpsilon); //!< A base epsilon for numerical differentiation, can contain multiple values
NEW_PROP_TAG(FaceVariables); //!< Class containing local face-related data
NEW_PROP_TAG(BoundaryValues); //!< Class containing local boundary data
NEW_PROP_TAG(EnableGlobalFaceVariablesCache); //!< If the face variables are cached on the gridview
NEW_PROP_TAG(StaggeredFaceSolution); //!< A vector containing the solution for a face (similar to ElementSolution)
NEW_PROP_TAG(ElementFaceVariables); //!< Face related varibles (similar to volume variables)
NEW_PROP_TAG(EnableGridFaceVariablesCache); //!< Switch on/off caching of face variables
/////////////////////////////////////////////////////////////
// Properties used by the mpnc model
......@@ -225,6 +225,13 @@ NEW_PROP_TAG(AnsSurface);
NEW_PROP_TAG(NusseltFormulation);
NEW_PROP_TAG(SherwoodFormulation);
/////////////////////////////////////////////////////////////
// Properties used by free flow models
/////////////////////////////////////////////////////////////
NEW_PROP_TAG(EnableInertiaTerms); //!< Returns whether to include inertia terms in the momentum balance eq or not (Stokes / Navier-Stokes)
NEW_PROP_TAG(NormalizePressure); //!< Returns whether to normalize the pressure term in the momentum balance or not
} // end namespace Properties
} // end namespace Dumux
......
......@@ -18,7 +18,8 @@
*****************************************************************************/
/*!
* \file
* \brief The face variables class for free flow staggered grid models
* \ingroup StaggeredDiscretization
* \copydoc Dumux::StaggeredElementFaceVariables
*/
#ifndef DUMUX_DISCRETIZATION_STAGGERED_ELEMENTFACEVARIABLES_HH
#define DUMUX_DISCRETIZATION_STAGGERED_ELEMENTFACEVARIABLES_HH
......@@ -29,37 +30,41 @@ namespace Dumux
{
/*!
* \ingroup ImplicitModel
* \ingroup StaggeredDiscretization
* \brief Base class for the face variables vector
*/
template<class TypeTag, bool enableGlobalFaceVarsCache>
template<class TypeTag, bool enableGridFaceVariablesCache>
class StaggeredElementFaceVariables
{};
/*!
* \ingroup StaggeredDiscretization
* \brief Class for the face variables vector. Specialization for the case of storing the face variables globally.
*/
template<class TypeTag>
class StaggeredElementFaceVariables<TypeTag, /*enableGlobalFaceVarsCache*/true>
class StaggeredElementFaceVariables<TypeTag, /*enableGridFaceVariablesCache*/true>
{
using GridView = typename GET_PROP_TYPE(TypeTag, GridView);
using Element = typename GridView::template Codim<0>::Entity;
using SolutionVector = typename GET_PROP_TYPE(TypeTag, SolutionVector);
using SubControlVolumeFace = typename GET_PROP_TYPE(TypeTag, SubControlVolumeFace);
using GlobalFaceVars = typename GET_PROP_TYPE(TypeTag, GlobalFaceVars);
using GridFaceVariables = typename GET_PROP_TYPE(TypeTag, GridFaceVariables);
using FaceVariables = typename GET_PROP_TYPE(TypeTag, FaceVariables);
using FVElementGeometry = typename GET_PROP_TYPE(TypeTag, FVElementGeometry);
using IndexType = typename GridView::IndexSet::IndexType;
public:
StaggeredElementFaceVariables(const GlobalFaceVars& globalFacesVars) : globalFaceVarsPtr_(&globalFacesVars) {}
StaggeredElementFaceVariables(const GridFaceVariables& gridFaceVariables) : gridFaceVariablesPtr_(&gridFaceVariables) {}
//! operator for the access with an scvf
const FaceVariables& operator [](const SubControlVolumeFace& scvf) const
{ return globalFaceVars().faceVars(scvf.index()); }
{ return gridFaceVariables().faceVars(scvf.index()); }
// operator for the access with an index
// needed for cc methods for the access to the boundary volume variables
//! operator for the access with an index
//! needed for cc methods for the access to the boundary volume variables
const FaceVariables& operator [](const IndexType scvfIdx) const
{ return globalFaceVars().faceVars(scvfIdx); }
{ return gridFaceVariables().faceVars(scvfIdx); }
//! For compatibility reasons with the case of not storing the face vars.
......@@ -69,8 +74,8 @@ public:
const SolutionVector& sol)
{}
// Binding of an element, prepares only the face variables of the element
// specialization for Staggered models
//! Binding of an element, prepares only the face variables of the element
//! specialization for Staggered models
void bindElement(const Element& element,
const FVElementGeometry& fvGeometry,
const SolutionVector& sol)
......@@ -78,22 +83,26 @@ public:
//! The global volume variables object we are a restriction of
const GlobalFaceVars& globalFaceVars() const
{ return *globalFaceVarsPtr_; }
const GridFaceVariables& gridFaceVariables() const
{ return *gridFaceVariablesPtr_; }
private:
const GlobalFaceVars* globalFaceVarsPtr_;
const GridFaceVariables* gridFaceVariablesPtr_;
};
/*!
* \ingroup StaggeredDiscretization
* \brief Class for the face variables vector. Specialization for the case of not storing the face variables globally.
*/
template<class TypeTag>
class StaggeredElementFaceVariables<TypeTag, /*enableGlobalFaceVarsCache*/false>
class StaggeredElementFaceVariables<TypeTag, /*enableGridFaceVariablesCache*/false>
{
using GridView = typename GET_PROP_TYPE(TypeTag, GridView);
using Element = typename GridView::template Codim<0>::Entity;
using SolutionVector = typename GET_PROP_TYPE(TypeTag, SolutionVector);
using SubControlVolumeFace = typename GET_PROP_TYPE(TypeTag, SubControlVolumeFace);
using GlobalFaceVars = typename GET_PROP_TYPE(TypeTag, GlobalFaceVars);
using GridFaceVariables = typename GET_PROP_TYPE(TypeTag, GridFaceVariables);
using FaceVariables = typename GET_PROP_TYPE(TypeTag, FaceVariables);
using FVElementGeometry = typename GET_PROP_TYPE(TypeTag, FVElementGeometry);
using IndexType = typename GridView::IndexSet::IndexType;
......@@ -104,15 +113,17 @@ class StaggeredElementFaceVariables<TypeTag, /*enableGlobalFaceVarsCache*/false>
public:
StaggeredElementFaceVariables(const GlobalFaceVars& globalFacesVars) : globalFaceVarsPtr_(&globalFacesVars) {}
StaggeredElementFaceVariables(const GridFaceVariables& globalFacesVars) : gridFaceVariablesPtr_(&globalFacesVars) {}
//! const operator for the access with an scvf
const FaceVariables& operator [](const SubControlVolumeFace& scvf) const
{ return faceVariables_[scvf.localFaceIdx()]; }
// operator for the access with an index
//! const operator for the access with an index
const FaceVariables& operator [](const IndexType scvfIdx) const
{ return faceVariables_[getLocalIdx_(scvfIdx)]; }
//! operator for the access with an scvf
FaceVariables& operator [](const SubControlVolumeFace& scvf)
{ return faceVariables_[scvf.localFaceIdx()]; }
......@@ -131,13 +142,13 @@ public:
for(auto&& scvf : scvfs(fvGeometry))
{
faceVariables_[scvf.localFaceIdx()].update(sol[faceIdx], globalFaceVars().problem(), element, fvGeometry, scvf);
faceVariables_[scvf.localFaceIdx()].update(sol[faceIdx], GridFaceVariables().problem(), element, fvGeometry, scvf);
faceVarIndices_[scvf.localFaceIdx()] = scvf.index();
}
}
// Binding of an element, prepares only the face variables of the element
// specialization for Staggered models
//! Binding of an element, prepares only the face variables of the element
//! specialization for Staggered models
void bindElement(const Element& element,
const FVElementGeometry& fvGeometry,
const SolutionVector& sol)
......@@ -153,8 +164,8 @@ public:
}
//! The global volume variables object we are a restriction of
const GlobalFaceVars& globalFaceVars() const
{ return *globalFaceVarsPtr_; }
const GridFaceVariables& gridFaceVariables() const
{ return *gridFaceVariablesPtr_; }
private:
......@@ -165,7 +176,7 @@ private:
return std::distance(faceVarIndices_.begin(), it);
}
const GlobalFaceVars* globalFaceVarsPtr_;
const GridFaceVariables* gridFaceVariablesPtr_;
std::vector<IndexType> faceVarIndices_;
std::vector<FaceVariables> faceVariables_;
};
......
......@@ -18,7 +18,8 @@
*****************************************************************************/
/*!
* \file
* \brief The global object of flux var caches
* \ingroup StaggeredDiscretization
* \copydoc Dumux::StaggeredElementFluxVariablesCache
*/
#ifndef DUMUX_DISCRETIZATION_STAGGERED_ELEMENT_FLUXVARSCACHE_HH
#define DUMUX_DISCRETIZATION_STAGGERED_ELEMENT_FLUXVARSCACHE_HH
......@@ -29,15 +30,16 @@ namespace Dumux
{
/*!
* \ingroup ImplicitModel
* \brief Base class for the stencil local flux variables cache
* \ingroup StaggeredDiscretization
* \brief Base class for the stencil local flux variables cache for the staggered model
*/
template<class TypeTag, bool EnableGridFluxVariablesCache>
class StaggeredElementFluxVariablesCache;
/*!
* \ingroup ImplicitModel
* \brief Spezialization when caching globally
* \ingroup StaggeredDiscretization
* \brief Class for the stencil local flux variables cache for the staggered model.
Specialization for the case of storing the fluxvars cache globally.
*/
template<class TypeTag>
class StaggeredElementFluxVariablesCache<TypeTag, true>
......@@ -56,23 +58,23 @@ public:
StaggeredElementFluxVariablesCache(const GridFluxVariablesCache& global)
: gridFluxVarsCachePtr_(&global) {}
// Specialization for the global caching being enabled - do nothing here
//! Specialization for the global caching being enabled - do nothing here
void bindElement(const Element& element,
const FVElementGeometry& fvGeometry,
const ElementVolumeVariables& elemVolVars) {}
// Specialization for the global caching being enabled - do nothing here
//! Specialization for the global caching being enabled - do nothing here
void bind(const Element& element,
const FVElementGeometry& fvGeometry,
const ElementVolumeVariables& elemVolVars) {}
// Specialization for the global caching being enabled - do nothing here
//! Specialization for the global caching being enabled - do nothing here
void bindScvf(const Element& element,
const FVElementGeometry& fvGeometry,
const ElementVolumeVariables& elemVolVars,
const SubControlVolumeFace& scvf) {}
// aStaggeredess operators in the case of caching
//! operators in the case of caching
const FluxVariablesCache& operator [](const SubControlVolumeFace& scvf) const
{ return (*gridFluxVarsCachePtr_)[scvf.index()]; }
......@@ -85,8 +87,9 @@ private:
};
/*!
* \ingroup ImplicitModel
* \brief Spezialization when not using global caching
* \ingroup StaggeredDiscretization
* \brief Class for the stencil local flux variables cache for the staggered model.
Specialization for the case of not storing the fluxvars cache globally.
*/
template<class TypeTag>
class StaggeredElementFluxVariablesCache<TypeTag, false>
......@@ -105,8 +108,8 @@ public:
StaggeredElementFluxVariablesCache(const GridFluxVariablesCache& global)
: gridFluxVarsCachePtr_(&global) {}
// This function has to be called prior to flux calculations on the element.
// Prepares the transmissibilities of the scv faces in an element. The FvGeometry is assumed to be bound.
//! This function has to be called prior to flux calculations on the element.
//! Prepares the transmissibilities of the scv faces in an element. The FvGeometry is assumed to be bound.
void bindElement(const Element& element,
const FVElementGeometry& fvGeometry,
const ElementVolumeVariables& elemVolVars)
......@@ -126,8 +129,8 @@ public:
}
}
// This function is called by the StaggeredLocalResidual before flux calculations during assembly.
// Prepares the transmissibilities of the scv faces in the stencil. The FvGeometries are assumed to be bound.
//! This function is called by the StaggeredLocalResidual before flux calculations during assembly.
//! Prepares the transmissibilities of the scv faces in the stencil. The FvGeometries are assumed to be bound.
void bind(const Element& element,
const FVElementGeometry& fvGeometry,
const ElementVolumeVariables& elemVolVars)
......@@ -183,7 +186,7 @@ public:
globalScvfIndices_[0] = scvf.index();
}
// access operators in the case of no caching
//! access operators in the case of no caching
const FluxVariablesCache& operator [](const SubControlVolumeFace& scvf) const
{ return fluxVarsCache_[getLocalScvfIdx_(scvf.index())]; }
......
......@@ -18,7 +18,8 @@
*****************************************************************************/
/*!
* \file
* \brief The local (stencil) volume variables class for cell centered models
* \ingroup StaggeredDiscretization
* \copydoc Dumux::StaggeredElementVolumeVariables
*/
#ifndef DUMUX_DISCRETIZATION_STAGGERED_ELEMENT_VOLUMEVARIABLES_HH
#define DUMUX_DISCRETIZATION_STAGGERED_ELEMENT_VOLUMEVARIABLES_HH
......@@ -30,14 +31,18 @@ namespace Dumux
{
/*!
* \ingroup ImplicitModel
* \brief Base class for the volume variables vector
* \ingroup StaggeredDiscretization
* \brief Base class for the element volume variables vector for the staggered model
*/
template<class TypeTag, bool enableGridVolVarsCache>
class StaggeredElementVolumeVariables
{};
// specialization in case of storing the volume variables globally
/*!
* \ingroup StaggeredDiscretization
* \brief Class for the element volume variables vector for the staggered model.
Specialization in case the volume variables are stored globally.
*/
template<class TypeTag>
class StaggeredElementVolumeVariables<TypeTag, /*enableGridVolVarsCache*/true>
{
......@@ -58,22 +63,23 @@ public:
StaggeredElementVolumeVariables(const GridVolumeVariables& gridVolVars)
: gridVolVarsPtr_(&gridVolVars) {}
//! operator for the access with an scv
const VolumeVariables& operator [](const SubControlVolume& scv) const
{ return gridVolVars().volVars(scv.dofIndex()); }
// operator for the access with an index
// needed for Staggered methods for the access to the boundary volume variables
//! operator for the access with an index
//! needed for Staggered methods for the access to the boundary volume variables
const VolumeVariables& operator [](const IndexType scvIdx) const
{ return gridVolVars().volVars(scvIdx); }
// For compatibility reasons with the case of not storing the vol vars.
// function to be called before assembling an element, preparing the vol vars within the stencil
//! For compatibility reasons with the case of not storing the vol vars.
//! function to be called before assembling an element, preparing the vol vars within the stencil
void bind(const Element& element,
const FVElementGeometry& fvGeometry,
const SolutionVector& sol)
{}
// function to prepare the vol vars within the element
//! function to prepare the vol vars within the element
void bindElement(const Element& element,
const FVElementGeometry& fvGeometry,
const SolutionVector& sol)
......@@ -88,7 +94,11 @@ private:
};
// Specialization when the current volume variables are not stored
/*!
* \ingroup StaggeredDiscretization
* \brief Class for the element volume variables vector for the staggered model.
Specialization in case the volume variables are not stored globally.
*/
template<class TypeTag>
class StaggeredElementVolumeVariables<TypeTag, /*enableGridVolVarsCache*/false>
{
......@@ -119,8 +129,8 @@ public:
StaggeredElementVolumeVariables(const GridVolumeVariables& gridVolVars)
: gridVolVarsPtr_(&gridVolVars) {}
// Binding of an element, prepares the volume variables within the element stencil
// called by the local jacobian to prepare element assembly
//! Binding of an element, prepares the volume variables within the element stencil
//! called by the local jacobian to prepare element assembly
void bind(const Element& element,
const FVElementGeometry& fvGeometry,
const SolutionVector& sol)
......@@ -194,8 +204,8 @@ public:
}
}
// Binding of an element, prepares only the volume variables of the element
// specialization for Staggered models
//! Binding of an element, prepares only the volume variables of the element.
//! Specialization for Staggered models
void bindElement(const Element& element,
const FVElementGeometry& fvGeometry,
const SolutionVector& sol)
......@@ -218,15 +228,19 @@ public:
volVarIndices_[0] = scv.dofIndex();
}
//! const operator for the access with an scv
const VolumeVariables& operator [](const SubControlVolume& scv) const
{ return volumeVariables_[getLocalIdx_(scv.dofIndex())]; }
//! operator for the access with an scv
VolumeVariables& operator [](const SubControlVolume& scv)
{ return volumeVariables_[getLocalIdx_(scv.dofIndex())]; }
//! const operator for the access with an index
const VolumeVariables& operator [](IndexType scvIdx) const
{ return volumeVariables_[getLocalIdx_(scvIdx)]; }
//! operator for the access with an index
VolumeVariables& operator [](IndexType scvIdx)
{ return volumeVariables_[getLocalIdx_(scvIdx)]; }
......
......@@ -18,7 +18,8 @@
*****************************************************************************/
/*!
* \file
* \brief The global volume variables class for cell centered models
* \ingroup StaggeredDiscretization
* \copydoc Dumux::StaggeredFaceSolution
*/
#ifndef DUMUX_DISCRETIZATION_STAGGERED_FACE_SOLUTION_HH
#define DUMUX_DISCRETIZATION_STAGGERED_FACE_SOLUTION_HH
......@@ -31,6 +32,10 @@
namespace Dumux
{
/*!
* \ingroup StaggeredDiscretization
* \brief The global face variables class for staggered models
*/
template<class TypeTag>
class StaggeredFaceSolution
{
......
......@@ -18,7 +18,8 @@
*****************************************************************************/
/*!
* \file
* \brief Class to specify the type of a boundary for the staggered Navier-Stokes model.
* \ingroup StaggeredDiscretization
* \copydoc Dumux::StaggeredFreeFlowBoundaryTypes
*/
#ifndef STAGGERED_FREEFLOW_BOUNDARY_TYPES_HH
#define STAGGERED_FREEFLOW_BOUNDARY_TYPES_HH
......@@ -30,7 +31,7 @@ namespace Dumux
{
/*!
* \ingroup BC
* \ingroup StaggeredDiscretization
* \brief Class to specify the type of a boundary for the staggered Navier-Stokes model.
*/
template <int numEq>
......
......@@ -18,9 +18,8 @@
*****************************************************************************/
/*!
* \file
* \brief Stores the face indices corresponding to the neighbors of an element
* that contribute to the derivative calculation. This is used for
* finite-volume schemes with symmetric sparsity pattern in the global matrix.
* \ingroup StaggeredDiscretization
* \copydoc Dumux::StaggeredFreeFlowConnectivityMap
*/
#ifndef DUMUX_STAGGERED_FREEFLOW_CONNECTIVITY_MAP_HH
#define DUMUX_STAGGERED_FREEFLOW_CONNECTIVITY_MAP_HH
......@@ -31,6 +30,11 @@
namespace Dumux
{
/*!
* \ingroup StaggeredDiscretization
* \brief Stores the dof indices corresponding to the neighboring cell centers and faces
* that contribute to the derivative calculation. Specialization for the staggered free flow model.
*/
template<class TypeTag>
class StaggeredFreeFlowConnectivityMap
{
......@@ -58,11 +62,7 @@ class StaggeredFreeFlowConnectivityMap
public:
/*!
* \brief Initialize the AssemblyMap object.
*
* \param problem The problem which we want to simulate.
*/
//! Update the map and prepare the stencils
void update(const FVGridGeometry& fvGridGeometry)
{
const auto numDofsCC = fvGridGeometry.gridView().size(0);
......@@ -98,21 +98,25 @@ public:
}
}
//! Returns the stencil of a cell center dof w.r.t. other cell center dofs
const std::vector<IndexType>& operator() (CellCenterIdxType, CellCenterIdxType, const IndexType globalI) const
{
return cellCenterToCellCenterMap_[globalI];
}
//! Returns the stencil of a cell center dof w.r.t. face dofs
const std::vector<IndexType>& operator() (CellCenterIdxType, FaceIdxType, const IndexType globalI) const
{
return cellCenterToFaceMap_[globalI];
}
//! Returns the stencil of a face dof w.r.t. cell center dofs
const std::vector<IndexType>& operator() (FaceIdxType, CellCenterIdxType, const IndexType globalI) const
{
return faceToCellCenterMap_[globalI];
}
//! Returns the stencil of a face dof w.r.t. other face dofs
const std::vector<IndexType>& operator() (FaceIdxType, FaceIdxType, const IndexType globalI) const
{
return faceToFaceMap_[globalI];
......
......@@ -18,8 +18,8 @@
*****************************************************************************/
/*!
* \file
* \brief The face variables class for free flow staggered grid models.
* Contains all relevant velocities for the assembly of the momentum balance.
* \ingroup StaggeredDiscretization
* \copydoc Dumux::StaggeredFaceVariables
*/
#ifndef DUMUX_DISCRETIZATION_STAGGERED_FREEFLOW_FACEVARIABLES_HH
#define DUMUX_DISCRETIZATION_STAGGERED_FREEFLOW_FACEVARIABLES_HH
......@@ -27,8 +27,14 @@
#include <dune/common/fvector.hh>
#include <dumux/common/properties.hh>
namespace Dumux {
namespace Dumux
{
/*!
* \ingroup StaggeredDiscretization
* \brief The face variables class for free flow staggered grid models.
* Contains all relevant velocities for the assembly of the momentum balance.
*/
template<class TypeTag>
class StaggeredFaceVariables
{
......
......@@ -18,8 +18,8 @@
*****************************************************************************/
/*!
* \file
* \brief This file contains the data which is required to calculate
* diffusive mass fluxes due to molecular diffusion with Fourier's law.
* \ingroup StaggeredDiscretization
* \brief Specialization of Fourier's Law for the staggered free flow method.
*/
#ifndef DUMUX_DISCRETIZATION_STAGGERED_FOURIERS_LAW_HH
#define DUMUX_DISCRETIZATION_STAGGERED_FOURIERS_LAW_HH
......@@ -37,7 +37,7 @@ template<class TypeTag, DiscretizationMethods discMethod>
class FouriersLawImplementation;
/*!
* \ingroup StaggeredFouriersLaw
* \ingroup StaggeredDiscretization
* \brief Specialization of Fourier's Law for the staggered free flow method.
*/
template <class TypeTag>
......@@ -63,6 +63,7 @@ public:
//! We don't cache anything for this law
using Cache = FluxVariablesCaching::EmptyDiffusionCache<TypeTag>;
//! calculate the molecular diffusive fluxes
static Scalar diffusiveFluxForCellCenter(const Problem& problem,
const Element& element,
const FVElementGeometry& fvGeometry,
......
......@@ -18,8 +18,8 @@
*****************************************************************************/
/*!
* \file
* \brief This file contains the data which is required to calculate
* diffusive mass fluxes due to molecular diffusion with Fick's law.
* \ingroup StaggeredDiscretization
* \brief Specialization of Maxwell Stefan's Law for the Staggered method.
*/
#ifndef DUMUX_DISCRETIZATION_STAGGERED_MAXWELL_STEFAN_LAW_HH
#define DUMUX_DISCRETIZATION_STAGGERED_MAXWELL_STEFAN_LAW_HH
......@@ -39,7 +39,7 @@ template <class TypeTag, DiscretizationMethods DM>
class MaxwellStefansLawImplementation;
/*!
* \ingroup StaggeredMaxwellStefansLaw
* \ingroup StaggeredDiscretization
* \brief Specialization of Maxwell Stefan's Law for the Staggered method.
*/
template <class TypeTag>
......
......@@ -17,10 +17,12 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>. *
*****************************************************************************/
/*!
* \ingroup Properties
* \ingroup StaggeredDiscretization
* \file
*
* \brief Defines a type tag and some properties for free-flow models using the staggered scheme.
* \brief Defines a type tag and some properties for ree-flow models using the staggered scheme.
This scheme features degrees of freedom at the elements' centers and intersections (faces).
* TODO: detailed documentation and figures
*/
#ifndef DUMUX_STAGGERD_FREE_FLOW_PROPERTIES_HH
......@@ -109,6 +111,7 @@ public:
using type = StaggeredFreeFlowBoundaryTypes<size>;
};
//! The velocity output
SET_TYPE_PROP(StaggeredFreeFlowModel, VelocityOutput, StaggeredFreeFlowVelocityOutput<TypeTag>);
SET_TYPE_PROP(StaggeredFreeFlowModel, AssemblyMap, StaggeredFreeFlowConnectivityMap<TypeTag>);
......
......@@ -18,8 +18,8 @@
*****************************************************************************/
/*!
* \file
* \brief Helper class constructing the dual grid finite volume geometries
* for the staggered discretization method
* \ingroup StaggeredDiscretization
* \copydoc Dumux::FreeFlowStaggeredGeometryHelper
*/
#ifndef DUMUX_DISCRETIZATION_STAGGERED_GEOMETRY_HELPER_HH
#define DUMUX_DISCRETIZATION_STAGGERED_GEOMETRY_HELPER_HH
......@@ -35,6 +35,10 @@
namespace Dumux
{
/*!
* \ingroup StaggeredDiscretization
* \brief Data stored per sub face
*/
template<class Scalar, class GlobalPosition>
struct PairData
{
......@@ -48,8 +52,8 @@ struct PairData
GlobalPosition virtualOuterParallelFaceDofPos;
};
/*!
* \ingroup StaggeredDiscretization
* \brief Returns the dirction index of the facet (0 = x, 1 = y, 2 = z)
*/
template<class Vector>
......@@ -60,7 +64,11 @@ inline static int directionIndex(Vector&& vector)
return idx;
}
//! A class to create face information per intersection
/*!
* \ingroup StaggeredDiscretization
* \brief Helper class constructing the dual grid finite volume geometries
* for the free flow staggered discretization method.
*/
template<class GridView>
class FreeFlowStaggeredGeometryHelper
{
......@@ -89,6 +97,7 @@ public:
FreeFlowStaggeredGeometryHelper(const Element& element, const GridView& gridView) : element_(element), elementGeometry_(element.geometry()), gridView_(gridView)
{ }
//! update the local face
template<class IntersectionMapper>
void updateLocalFace(const IntersectionMapper& intersectionMapper_, const Intersection& intersection)
{
......@@ -97,7 +106,7 @@ public:
fillPairData_();
}
/*!
/*!
* \brief Returns the global dofIdx of the intersection itself
*/
int dofIndex() const
......@@ -107,7 +116,7 @@ public:
return gridView_.indexSet().subIndex(intersection_.inside(), inIdx, codimIntersection);
}
/*!
/*!
* \brief Returns the global dofIdx of the opposing intersection
*/
int dofIndexOpposingFace() const
......@@ -118,8 +127,8 @@ public:
}
/*!
* \brief Returns the local index of the face (i.e. the intersection)
*/