Skip to content
Snippets Groups Projects
Commit b13c625e authored by Praetorius, Simon's avatar Praetorius, Simon
Browse files

decltype bug in DOFVectorView corrected

parent f8f4faa1
Branches
Tags
No related merge requests found
...@@ -17,9 +17,6 @@ LocalFunction::operator()(LocalDomain const& x) const ...@@ -17,9 +17,6 @@ LocalFunction::operator()(LocalDomain const& x) const
{ {
using Node = std::decay_t<decltype(node)>; using Node = std::decay_t<decltype(node)>;
using LocalBasisRange = typename LocalFunction::template LocalBasisRange<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&& fe = node.finiteElement();
auto&& localBasis = fe.localBasis(); auto&& localBasis = fe.localBasis();
...@@ -29,12 +26,14 @@ LocalFunction::operator()(LocalDomain const& x) const ...@@ -29,12 +26,14 @@ LocalFunction::operator()(LocalDomain const& x) const
// Get range entry associated to this node // Get range entry associated to this node
auto&& re = nodeToRangeEntry(node, y); auto&& re = nodeToRangeEntry(node, y);
using RangeBlock = std::decay_t<decltype(re)>;
for (std::size_t i = 0; i < localBasis.size(); ++i) { for (std::size_t i = 0; i < localBasis.size(); ++i) {
auto&& multiIndex = localIndexSet_.index(node.localIndex(i)); auto&& multiIndex = localIndexSet_.index(node.localIndex(i));
// Get coefficient associated to i-th shape function // Get coefficient associated to i-th shape function
auto&& c = coefficients[multiIndex]; auto&& c = coefficients[multiIndex];
using CoefficientBlock = std::decay_t<decltype(c)>;
// Get value of i-th shape function // Get value of i-th shape function
auto&& v = shapeFunctionValues[i]; auto&& v = shapeFunctionValues[i];
...@@ -74,9 +73,6 @@ GradientLocalFunction::operator()(LocalDomain const& x) const ...@@ -74,9 +73,6 @@ GradientLocalFunction::operator()(LocalDomain const& x) const
// TODO: may DOFVectorView::Range to FieldVector type if necessary // TODO: may DOFVectorView::Range to FieldVector type if necessary
using LocalDerivativeTraits = Dune::Functions::DefaultDerivativeTraits<Dune::FieldVector<double,1>(Domain)>; using LocalDerivativeTraits = Dune::Functions::DefaultDerivativeTraits<Dune::FieldVector<double,1>(Domain)>;
using GradientBlock = typename LocalDerivativeTraits::Range; 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&& fe = node.finiteElement();
auto&& localBasis = fe.localBasis(); auto&& localBasis = fe.localBasis();
...@@ -94,12 +90,14 @@ GradientLocalFunction::operator()(LocalDomain const& x) const ...@@ -94,12 +90,14 @@ GradientLocalFunction::operator()(LocalDomain const& x) const
// Get range entry associated to this node // Get range entry associated to this node
auto&& re = nodeToRangeEntry(node, dy); auto&& re = nodeToRangeEntry(node, dy);
using RangeBlock = std::decay_t<decltype(re)>;
for (std::size_t i = 0; i < localBasis.size(); ++i) { for (std::size_t i = 0; i < localBasis.size(); ++i) {
auto&& multiIndex = localIndexSet_.index(node.localIndex(i)); auto&& multiIndex = localIndexSet_.index(node.localIndex(i));
// Get coefficient associated to i-th shape function // Get coefficient associated to i-th shape function
auto&& c = coefficients[multiIndex]; auto&& c = coefficients[multiIndex];
using CoefficientBlock = std::decay_t<decltype(c)>;
// Get value of i-th transformed reference gradient // Get value of i-th transformed reference gradient
auto&& grad = gradients[i]; auto&& grad = gradients[i];
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment