adopting to PETSc >3.10
thanks to Matthew Knepley from the PETSc team
This commit is contained in:
parent
cab000f4b4
commit
1ceba73d31
|
@ -120,8 +120,15 @@ subroutine FEM_mech_init(fieldBC)
|
||||||
call PetscFESetQuadrature(mechFE,mechQuad,ierr); CHKERRQ(ierr)
|
call PetscFESetQuadrature(mechFE,mechQuad,ierr); CHKERRQ(ierr)
|
||||||
call PetscFEGetDimension(mechFE,nBasis,ierr); CHKERRQ(ierr)
|
call PetscFEGetDimension(mechFE,nBasis,ierr); CHKERRQ(ierr)
|
||||||
nBasis = nBasis/nc
|
nBasis = nBasis/nc
|
||||||
|
#if (PETSC_VERSION_MINOR > 10)
|
||||||
|
call DMAddField(mech_mesh,PETSC_NULL_DMLABEL,mechFE,ierr); CHKERRQ(ierr)
|
||||||
|
call DMCreateDS(mech_mesh,ierr); CHKERRQ(ierr)
|
||||||
|
#endif
|
||||||
|
call DMGetDS(mech_mesh,mechDS,ierr); CHKERRQ(ierr)
|
||||||
|
#if (PETSC_VERSION_MINOR < 11)
|
||||||
call DMGetDS(mech_mesh,mechDS,ierr); CHKERRQ(ierr)
|
call DMGetDS(mech_mesh,mechDS,ierr); CHKERRQ(ierr)
|
||||||
call PetscDSAddDiscretization(mechDS,mechFE,ierr); CHKERRQ(ierr)
|
call PetscDSAddDiscretization(mechDS,mechFE,ierr); CHKERRQ(ierr)
|
||||||
|
#endif
|
||||||
call PetscDSGetTotalDimension(mechDS,cellDof,ierr); CHKERRQ(ierr)
|
call PetscDSGetTotalDimension(mechDS,cellDof,ierr); CHKERRQ(ierr)
|
||||||
call PetscFEDestroy(mechFE,ierr); CHKERRQ(ierr)
|
call PetscFEDestroy(mechFE,ierr); CHKERRQ(ierr)
|
||||||
call PetscQuadratureDestroy(mechQuad,ierr); CHKERRQ(ierr)
|
call PetscQuadratureDestroy(mechQuad,ierr); CHKERRQ(ierr)
|
||||||
|
|
Loading…
Reference in New Issue