Newton s Method and Efficient, Robust Variants

Similar documents
A comparison of Rosenbrock and ESDIRK methods combined with iterative solvers for unsteady compressible

Termination criteria for inexact fixed point methods

Numerical Methods for Large-Scale Nonlinear Equations

A STUDY OF MULTIGRID SMOOTHERS USED IN COMPRESSIBLE CFD BASED ON THE CONVECTION DIFFUSION EQUATION

Optimizing Runge-Kutta smoothers for unsteady flow problems

Rosenbrock time integration combined with Krylov subspace enrichment for unsteady flow simulations

Preconditioning for modal discontinuous Galerkin methods for unsteady 3D Navier-Stokes equations

2 CAI, KEYES AND MARCINKOWSKI proportional to the relative nonlinearity of the function; i.e., as the relative nonlinearity increases the domain of co

Nonlinear iterative solvers for unsteady Navier-Stokes equations

TAU Solver Improvement [Implicit methods]

Performance tuning of Newton-GMRES methods for discontinuous Galerkin discretizations of the Navier-Stokes equations

Linear Solvers. Andrew Hazel

A Linear Multigrid Preconditioner for the solution of the Navier-Stokes Equations using a Discontinuous Galerkin Discretization. Laslo Tibor Diosady

High Performance Nonlinear Solvers

Maria Cameron. f(x) = 1 n

Stabilization and Acceleration of Algebraic Multigrid Method

An Efficient Low Memory Implicit DG Algorithm for Time Dependent Problems

A Robust Preconditioned Iterative Method for the Navier-Stokes Equations with High Reynolds Numbers

Iterative Methods for Solving A x = b

AA214B: NUMERICAL METHODS FOR COMPRESSIBLE FLOWS

ITERATIVE METHODS FOR NONLINEAR ELLIPTIC EQUATIONS

DELFT UNIVERSITY OF TECHNOLOGY

Solving Large Nonlinear Sparse Systems

Preconditioning the Newton-Krylov method for reactive transport

The Conjugate Gradient Method

A new class of preconditioners for discontinuous Galerkin methods for unsteady 3D Navier-Stokes equations: ROBO-SGS

x 2 x n r n J(x + t(x x ))(x x )dt. For warming-up we start with methods for solving a single equation of one variable.

An Implicit Multi-Step Diagonal Secant-Type Method for Solving Large-Scale Systems of Nonlinear Equations

ADAPTIVE ACCURACY CONTROL OF NONLINEAR NEWTON-KRYLOV METHODS FOR MULTISCALE INTEGRATED HYDROLOGIC MODELS

Implicit Solution of Viscous Aerodynamic Flows using the Discontinuous Galerkin Method

THE INEXACT, INEXACT PERTURBED AND QUASI-NEWTON METHODS ARE EQUIVALENT MODELS

Multigrid absolute value preconditioning

RESIDUAL BASED ERROR ESTIMATES FOR THE SPACE-TIME DISCONTINUOUS GALERKIN METHOD APPLIED TO NONLINEAR HYPERBOLIC EQUATIONS

Numerical Methods I Solving Nonlinear Equations

Lecture 17: Iterative Methods and Sparse Linear Algebra

Indefinite and physics-based preconditioning

Bindel, Spring 2016 Numerical Analysis (CS 4220) Notes for

Newton-Krylov-Schwarz Method for a Spherical Shallow Water Model

Research Article Evaluation of the Capability of the Multigrid Method in Speeding Up the Convergence of Iterative Methods

Solving Symmetric Indefinite Systems with Symmetric Positive Definite Preconditioners

Quasi-Newton Methods

HIGHER-ORDER LINEARLY IMPLICIT ONE-STEP METHODS FOR THREE-DIMENSIONAL INCOMPRESSIBLE NAVIER-STOKES EQUATIONS

Newton s Method. Javier Peña Convex Optimization /36-725

Algorithms for Nonlinear and Transient Problems

MULTIGRID METHODS FOR NONLINEAR PROBLEMS: AN OVERVIEW

AMG for a Peta-scale Navier Stokes Code

IMPROVING THE FINITE DIFFERENCE APPROXIMATION IN THE JACOBIAN-FREE NEWTON-KRYLOV METHOD

PDE Solvers for Fluid Flow

Domain-decomposed Fully Coupled Implicit Methods for a Magnetohydrodynamics Problem

