Special Solution Strategies inside a Spectral Element Ocean Model Mohamed Iskandarani Rutgers University and Miami University Craig C. Douglas University.

Slides:



Advertisements
Similar presentations
Steady-state heat conduction on triangulated planar domain May, 2002
Advertisements

Computational Modeling for Engineering MECN 6040
A Discrete Adjoint-Based Approach for Optimization Problems on 3D Unstructured Meshes Dimitri J. Mavriplis Department of Mechanical Engineering University.
The Combinatorial Multigrid Solver Yiannis Koutis, Gary Miller Carnegie Mellon University TexPoint fonts used in EMF. Read the TexPoint manual before you.
Solving Linear Systems (Numerical Recipes, Chap 2)
Iterative methods TexPoint fonts used in EMF. Read the TexPoint manual before you delete this box.: AAA A A A A A A A.
Modern iterative methods For basic iterative methods, converge linearly Modern iterative methods, converge faster –Krylov subspace method Steepest descent.
Notes Assignment questions… cs533d-winter-2005.
Multilevel Incomplete Factorizations for Non-Linear FE problems in Geomechanics DMMMSA – University of Padova Department of Mathematical Methods and Models.
12/21/2001Numerical methods in continuum mechanics1 Continuum Mechanics On the scale of the object to be studied the density and other fluid properties.
Sparse Matrix Algorithms CS 524 – High-Performance Computing.
Avoiding Communication in Sparse Iterative Solvers Erin Carson Nick Knight CS294, Fall 2011.
Monica Garika Chandana Guduru. METHODS TO SOLVE LINEAR SYSTEMS Direct methods Gaussian elimination method LU method for factorization Simplex method of.
Non-hydrostatic algorithm and dynamics in ROMS Yuliya Kanarska, Alexander Shchepetkin, Alexander Shchepetkin, James C. McWilliams, IGPP, UCLA.
Chapter 13 Finite Difference Methods: Outline Solving ordinary and partial differential equations Finite difference methods (FDM) vs Finite Element Methods.
PETE 603 Lecture Session #29 Thursday, 7/29/ Iterative Solution Methods Older methods, such as PSOR, and LSOR require user supplied iteration.
1 Parallel Simulations of Underground Flow in Porous and Fractured Media H. Mustapha 1,2, A. Beaudoin 1, J. Erhel 1 and J.R. De Dreuzy IRISA – INRIA.
MANE 4240 & CIVL 4240 Introduction to Finite Elements
1 The Spectral Method. 2 Definition where (e m,e n )=δ m,n e n = basis of a Hilbert space (.,.): scalar product in this space In L 2 space where f * :
An approach for solving the Helmholtz Equation on heterogeneous platforms An approach for solving the Helmholtz Equation on heterogeneous platforms G.
Finite Differences Finite Difference Approximations  Simple geophysical partial differential equations  Finite differences - definitions  Finite-difference.
University of Veszprém Department of Image Processing and Neurocomputing Emulated Digital CNN-UM Implementation of a 3-dimensional Ocean Model on FPGAs.
CIS V/EE894R/ME894V A Case Study in Computational Science & Engineering HW 5 Repeat the HW associated with the FD LBI except that you will now use.
Fast Low-Frequency Impedance Extraction using a Volumetric 3D Integral Formulation A.MAFFUCCI, A. TAMBURRINO, S. VENTRE, F. VILLONE EURATOM/ENEA/CREATE.
Fast Thermal Analysis on GPU for 3D-ICs with Integrated Microchannel Cooling Zhuo Fen and Peng Li Department of Electrical and Computer Engineering, {Michigan.
Finite Element Method.
Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. Parallel Programming in C with MPI and OpenMP Michael J. Quinn.
CFD Lab - Department of Engineering - University of Liverpool Ken Badcock & Mark Woodgate Department of Engineering University of Liverpool Liverpool L69.
1 Variational and Weighted Residual Methods. 2 The Weighted Residual Method The governing equation for 1-D heat conduction A solution to this equation.
1 20-Oct-15 Last course Lecture plan and policies What is FEM? Brief history of the FEM Example of applications Discretization Example of FEM softwares.
6. Introduction to Spectral method. Finite difference method – approximate a function locally using lower order interpolating polynomials. Spectral method.
Stable, Circulation- Preserving, Simplicial Fluids Sharif Elcott, Yiying Tong, Eva Kanso, Peter Schröder, and Mathieu Desbrun.
Elliptic PDEs and the Finite Difference Method
1 Complex Images k’k’ k”k” k0k0 -k0-k0 branch cut   k 0 pole C1C1 C0C0 from the Sommerfeld identity, the complex exponentials must be a function.
Illustration of FE algorithm on the example of 1D problem Problem: Stress and displacement analysis of a one-dimensional bar, loaded only by its own weight,
Simulating complex surface flow by Smoothed Particle Hydrodynamics & Moving Particle Semi-implicit methods Benlong Wang Kai Gong Hua Liu
© Fluent Inc. 11/24/2015J1 Fluids Review TRN Overview of CFD Solution Methodologies.
Finite Difference Methods Definitions. Finite Difference Methods Approximate derivatives ** difference between exact derivative and its approximation.
Parallel Solution of the Poisson Problem Using MPI
HEAT TRANSFER FINITE ELEMENT FORMULATION
Case Study in Computational Science & Engineering - Lecture 5 1 Iterative Solution of Linear Systems Jacobi Method while not converged do { }
Discretization Methods Chapter 2. Training Manual May 15, 2001 Inventory # Discretization Methods Topics Equations and The Goal Brief overview.
Adjoint-Based Aerodynamic Shape Optimization on Unstructured Meshes
Partial Derivatives Example: Find If solution: Partial Derivatives Example: Find If solution: gradient grad(u) = gradient.
Consider Preconditioning – Basic Principles Basic Idea: is to use Krylov subspace method (CG, GMRES, MINRES …) on a modified system such as The matrix.
CO 2 maîtrisé | Carburants diversifiés | Véhicules économes | Raffinage propre | Réserves prolongées © IFP Écrire ici dans le masque le nom de votre Direction.
On the Performance of PC Clusters in Solving Partial Differential Equations Xing Cai Åsmund Ødegård Department of Informatics University of Oslo Norway.
Numerical Algorithm Development and Testing in HYCOM.
Brain (Tech) NCRR Overview Magnetic Leadfields and Superquadric Glyphs.
Efficient Simulation of Large Bodies of Water by Coupling Two and Three Dimensional Techniques Geoffrey Irving Stanford University Pixar Animation Studios.
A Parallel Hierarchical Solver for the Poisson Equation Seung Lee Deparment of Mechanical Engineering
Multipole-Based Preconditioners for Sparse Linear Systems. Ananth Grama Purdue University. Supported by the National Science Foundation.
Using Neumann Series to Solve Inverse Problems in Imaging Christopher Kumar Anand.
ANSYS, Inc. Proprietary © 2004 ANSYS, Inc. Chapter 5 Distributed Memory Parallel Computing v9.0.
General 3D equation used in MODFLOW Block centered grid xixi i-1 i i+1  x i-1/2  x i+1/2.
Xing Cai University of Oslo
Boundary Element Method
Convection-Dominated Problems
A computational loop k k Integration Newton Iteration
Lecture 19 MA471 Fall 2003.
A Parallel Hierarchical Solver for the Poisson Equation
Chapter 10: Solving Linear Systems of Equations
PDEs and Examples of Phenomena Modeled
FEM Steps (Displacement Method)
Supported by the National Science Foundation.
RECORD. RECORD COLLABORATE: Discuss: Is the statement below correct? Try a 2x2 example.
Comparison of CFEM and DG methods
MATH 175: Numerical Analysis II
Ph.D. Thesis Numerical Solution of PDEs and Their Object-oriented Parallel Implementations Xing Cai October 26, 1998.
A computational loop k k Integration Newton Iteration
Presentation transcript:

Special Solution Strategies inside a Spectral Element Ocean Model Mohamed Iskandarani Rutgers University and Miami University Craig C. Douglas University of Kentucky and Yale University Gundolf Haase University Linz, Austria and University of Kentucky

Outline Versions of Spectral Element Ocean Model (SEOM) Description of layered version Solving the Laplacian for Spectral Elements –Schur complement method with BPS-like pc –Sparse approximation matrix and AMG –A Two-grid method with patch smoothing What to do in 3D?

North East Pacific Grid

4 Way Partitioning of the Grid

SEOM Versions and Applications Single Layer –1.5 layer (wind circulation/abyssal flow) –global tides –estuarine modeling Multiple Layers –wind driven circulation, 2-5 layers 3D Continuous Stratification –Gravitational Adjustment –Overflow –Basin Circulation

Highlights of Spectral Element Method h-p type FEM (C 0 continuity) Geometric flexibility Dense computational kernels (ops O(KN 3 )) Excellent scalability Very low phase errors and numerical dissipation CPU intensive

Motivation for Layered SEOM Mathematically simpler than SEOM-3D Computationally simpler and faster No cross isopycnal diffusion No pressure gradient errors Baroclinic processes possible with 2 layers Eddy resolving simulations can be produced relatively easily and cheaply

Layered Model Equations Equations are –du k /dt + f  u k =        h k  u k )/h k –        u k  The Montgomery potential is  k = g  1 +  k-1 + g  k z k, k>0, where  1 is the barotropic pressure contribution to the Montgomery potential. The thickness anomaly of layer k is  k =  k -  k+1 with  N+1 = 0. The total depth of the fluid is H =      The vertical coordinate of the surface interface of layer k is z k = z k+1 + h k. The stress on the layer k is  k, where  1 is surface wind stress,  N+1 is the bottom drag coefficient, and  k+1 is the interfacial drag coefficient.

Current Limitations Layer thickness must be > 0 –Entrainment kicks in when h < h c : h t +  (hu) = w t Topography confined to deepest layer No thermodynamics

Time Discretization Third order Adams-Bashford (AB3) explicit on all terms except surface gravity waves Backward Euler (BE) implicit on surface gravity waves –Implicit terms isolated in 2D equations –Iterative solutions via PCG.

Filtering Each layer has to solve denotes the filtered vorticity and is the filtered divergence field The filtering is done by series expansion and the Boyed-Vandeven filter in each spectral element. Solve on each of the 5 layers

Spectral Element Gauss-Lobatto discretization Element is the support of inner node f.e. basis functions IInner nodes BBoundary nodes E consisting of Edge nodes V Vertex nodes

SEOM Advantage over FDM The speedup formula shows that the speedup deteriorates as the second term in the denominator increases. This second term decreases quadratically with the spectral truncation, and like the square root of the number of elements in the partition. The formula also shows the distinguishing property of the spectral element method which gives it its coarse grain character: the communication cost increases only linearly with the order of the method while its computational cost increases cubically, yielding a quadratic ratio between the two. High order finite difference methods, by contrast, show a quadratic increase of the communication cost with the order, since the halo of points needed to be passed between processors increases.

System of equations Spectral element discretization: solve 10 times the system of eqns Block structure Note, that and are symmetric.

What’s the problem? symmetric, positive definite matrix no M-matrix huge Many parallel solvers available Memory requirements vs. solution time but

A. Schur Complement cg Solve Laplacian by Schur Complement cg Preconditioner Adapts wrt. spectral elements

Factor matrix Factorization of results in Schur complement Matrices are stored.

Schur Complement and Basis Transformation Defining the exact harmonic basis transformation the Schur complement can be reinterpreted as i.e., Galerkin approach.

Schur complement cg 1.) 2.) 3.) Solve 4.)

Schur Complement Preconditioner I Again, we can factor such that BUT with j counter of elements/edges/...

Schur Complement Preconditioner II Substitute by : linear interpolation from vertices onto an edge j

Schur Complement Preconditioner III Calculate element-wise: Approximate by is on edge j [Dryja] Derive directly by symbolic methods [Bramble/Pasciak/Schatz]

Schur complement pc 1.) 2.) Solve 3.) 4.)

Vertex node system is equivalent to a (non-constant) 9-point stencil Solve directly (gather on one processor) Combine with parallel AMG (PEBBLES) Special cache-optimized and parallel AMG/MG for 9-point stencil ()

Memory requirements (A) Laplacian in 2D Small example: 99 elements, 5146 nodes M = O(nelem) M(Schur-cg) = 2.35 MB M(Schur-cg,pc) = 2.36 MB

B. Matrix approximation Memory Approximate element matrices AMG solver

Memory for stiffness matrix Small example Storing in CRS requires 4.79 MB Storing full matrices needs 3.10 MB Symmetry ==> half of memory requirements AMG ==> 3 x 4.8 MB = 14.6 MB

Sparse element matrices 4096 entries in, many of them are small Lumping of entries < 5% of main diagonal ==> sparse matrix with aver. 9 entries per row Future: Element preconditioning [Reitzinger], M-matrix, reduced pattern, symbolic methods

Sparse matrix: memory(B) M(C) = 0.42 Mbytes AMG(C) ==> 3 x 0.42 MB = 1.26 MB cg(K) with AMG(C)-preconditioning matrix free matrix-vector: M = 1.26 MB matrix-vector: M = 2.82 MB

C. Two grid method Direct reduction to vertex system Patch smoother Matrix free defect calculation

Interpolation bilinear interpolation from vertices same operator for all elements

Factor matrix Factorization of wrt. Element-wise vertex Schur complement ( = coarse matrix) Matrices are stored (16*nelem + 8).

Patch smoother Sparse approximation of is Accumulate it and store inverse element matrix (matrix-free) DO r = 1, nelem OD

Element matrix I

Element matix II Store in each element (3*nelem) Store three 64x64 matrices (3*4096) 3 Mults and 3 Adds calculate the matrix entry

Memory requirements (C) Laplacian in 2D Small example: 99 elements, 5146 nodes M (vertex) = 0.01 MB M( ) = 0.13 MB M( ) = 0.82 MB M(Two grid) = 0.96 MB

Memory requirements (A-C)

Summary 2D: Schur complement pcg is fast AMG and Two-grid method require less memory, especially in 3D Use parallel AMG for Vertex systems Simultaneous iteration for u,v and layers will save arithmetic in matrix-free methods