[Dune] PQkLocalFiniteElement in dune-localfunction
Simon Praetorius
simon.praetorius at tu-dresden.de
Thu Apr 28 01:09:44 CEST 2016
Hello,
I'm currently working on calculating derivatives of solution-vectors
build on functionspacebases from dune-function, i.e. PQkNodalBasis with
order k > 0. When evaluating the derivative I get an error about non
matching types, since for some reasons the PQkLocalFiniteElementCache
generates a LocalBasisType for P0LocalFiniteElements only (independent
of k, always the order 0 is chosen). Is this a bug or a feature or
simply not yet implemented for general k?
Best regards,
Simon
Details:
------------------
The evaluation of a partial derivative is called by
pqknodalbasis.localView().tree().finiteElement().localBasis().template
evaluate<1>(direction, position, derivativeVector);
with
decltype(direction) = std::array<int, 1>
decltype(position) = FieldVector<double,dim>
decltype(derivativeVector) = std::vector< DerivativeType >
using DerivativeType =
PQkNodalBasis<...>::LocalView::Tree::FiniteElement::Traits::LocalBasisType::Traits::RangeType
The problem is in the LocalBasisType, i.e.
using LocalBasisType =
decltype(pqknodalbasis.localView().tree().finiteElement().localBasis())::(...)
= LocalBasisVirtualInterface< LocalBasisTraits<DF,n,D,RF,m,R,J, *** 0
*** > >
Thus, the maximal order of implemented partial derivatives is always set
to 0.
See also PQkLocalFiniteElementCache>D,R,dim,k>::FiniteElementType in
pqkfactory.hh:115
ErrorMessage:
-------------------------
File://dune/localfunctions/common/virtualinterface.hh: In instantiation
of 'void Dune::LocalBasisVirtualInterface<T>::evaluate(const
std::array<int, k>&, const typename
Dune::LocalBasisVirtualInterface<T>::Traits::DomainType&,
std::vector<typename T::RangeType>&) const [with int k = 1; T =
Dune::LocalBasisTraits<double, 2, Dune::FieldVector<double, 2>, double,
1, Dune::FieldVector<double, 1>, Dune::FieldMatrix<double, 1, 2>, 0>;
typename Dune::LocalBasisVirtualInterface<T>::Traits::DomainType =
Dune::FieldVector<double, 2>; typename T::RangeType =
Dune::FieldVector<double, 1>]':
(...)
File://dune/localfunctions/common/virtualinterface.hh:211:44: error:
invalid initialization of reference of type 'const OrderKBaseInterface&
{aka const
Dune::LocalBasisVirtualInterfaceBase<Dune::LocalBasisTraits<double, 2,
Dune::FieldVector<double, 2>, double, 1, Dune::FieldVector<double, 1>,
Dune::FieldMatrix<double, 1, 2>, 1> >&}' from expression of type 'const
Dune::LocalBasisVirtualInterface<Dune::LocalBasisTraits<double, 2,
Dune::FieldVector<double, 2>, double, 1, Dune::FieldVector<double, 1>,
Dune::FieldMatrix<double, 1, 2>, 0> >'
const OrderKBaseInterface& asBase = *this;
More information about the Dune
mailing list