First, Second, and Third Order Finite-Volume Schemes for Diffusion

Trust-Region SQP Methods with Inexact Linear System Solves for Large-Scale Optimization

Fast Iterative Solution of Saddle Point Problems

Lecture Notes to Accompany. Scientific Computing An Introductory Survey. by Michael T. Heath. Chapter 5. Nonlinear Equations

Preconditioned Smoothers for the Full Approximation Scheme for the RANS Equations

arxiv: v1 [math.na] 25 Jan 2017

An Efficient Low Memory Implicit DG Algorithm for Time Dependent Problems

An Accelerated Block-Parallel Newton Method via Overlapped Partitioning

Mathematics and Computer Science

Implicit solvers for large-scale nonlinear problems

Multigrid Algorithms for High-Order Discontinuous Galerkin Discretizations of the Compressible Navier-Stokes Equations

Preconditioning for Nonsymmetry and Time-dependence

Some notes about PDEs. -Bill Green Nov. 2015

Efficient Solvers for the Navier Stokes Equations in Rotation Form

An Introduction to Algebraic Multigrid (AMG) Algorithms Derrick Cerwinsky and Craig C. Douglas 1/84

On the choice of abstract projection vectors for second level preconditioners

Chapter 9 Implicit integration, incompressible flows

Interior-Point Methods as Inexact Newton Methods. Silvia Bonettini Università di Modena e Reggio Emilia Italy

Lab 1: Iterative Methods for Solving Linear Systems

Implementation and Comparisons of Parallel Implicit Solvers for Hypersonic Flow Computations on Unstructured Meshes

Research Article A Two-Step Matrix-Free Secant Method for Solving Large-Scale Systems of Nonlinear Equations

New Streamfunction Approach for Magnetohydrodynamics

Efficient BDF time discretization of the Navier Stokes equations with VMS LES modeling in a High Performance Computing framework

Computation Fluid Dynamics

Constrained Minimization and Multigrid

Kasetsart University Workshop. Multigrid methods: An introduction

Shifted Laplace and related preconditioning for the Helmholtz equation

On solving linear systems arising from Shishkin mesh discretizations

Reactive transport in porous media: formulations, non-linear solvers and preconditioners

2.29 Numerical Fluid Mechanics Spring 2015 Lecture 9

NEWTON-GMRES PRECONDITIONING FOR DISCONTINUOUS GALERKIN DISCRETIZATIONS OF THE NAVIER-STOKES EQUATIONS

arxiv: v1 [math.na] 14 May 2016

AMS526: Numerical Analysis I (Numerical Linear Algebra for Computational and Data Sciences)

Methods for Unconstrained Optimization Numerical Optimization Lectures 1-2

Lecture 11: CMSC 878R/AMSC698R. Iterative Methods An introduction. Outline. Inverse, LU decomposition, Cholesky, SVD, etc.

Improvements of Unsteady Simulations for Compressible Navier Stokes Based on a RK/Implicit Smoother Scheme

Chapter 7 Iterative Techniques in Matrix Algebra

A Space-Time Multigrid Solver Methodology for the Optimal Control of Time-Dependent Fluid Flow

Handout on Newton s Method for Systems

High Order Discontinuous Galerkin Methods for Aerodynamics

Fourth-Order Implicit Runge-Kutta Time Marching Using A Newton-Krylov Algorithm. Sammy Isono

A SUFFICIENTLY EXACT INEXACT NEWTON STEP BASED ON REUSING MATRIX INFORMATION

Inexact Newton Methods Applied to Under Determined Systems. Joseph P. Simonis. A Dissertation. Submitted to the Faculty

Discrete Projection Methods for Incompressible Fluid Flow Problems and Application to a Fluid-Structure Interaction

Structure preserving preconditioner for the incompressible Navier-Stokes equations

Iterative solvers within sequences of large linear systems in non-linear structural mechanics

Semi-implicit Krylov Deferred Correction Methods for Ordinary Differential Equations

FOR many computational fluid dynamics (CFD) applications, engineers require information about multiple solution

Robust Preconditioned Conjugate Gradient for the GPU and Parallel Implementations

REPORTS IN INFORMATICS

Newton s Method. Ryan Tibshirani Convex Optimization /36-725

Transcription:

Newton s Method and Efficient, Robust Variants Philipp Birken University of Kassel (SFB/TRR 30) Soon: University of Lund October 7th 2013 Efficient solution of large systems of non-linear PDEs in science Lyon Birken, Philipp (University of Kassel) Newton s method JFNK Tutorial 1 / 32

Outline 1 Introduction 2 Newton s method 3 JFNK 4 Newton and Multigrid 5 The fine print Birken, Philipp (University of Kassel) Newton s method JFNK Tutorial 2 / 32

Outline 1 Introduction 2 Newton s method 3 JFNK 4 Newton and Multigrid 5 The fine print Birken, Philipp (University of Kassel) Newton s method JFNK Tutorial 3 / 32

Flow-Chart for DIRK scheme with Newtonx Given error tolerance TOL, initial time t 0 and time step size t 0 For i = 1,..., s For k = 0, 1,... until termination criterion with tolerance TOL/5 is satisfied or MAX NEWTON ITER has been reached Solve linear system up to certain tolerance If MAX NEWTON ITER has been reached, but the tolerance test has not been passed, repeat time step with t n = t n /4 Estimate local error and compute new time step size t n+1 t n+1 = t n + t n Birken, Philipp (University of Kassel) Newton s method JFNK Tutorial 4 / 32

Outline 1 Introduction 2 Newton s method 3 JFNK 4 Newton and Multigrid 5 The fine print Birken, Philipp (University of Kassel) Newton s method JFNK Tutorial 5 / 32

Illustration of Newton s method Figure: Illustration of Newton s method in one dimension (left); convergence curve (right) Birken, Philipp (University of Kassel) Newton s method JFNK Tutorial 6 / 32

Newton s method Assume we solve F(x) = 0. Given starting value x 0, Newton s method is given by: F x = F(x x (k) x (k) ), x (k+1) = x (k) + x, k = 0,... Uses first order approximation of function Local quadratic convergence Outside of local ball of convergence no statement possiblex Nonlinear system transformed into sequence of linear systems Birken, Philipp (University of Kassel) Newton s method JFNK Tutorial 7 / 32

Standard Assumptions Always need Differentiability (at least piecewise) For easy convergence theory i) F(x) = 0 has a solution x. ii) F : Ω R m m is Lipschitz continuous with Lipschitz constant L. iii) F (x ) is nonsingular. Lower requirements technically possible Birken, Philipp (University of Kassel) Newton s method JFNK Tutorial 8 / 32

The linear system [ ] System matrix: A = I t f(x) x x (k). This matrix is sparse, nonnormal, not diagonally dominant and ill conditioned for reasonable t. Generally unstructured, but symmetric block-sparsity pattern. In FVM/low order FEM context: block sizes small even in 3D. For DG/high order FEM: Block sizes depend on degree N and dimension d: (d + 2) (N + d)!/(n!d!) This makes the design of efficient implicit DG schemes in 3D so difficult, since blocks have couple hundred unknowns Birken, Philipp (University of Kassel) Newton s method JFNK Tutorial 9 / 32

Problems of exact Newton method Problem 1: The linear systems are solved exactly This implies either a direct solver or an iterative one with extremely small tolerance But we want to solve nonlinear systems only approximately This is way too costly But what happens when we do not solve exactly? Problem 2: The Jacobian has to be assembled Typically very costly to do Huge amount of storage for 3D problems Need way around this Birken, Philipp (University of Kassel) Newton s method JFNK Tutorial 10 / 32

Inexact Newton methods Let s solve problem 1! F(x) x x (k)d + F(x(k) ) η k F(x k ) (1) x (k+1) = x (k) + d, k = 0, 1,... Theorem Let the standard assumptions hold. Then there is δ such that if x (0) is in a δ-neighborhood of x, {η k } [0, η] with η < η < 1, then the inexact Newton iteration (1) converges linearly. Moreover, if η k 0, the convergence is superlinear and if η k K η F(x (k) ) p for some K η > 0 and p [0, 1], the convergence is superlinear with order 1 + p. Birken, Philipp (University of Kassel) Newton s method JFNK Tutorial 11 / 32

Eisenstat-Walker 96 ηk A = γ F(x(k) ) 2 F(x (k 1), γ (0, 1] ) 2 To obtain quadratic convergence, bound sequence away from zero: η B k = min(η max, η A k ) Definition of η k is refined to η max, n = 0, ηk C = min(η max, η A k ), min(η max, max(ηk A, γη2 k 1 )) n > 0, γη2 k 1 0.1 k 1 > 0.1 to avoid volatile decreases in η k. To avoid oversolving η k = min(η max, max(η C k, 0.5τ/ F(x(k) ) )). (2) Birken, Philipp (University of Kassel) Newton s method JFNK Tutorial 12 / 32

