Skip to content

Commit

Permalink
mesh solver adjustments for PETSc 3.22.x
Browse files Browse the repository at this point in the history
  • Loading branch information
MarDiehl committed Oct 8, 2024
1 parent 751f2c7 commit 10af4b8
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 0 deletions.
10 changes: 10 additions & 0 deletions src/mesh/discretization_mesh.f90
Original file line number Diff line number Diff line change
Expand Up @@ -179,15 +179,25 @@ subroutine discretization_mesh_init()
#else
call PetscDTSimplexQuadrature(dimplex, p_i, -1, quadrature, err_PETSc)
CHKERRQ(err_PETSc)
#if (PETSC_VERSION_MAJOR==3 && PETSC_VERSION_MINOR>=22)
call PetscQuadratureGetData(quadrature,PETSC_NULL_INTEGER,PETSC_NULL_INTEGER, &
mesh_maxNips,qPointsP,PETSC_NULL_REAL_PTR,err_PETSc)
#else
call PetscQuadratureGetData(quadrature,PETSC_NULL_INTEGER(1),PETSC_NULL_INTEGER(1), &
mesh_maxNips,qPointsP,PETSC_NULL_REAL_PTR,err_PETSc)
#endif
CHKERRQ(err_PETSc)

call mesh_FEM_build_ipCoordinates(dimPlex,qPointsP)
call mesh_FEM_build_ipVolumes(dimPlex)

#if (PETSC_VERSION_MAJOR==3 && PETSC_VERSION_MINOR>=22)
call PetscQuadratureRestoreData(quadrature,PETSC_NULL_INTEGER,PETSC_NULL_INTEGER, &
PETSC_NULL_INTEGER,qPointsP,PETSC_NULL_REAL_PTR,err_PETSc)
#else
call PetscQuadratureRestoreData(quadrature,PETSC_NULL_INTEGER(1),PETSC_NULL_INTEGER(1), &
PETSC_NULL_INTEGER(1),qPointsP,PETSC_NULL_REAL_PTR,err_PETSc)
#endif
CHKERRQ(err_PETSc)
call PetscQuadratureDestroy(quadrature, err_PETSc)
CHKERRQ(err_PETSc)
Expand Down
10 changes: 10 additions & 0 deletions src/mesh/mesh_mech_FEM.f90
Original file line number Diff line number Diff line change
Expand Up @@ -179,13 +179,23 @@ subroutine FEM_mechanical_init(mechBC,num_mesh)
#else
call PetscDTSimplexQuadrature(dimplex,num%p_i,-1,mechQuad,err_PETSc)
CHKERRQ(err_PETSc)
#if (PETSC_VERSION_MAJOR==3 && PETSC_VERSION_MINOR>=22)
call PetscQuadratureGetData(mechQuad,PETSC_NULL_INTEGER,PETSC_NULL_INTEGER, &
nQuadrature,PETSC_NULL_REAL_PTR,qWeightsP,err_PETSc)
CHKERRQ(err_PETSc)
qWeights = qWeightsP
call PetscQuadratureRestoreData(mechQuad,PETSC_NULL_INTEGER,PETSC_NULL_INTEGER, &
PETSC_NULL_INTEGER,PETSC_NULL_REAL_PTR,qWeightsP, &
err_PETSc)
#else
call PetscQuadratureGetData(mechQuad,PETSC_NULL_INTEGER(1),PETSC_NULL_INTEGER(1), &
nQuadrature,PETSC_NULL_REAL_PTR,qWeightsP,err_PETSc)
CHKERRQ(err_PETSc)
qWeights = qWeightsP
call PetscQuadratureRestoreData(mechQuad,PETSC_NULL_INTEGER(1),PETSC_NULL_INTEGER(1), &
PETSC_NULL_INTEGER(1),PETSC_NULL_REAL_PTR,qWeightsP, &
err_PETSc)
#endif
CHKERRQ(err_PETSc)
nc = dimPlex
#endif
Expand Down

0 comments on commit 10af4b8

Please sign in to comment.