Hi,
I have given the setting
V = VectorElement(“Lagrange”, triangle, 2)
Q = FiniteElement(“Lagrange”, triangle, 1)
TH = V*Q
Now, I have given a dolfin::Function y which belongs to V.
I now want to create a dolfin::Function yp in TH where I write the function y into the mixed function yp. How is the syntax in c++?
lets say something like this (but this doesnt work unfortunately…)
std::shared_ptr < dolfin::Function> yp(new dolfin::Function(TH));
yp->operator [] (0).vector() = y.vector()
I have seen some guides for dolfin::assing or using collapsing the dofmap for python, but I am not able to construct something similar in c++. It would be of great help if anyone could give me advise…!
Many thanks in advance