Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/prj-/jolivet2020petsc

KSPHPDDM and PCHPDDM
https://github.com/prj-/jolivet2020petsc

freefem krylov-methods petsc preconditioners slepc

Last synced: about 1 month ago
JSON representation

KSPHPDDM and PCHPDDM

Awesome Lists containing this project

README

        

# KSPHPDDM and PCHPDDM

> Extending PETSc with Robust Overlapping Schwarz Preconditioners and Advanced Krylov Methods.

The code available in this repository can reproduce the results from the following [paper](https://www.sciencedirect.com/science/article/abs/pii/S0898122121000055).
```
@article{jolivet2020petsc,
Author = {Jolivet, Pierre and Roman, Jose E. and Zampini, Stefano},
Title = {{KSPHPDDM} and {PCHPDDM}: Extending {PETSc} with advanced {Krylov} methods and robust multilevel overlapping {Schwarz} preconditioners},
Year = {2021},
Publisher = {Elsevier},
Journal = {Computer \& Mathematics with Applications},
Volume = {84},
Pages = {277--295},
Url = {https://github.com/prj-/jolivet2020petsc}
}
```

## Getting started
### Dependencies
Make sure you have access to a recent [FreeFEM](https://freefem.org/) and/or [MFEM](https://mfem.org/) installation, compiled with [PETSc](https://petsc.org/) and [SLEPc](https://slepc.upv.es/) support. More details about the HPDDM options used in the solver may be found in the [KSP](https://petsc.org/main/docs/manualpages/KSP/KSPHPDDM/) or the [PC](https://petsc.org/main/docs/manualpages/PC/PCHPDDM/) manual pages.

### Usage example
One should be able to launch the following commands, which solves the Bratu equation or computes the eigenvalues of the Laplacian on the same geometrical configurations as in the paper.
```
$ mpirun -np 8 FreeFem++-mpi bratu.edp -v 0
$ mpirun -np 8 FreeFem++-mpi blocking-slepc.edp -v 0 -asm
```
The option `-v 0` is here to minimize the output generated by FreeFEM, see this [tutorial](https://joliv.et/FreeFem-tutorial/) for more information.

### Customization
Here are the main command line parameters common to all scripts.

* `-N` (default to `10`), number of discretization points of the global domain (users are free to use a Gmsh or DMPlex mesh as well)

For `blocking-slepc.edp`, default options for the three inner preconditioners compared in the paper are turned on with the additional command line parameters `-asm` (for `PCASM`), `-gamg` (for `PCGAMG`), or `-hpddm` (for `PCHPDDM`). It is also possible to switch from `EPSLOBPCG` to `EPSCISS` by using the command line option `-eps_type ciss`.

### `MatProduct` mini-app
The source code of the mini-app is in the file `MatProduct.c`. It is also available as [mat/tests/ex237.c](https://petsc.org/main/src/mat/tests/ex237.c.html) in the official PETSc test suite. It can be compiled using a recent PETSc installation (3.14.0 or above) and launched using the same parameters as in the paper. One can generate one's own `MatSeqAIJ` and then save it in binary format, or download the matrix used in the benchmark: [binaryoutput](http://joliv.et/binaryoutput).

## Acknowledgements
* HPC resources of [TGCC@CEA](http://www-hpc.cea.fr/index-en.htm), resp. [IDRIS@CNRS](http://www.idris.fr/), under the allocation A0070607519, resp. AP010611780, made by [GENCI](http://www.genci.fr/en)