Commit b13c625e authored by Praetorius, Simon's avatar Praetorius, Simon
Browse files

decltype bug in DOFVectorView corrected

parent f8f4faa1
......@@ -17,9 +17,6 @@ LocalFunction::operator()(LocalDomain const& x) const
{
using Node = std::decay_t<decltype(node)>;
using LocalBasisRange = typename LocalFunction::template LocalBasisRange<Node>;
using MultiIndex = typename LocalIndexSet::MultiIndex;
using CoefficientBlock = typename std::decay<decltype(std::declval<Vector>()[std::declval<MultiIndex>()])>::type;
using RangeBlock = std::decay_t<decltype(std::declval<NodeToRangeEntry>()(node, y))>;
auto&& fe = node.finiteElement();
auto&& localBasis = fe.localBasis();
......@@ -29,12 +26,14 @@ LocalFunction::operator()(LocalDomain const& x) const
// Get range entry associated to this node
auto&& re = nodeToRangeEntry(node, y);
using RangeBlock = std::decay_t<decltype(re)>;
for (std::size_t i = 0; i < localBasis.size(); ++i) {
auto&& multiIndex = localIndexSet_.index(node.localIndex(i));
// Get coefficient associated to i-th shape function
auto&& c = coefficients[multiIndex];
using CoefficientBlock = std::decay_t<decltype(c)>;
// Get value of i-th shape function
auto&& v = shapeFunctionValues[i];
......@@ -74,9 +73,6 @@ GradientLocalFunction::operator()(LocalDomain const& x) const
// TODO: may DOFVectorView::Range to FieldVector type if necessary
using LocalDerivativeTraits = Dune::Functions::DefaultDerivativeTraits<Dune::FieldVector<double,1>(Domain)>;
using GradientBlock = typename LocalDerivativeTraits::Range;
using MultiIndex = typename LocalIndexSet::MultiIndex;
using CoefficientBlock = typename std::decay<decltype(std::declval<Vector>()[std::declval<MultiIndex>()])>::type;
using RangeBlock = std::decay_t<decltype(std::declval<NodeToRangeEntry>()(node, dy))>;
auto&& fe = node.finiteElement();
auto&& localBasis = fe.localBasis();
......@@ -94,12 +90,14 @@ GradientLocalFunction::operator()(LocalDomain const& x) const
// Get range entry associated to this node
auto&& re = nodeToRangeEntry(node, dy);
using RangeBlock = std::decay_t<decltype(re)>;
for (std::size_t i = 0; i < localBasis.size(); ++i) {
auto&& multiIndex = localIndexSet_.index(node.localIndex(i));
// Get coefficient associated to i-th shape function
auto&& c = coefficients[multiIndex];
using CoefficientBlock = std::decay_t<decltype(c)>;
// Get value of i-th transformed reference gradient
auto&& grad = gradients[i];
......
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