Hi,
Le lundi 5 février 2007 02:49, Timothy Cox a écrit :
> Can I set up a P2 function using a formula like:
> femfunction f(M)=x^2;
If you do this you will interpolate the function x^2 on a P1 function space. 
But, you can do it.
> if so how?
        femfunction f(M:P2)=x^2;
will do what you want. Note that available keywords are P0, P1(default) and 
P2. If the mesh M is a mesh of hexahedra, this will build a Q2 function.

You can also solve problems with this kind of element :
        solve(u:P2) in ...
or compute integrals :
        int[M:P2](...

there are examples in the exercises from Sevilla that you can download from 
        http://www.freefem.org/ff3d/index.html

Best regards,
Stéphane.



_______________________________________________
ff3d-users mailing list
[email protected]
http://lists.nongnu.org/mailman/listinfo/ff3d-users

Reply via email to