-
Notifications
You must be signed in to change notification settings - Fork 90
Tutorial: Building a 2D Poisson Solver
Terry Cojean edited this page Jul 5, 2021
·
4 revisions
Welcome to Ginkgo tutorials! In this tutorial series, you will build a simple console application that will be able to solve a discrete 2D Poisson equation on a unit square with Dirichlet boundary conditions. Your application will have support for several different right-hand sides and boundary functions and will be able to run the solver either on the CPU or on the GPU. You will also be able to monitor the residual on screen as your solver progresses, and collect various metrics that you can later plot to analyze your results.
This series is divided into 4 sections:
- The Getting Started section will guide you through Ginkgo's installation process.
- In the Implement section you will familiarize yourself with basic concepts in Ginkgo, such as matrices, solvers and linear operators, and learn enough of Ginkgo's features to build a first version of the Poisson solver.
- The Optimize section will show you how to use Ginkgo's benchmarking and logging features to analyze the performance of your solver, and show you how to improve the performance by using more suitable matrix formats and adding a preconditioner. You will also port your code to a GPU, to be able to use all the extra bandwidth it provides.
- The last Customize section will teach you about advanced concepts in Ginkgo and different ways in which Ginkgo can be extended for your applications specific needs. In the first part of this section, you will improve your application with a custom stopping criterion and a custom logger, while the second part will show you how to squeeze the last bit of performance from your hardware by designing your own matrix format, solver, and preconditioner which will benefit from the special structure of the Poisson matrix.
Without further ado, let's get started!
Next: Getting Started
Tutorial: Building a Poisson Solver
- Getting Started
- Implement: Matrices
- Implement: Solvers
- Optimize: Measuring Performance
- Optimize: Monitoring Progress
- Optimize: More Suitable Matrix Formats
- Optimize: Using a Preconditioner
- Optimize: Using GPUs
- Customize: Loggers
- Customize: Stopping Criterions
- Customize: Matrix Formats
- Customize: Solvers
- Customize: Preconditioners