How to set up a linear form with an interpolation operator

More
1 year 10 months ago - 1 year 10 months ago #4664 by dwersd
Dear all,
I'm trying to set up the following linear form in NGSolve (see the image in the attachment) where f and g are two known functions and \phi_h is my test. But the problem is that I have no idea how to implement the Lagrange interpolation I_h in the code. Does anybody have some ideas? Thank you very much!
Last edit: 1 year 10 months ago by dwersd.
More
1 year 10 months ago - 1 year 10 months ago #4668 by mneunteufel
Hi,

the Interpolate command interpolates a given function into a given finite element space 

Grad(f)*Grad(Interpolate(g*\phi_h, H1(mesh,order=1)))*dx 

Best,
Michael
Last edit: 1 year 10 months ago by mneunteufel.
Time to create page: 0.143 seconds