Methods of Newton type Now, let s solve problem 2! Freeze the Jacobian and periodically recompute periodically Thus we use approximation x (k+1) = x (k) A(x (k) ) 1 F(x (k) ) Meaning we solve a different linear equation system Only linear convergence, provided that ρ(i A(x) enough This is not a good solution for problem 2! 1 F x ) is small Birken, Philipp (University of Kassel) Newton s method JFNK Tutorial 13 / 32

Outline 1 Introduction 2 Newton s method 3 JFNK 4 Newton and Multigrid 5 The fine print Birken, Philipp (University of Kassel) Newton s method JFNK Tutorial 14 / 32

Jacobian-free Newton-Krylov method Let s give problem 2 another try! Solve iterative systems using Krylov subspace method (e.g. GMRES) These do not need Jacobian, only matrix vector products. Approximate F x q by finite differences: Aq = F(x(k) ) x q F(x(k) + ɛq) F(x (k) ). ɛ More expensive than sparse matrix vector products. Immense flexibility Since we solve the correct linear equation system, quadratic convergence is retained, thus fast method! Birken, Philipp (University of Kassel) Newton s method JFNK Tutorial 15 / 32

Convergence of JFNK Theorem Let the standard assumptions hold. Then there are δ, σ, C G such that if x 0 is in a δ-neighborhood of x and the sequences {η k } and {ɛ k } satisfy σ n = η n + C G ɛ n σ, then the Jacobian free Newton-GMRES iteration converges linearly. Moreover, if σ k 0, the convergence is superlinear and if σ k K η F(x k ) p for some K η > 0 and p [0, 1], the convergence is superlinear with order 1 + p. Birken, Philipp (University of Kassel) Newton s method JFNK Tutorial 16 / 32

Final Flow-Chart for DIRK scheme Given error tolerance TOL, initial time t 0 and time step size t 0 For i = 1,..., s For k = 0, 1,... until termination criterion with tolerance TOL/5 is satisfied or MAX NEWTON ITER has been reached Determine Eisenstat-Walker relative tolerance Solve linear system using preconditioned GMRES If MAX NEWTON ITER has been reached, but the tolerance test has not been passed, repeat time step with t n = t n /4 Estimate local error and compute new time step size t n+1 t n+1 = t n + t n Note: Puts additional bound on time step via nonlinear solver Birken, Philipp (University of Kassel) Newton s method JFNK Tutorial 17 / 32

Efficiency of different Newton schemes JFNK-FT JFNK-EW Newton-type-FT Newton-type-EW 3.0 4.1 0.7 0.9 Table: Upper bounds of convergence radius for Shu vortex problem in terms of CFL numbers. FT stands for a fixed tolerance of 10 2, EW for Eisenstat-Walker. JFNK-FT JFNK-EW Newton-type-FT Newton-type-EW Iter. 32,793 6,821 45,531 10,101 CPU 17,394 4,566 19,920 10,672 Table: Comparison of efficiency of different Newton variants. SDIRK2, TOL = 10 2 Birken, Philipp (University of Kassel) Newton s method JFNK Tutorial 18 / 32

Newton convergence: Unsteady TEMPO Figure: Convergence of different Newton schemes for one time step during an unsteady calculation Birken, Philipp (University of Kassel) Newton s method JFNK Tutorial 19 / 32

Outline 1 Introduction 2 Newton s method 3 JFNK 4 Newton and Multigrid 5 The fine print Birken, Philipp (University of Kassel) Newton s method JFNK Tutorial 20 / 32

Newton convergence: TEMPO for steady states Figure: Convergence to steady state of a damped scheme of Newton-type Birken, Philipp (University of Kassel) Newton s method JFNK Tutorial 21 / 32

Multigrid convergence: UFLO103 on structured grid Figure: UFLO103 convergence, first 100 steps using the steady state solver, then 50 iteration of dual time stepping per time step Birken, Philipp (University of Kassel) Newton s method JFNK Tutorial 22 / 32

Multigrid convergence: DLR TAU Figure: DLR TAU dual time stepping for two different systems. FAS in TAU converges to something else. Wrong BC on coarse grids? Birken, Philipp (University of Kassel) Newton s method JFNK Tutorial 23 / 32

