SimVascular / svFSIplus

This repository contains a line-by-line conversion of the Fortran svFSI solver to C++.
Other
6 stars 19 forks source link

Add CMake commands to build with PETSc #181

Closed ktbolt closed 3 months ago

ktbolt commented 3 months ago

Problem

We would like to build svFSIplus with PETSc linear algebra package.

Solution

Add CMake commands to build svFSIplus with PETSc.

Additional context

No response

Code of Conduct

ktbolt commented 3 months ago

I've added an SV_PETSC_DIR option to set the PETSc install directory

Screen Shot 2024-02-05 at 5 19 38 PM

Setting SV_PETSC_DIR will build svFSIplus with PETSc and enable using it. Note that we just can't use an SV_USE_PETSC flag like SV_USE_TRILINOS because PETSc does not have a CMake config file and therefore does not work with the CMake find_package command.

I also added CMake commands to define PETSc include and library flags.

This all seems to work, tested with https://github.com/mrp089/svFSIplus_old/tree/petsc_interface_30.