Forum Message

 

 

We have moved the forum to https://forum.ngsolve.org . This is an archived version of the topics until 05/05/23. All the topics were moved to the new forum and conversations can be continued there. This forum is just kept as legacy to not invalidate old links. If you want to continue a conversation just look for the topic in the new forum.

Notice

The forum is in read only mode.

How to set up a linear form with an interpolation operator

More
1 year 2 months ago - 1 year 2 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 2 months ago by dwersd.
More
1 year 2 months ago - 1 year 2 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 2 months ago by mneunteufel.
Time to create page: 0.102 seconds