scientific computing i
play

Scientific Computing I Module 10: Algorithms and Data Storage for - PowerPoint PPT Presentation

Lehrstuhl Informatik V Scientific Computing I Module 10: Algorithms and Data Storage for PDE Solvers Miriam Mehl Winter 2011/2012 Miriam Mehl: Scientific Computing I Module 10: Algorithms and Data Storage for PDE Solvers, Winter 2011/2012 1


  1. Lehrstuhl Informatik V Scientific Computing I Module 10: Algorithms and Data Storage for PDE Solvers Miriam Mehl Winter 2011/2012 Miriam Mehl: Scientific Computing I Module 10: Algorithms and Data Storage for PDE Solvers, Winter 2011/2012 1

  2. Lehrstuhl Informatik V Part I: Algorithms for PDE Solvers Model + Discretization + Grid: What’s Missing? Grid Traversal Miriam Mehl: Scientific Computing I Module 10: Algorithms and Data Storage for PDE Solvers, Winter 2011/2012 2

  3. Lehrstuhl Informatik V What’s Missing? Scenario Spatial discreti- sation: Model:   1 1 u t = ∆ u − f 1 − 4 1   h 2 1 Grid: Time discretization: � 1 � u n + 1 = u n + ∂ t h 2 [∆] u n − f . What else do we need? Miriam Mehl: Scientific Computing I Module 10: Algorithms and Data Storage for PDE Solvers, Winter 2011/2012 3

  4. Lehrstuhl Informatik V What’s Missing (2)? • How to travers the grid? • How to store and access data? • How to assemble and store the system matrix? • How to evaluate stencils? • How to solve the (non-)linear system of equations? Miriam Mehl: Scientific Computing I Module 10: Algorithms and Data Storage for PDE Solvers, Winter 2011/2012 4

  5. Lehrstuhl Informatik V Grid Traversal – Two Examples space-filling curves (also applicable to un- structured grids) line-/row-wise Miriam Mehl: Scientific Computing I Module 10: Algorithms and Data Storage for PDE Solvers, Winter 2011/2012 5

  6. Lehrstuhl Informatik V Space-Filling Curve Grid Traversal • broad applicability (regular, adaptive, structures, unstructured grids) • efficient recursive construction • locality properties • quasi-optimal grid partitioning • locality of data-access (cache!) Miriam Mehl: Scientific Computing I Module 10: Algorithms and Data Storage for PDE Solvers, Winter 2011/2012 6

  7. Lehrstuhl Informatik V Iterator Grid Traversal • travers lists of elements, faces, edges, nodes, boundary elements,... • possible for all kinds of grids • very flexible • traverses a single grid level → extra work for restrictions/interpolations • widely used in frameworks allowing for the usage of different grid types (DUNE, Sundance,...) Miriam Mehl: Scientific Computing I Module 10: Algorithms and Data Storage for PDE Solvers, Winter 2011/2012 7

  8. Lehrstuhl Informatik V Recursive Grid Traversal • follow the tree-structure of a grid (usually depth-first) • applicable for tree-structured grids • traverses all grid-levels → allows for inter-level operations (restriction, interpolation) Miriam Mehl: Scientific Computing I Module 10: Algorithms and Data Storage for PDE Solvers, Winter 2011/2012 8

  9. Lehrstuhl Informatik V Part II: Data Storage for PDE Solvers Data Storage and Access Storage of the Computational Grid Storage of the Unknowns Storage of the System Matrix Miriam Mehl: Scientific Computing I Module 10: Algorithms and Data Storage for PDE Solvers, Winter 2011/2012 9

  10. Lehrstuhl Informatik V Data Storage and Access What do we have to store? • the computational grid • values of unknowns and auxiliary variables (residuals,...) • system matrices Miriam Mehl: Scientific Computing I Module 10: Algorithms and Data Storage for PDE Solvers, Winter 2011/2012 10

  11. Lehrstuhl Informatik V Storage of the Computational Grid • regular grid: → nothing to store except N x , N y , and N z • tree-structured grid: linearized storage: 1 1 000000000 1 000000000 0000000 ���� ���� � �� � ���� � �� � � �� � ref.root ref. cell l1 unref. cells l2 ref. cell l1 unref. cells l2 unref. cells l1 Miriam Mehl: Scientific Computing I Module 10: Algorithms and Data Storage for PDE Solvers, Winter 2011/2012 11

  12. Lehrstuhl Informatik V Storage of the Computational Grid (2) • unstructured grid: linked lists of grid components:         ց ց elem 1 face 1 → edge 1 node 1 . → . elem 2 face 2 ց edge 2 node 2         . .         . . . . . .  .   .  .  .   .  ր . . . . . .         . . elem M . face N edge Q . node P → . . Miriam Mehl: Scientific Computing I Module 10: Algorithms and Data Storage for PDE Solvers, Winter 2011/2012 12

  13. Lehrstuhl Informatik V Storage of the Unknowns ... and auxiliary values such as residuals, old time step values,... • arrays/vectors → regular structured grids • hashtable → unstructured / (dynamically) adaptive grids • streams / stacks → optimal data locality (cache!) → possible in special cases Miriam Mehl: Scientific Computing I Module 10: Algorithms and Data Storage for PDE Solvers, Winter 2011/2012 13

  14. Lehrstuhl Informatik V Storage of the Unknowns (2) Storage in streams and stacks in Peano: input stream output stream temporary stacks u, v, res, crit p., res ref, crit input stream output stream Miriam Mehl: Scientific Computing I Module 10: Algorithms and Data Storage for PDE Solvers, Winter 2011/2012 14

  15. Lehrstuhl Informatik V Storage of the System Matrix • dense matrix format • sparse matrix format • matrix-free Miriam Mehl: Scientific Computing I Module 10: Algorithms and Data Storage for PDE Solvers, Winter 2011/2012 15

Download Presentation
Download Policy: The content available on the website is offered to you 'AS IS' for your personal information and use only. It cannot be commercialized, licensed, or distributed on other websites without prior consent from the author. To download a presentation, simply click this link. If you encounter any difficulties during the download process, it's possible that the publisher has removed the file from their server.

Recommend


More recommend