Bdry_Constraint

Top  Previous  Next

{  BDRY_CONSTRAINT.PDE      }

{  This problem demonstrates the use of boundary-integral constraints }

 

title 'Boundary Constraint Test'

 

Variables

    u

 

equations

    div(grad(u)) +x = 0;

 

constraints

    bintegral(u,"outer") = bintegral(1,"outer")

 

boundaries

    Region 1

       start "outer" (-1,-1)

       natural(u) = 0       line to (1,-1) to (1,1) to (-1,1) to close

 

monitors

    contour(u)  report(bintegral(u,"outer"))

plots

    contour(u)

    summary

    report("Constraint Validation:")

    report(bintegral(u,"outer"))

    report(bintegral(1,"outer"))

 

end