P2 = 0; // set to 1 for second order elements Group { Omega = Region[ 1 ]; Gamma0 = Region[ 2 ]; } Function { f[] = -1; // f[] = X[] > 0 ? Sin[X[]] : 0; } Constraint { { Name u0; Case { { Region Gamma0; Value 0; } } } } Jacobian { { Name JVol; Case { { Region All; Jacobian Vol; } } } } Integration { { Name I1; Case { { Type Gauss; Case { { GeoElement Triangle; NumberOfPoints 6; } } } } } } FunctionSpace { { Name Hgrad_u; Type Form0; BasisFunction { { Name sn1n; NameOfCoef wn1n; Function BF_Node; Support Omega; Entity NodesOf[All]; } If(P2) { Name sn2e; NameOfCoef wn2e; Function BF_Node_2E; Support Omega; Entity EdgesOf[All]; } EndIf } Constraint { { NameOfCoef wn1n; EntityType NodesOf; NameOfConstraint u0; } If(P2) { NameOfCoef wn2e; EntityType EdgesOf; NameOfConstraint u0; } EndIf } } } Formulation { { Name Poisson; Type FemEquation; Quantity { { Name u; Type Local; NameOfSpace Hgrad_u; } } Equation { Galerkin { [ Dof{Grad u} , {Grad u} ]; In Omega; Integration I1; Jacobian JVol; } Galerkin { [ - f[] , {u} ]; In Omega; Integration I1; Jacobian JVol; } } } } Resolution { { Name Poisson; System { { Name A; NameOfFormulation Poisson; } } Operation { Generate[A]; Solve[A]; SaveSolution[A]; } } } PostProcessing { { Name Poisson; NameOfFormulation Poisson; Quantity { { Name u; Value{ Local{ [ {u} ]; In Omega; Jacobian JVol; } } } } } } PostOperation { { Name u; NameOfPostProcessing Poisson; Operation { Print[ u , OnElementsOf Omega , File "u.pos", Depth P2*2+1]; } } }