diff --git a/CMakeLists.txt b/CMakeLists.txt index de04a95e3..60a05cfc7 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -11,7 +11,7 @@ endif() project(Prerequisites LANGUAGES) set(ENV{PKG_CONFIG_PATH} "$ENV{PETSC_DIR}/$ENV{PETSC_ARCH}/lib/pkgconfig:$ENV{PKG_CONFIG_PATH}") pkg_check_modules(PETSC_MIN REQUIRED PETSc>=3.12.0 QUIET) #CMake does not support version range -pkg_check_modules(PETSC REQUIRED PETSc<3.20.0) +pkg_check_modules(PETSC REQUIRED PETSc<3.21.0) pkg_get_variable(CMAKE_Fortran_COMPILER PETSc fcompiler) pkg_get_variable(CMAKE_C_COMPILER PETSc ccompiler) diff --git a/src/CLI.f90 b/src/CLI.f90 index 675f3c3bc..968186f3d 100644 --- a/src/CLI.f90 +++ b/src/CLI.f90 @@ -6,7 +6,7 @@ !> @brief Parse command line interface for PETSc-based solvers !-------------------------------------------------------------------------------------------------- #define PETSC_MINOR_MIN 12 -#define PETSC_MINOR_MAX 19 +#define PETSC_MINOR_MAX 20 module CLI use, intrinsic :: ISO_fortran_env diff --git a/src/mesh/mesh_mech_FEM.f90 b/src/mesh/mesh_mech_FEM.f90 index c566990e2..67b7859ba 100644 --- a/src/mesh/mesh_mech_FEM.f90 +++ b/src/mesh/mesh_mech_FEM.f90 @@ -74,6 +74,9 @@ module mesh_mechanical_FEM external :: & ! ToDo: write interfaces #if defined(PETSC_USE_64BIT_INDICES) || PETSC_VERSION_MINOR < 17 ISDestroy, & +#endif +#if PETSC_VERSION_MINOR > 18 + DMAddField, & #endif PetscSectionGetNumFields, & PetscFESetQuadrature, &