Skip to content
Snippets Groups Projects
Commit 45884521 authored by Timo Koch's avatar Timo Koch
Browse files

Merge branch 'fix/mpfa-error-clang3.8' into 'master'

[fix][mpfa][fvgridgeom] rearrange public aliases

Closes #597

See merge request !1293
parents e6ddd923 1c981aba
No related branches found
No related tags found
1 merge request!1293[fix][mpfa][fvgridgeom] rearrange public aliases
......@@ -85,14 +85,10 @@ class CCMpfaFVGridGeometry<GV, Traits, true>
using ScvfOutsideGridIndexStorage = typename Traits::SubControlVolumeFace::Traits::OutsideGridIndexStorage;
// check if two types of interaction volumes are considered in this problem
using Helper = typename Traits::template MpfaHelper<ThisType>;
static constexpr bool considerSecondaryIVs = Helper::considerSecondaryIVs();
public:
//! export the flip scvf index set type
using FlipScvfIndexSet = std::vector<ScvfOutsideGridIndexStorage>;
//! export the mpfa helper type
using MpfaHelper = Helper;
//! export the grid interaction volume index set type
using GridIVIndexSets = typename Traits::template GridIvIndexSets<ThisType>;
//! export the type to be used for indicators where to use the secondary ivs
......@@ -110,6 +106,8 @@ public:
using DofMapper = typename Traits::ElementMapper;
//! export the grid view type
using GridView = GV;
//! export the mpfa helper type
using MpfaHelper = typename Traits::template MpfaHelper<ThisType>;
//! export the discretization method this geometry belongs to
static constexpr DiscretizationMethod discMethod = DiscretizationMethod::ccmpfa;
......@@ -117,6 +115,9 @@ public:
//! The maximum admissible stencil size (used for static memory allocation during assembly)
static constexpr int maxElementStencilSize = Traits::maxElementStencilSize;
//! State if only a single type is used for interaction volumes
static constexpr bool hasSingleInteractionVolumeType = !MpfaHelper::considerSecondaryIVs();
//! Constructor without indicator function for secondary interaction volumes
//! Per default, we use the secondary IVs at branching points & boundaries
CCMpfaFVGridGeometry(const GridView& gridView)
......@@ -158,13 +159,13 @@ public:
//! Returns true if secondary interaction volumes are used around a given vertex (index).
//! This specialization is enabled if the use of secondary interaction volumes is active.
template<bool useSecondary = considerSecondaryIVs, std::enable_if_t<useSecondary, bool> = 0>
template<bool useSecondary = !hasSingleInteractionVolumeType, std::enable_if_t<useSecondary, bool> = 0>
bool vertexUsesSecondaryInteractionVolume(GridIndexType vIdxGlobal) const
{ return secondaryInteractionVolumeVertices_[vIdxGlobal]; }
//! Returns true if secondary interaction volumes are used around a given vertex (index).
//! If the use of secondary interaction volumes is disabled, this can be evaluated at compile time.
template<bool useSecondary = considerSecondaryIVs, std::enable_if_t<!useSecondary, bool> = 0>
template<bool useSecondary = !hasSingleInteractionVolumeType, std::enable_if_t<!useSecondary, bool> = 0>
constexpr bool vertexUsesSecondaryInteractionVolume(GridIndexType vIdxGlobal) const { return false; }
//! update all fvElementGeometries (do this again after grid adaption)
......@@ -443,15 +444,9 @@ class CCMpfaFVGridGeometry<GV, Traits, false>
using ScvfOutsideGridIndexStorage = typename Traits::SubControlVolumeFace::Traits::OutsideGridIndexStorage;
// check if two types of interaction volumes are considered in this problem
using Helper = typename Traits::template MpfaHelper<ThisType>;
static constexpr bool considerSecondaryIVs = Helper::considerSecondaryIVs();
public:
//! export the flip scvf index set type
using FlipScvfIndexSet = std::vector<ScvfOutsideGridIndexStorage>;
//! export the mpfa helper type
using MpfaHelper = Helper;
//! export the grid interaction volume index set type
using GridIVIndexSets = typename Traits::template GridIvIndexSets<ThisType>;
//! export the type to be used for indicators where to use the secondary ivs
......@@ -469,6 +464,8 @@ public:
using DofMapper = typename Traits::ElementMapper;
//! export the grid view type
using GridView = GV;
//! export the mpfa helper type
using MpfaHelper = typename Traits::template MpfaHelper<ThisType>;
//! export the discretization method this geometry belongs to
static constexpr DiscretizationMethod discMethod = DiscretizationMethod::ccmpfa;
......@@ -476,6 +473,9 @@ public:
//! The maximum admissible stencil size (used for static memory allocation during assembly)
static constexpr int maxElementStencilSize = Traits::maxElementStencilSize;
//! State if only a single type is used for interaction volumes
static constexpr bool hasSingleInteractionVolumeType = !MpfaHelper::considerSecondaryIVs();
//! Constructor without indicator function for secondary interaction volumes
//! Per default, we use the secondary IVs at branching points & boundaries
CCMpfaFVGridGeometry(const GridView& gridView)
......@@ -517,13 +517,13 @@ public:
//! Returns true if secondary interaction volumes are used around a given vertex (index).
//! This specialization is enabled if the use of secondary interaction volumes is active.
template<bool useSecondary = considerSecondaryIVs, std::enable_if_t<useSecondary, bool> = 0>
template<bool useSecondary = !hasSingleInteractionVolumeType, std::enable_if_t<useSecondary, bool> = 0>
bool vertexUsesSecondaryInteractionVolume(GridIndexType vIdxGlobal) const
{ return secondaryInteractionVolumeVertices_[vIdxGlobal]; }
//! Returns true if secondary interaction volumes are used around a given vertex (index).
//! If the use of secondary interaction volumes is disabled, this can be evaluated at compile time.
template<bool useSecondary = considerSecondaryIVs, std::enable_if_t<!useSecondary, bool> = 0>
template<bool useSecondary = !hasSingleInteractionVolumeType, std::enable_if_t<!useSecondary, bool> = 0>
constexpr bool vertexUsesSecondaryInteractionVolume(GridIndexType vIdxGlobal) const { return false; }
//! Returns true if a given vertex lies on a processor boundary inside a ghost element.
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment