Parallel, adaptive multigrid methods for parabolic PDEs and - - PowerPoint PPT Presentation

parallel adaptive multigrid methods for parabolic pdes
SMART_READER_LITE
LIVE PREVIEW

Parallel, adaptive multigrid methods for parabolic PDEs and - - PowerPoint PPT Presentation

Parallel, adaptive multigrid methods for parabolic PDEs and applications Feng Wei Yang Department of Mathematics University of Sussex F.W.Yang@sussex.ac.uk 25 January 2016 Feng Wei Yang Seminar at Warwick 25 January 2016 1 / 46 Objectives


slide-1
SLIDE 1

Parallel, adaptive multigrid methods for parabolic PDEs and applications

Feng Wei Yang

Department of Mathematics University of Sussex F.W.Yang@sussex.ac.uk

25 January 2016

Feng Wei Yang Seminar at Warwick 25 January 2016 1 / 46

slide-2
SLIDE 2

Objectives

To solve complex non-linear parabolic systems by applying: 2nd order central Finite Difference Method (FDM) 2nd order Backward Differentiation Formula (BDF2) Nonlinear multigrid method with Full Approximation Scheme (FAS) Adaptive Mesh Refinement (AMR) Adaptive time-stepping Parallel techniques

Feng Wei Yang Seminar at Warwick 25 January 2016 2 / 46

slide-3
SLIDE 3

Outline

Multigrid methods

Linear multigrid Nonlinear multigrid

Thin film models from Gaskell et al. and Validation Tumour modelling and a model from Wise et al. Optimal control for whole cell tracking

Feng Wei Yang Seminar at Warwick 25 January 2016 3 / 46

slide-4
SLIDE 4

Jacobi/Gauss-Seidel iterative methods

Well-known methods Require diagonally-dominant matrices Typically have complexity of O(n2) for general sparse matrices ... Smoothing property

Low frequency of error High frequency of error

S.H. Lui Numerical Analysis of Partial Differential Equations, 2011 Feng Wei Yang Seminar at Warwick 25 January 2016 4 / 46

slide-5
SLIDE 5

Convergence of a typical Jacobi iterative method

source: nkl.cc.u-tokyo.ac.jp Feng Wei Yang Seminar at Warwick 25 January 2016 5 / 46

slide-6
SLIDE 6

Multigrid V-cycle

Finest grid Coarsest grid Grid level 1 Grid level 2 Grid level 3 Grid level 4 x y

Feng Wei Yang Seminar at Warwick 25 January 2016 6 / 46

slide-7
SLIDE 7

Linear multigrid

A linear problem: Au = b, (1) exact error can be obtained as E = u − v, (2) residual can be calculated as: r = b − Av. (3) Error equation: AE = A(u − v) = Au − Av = b − Av = r. (4)

Feng Wei Yang Seminar at Warwick 25 January 2016 7 / 46

slide-8
SLIDE 8

Linear multigrid

Feng Wei Yang Seminar at Warwick 25 January 2016 8 / 46

slide-9
SLIDE 9

Nonlinear multigrid

The Error Equation (4) does not exist in a nonlinear case Full Approximate Scheme (FAS) For problem on coarser grids, a modified RHS is included

Feng Wei Yang Seminar at Warwick 25 January 2016 9 / 46

slide-10
SLIDE 10

Nonlinear multigrid

Feng Wei Yang Seminar at Warwick 25 January 2016 10 / 46

slide-11
SLIDE 11

A nonlinear point-wise smoother

Let’s consider our nonlinear problem: A(v) = f . It can be rewritten as: F(v) = 0. Then the Newton-like nonlinear point-wise smoother at a particular grid point (i, j) ∈ Ω can be the following: vℓ+1,t+1

i,j

= vℓ,t+1

i,j

− F(v) F′(vℓ,t+1

i,j

) .

Feng Wei Yang Seminar at Warwick 25 January 2016 11 / 46

slide-12
SLIDE 12

Domain decomposition and guard cells

1 2 3 4 5 6 7 8 10 11 12 13 14 15 16 17 9

boundary Feng Wei Yang Seminar at Warwick 25 January 2016 12 / 46

slide-13
SLIDE 13

Droplet spreading model

∂h ∂t =

∂ ∂x

  • h3

3

  • ∂p

∂x − Bo ǫ sinα

  • + ∂

∂y

  • h3

3

  • ∂p

∂y

  • p =

−△(h) − Π(h) + Boh cos α with Neumann boundary conditions: ∂nh = 0 ∂np = 0

  • n ∂Ω

Gaskell et al. Int. J. Numer. Meth. Fluids, 45:1161-1186, 2004 Feng Wei Yang Seminar at Warwick 25 January 2016 13 / 46

slide-14
SLIDE 14

Our solver

Cell-centred 2nd order finite difference method PARAMESH library for mesh generation and AMR Fully implicit BDF2 method with adaptive time-stepping MLAT variation of FAS multigrid at each time-step Newton-block 2 × 2 Red-Black (weighted) Gauss-Seidel smoother Full weighting restriction and bilinear interpolation Parallelism achieved using MPI

Feng Wei Yang Seminar at Warwick 25 January 2016 14 / 46

slide-15
SLIDE 15

Newton-block smoother

Update at a grid point (i, j): hℓ+1,t+1 pℓ+1,t+1

  • i,j

= hℓ,t+1 pℓ,t+1

  • i,j

−  

∂Fh ∂ht+1

i,j

∂Fh ∂pt+1

i,j

∂Fp ∂ht+1

i,j

∂Fp ∂pt+1

i,j

 

−1 Fh i,j(h, p)

Fp i,j(h, p)

  • Feng Wei Yang

Seminar at Warwick 25 January 2016 15 / 46

slide-16
SLIDE 16

Validation

0.2 0.4 0.6 0.8 1 x 10

−5

1 2 3 4 5 t h0(t) 32x32 64x64 128x128 256x256 512x512 1024x1024

Results from Gaskell et al. on the left and our results on the right.

Feng Wei Yang Seminar at Warwick 25 January 2016 16 / 46

slide-17
SLIDE 17

Multigrid linear complexity

10

4

10

5

10

6

10

7

10 10

1

10

2

  • No. grid points on the finest grid.

Average CPU time per time step (seconds). CPU time required Line with slope of 1

A log-log plot demonstrating the linear complexity of multigrid.

Feng Wei Yang Seminar at Warwick 25 January 2016 17 / 46

slide-18
SLIDE 18

Multigrid performance

Results from Gaskell et al. on the left and our results on the right.

Feng Wei Yang Seminar at Warwick 25 January 2016 18 / 46

slide-19
SLIDE 19

AMR

AMR with initial condition on the left and final solution on the right.

Feng Wei Yang Seminar at Warwick 25 January 2016 19 / 46

slide-20
SLIDE 20

Adaptive time-stepping

0.2 0.4 0.6 0.8 1 x 10

−5

1 2 3 4 5 6 7 8 9 10 11 x 10

−7

Time Time step size adaptive time−stepping 1024x1024

Evolution of δt during T = [0, 1 × 10−5].

Feng Wei Yang Seminar at Warwick 25 January 2016 20 / 46

slide-21
SLIDE 21

Adaptive multigrid solver

Cases No. leaf nodes Uniform 10242 1,048,576 AMR 168,480 Cases

  • No. time

CPU time steps (seconds) Fixed δt 1000 16721.3 ATS 45 574.4

Feng Wei Yang Seminar at Warwick 25 January 2016 21 / 46

slide-22
SLIDE 22

Animation

Feng Wei Yang Seminar at Warwick 25 January 2016 22 / 46

slide-23
SLIDE 23

Parallel efficiency vs. Actual computational time

20 40 60 80 50 100 150 200 250 300 350 400 450 500 Number of cores The computational time (seconds) AMR 32x32x32 − 256x256x256 AMR 64x64x64 − 256x256x256

1 4 16 64 0% 10% 20% 30% 40% 50% 60% 70% 80% 90% 100% Number of cores Parallel efficiency AMR 32x32x32 − 256x256x256 AMR 64x64x64 − 256x256x256

Feng Wei Yang Seminar at Warwick 25 January 2016 23 / 46

slide-24
SLIDE 24

Tumour modelling - avascular tumour growth

Starts with a small cluster of cells Nutrient supply through diffusion Internal adhesion force Three layers of cells:

Proliferative cells Dormant cells Dead cells (necrosis)

Volume loss in necrotic core

source: www.bioinfo.de Feng Wei Yang Seminar at Warwick 25 January 2016 24 / 46

slide-25
SLIDE 25

Tumour modelling - vascular tumour growth

TAF chemical factor Inducing blood vessel (angiogenesis) Exponential growth rate Develop secondaries through metastasis

source: www.maths.dundee.ac.uk Feng Wei Yang Seminar at Warwick 25 January 2016 25 / 46

slide-26
SLIDE 26

Tumour model from Wise et al.

∂tφT = M∇ · (φT∇µ) + ST(φT, φD, n) − ∇ · (uSφT) µ = f ′(φT) − ǫ2∆φT ∂tφD = M∇ · (φD∇µ) + SD(φT, φD, n) − ∇ · (uSφD) uS = −(∇p − γ ǫ µ∇φT) ∇ · uS = ST(φT, φD, n) = ∆n + TC(φT, n) − n(φT − φD) with mixed boundary conditions: µ = p = 0 n = 1 ∂nφT = ∂nφD = 0 on ∂Ω,

  • S. M. Wise, J. S. Lowengrub, V. Cristini,
  • Math. Comput. Modelling, 53: 1-20, 2011.

Feng Wei Yang Seminar at Warwick 25 January 2016 26 / 46

slide-27
SLIDE 27

Tumour model from Wise et al.

∂tφT = M∇ · (φT∇µ) + ST(φT, φD, n) − ∇ · (uSφT) µ = f ′(φT) − ǫ2∆φT ∂tφD = M∇ · (φD∇µ) + SD(φT, φD, n) − ∇ · (uSφD) [uS = −(∇p − γ ǫ µ∇φT)] −∆p = ST(φT, φD, n) − ∇ · (γ ǫ µ∇φT) = ∆n + TC(φT, n) − n(φT − φD) with mixed boundary conditions: µ = p = 0 n = 1 ∂nφT = ∂nφD = 0 on ∂Ω,

  • S. M. Wise, J. S. Lowengrub, V. Cristini,
  • Math. Comput. Modelling, 53: 1-20, 2011.

Feng Wei Yang Seminar at Warwick 25 January 2016 27 / 46

slide-28
SLIDE 28

Validation

t=100 t=200 Validation between results of Wise et al. and ours.

Feng Wei Yang Seminar at Warwick 25 January 2016 28 / 46

slide-29
SLIDE 29

2nd order convergence rate

For variable φT Levels Time steps Infinity norm Ratio Two norm Ratio 5(1282) 1250

  • 6(2562)

2500 9.118 × 10−2

  • 7.836 × 10−3
  • 7(5122)

5000 1.322 × 10−2 6.90 1.131 × 10−3 6.93 8(10242) 10000 2.579 × 10−3 5.13 2.367 × 10−4 4.78 9(20482) 20000 6.415 × 10−4 4.02 5.833 × 10−5 4.06

2nd order convergence rate seen from the model of tumour growth.

Feng Wei Yang Seminar at Warwick 25 January 2016 29 / 46

slide-30
SLIDE 30

3-D results

t=50 t=100 t=150 t=200

Feng Wei Yang Seminar at Warwick 25 January 2016 30 / 46

slide-31
SLIDE 31

3-D results

t=200 Cutting through x plane Cutting through y plane Cutting through z plane

Feng Wei Yang Seminar at Warwick 25 January 2016 31 / 46

slide-32
SLIDE 32

Model objectives

To track the morphology of cells and reconstruct their movements:

  • V. Peschetola et al. Cytoskeleton, 2013

Feng Wei Yang Seminar at Warwick 25 January 2016 32 / 46

slide-33
SLIDE 33

What is our signature

Particle tracking: Particle tracking: Particle tracking: The morphology of cells are not considered Manually tracking is slow Automatic tracking algorithms are often flawed

Segmentation is suboptimal for real data Tracking through patten recognition is challenging

Pure geometric math models: Pure geometric math models: Pure geometric math models: Resolution of the data matters Typically no cell-setting is considered It is a complicated procedure to

  • btain the results

Computational power and advanced numerical methods have to be included for 3-D real-life cell tracking

Feng Wei Yang Seminar at Warwick 25 January 2016 33 / 46

slide-34
SLIDE 34

Our optimal control model

The volume constrained mean curvature flow with forcing:

  • V

V V (x x x, t) = (−σH(x x x, t) + η(x x x, t) + λV (t))v v v(x x x, t) on Γ(t), t ∈ (0, T], Γ(0) = Γ0.

The phase-field approximation of the above equation - Allen-Cahn:

     ∂tφ(x x x, t) = △φ(x x x, t) − 1

ǫ2 G ′(φ(x

x x, t)) − 1

ǫ(η(x

x x, t) − λ(t)) in Ω × (0, T], ∇φ · ν ν νΩ = 0 on ∂Ω × (0, T], φ(·, 0) = φ0 in Ω.

Feng Wei Yang Seminar at Warwick 25 January 2016 34 / 46

slide-35
SLIDE 35

Our optimal control model cont.

The objective functional:

J(φ, η) = 1 2

(φ(x x x, T) − φobs(x x x))2 dx x x + θ 2 T

η(x x x, t)2dx x xdt,

and now we solve the minimisation problem:

minηJ(φ, η), with J given above.

Feng Wei Yang Seminar at Warwick 25 January 2016 35 / 46

slide-36
SLIDE 36

Our optimal control model cont.

The adjoint equation to help computing the derivative of the objective functional:

  • ∂tp(x

x x, t) = −△p(x x x, t) + ǫ−2G ′′ (φ (x x x, t))p(x x x, t) in Ω × [0, T), p(x x x, T) = φ(x x x, T) − φobs(x x x) in Ω,

and we update the control as

ηℓ+1 = ηℓ − α

  • θηℓ + 1

ǫ pℓ

  • .

Feng Wei Yang Seminar at Warwick 25 January 2016 36 / 46

slide-37
SLIDE 37

Numerical challenges

Number of time steps Memory requirement (let’s consider double precision and 100 time steps)

2-D: 5122 requires 0.4 gigabytes 3-D: 5123 requires 215 gigabytes

Feng Wei Yang Seminar at Warwick 25 January 2016 37 / 46

slide-38
SLIDE 38

Two-grid solution strategy

One time step One complete solve for the Allen-Cahn equation from t=(0,T] Intermediate grid(s) Restrict the converged solution

  • f ϕ

Fine grid for the Allen-Cahn equation Coarse grid for the adjoint equation One time step One complete solve for the adjoint equation from t=[T,0) Interpolate the computed η Start the next η iteration

Feng Wei Yang Seminar at Warwick 25 January 2016 38 / 46

slide-39
SLIDE 39

Real world example (1)

Feng Wei Yang Seminar at Warwick 25 January 2016 39 / 46

slide-40
SLIDE 40

Real world example (1)

t=0 t=T

Feng Wei Yang Seminar at Warwick 25 January 2016 40 / 46

slide-41
SLIDE 41

Real world example (1)

Feng Wei Yang Seminar at Warwick 25 January 2016 41 / 46

slide-42
SLIDE 42

Real world example (2)

Feng Wei Yang Seminar at Warwick 25 January 2016 42 / 46

slide-43
SLIDE 43

Euler number for topological changes

We compute this Euler number for these time steps with an ”optimized“ control η: X = 1 2π(a − b)

  • Ω(a,b)
  • −△φ + ∇|∇φ|2 · ∇φ

2|∇φ|2

  • dx.
  • Q. Du et al. J. Appl. Math., 2005

Feng Wei Yang Seminar at Warwick 25 January 2016 43 / 46

slide-44
SLIDE 44

Real world example (2)

Feng Wei Yang Seminar at Warwick 25 January 2016 44 / 46

slide-45
SLIDE 45

A 3-D example

Feng Wei Yang Seminar at Warwick 25 January 2016 45 / 46

slide-46
SLIDE 46

The end

F.W. Yang, C.E. Goodyer, M.E. Hubbard and P.K. Jimack “An Optimally Efficient Technique for the Solution of Systems of Nonlinear Parabolic Partial Differential Equations” AiES in review, 2015

  • F. Yang, C. Venkataraman, V. Styles and A. Madzvamuse

“A Robust and Efficient Adaptive Multigrid Solver for the Optimal Control of Phase Field Formulations of Geometric Evolution Laws” CiCP in review, 2015

  • F. Yang, C. Venkataraman, V. Styles, V.Kuttenberger, E. Horn, Z.von Guttenberg and A. Madzvamuse

“A Computational Framework for Particle and Whole Cell Tracking Applied to a Real Biological Dataset” JBM in review, 2015 Feng Wei Yang Seminar at Warwick 25 January 2016 46 / 46