480 likes | 588 Views
Time Discretization ( It’s about time…). Sauro Succi. Time Evolution. Initial and Boundary Conditions. Time Marching: Formal. Time Marching: Matrix Exponential. L banded b, L*L banded 2b+1, L*L*L banded 3b+2 …. UNPRACTICAL. Numerical Marching.
E N D
Time Discretization(It’sabout time…) Sauro Succi
Time Evolution Initial and Boundary Conditions
Time Marching: Matrix Exponential L banded b, L*L banded 2b+1, L*L*L banded 3b+2 …. UNPRACTICAL
Numerical Marching On the lattice x_j=j*d:
Numerical Marching On the lattice x_j=j*d:
Numerical Marching Explicit Crank-Nicolson Fully Implicit
Numerical Marching Explicit Crank-Nicolson
Time marching: Explicit/Implicit methods Cranck-Nicolson Euler fwd - t+2dt - X ----------X----------X X ----------X----------X - t+dt - X ----------X----------X - t - X ----------X----------X X ----------X----------X Unconditionallystable --> large dt Non-local, matrix algebra, expensive Conditionally stable (|1+Ldt|<1) ---> small dt Matrix-free (local in spacetime) Simple and fast
Forward Euler Stability (for stable phys)
Crank-Nicolson Trapezoidal rule
Implicit=Non-local 3 spatialconnections 5spatialconnections 2p+1 spatialconnections
Matrix Algebra Algebraic Methods Direct Methods Iterative Methods
Direct Methods 2. Backwardsweep: x 1. Forwardsweep: y
Gaussian elimination Zeroesincluded!
Memory is 1d: Addressing Sequentialindex:
Iterative: Methods Splitting Relaxation Gradient ConjugateGradient No matrix inversion: only matrix*vector products
Iterative: Jacobi splitting Stoppingcriteria:
Gauss-Seidel: aggressive Jacobi Convergencecriteria:
Jacobi: does it converge? Diagonaldominant: Goodmatrixcondition:
Optimum condition=1 Badcondition>>1
Directional Splitting A sequence of Nyone-dimensional Problems of size NX:
Over/Under relaxation methods AcceleratedRelaxation Conservative, oscillatingconvergence Aggressive, montonicconvergence
Relaxation methods Fictitious time Iterationloop Convergencecriterion: Usuallyvery slow!
Steepest descent: gradient Residual=Gradient of the energy ris the gradient of E=1/2<x,Ax>-<b,x>
Steepest Descent Convergentguaranteedonly for SPD matrices [(x,Ax)>0] Long-term slow becauser-->0 asAx-->b Round-off sensitive, needle-sensitive
Conjugate Gradient The steepestdescentisnot the shortestpath to the minimum g=r= Ax-b; <g,t>=0 c defined by <c,At> = 0 Oneshot on the local minimum ateachplanex_k,x_(k+1) t x x_k g c x_(k+1)
Conjugate Gradient The steepestdescentisnot the shortestpath to the minimum! 0. x0, p0=r0=A*x0-b The new searchdirection isbetweenr and oldp 1. a0=<r0,p0>/<r0,A*p0> x1=x0+a0*p0; r1=r0-a0*A*p0 Out? 3. b0=<r1*r1>/<r0*r0> p1 = r1+b0*p0 nextsearchdirection basedupon <p1,A*p0>=0 Go to 1 with p1 t x g c {p0,A*p0,A^2*p0 … A^N p0} is a Krylovsequence: Nstepconvergent for SPD
Time Marching: Spectral Hermitian Stable/Unstable Example: diffusion