Skip to content
Snippets Groups Projects
Commit 22adf453 authored by Sander, Oliver's avatar Sander, Oliver
Browse files

Use a power basis to interpolate vector-valued functions

Scalar bases used to work for that, but that feature got
removed a long time ago.
parent b721f7bd
No related branches found
No related tags found
1 merge request!28Fix a few issues that I found using the clang sanitizer
Pipeline #3446 failed
......@@ -35,7 +35,7 @@ typedef double FDType;
#include <dune/functions/functionspacebases/lagrangebasis.hh>
#include <dune/functions/functionspacebases/interpolate.hh>
#include <dune/functions/functionspacebases/powerbasis.hh>
#include <dune/gfe/rigidbodymotion.hh>
#include <dune/gfe/localgeodesicfestiffness.hh>
......@@ -464,7 +464,15 @@ int main (int argc, char *argv[]) try
auto identity = [](const FieldVector<double,2>& x) -> FieldVector<double,3> { return {x[0], x[1], 0};};
std::vector<FieldVector<double,3> > v;
Functions::interpolate(feBasis, v, identity);
using namespace Functions::BasisFactory;
auto powerBasis = makeBasis(
gridView,
power<3>(
lagrange<1>(),
blockedInterleaved()
));
Functions::interpolate(powerBasis, v, identity);
for (size_t i=0; i<x.size(); i++)
x[i].r = v[i];
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment