Commit 1cc3dcad authored by Müller, Felix's avatar Müller, Felix

Corrected types for local interpolation

parent 598f8fc0
Pipeline #1449 failed with stage
in 23 minutes and 49 seconds
......@@ -30,6 +30,10 @@ class NodeDataTransfer<Dune::Functions::LagrangeNode<GV,k,TP>, RangeType>
using LocalBasis = typename Node::FiniteElement::Traits::LocalBasisType;
using LBRangeType = typename LocalBasis::Traits::RangeType;
using LocalInterpolation = typename Node::FiniteElement::Traits::LocalBasisType;
using LIDomainType = typename LocalInterpolation::Traits::DomainType;
using LIRangeType = typename LocalInterpolation::Traits::RangeType;
using ElementData = std::vector<RangeType>;
using PersistentContainer = std::map<IdType, ElementData>;
using Mapper = Dune::LeafMultipleCodimMultipleGeomTypeMapper<typename GV::Grid>;
......@@ -57,7 +61,7 @@ private:
// Evaluate Function in father element, with coordinates given in child element
class EvalFather
: public Dune::VirtualFunction<LocalCoordinate, RangeType>
: public Dune::VirtualFunction<LIDomainType, LIRangeType>
{
public:
EvalFather(Node const& node, PersistentContainer const& container, IdSet const& idSet)
......@@ -76,13 +80,13 @@ private:
}
// coordinate transform from child to father element
inline LocalCoordinate trafo(LocalCoordinate const& x) const
inline LIDomainType trafo(LIDomainType const& x) const
{
return geo_.local(childGeo_.value().global(x));
}
// evaluate father in child coordinate x
virtual void evaluate(LocalCoordinate const& x, RangeType& y) const override
virtual void evaluate(LIDomainType const& x, LIRangeType& y) const override
{
localBasis_.evaluateFunction(trafo(x), shapeValues_);
......@@ -234,7 +238,7 @@ void NodeDataTransfer<Dune::Functions::LagrangeNode<GV,k,TP>, RangeType>
std::vector<LBRangeType> shapeValues;
auto childNode = lv.tree();
auto evalLeaf = [&](LocalCoordinate const& x) {
auto evalLeaf = [&](LIDomainType const& x) {
std::tie(child, local) = findLeafEntity(father, geo.global(x));
bindTree(childNode, child);
......@@ -245,7 +249,7 @@ void NodeDataTransfer<Dune::Functions::LagrangeNode<GV,k,TP>, RangeType>
assert(search != oldDOFs_.end());
auto const& dofs = search->second;
RangeType y(0);
LIRangeType y(0);
for (std::size_t i = 0; i < shapeValues.size(); ++i)
y += shapeValues[i] * dofs[i];
......@@ -256,7 +260,7 @@ void NodeDataTransfer<Dune::Functions::LagrangeNode<GV,k,TP>, RangeType>
bindTree(node, father);
auto const& fe = node.finiteElement();
using FFC = Dune::Functions::FunctionFromCallable<RangeType(LocalCoordinate), decltype(evalLeaf)>;
using FFC = Dune::Functions::FunctionFromCallable<LIRangeType(LIDomainType), decltype(evalLeaf)>;
fe.localInterpolation().interpolate(FFC(evalLeaf), fatherDOFs);
}
......
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