Skip to content
Snippets Groups Projects
user avatar
Stefano Zampini authored
- need VecResetArray otherwise the CPU array placed will never be updated

STYLE: make PetscWrappedVector constructor explicit, use default constructor
5d0b36c6
Name Last commit Last update
doc
src
tutorials
.gitignore
Allwclean
Allwmake
README.md

petsc4Foam

General Description

Library for OpenFOAM that provides a solver for embedding Petsc and its external dependencies (i.e. Hypre) into arbitrary OpenFOAM simulations.

The library provides:

  • ldu2csr matrix conversion.
  • selection of solvers and preconditioners available in Petsc and in its external libraries (i.e. Hypre).
  • editing of run-time options by a dictionary and/or a rc file.
  • basic caching implementation of a Petsc matrix.

Requirements

  1. OpenFOAM-v1906 or higher or a recent development version from OpenFOAM.com.
  2. Petsc 3.10 or newer, optionally compiled with Hypre support (optionally with MPI support).

Building

Ensure that the OpenFOAM environment is active and that Petsc can be found (check that the PETSC_ARCH_PATH environment variable is properly set). Read How to build Petsc for OpenFOAM for more information or visit the Petsc website How to build Petsc.

To install in the normal OpenFOAM directories (using wmake)

Simply use the supplied Allwmake script:

./Allwmake

This will install the library under FOAM_USER_LIBBIN.

Authors

License:

Licensed under GNU General Public License http://www.gnu.org/licenses/ with the same terms as OpenFOAM itself.