Commit 258f4ce9 authored by Lukas Riedel's avatar Lukas Riedel

Add access to gravity vector and cache to FlowParamters

parent 74a1d84b
......@@ -42,6 +42,7 @@ private:
using Mapper = typename Dune::MultipleCodimMultipleGeomTypeMapper<
LevelGridView
>;
using Vector = typename Traits::Vector;
// Define the storage and cache for parameterizations and scaling
/// Index type used by the element mapper
......@@ -75,6 +76,8 @@ private:
ParameterStorage _param;
/// Currently cached parameterization (bound to element)
mutable Cache _cache;
/// Gravity vector
Vector _gravity;
private:
......@@ -100,8 +103,21 @@ public:
):
_config(config),
_gv(grid->levelGridView(0)),
_mapper(_gv, Dune::mcmgElementLayout())
{ }
_mapper(_gv, Dune::mcmgElementLayout()),
_gravity(0.0)
{
_gravity[Traits::dim - 1] = -1.0;
}
/// Return normalized gravity vector
const Vector& gravity() const { return _gravity; }
/// Return the current cache
const Cache& cache() const
{
verify_cache();
return _cache;
}
/// Bind to a grid entity. Required to call parameterization functions!
/** \param entity Grid entity (codim 0) to bind to
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment