This is a Pyhon program can be used to evaluate L2 projection Pf(x) for a given function f(x) in 2D.
The main file is <L2Projection2D.py>
The following results for 32 elemnts (25 nodes) in the domain [-1,1]^2.
which gives the mass matrix:
which evaluated on the following mesh:
For the given function:
f(x,y)= sin(sqrt(x^2 + y^2))
Note: you can shange the function from main file.
Maged Shaban
magshaban[at]gmail.com