MATH 676 – Finite element methods in scientific computing Wolfgang Bangerth, Texas A&M University http://www.dealii.org/ Wolfgang Bangerth Lecture 31.6: Nonlinear problems Part 3: Newton's method for the minimal surface equation, step-15 http://www.dealii.org/ Wolfgang Bangerth The minimal surface equation Consider the minimal surface equation: ( −∇⋅ A ∇u = f 2 √ 1+|∇ u| u = g ) in Ω on ∂Ω where we choose Ω=B1 (0)⊂ℝ 2, f =0, g=sin(2 π( x + y)) Goal: Solve this numerically with Newton's method. http://www.dealii.org/ Wolfgang Bangerth Approach Newton's method requires us to iterate these two steps (in weak form): ( A (∇ uk⋅∇ δ uk ) A ∇φ, ∇ δ uk − ∇ φ , ∇ uk 2 2 3 /2 √ 1+|∇ uk| ( 1+|∇ u k| ) )( ( = − ∇ φ, ) A ∇ uk 2 √ 1+|∇ uk| ) ∀ φ∈H 10 uk + 1 = u k +δ uk http://www.dealii.org/ Wolfgang Bangerth Approach Discrete form: ∑j [( )] A (∇ uk , h⋅∇ φ j ) A ∇ φi , ∇ φ j − ∇ φi , ∇ uk ,h δ U k , j 2 2 3/ 2 √ 1+|∇ uk , h| ( 1+|∇ u k , h| ) )( A = − ∇ φi , ∇ uk , h 2 √ 1+|∇ uk , h| ( ) ∀ i=1 ... N U k +1 = U k +δ U k http://www.dealii.org/ Wolfgang Bangerth Approach Discrete form (in matrix form): Ak δ U k = Fk U k +1 = U k +δ U k where A k , ij A ( ∇ uk ,h⋅∇ φ j ) A = ∇ φi , ∇ φ j − ∇ φi , ∇ uk , h 2 2 3 /2 √1+|∇ uk ,h| ( 1+|∇ uk , h| ) F k ,i A = − ∇ φi , ∇ u k ,h 2 √ 1+|∇ uk , h| )( ( ( http://www.dealii.org/ ) ) Wolfgang Bangerth Practical considerations Consideration 1: To solve Ak δ U k = Fk with A k , ij A (∇ uk , h⋅∇ φ j ) A = ∇ φi , ∇ φj − ∇ φ, ∇ uk 2 2 3/ 2 √ 1+|∇ uk ,h| ( 1+|∇ u k , h| ) ( )( ) what solver is appropriate? Answer: The matrix is symmetric and positive definite, so CG is ok. Note: A is SPD because the minimal surface equation corresponds to minimizing a convex energy functional E(u). http://www.dealii.org/ Wolfgang Bangerth Practical considerations Consideration 2: What boundary values does δuk have? Answer: Let us choose u0 so that it already has the correct boundary values: u 0 |∂ Ω = g Then all of the δuk have zero boundary values because we want that (uk +α k δ u k )|∂ Ω = g http://www.dealii.org/ Wolfgang Bangerth Practical considerations Consideration 3: Newton's method does not always converge if we choose U k +1 = U k +δ U k But, we can often make it converge by relaxing the iteration: U k +1 = U k +α k δ U k Algorithms for choosing αk are typically called “line search”. http://www.dealii.org/ Wolfgang Bangerth Practical considerations Idea of line search: Using the damped iteration: U k +1 = U k +α k δ U k ● We can prove quadratic convergence if ● We get slower convergence if ● We may not converge if ● We frequently converge if http://www.dealii.org/ αk=1 αk<1 αk=1 αk<1 Wolfgang Bangerth Practical considerations Idea of line search: We want to achieve that R (u) = L(u)−f = 0 So try this in iteration k: ● Set αk=1 ● If ‖R (u k +αk δ uk )‖ ≤ c‖R (uk )‖ then use this αk; otherwise set αk:=αk/2 and try again ● Compute http://www.dealii.org/ U k +1 = U k +α k δ U k Wolfgang Bangerth Practical considerations Practice of line search: ● We need to say which norm we mean in ‖R (u k )‖ ● There are other criteria in addition to ‖R (u k +αk δ uk )‖ ≤ c‖R (uk )‖ These additional criteria are often called Wolfe and Armijo-Goldstein conditions http://www.dealii.org/ Wolfgang Bangerth Practical considerations In step-15: ● For simplicity, just always choose α k =0.1 ● The “Results” section of step-15 has more details on how to implement an actual line search http://www.dealii.org/ Wolfgang Bangerth Practical considerations Consideration 4: We want to use a sequence of meshes. Practical implementation: 1. Start with a coarse mesh 2. Do 5 Newton iterations 3. If ‖R (u k )‖≤tol then stop 4. Save the solution on the current mesh 5. Refine the mesh 6. Go to step 2 http://www.dealii.org/ Wolfgang Bangerth The minimal surface equation Let's look at all of this in real code! http://www.dealii.org/ Wolfgang Bangerth MATH 676 – Finite element methods in scientific computing Wolfgang Bangerth, Texas A&M University http://www.dealii.org/ Wolfgang Bangerth