external statements will not work if interfaces exist
we're currently providing a patch for PETSc with interfaces for all functions that we use
This commit is contained in:
parent
ff241ae4a6
commit
180105d3ce
|
@ -118,11 +118,8 @@ program DAMASK_FEM
|
||||||
|
|
||||||
external :: &
|
external :: &
|
||||||
MPI_abort, &
|
MPI_abort, &
|
||||||
DMGetDimension, &
|
|
||||||
DMGetLabelSize, &
|
|
||||||
DMGetLabelIdIS, &
|
|
||||||
ISDestroy, &
|
|
||||||
quit
|
quit
|
||||||
|
|
||||||
!--------------------------------------------------------------------------------------------------
|
!--------------------------------------------------------------------------------------------------
|
||||||
! init DAMASK (all modules)
|
! init DAMASK (all modules)
|
||||||
call CPFEM_initAll(el = 1_pInt, ip = 1_pInt)
|
call CPFEM_initAll(el = 1_pInt, ip = 1_pInt)
|
||||||
|
|
|
@ -88,9 +88,7 @@ subroutine DAMASK_interface_init()
|
||||||
dateAndTime ! type default integer
|
dateAndTime ! type default integer
|
||||||
PetscErrorCode :: ierr
|
PetscErrorCode :: ierr
|
||||||
external :: &
|
external :: &
|
||||||
quit,&
|
quit
|
||||||
PETScErrorF, & ! is called in the CHKERRQ macro
|
|
||||||
PETScInitialize
|
|
||||||
|
|
||||||
open(6, encoding='UTF-8') ! for special characters in output
|
open(6, encoding='UTF-8') ! for special characters in output
|
||||||
|
|
||||||
|
|
|
@ -151,7 +151,6 @@ program DAMASK_spectral
|
||||||
external :: &
|
external :: &
|
||||||
quit
|
quit
|
||||||
|
|
||||||
|
|
||||||
!--------------------------------------------------------------------------------------------------
|
!--------------------------------------------------------------------------------------------------
|
||||||
! init DAMASK (all modules)
|
! init DAMASK (all modules)
|
||||||
call CPFEM_initAll(el = 1_pInt, ip = 1_pInt)
|
call CPFEM_initAll(el = 1_pInt, ip = 1_pInt)
|
||||||
|
@ -659,9 +658,6 @@ subroutine quit(stop_id)
|
||||||
PetscErrorCode :: ierr = 0
|
PetscErrorCode :: ierr = 0
|
||||||
logical :: ErrorInQuit
|
logical :: ErrorInQuit
|
||||||
|
|
||||||
external :: &
|
|
||||||
PETScFinalize
|
|
||||||
|
|
||||||
call PETScFinalize(ierr)
|
call PETScFinalize(ierr)
|
||||||
if (ierr /= 0) write(6,'(a)') ' Error in PETScFinalize'
|
if (ierr /= 0) write(6,'(a)') ' Error in PETScFinalize'
|
||||||
#ifdef _OPENMP
|
#ifdef _OPENMP
|
||||||
|
|
|
@ -62,7 +62,6 @@ module FEM_mech
|
||||||
FEM_mech_solution ,&
|
FEM_mech_solution ,&
|
||||||
FEM_mech_forward, &
|
FEM_mech_forward, &
|
||||||
FEM_mech_destroy
|
FEM_mech_destroy
|
||||||
external :: PETScerrorf
|
|
||||||
contains
|
contains
|
||||||
|
|
||||||
!--------------------------------------------------------------------------------------------------
|
!--------------------------------------------------------------------------------------------------
|
||||||
|
|
|
@ -121,7 +121,6 @@ use PETScis
|
||||||
COMPONENT_MECH_Z_ID, &
|
COMPONENT_MECH_Z_ID, &
|
||||||
COMPONENT_THERMAL_T_ID
|
COMPONENT_THERMAL_T_ID
|
||||||
|
|
||||||
external :: PETScErrorF
|
|
||||||
contains
|
contains
|
||||||
|
|
||||||
!--------------------------------------------------------------------------------------------------
|
!--------------------------------------------------------------------------------------------------
|
||||||
|
|
|
@ -192,8 +192,6 @@ subroutine numerics_init
|
||||||
tag ,&
|
tag ,&
|
||||||
line
|
line
|
||||||
!$ character(len=6) DAMASK_NumThreadsString ! environment variable DAMASK_NUM_THREADS
|
!$ character(len=6) DAMASK_NumThreadsString ! environment variable DAMASK_NUM_THREADS
|
||||||
external :: &
|
|
||||||
PETScErrorF ! is called in the CHKERRQ macro
|
|
||||||
|
|
||||||
#ifdef PETSc
|
#ifdef PETSc
|
||||||
call MPI_Comm_rank(PETSC_COMM_WORLD,worldrank,ierr);CHKERRQ(ierr)
|
call MPI_Comm_rank(PETSC_COMM_WORLD,worldrank,ierr);CHKERRQ(ierr)
|
||||||
|
|
|
@ -50,8 +50,6 @@ module spectral_damage
|
||||||
spectral_damage_init, &
|
spectral_damage_init, &
|
||||||
spectral_damage_solution, &
|
spectral_damage_solution, &
|
||||||
spectral_damage_forward
|
spectral_damage_forward
|
||||||
external :: &
|
|
||||||
PETScErrorF ! is called in the CHKERRQ macro
|
|
||||||
|
|
||||||
contains
|
contains
|
||||||
|
|
||||||
|
@ -85,11 +83,6 @@ subroutine spectral_damage_init()
|
||||||
Vec :: uBound, lBound
|
Vec :: uBound, lBound
|
||||||
PetscErrorCode :: ierr
|
PetscErrorCode :: ierr
|
||||||
character(len=100) :: snes_type
|
character(len=100) :: snes_type
|
||||||
external :: &
|
|
||||||
SNESSetOptionsPrefix, &
|
|
||||||
SNESGetType, &
|
|
||||||
DMDAGetCorners, &
|
|
||||||
DMDASNESSetFunctionLocal
|
|
||||||
|
|
||||||
write(6,'(/,a)') ' <<<+- spectral_damage init -+>>>'
|
write(6,'(/,a)') ' <<<+- spectral_damage init -+>>>'
|
||||||
write(6,'(/,a)') ' Shanthraj et al., Handbook of Mechanics of Materials, volume in press, '
|
write(6,'(/,a)') ' Shanthraj et al., Handbook of Mechanics of Materials, volume in press, '
|
||||||
|
@ -194,11 +187,6 @@ type(tSolutionState) function spectral_damage_solution(timeinc,timeinc_old,loadC
|
||||||
PetscErrorCode :: ierr
|
PetscErrorCode :: ierr
|
||||||
SNESConvergedReason :: reason
|
SNESConvergedReason :: reason
|
||||||
|
|
||||||
external :: &
|
|
||||||
VecMin, &
|
|
||||||
VecMax, &
|
|
||||||
SNESSolve
|
|
||||||
|
|
||||||
spectral_damage_solution%converged =.false.
|
spectral_damage_solution%converged =.false.
|
||||||
|
|
||||||
!--------------------------------------------------------------------------------------------------
|
!--------------------------------------------------------------------------------------------------
|
||||||
|
|
|
@ -66,8 +66,6 @@ module spectral_mech_basic
|
||||||
basic_init, &
|
basic_init, &
|
||||||
basic_solution, &
|
basic_solution, &
|
||||||
basic_forward
|
basic_forward
|
||||||
external :: &
|
|
||||||
PETScErrorF ! is called in the CHKERRQ macro
|
|
||||||
|
|
||||||
contains
|
contains
|
||||||
|
|
||||||
|
@ -119,11 +117,6 @@ subroutine basic_init
|
||||||
integer(pInt) :: proc
|
integer(pInt) :: proc
|
||||||
character(len=1024) :: rankStr
|
character(len=1024) :: rankStr
|
||||||
|
|
||||||
external :: &
|
|
||||||
SNESSetOptionsPrefix, &
|
|
||||||
SNESSetConvergenceTest, &
|
|
||||||
DMDASNESSetFunctionLocal
|
|
||||||
|
|
||||||
write(6,'(/,a)') ' <<<+- DAMASK_spectral_solverBasic init -+>>>'
|
write(6,'(/,a)') ' <<<+- DAMASK_spectral_solverBasic init -+>>>'
|
||||||
write(6,'(/,a)') ' Shanthraj et al., International Journal of Plasticity, 66:31–45, 2015'
|
write(6,'(/,a)') ' Shanthraj et al., International Journal of Plasticity, 66:31–45, 2015'
|
||||||
write(6,'(a,/)') ' https://doi.org/10.1016/j.ijplas.2014.02.006'
|
write(6,'(a,/)') ' https://doi.org/10.1016/j.ijplas.2014.02.006'
|
||||||
|
@ -246,9 +239,6 @@ type(tSolutionState) function basic_solution(incInfoIn,timeinc,timeinc_old,stres
|
||||||
PetscErrorCode :: ierr
|
PetscErrorCode :: ierr
|
||||||
SNESConvergedReason :: reason
|
SNESConvergedReason :: reason
|
||||||
|
|
||||||
external :: &
|
|
||||||
SNESsolve
|
|
||||||
|
|
||||||
incInfo = incInfoIn
|
incInfo = incInfoIn
|
||||||
|
|
||||||
!--------------------------------------------------------------------------------------------------
|
!--------------------------------------------------------------------------------------------------
|
||||||
|
|
|
@ -73,8 +73,6 @@ module spectral_mech_Polarisation
|
||||||
Polarisation_init, &
|
Polarisation_init, &
|
||||||
Polarisation_solution, &
|
Polarisation_solution, &
|
||||||
Polarisation_forward
|
Polarisation_forward
|
||||||
external :: &
|
|
||||||
PETScErrorF ! is called in the CHKERRQ macro
|
|
||||||
|
|
||||||
contains
|
contains
|
||||||
|
|
||||||
|
@ -130,11 +128,6 @@ subroutine Polarisation_init
|
||||||
integer(pInt) :: proc
|
integer(pInt) :: proc
|
||||||
character(len=1024) :: rankStr
|
character(len=1024) :: rankStr
|
||||||
|
|
||||||
external :: &
|
|
||||||
SNESSetOptionsPrefix, &
|
|
||||||
SNESSetConvergenceTest, &
|
|
||||||
DMDASNESsetFunctionLocal
|
|
||||||
|
|
||||||
write(6,'(/,a)') ' <<<+- DAMASK_spectral_solverPolarisation init -+>>>'
|
write(6,'(/,a)') ' <<<+- DAMASK_spectral_solverPolarisation init -+>>>'
|
||||||
write(6,'(/,a)') ' Shanthraj et al., International Journal of Plasticity, 66:31–45, 2015'
|
write(6,'(/,a)') ' Shanthraj et al., International Journal of Plasticity, 66:31–45, 2015'
|
||||||
write(6,'(a,/)') ' https://doi.org/10.1016/j.ijplas.2014.02.006'
|
write(6,'(a,/)') ' https://doi.org/10.1016/j.ijplas.2014.02.006'
|
||||||
|
@ -272,9 +265,6 @@ type(tSolutionState) function Polarisation_solution(incInfoIn,timeinc,timeinc_ol
|
||||||
PetscErrorCode :: ierr
|
PetscErrorCode :: ierr
|
||||||
SNESConvergedReason :: reason
|
SNESConvergedReason :: reason
|
||||||
|
|
||||||
external :: &
|
|
||||||
SNESSolve
|
|
||||||
|
|
||||||
incInfo = incInfoIn
|
incInfo = incInfoIn
|
||||||
|
|
||||||
!--------------------------------------------------------------------------------------------------
|
!--------------------------------------------------------------------------------------------------
|
||||||
|
|
|
@ -50,8 +50,6 @@ module spectral_thermal
|
||||||
spectral_thermal_init, &
|
spectral_thermal_init, &
|
||||||
spectral_thermal_solution, &
|
spectral_thermal_solution, &
|
||||||
spectral_thermal_forward
|
spectral_thermal_forward
|
||||||
external :: &
|
|
||||||
PETScErrorF ! is called in the CHKERRQ macro
|
|
||||||
|
|
||||||
contains
|
contains
|
||||||
|
|
||||||
|
@ -88,11 +86,6 @@ subroutine spectral_thermal_init
|
||||||
PetscScalar, dimension(:,:,:), pointer :: x_scal
|
PetscScalar, dimension(:,:,:), pointer :: x_scal
|
||||||
PetscErrorCode :: ierr
|
PetscErrorCode :: ierr
|
||||||
|
|
||||||
external :: &
|
|
||||||
SNESsetOptionsPrefix, &
|
|
||||||
DMDAgetCorners, &
|
|
||||||
DMDASNESsetFunctionLocal
|
|
||||||
|
|
||||||
write(6,'(/,a)') ' <<<+- spectral_thermal init -+>>>'
|
write(6,'(/,a)') ' <<<+- spectral_thermal init -+>>>'
|
||||||
write(6,'(/,a)') ' Shanthraj et al., Handbook of Mechanics of Materials, volume in press,'
|
write(6,'(/,a)') ' Shanthraj et al., Handbook of Mechanics of Materials, volume in press,'
|
||||||
write(6,'(/,a)') ' chapter Spectral Solvers for Crystal Plasticity and Multi-Physics Simulations. Springer, 2018'
|
write(6,'(/,a)') ' chapter Spectral Solvers for Crystal Plasticity and Multi-Physics Simulations. Springer, 2018'
|
||||||
|
@ -196,11 +189,6 @@ type(tSolutionState) function spectral_thermal_solution(timeinc,timeinc_old,load
|
||||||
PetscErrorCode :: ierr
|
PetscErrorCode :: ierr
|
||||||
SNESConvergedReason :: reason
|
SNESConvergedReason :: reason
|
||||||
|
|
||||||
external :: &
|
|
||||||
VecMin, &
|
|
||||||
VecMax, &
|
|
||||||
SNESSolve
|
|
||||||
|
|
||||||
spectral_thermal_solution%converged =.false.
|
spectral_thermal_solution%converged =.false.
|
||||||
|
|
||||||
!--------------------------------------------------------------------------------------------------
|
!--------------------------------------------------------------------------------------------------
|
||||||
|
|
|
@ -146,8 +146,6 @@ module spectral_utilities
|
||||||
FIELD_DAMAGE_ID
|
FIELD_DAMAGE_ID
|
||||||
private :: &
|
private :: &
|
||||||
utilities_getFreqDerivative
|
utilities_getFreqDerivative
|
||||||
external :: &
|
|
||||||
PETScErrorF ! is called in the CHKERRQ macro
|
|
||||||
|
|
||||||
contains
|
contains
|
||||||
|
|
||||||
|
@ -209,8 +207,6 @@ subroutine utilities_init()
|
||||||
scalarSize = 1_C_INTPTR_T, &
|
scalarSize = 1_C_INTPTR_T, &
|
||||||
vecSize = 3_C_INTPTR_T, &
|
vecSize = 3_C_INTPTR_T, &
|
||||||
tensorSize = 9_C_INTPTR_T
|
tensorSize = 9_C_INTPTR_T
|
||||||
external :: &
|
|
||||||
PetscOptionsInsertString
|
|
||||||
|
|
||||||
write(6,'(/,a)') ' <<<+- spectral_utilities init -+>>>'
|
write(6,'(/,a)') ' <<<+- spectral_utilities init -+>>>'
|
||||||
write(6,'(/,a)') ' Eisenlohr et al., International Journal of Plasticity, 46:37–53, 2013'
|
write(6,'(/,a)') ' Eisenlohr et al., International Journal of Plasticity, 46:37–53, 2013'
|
||||||
|
|
Loading…
Reference in New Issue