Skip to content

Commit

Permalink
PETSc 3.22 support for mesh and grid solver
Browse files Browse the repository at this point in the history
  • Loading branch information
MarDiehl committed Oct 8, 2024
1 parent 56a712f commit b875181
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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.22.0)
pkg_check_modules(PETSC REQUIRED PETSc<3.23.0)

pkg_get_variable(CMAKE_Fortran_COMPILER PETSc fcompiler)
pkg_get_variable(CMAKE_C_COMPILER PETSc ccompiler)
Expand Down
2 changes: 1 addition & 1 deletion src/CLI.f90
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
!> @brief Parse command line interface for PETSc-based solvers
!--------------------------------------------------------------------------------------------------
#define PETSC_MINOR_MIN 12
#define PETSC_MINOR_MAX 21
#define PETSC_MINOR_MAX 22

module CLI
use, intrinsic :: ISO_fortran_env
Expand Down
4 changes: 2 additions & 2 deletions src/mesh/mesh_mech_FEM.f90
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ module mesh_mechanical_FEM
#if defined(PETSC_USE_64BIT_INDICES) || PETSC_VERSION_MINOR < 16
ISDestroy, &
#endif
#if PETSC_VERSION_MINOR > 18
#if PETSC_VERSION_MINOR > 18 && PETSC_VERSION_MINOR < 22
DMAddField, &
#endif
PetscSectionGetNumFields, &
Expand Down Expand Up @@ -782,7 +782,7 @@ subroutine FEM_mechanical_updateCoords()
PetscInt :: pStart, pEnd, p, s, e, q, &
cellStart, cellEnd, c, n
PetscSection :: section
PetscQuadrature :: mechQuad
PetscDS :: mechQuad
PetscReal, dimension(:), pointer :: basisField, basisFieldDer, &
nodeCoords_linear !< nodal coordinates (dimPlex*Nnodes)
real(pREAL), dimension(:), pointer :: x_scal
Expand Down

0 comments on commit b875181

Please sign in to comment.