Newton and Multigrid Steady States Multigrid fast Newton slow Unsteady problems Here we expect significantly faster convergence Multigrid marginally, if at all, faster, not fast on unstructured grids Newton significantly faster than for steady state Birken, Philipp (University of Kassel) Newton s method JFNK Tutorial 24 / 32

Newton and Multigrid Multigrid Newton Dual time stepping typically implies reusing the steady state algorithm without changes Thus less than optimal multigrid convergence Redesign multigrid (see B., Optimizing Runge-Kutta smoothers for unsteady flow problems, ETNA, 2012) Very good scheme: Jacobian-Free Newton-GMRES with good parallel preconditioner Multigrid candidate for preconditioner (see above) Compare Solving nonlinear systems inside implicit time integration schemes for unsteady viscous flows, P. Birken, pp. 57-71 in R. Ansorge, H. Bijl, A. Meister, T. Sonar (editors), Numerics of Nonlinear Hyperbolic Conservation Laws, Notes on Numerical Fluid Mechanics, Springer Birken, Philipp (University of Kassel) Newton s method JFNK Tutorial 25 / 32

Outline 1 Introduction 2 Newton s method 3 JFNK 4 Newton and Multigrid 5 The fine print Birken, Philipp (University of Kassel) Newton s method JFNK Tutorial 26 / 32

Choice of initial guess Good choice of intial guess important Without that, we might have divergence With it, we could be close to the solution and need very few steps In unsteady time stepping, last value often good choice But: For huge time steps, this might not be in radius of convergence (see flow chart) Extrapolation of old values can help Stage value predictors other possibility Birken, Philipp (University of Kassel) Newton s method JFNK Tutorial 27 / 32

Globalization Problem: Local convergence Solution globalization strategy via line search: x (k+1) = x (k) + λ x (k), λ [0, 1] Popular choice: Armijo line search F(x (k+1) < (1 αλ) F(x (k), 0 < α << 1 For example, α = 10 4 is a suitable choice. Search for suitable λ done in trivial way by starting with 1 and dividing by 2 if condition not satisfied. This method is linearly convergent When close to solution, full steps with λ = 1 can be taken and original convergence rate recovered Birken, Philipp (University of Kassel) Newton s method JFNK Tutorial 28 / 32

Implementation Issues JFNK approach extremely flexible (think change of space discretization) Very modular, thus high reusability Avoids storing the Jacobian Need vector data structure at some point Might be good to have solution in that instead of grid based structure Parallelization hinges on space discretization and Krylov solver Software: PETSc, SUNDIALS, TRILINOS, TEMPO (soon) Birken, Philipp (University of Kassel) Newton s method JFNK Tutorial 29 / 32

Preconditioning Convergence of Krylov subspace methods (GMRES) depends strongly on matrix. Transform problem to get better convergence. Use right preconditioning, since residual is unchanged (inexact JFNK) APy = b, y = P 1 x In a JFNK scheme, we do not compute the matrix a priori. Need to compute all parts of matrix needed for preconditioner. This is where things get difficult for the first time Birken, Philipp (University of Kassel) Newton s method JFNK Tutorial 30 / 32

Summary Newton locally quadratic convergent Problem 1: Need to solve equation exactly Solved by inexact Newton scheme Choosing proper termination criteria key to efficiency! Problem 2: Need to store and compute Jacobian Solved by JFNK approach Multigrid is main competitor Can be used inside a Newton scheme Preconditioning is a key issue. Birken, Philipp (University of Kassel) Newton s method JFNK Tutorial 31 / 32

Literature C. T. Kelley. Iterative Methods for Linear and Nonlinear Equations. SIAM, Philadelphia, PA, 1995 J. E. Dennis and R. B. Schnabel. Numerical Methods for Unconstrained Optimization and Nonlinear Equations. Classics in Applied Mathematics. SIAM, Philadelphia, 1996 P. Deuflhard. Newton Methods. Springer, 2004 E. Hairer and G. Wanner. Solving Ordinary Differential Equations II. Springer, Berlin, 2nd edition, 2004 B., Numerical methods for the unsteady compressible Navier-Stokes equations, Habilitation Thesis, 2012, University of Kassel Birken, Philipp (University of Kassel) Newton s method JFNK Tutorial 32 / 32