Commit 6a094580 authored by Andreas Dedner's avatar Andreas Dedner

moved some helper class from inside the lfe interpolation class into the

Fem::Impl namespace to make them easier to use in other contexts
parent ebaf7a43
Pipeline #18080 passed with stage
in 59 minutes and 7 seconds
......@@ -300,6 +300,8 @@ namespace Dune
typedef typename GF::LocalFunctionType::JacobianRangeType JacobianRangeType;
typedef typename GF::LocalFunctionType::HessianRangeType HessianRangeType;
static const int dimRange = RangeType::dimension;
explicit Type ( const GridFunctionType &gridFunction )
: GridFunctionType::LocalFunctionType( gridFunction ),
gridFunction_( gridFunction )
......@@ -367,6 +369,7 @@ namespace Dune
typedef typename GridFunctionDecayType::JacobianRangeType JacobianRangeType;
typedef typename GridFunctionDecayType::HessianRangeType HessianRangeType;
typedef typename GridFunctionDecayType::FunctionSpaceType FunctionSpaceType;
static const int dimRange = RangeType::dimension;
template<class Arg, std::enable_if_t<std::is_constructible<GF, Arg>::value, int> = 0>
explicit Type ( Arg&& gridFunction )
......
......@@ -137,30 +137,9 @@ namespace Dune
LocalInterpolationType localInterpolation_;
};
// a scalar valued shape basis function set taken from
// dune-localfunction - for this the vector value 'blow up' is supported
// as with other spaces
template< class Space, class LocalInterpolation >
class LocalFiniteElementInterpolation<Space,LocalInterpolation,true>
namespace Impl
{
typedef LocalFiniteElementInterpolation< Space, LocalInterpolation,true > ThisType;
public:
typedef typename Space::BasisFunctionSetType BasisFunctionSetType;
typedef LocalInterpolation LocalInterpolationType;
private:
typedef typename BasisFunctionSetType::FunctionSpaceType FunctionSpaceType;
typedef typename FunctionSpaceType::RangeType RangeType;
typedef typename FunctionSpaceType::RangeFieldType RangeFieldType;
static const int dimRange = FunctionSpaceType::dimRange;
typedef std::size_t size_type;
typedef VerticalDofAlignment< BasisFunctionSetType, RangeType> DofAlignmentType;
template <int dimRange>
struct RangeConverter
{
RangeConverter ( std::size_t range ) : range_( range ) {}
......@@ -195,6 +174,31 @@ namespace Dune
void resize( const unsigned int) {}
};
}
// a scalar valued shape basis function set taken from
// dune-localfunction - for this the vector value 'blow up' is supported
// as with other spaces
template< class Space, class LocalInterpolation >
class LocalFiniteElementInterpolation<Space,LocalInterpolation,true>
{
typedef LocalFiniteElementInterpolation< Space, LocalInterpolation,true > ThisType;
public:
typedef typename Space::BasisFunctionSetType BasisFunctionSetType;
typedef LocalInterpolation LocalInterpolationType;
private:
typedef typename BasisFunctionSetType::FunctionSpaceType FunctionSpaceType;
typedef typename FunctionSpaceType::RangeType RangeType;
typedef typename FunctionSpaceType::RangeFieldType RangeFieldType;
static const int dimRange = FunctionSpaceType::dimRange;
typedef std::size_t size_type;
typedef VerticalDofAlignment< BasisFunctionSetType, RangeType> DofAlignmentType;
public:
explicit LocalFiniteElementInterpolation ( const BasisFunctionSetType &basisFunctionSet,
const LocalInterpolationType &localInterpolation = LocalInterpolationType() )
......@@ -211,9 +215,9 @@ namespace Dune
std::fill(localDofVector.begin(),localDofVector.end(),0);
for( std::size_t i = 0; i < dimRange; ++i )
{
SubDofVectorWrapper< Vector, DofAlignmentType > subLdv( localDofVector, i, dofAlignment_ );
Impl::SubDofVectorWrapper< Vector, DofAlignmentType > subLdv( localDofVector, i, dofAlignment_ );
(*this)(
localFunctionConverter( localFunction, RangeConverter(i) ),
localFunctionConverter( localFunction, Impl::RangeConverter<dimRange>(i) ),
subLdv, PriorityTag<42>()
);
}
......
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