Group { Omega = Region[ 1 ] ; } Jacobian { { Name JVol ; Case { { Region All ; Jacobian Vol ; } } } } Integration { { Name I1 ; Case { { Type Gauss ; Case { { GeoElement Line ; NumberOfPoints 4 ; } { GeoElement Triangle ; NumberOfPoints 12 ; } { GeoElement Quadrangle ; NumberOfPoints 7 ; } { GeoElement Tetrahedron ; NumberOfPoints 15 ; } { GeoElement Hexahedron ; NumberOfPoints 34 ; } { GeoElement Prism ; NumberOfPoints 9 ; } } } } } } FunctionSpace { { Name Hgrad ; Type Form0 ; BasisFunction { { Name sn1 ; NameOfCoef wn1 ; Function BF_Node ; Support Omega ; Entity NodesOf[ All ] ; } { Name sn2e ; NameOfCoef wn2e ; Function BF_Node_2E ; Support Omega ; Entity EdgesOf[ All ] ; } // only necessary for non-simplices: { Name sn2f ; NameOfCoef wn2f ; Function BF_Node_2F ; Support Omega ; Entity FacetsOf[ All ] ; } { Name sn2v ; NameOfCoef wn2v ; Function BF_Node_2V ; Support Omega ; Entity VolumesOf[ All ] ; } } } } Formulation { { Name L2Projection ; Type FemEquation ; Quantity { { Name u ; Type Local ; NameOfSpace Hgrad ; } } Equation { Galerkin { [ Dof{u} , {u} ] ; In Omega ; Jacobian JVol ; Integration I1 ; } Galerkin { [ - (X[]^2+Y[]^2+Z[]^2) , {u} ] ; In Omega ; Jacobian JVol ; Integration I1 ; } } } } Resolution { { Name L2Projection ; System { { Name A ; NameOfFormulation L2Projection ; } } Operation { Generate[A]; Solve[A]; SaveSolution[A]; } } } PostProcessing { { Name L2Projection ; NameOfFormulation L2Projection ; Quantity { { Name u ; Value { Local { [ {u} ] ; In Omega ; Jacobian JVol; } } } { Name du ; Value { Local { [ {d u} ] ; In Omega ; Jacobian JVol; } } } } } } ep = 1.e-4 ; PostOperation { { Name L2Projection ; NameOfPostProcessing L2Projection ; Operation { Print[ u , OnElementsOf Omega, File "u.pos" , Depth 2 ] ; Print[ du , OnElementsOf Omega, File "du.pos" , Depth 2 ] ; Print[ u , OnPlane {{-1+ep,-1+ep,0.5}{1-ep,-1+ep,0.5}{-1+ep,1-ep,0.5}}{151,151} , File "cut_u.pos" ] ; Print[ du , OnPlane {{-1+ep,-1+ep,0.5}{1-ep,-1+ep,0.5}{-1+ep,1-ep,0.5}}{151,151} , File "cut_du.pos" ] ; } } }