diff --git a/dumux/discretization/cellcentered/mpfa/omethod/interactionvolume.hh b/dumux/discretization/cellcentered/mpfa/omethod/interactionvolume.hh index 75344066b6424dbc0b1b5f029023d32bbe7368bc..532846a65f6f19e134da70c4cc14557a3cf570d9 100644 --- a/dumux/discretization/cellcentered/mpfa/omethod/interactionvolume.hh +++ b/dumux/discretization/cellcentered/mpfa/omethod/interactionvolume.hh @@ -97,10 +97,13 @@ public: template<class TypeTag, class Traits> class CCMpfaOInteractionVolume : public CCMpfaInteractionVolumeBase<TypeTag, Traits> { - // The interaction volume implementation has to be friend, + // The interaction volume implementations have to be friend, // because some methods use the mpfa-o interaction volume as base friend typename GET_PROP_TYPE(TypeTag, InteractionVolume); - using Implementation = typename GET_PROP_TYPE(TypeTag, InteractionVolume); + friend typename Traits::BoundaryInteractionVolume; + + // We assume the actual implementation always to be the boundary-specific implementation + using Implementation = typename Traits::BoundaryInteractionVolume; using ParentType = CCMpfaInteractionVolumeBase<TypeTag, Traits>; using Problem = typename GET_PROP_TYPE(TypeTag, Problem); diff --git a/dumux/discretization/cellcentered/mpfa/omethodfps/interactionvolume.hh b/dumux/discretization/cellcentered/mpfa/omethodfps/interactionvolume.hh index 6a905987d6bbff25c1c9560da92e0b3e266d2ac9..add7c081b8fd5a458291dd4ba7c775ce03e9adb2 100644 --- a/dumux/discretization/cellcentered/mpfa/omethodfps/interactionvolume.hh +++ b/dumux/discretization/cellcentered/mpfa/omethodfps/interactionvolume.hh @@ -43,12 +43,8 @@ class CCMpfaOFpsInteractionVolumeTraits : public CCMpfaOInteractionVolumeTraits< public: // Interior boundaries can not yet be handled by the currend o-method fps implementation // In that case we use the o-interactionvolume, otherwise we use its own interaction volumes at the boundary - // TODO Fix the std::conditional - using BoundaryInteractionVolume = typename CCMpfaOInteractionVolumeTraits<TypeTag>::BoundaryInteractionVolume; - // using BoundaryInteractionVolume = typename std::conditional<GET_PROP_VALUE(TypeTag, EnableInteriorBoundaries), - // typename CCMpfaOInteractionVolumeTraits<TypeTag>::BoundaryInteractionVolume, - // typename CCMpfaInteractionVolumeImplementation<TypeTag, MpfaMethods::oMethodFps> - // >::type; + // TODO Implement this using std::conditional + using BoundaryInteractionVolume = CCMpfaInteractionVolumeImplementation<TypeTag, MpfaMethods::oMethodFps>; // The local sub-control volume type differs from the standard mpfa-o method using LocalScvType = CCMpfaOFpsLocalScv<TypeTag>; @@ -202,8 +198,7 @@ private: auto&& localScv = this->localScv_(localScvIdx); auto&& globalScv = this->fvGeometry_().scv(localScv.globalIndex()); auto&& element = this->localElement_(localScvIdx); - auto D = makeTensor_(getTensor(element, this->elemVolVars_()[globalScv], globalScv)); - + auto D = makeTensor_(getTensor(this->problem_(), element, this->elemVolVars_()[globalScv], this->fvGeometry_(), globalScv)); // the local finite element basis const auto& localBasis = feCache_.get(localScv.geometry().type()).localBasis(); @@ -248,7 +243,7 @@ private: auto&& localScv = this->localScv_(localScvIdx); auto&& globalScv = this->fvGeometry_().scv(localScv.globalIndex()); auto&& element = this->localElement_(localScvIdx);; - auto D = makeTensor_(getTensor(element, this->elemVolVars_()[globalScv], globalScv)); + auto D = makeTensor_(getTensor(this->problem_(), element, this->elemVolVars_()[globalScv], this->fvGeometry_(), globalScv)); // the local finite element bases of the scvs const auto& localBasis = feCache_.get(localScv.geometry().type()).localBasis();