-
Notifications
You must be signed in to change notification settings - Fork 118
Tutorial 3: Implement: Solvers
fritzgoebel edited this page Jul 28, 2019
·
10 revisions
Previous: Implement: Matrices; Next: Optimize: Measuring Performance
This tutorial will explain how to solve a system of equations using Ginkgo. You will learn about gko::solver::Cg class and its accompanying factory gko::solver::Cg::Factory. You will also learn about stopping criteria (gko::stop::Iterations and gko::stop::RelativeResidual).
In case you are not familiar with the conjugate gradient method, you can read up on it here.
In Ginkgo, to set up a cg solver, we first have to create a factory. That is done by
cg::build()
.with_criteria(gko::stop::Iteration::build()
.with_max_iters(max_iters)
.on(exec),
gko::stop::ResidualNormReduction<>::build()
.with_reduction_factor(1e-6)
.on(exec))
.on(exec);
Previous: [Implement: Matrices](./Tutorial-2:-Implement:-Matrices); Next: [Optimize: Measuring Performance](./Tutorial-4:-Optimize:-Measuring-Performance)
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