removed unused variables, added pure statements, and declared external functions as external (using gfortrans debug option)
This commit is contained in:
parent
c7c81a5ab5
commit
f0b4281400
|
@ -139,7 +139,7 @@ integer(pInt), intent(in) :: file
|
||||||
!* Local variables
|
!* Local variables
|
||||||
integer(pInt), parameter :: maxNchunks = 21_pInt
|
integer(pInt), parameter :: maxNchunks = 21_pInt
|
||||||
integer(pInt), dimension(1+2*maxNchunks) :: positions
|
integer(pInt), dimension(1+2*maxNchunks) :: positions
|
||||||
integer(pInt) :: section, maxNinstance,mySize,myStructure,maxTotalNslip,maxTotalNtwin,&
|
integer(pInt) :: section, maxNinstance,mySize=0_pInt,myStructure,maxTotalNslip,maxTotalNtwin,&
|
||||||
f,i,j,k,l,m,n,o,p,q,r,s,ns,nt, &
|
f,i,j,k,l,m,n,o,p,q,r,s,ns,nt, &
|
||||||
index_myFamily, index_otherFamily
|
index_myFamily, index_otherFamily
|
||||||
character(len=64) tag
|
character(len=64) tag
|
||||||
|
@ -1509,7 +1509,7 @@ do o = 1_pInt,phase_Noutput(material_phase(g,ip,el))
|
||||||
constitutive_dislotwin_postResults(c+j) = dot_product(Tstar_v, constitutive_dislotwin_sbSv(1:6,j,g,ip,el))
|
constitutive_dislotwin_postResults(c+j) = dot_product(Tstar_v, constitutive_dislotwin_sbSv(1:6,j,g,ip,el))
|
||||||
enddo
|
enddo
|
||||||
c = c + 6_pInt
|
c = c + 6_pInt
|
||||||
case ('schmid_factor_shearband')
|
case ('schmid_factor_shearband') !ToDo: j has no value!!!!!!
|
||||||
constitutive_dislotwin_postResults(c+1_pInt:c+6_pInt) = constitutive_dislotwin_sbSv(1:6,j,g,ip,el)
|
constitutive_dislotwin_postResults(c+1_pInt:c+6_pInt) = constitutive_dislotwin_sbSv(1:6,j,g,ip,el)
|
||||||
c = c + 6_pInt
|
c = c + 6_pInt
|
||||||
case ('shear_rate_shearband')
|
case ('shear_rate_shearband')
|
||||||
|
|
|
@ -129,7 +129,7 @@ subroutine constitutive_j2_init(myFile)
|
||||||
integer(pInt), parameter :: maxNchunks = 7_pInt
|
integer(pInt), parameter :: maxNchunks = 7_pInt
|
||||||
|
|
||||||
integer(pInt), dimension(1_pInt+2_pInt*maxNchunks) :: positions
|
integer(pInt), dimension(1_pInt+2_pInt*maxNchunks) :: positions
|
||||||
integer(pInt) :: section = 0_pInt, maxNinstance, i,j,k,o, mySize
|
integer(pInt) :: section = 0_pInt, maxNinstance, i,o, mySize
|
||||||
character(len=64) :: tag
|
character(len=64) :: tag
|
||||||
character(len=1024) :: line = '' ! to start initialized
|
character(len=1024) :: line = '' ! to start initialized
|
||||||
|
|
||||||
|
@ -371,7 +371,7 @@ pure function constitutive_j2_homogenizedC(state,ipc,ip,el)
|
||||||
end function constitutive_j2_homogenizedC
|
end function constitutive_j2_homogenizedC
|
||||||
|
|
||||||
|
|
||||||
subroutine constitutive_j2_microstructure(Temperature,state,ipc,ip,el)
|
pure subroutine constitutive_j2_microstructure(Temperature,state,ipc,ip,el)
|
||||||
!*********************************************************************
|
!*********************************************************************
|
||||||
!* calculate derived quantities from state (not used here) *
|
!* calculate derived quantities from state (not used here) *
|
||||||
!* INPUT: *
|
!* INPUT: *
|
||||||
|
|
|
@ -249,14 +249,12 @@ integer(pInt), intent(in) :: myFile
|
||||||
integer(pInt), parameter :: maxNchunks = 21_pInt
|
integer(pInt), parameter :: maxNchunks = 21_pInt
|
||||||
integer(pInt), &
|
integer(pInt), &
|
||||||
dimension(1_pInt+2_pInt*maxNchunks) :: positions
|
dimension(1_pInt+2_pInt*maxNchunks) :: positions
|
||||||
integer(pInt) section, &
|
integer(pInt) :: section, &
|
||||||
maxNinstance, &
|
maxNinstance, &
|
||||||
maxTotalNslip, &
|
maxTotalNslip, &
|
||||||
myStructure, &
|
myStructure, &
|
||||||
f, & ! index of my slip family
|
f, & ! index of my slip family
|
||||||
i, & ! index of my instance of this plasticity
|
i, & ! index of my instance of this plasticity
|
||||||
j, &
|
|
||||||
k, &
|
|
||||||
l, &
|
l, &
|
||||||
ns, & ! short notation for total number of active slip systems for the current instance
|
ns, & ! short notation for total number of active slip systems for the current instance
|
||||||
o, & ! index of my output
|
o, & ! index of my output
|
||||||
|
@ -264,7 +262,7 @@ integer(pInt) section, &
|
||||||
s1, & ! index of my slip system
|
s1, & ! index of my slip system
|
||||||
s2, & ! index of my slip system
|
s2, & ! index of my slip system
|
||||||
it, & ! index of my interaction type
|
it, & ! index of my interaction type
|
||||||
mySize
|
mySize = 0_pInt ! to suppress warnings, safe as init is called only once
|
||||||
character(len=64) tag
|
character(len=64) tag
|
||||||
character(len=1024) :: line = '' ! to start initialized
|
character(len=1024) :: line = '' ! to start initialized
|
||||||
|
|
||||||
|
@ -970,7 +968,6 @@ real(pReal), dimension(:), allocatable :: &
|
||||||
rhoDipScrew ! screw dipole dislocation density
|
rhoDipScrew ! screw dipole dislocation density
|
||||||
integer(pInt) el, &
|
integer(pInt) el, &
|
||||||
ip, &
|
ip, &
|
||||||
g, &
|
|
||||||
ns, & ! short notation for total number of active slip systems
|
ns, & ! short notation for total number of active slip systems
|
||||||
f, & ! index of lattice family
|
f, & ! index of lattice family
|
||||||
from, &
|
from, &
|
||||||
|
@ -1498,9 +1495,9 @@ real(pReal), dimension(constitutive_nonlocal_totalNslip(phase_plasticityInstance
|
||||||
intent(out), optional :: dv_dtau ! velocity derivative with respect to resolved shear stress
|
intent(out), optional :: dv_dtau ! velocity derivative with respect to resolved shear stress
|
||||||
|
|
||||||
!*** local variables
|
!*** local variables
|
||||||
integer(pInt) instance, & ! current instance of this plasticity
|
integer(pInt) :: instance, & ! current instance of this plasticity
|
||||||
ns, & ! short notation for the total number of active slip systems
|
ns, & ! short notation for the total number of active slip systems
|
||||||
s, t ! index of my current slip system
|
s ! index of my current slip system
|
||||||
real(pReal), dimension(constitutive_nonlocal_totalNslip(phase_plasticityInstance(material_phase(g,ip,el)))) :: &
|
real(pReal), dimension(constitutive_nonlocal_totalNslip(phase_plasticityInstance(material_phase(g,ip,el)))) :: &
|
||||||
tauThreshold, & ! threshold shear stress
|
tauThreshold, & ! threshold shear stress
|
||||||
tauEff ! effective shear stress
|
tauEff ! effective shear stress
|
||||||
|
|
|
@ -131,10 +131,10 @@ subroutine constitutive_phenopowerlaw_init(myFile)
|
||||||
integer(pInt), intent(in) :: myFile
|
integer(pInt), intent(in) :: myFile
|
||||||
integer(pInt), parameter :: maxNchunks = lattice_maxNinteraction + 1_pInt
|
integer(pInt), parameter :: maxNchunks = lattice_maxNinteraction + 1_pInt
|
||||||
integer(pInt), dimension(1+2*maxNchunks) :: positions
|
integer(pInt), dimension(1+2*maxNchunks) :: positions
|
||||||
integer(pInt) section, maxNinstance, i,j,k, f,o, &
|
integer(pInt) :: section, maxNinstance, i,j,k, f,o, &
|
||||||
Nchunks_SlipSlip, Nchunks_SlipTwin, Nchunks_TwinSlip, Nchunks_TwinTwin, &
|
Nchunks_SlipSlip, Nchunks_SlipTwin, Nchunks_TwinSlip, Nchunks_TwinTwin, &
|
||||||
Nchunks_SlipFamilies, Nchunks_TwinFamilies, &
|
Nchunks_SlipFamilies, Nchunks_TwinFamilies, &
|
||||||
mySize, myStructure, index_myFamily, index_otherFamily
|
mySize=0_pInt, myStructure, index_myFamily, index_otherFamily
|
||||||
character(len=64) :: tag
|
character(len=64) :: tag
|
||||||
character(len=1024) :: line = '' ! to start initialized
|
character(len=1024) :: line = '' ! to start initialized
|
||||||
|
|
||||||
|
@ -639,7 +639,7 @@ end function constitutive_phenopowerlaw_homogenizedC
|
||||||
!--------------------------------------------------------------------------------------------------
|
!--------------------------------------------------------------------------------------------------
|
||||||
!> @brief calculate derived quantities from state (dummy subroutine, not used here)
|
!> @brief calculate derived quantities from state (dummy subroutine, not used here)
|
||||||
!--------------------------------------------------------------------------------------------------
|
!--------------------------------------------------------------------------------------------------
|
||||||
subroutine constitutive_phenopowerlaw_microstructure(Temperature,state,ipc,ip,el)
|
pure subroutine constitutive_phenopowerlaw_microstructure(Temperature,state,ipc,ip,el)
|
||||||
|
|
||||||
use prec, only: pReal,pInt,p_vec
|
use prec, only: pReal,pInt,p_vec
|
||||||
use mesh, only: mesh_NcpElems,mesh_maxNips
|
use mesh, only: mesh_NcpElems,mesh_maxNips
|
||||||
|
|
|
@ -42,6 +42,7 @@ module crystallite
|
||||||
crystallite_integrateStateRKCK45, &
|
crystallite_integrateStateRKCK45, &
|
||||||
crystallite_integrateStress, &
|
crystallite_integrateStress, &
|
||||||
crystallite_stateJump
|
crystallite_stateJump
|
||||||
|
external :: dgesv
|
||||||
|
|
||||||
! ****************************************************************
|
! ****************************************************************
|
||||||
! *** General variables for the crystallite calculation ***
|
! *** General variables for the crystallite calculation ***
|
||||||
|
|
|
@ -802,6 +802,7 @@ function mesh_spectral_getResolution(fileUnit)
|
||||||
logical :: gotResolution = .false.
|
logical :: gotResolution = .false.
|
||||||
integer(pInt) :: myUnit
|
integer(pInt) :: myUnit
|
||||||
|
|
||||||
|
mesh_spectral_getResolution = -1_pInt
|
||||||
if(.not. present(fileUnit)) then
|
if(.not. present(fileUnit)) then
|
||||||
myUnit = 289_pInt
|
myUnit = 289_pInt
|
||||||
call IO_open_file(myUnit,trim(geometryFile))
|
call IO_open_file(myUnit,trim(geometryFile))
|
||||||
|
@ -883,6 +884,7 @@ function mesh_spectral_getDimension(fileUnit)
|
||||||
logical :: gotDimension = .false.
|
logical :: gotDimension = .false.
|
||||||
integer(pInt) :: myUnit
|
integer(pInt) :: myUnit
|
||||||
|
|
||||||
|
mesh_spectral_getDimension = -1.0_pReal
|
||||||
if(.not. present(fileUnit)) then
|
if(.not. present(fileUnit)) then
|
||||||
myUnit = 289_pInt
|
myUnit = 289_pInt
|
||||||
call IO_open_file(myUnit,trim(geometryFile))
|
call IO_open_file(myUnit,trim(geometryFile))
|
||||||
|
@ -957,6 +959,7 @@ function mesh_spectral_getHomogenization(fileUnit)
|
||||||
logical :: gotHomogenization = .false.
|
logical :: gotHomogenization = .false.
|
||||||
integer(pInt) :: myUnit
|
integer(pInt) :: myUnit
|
||||||
|
|
||||||
|
mesh_spectral_getHomogenization = -1_pInt
|
||||||
if(.not. present(fileUnit)) then
|
if(.not. present(fileUnit)) then
|
||||||
myUnit = 289_pInt
|
myUnit = 289_pInt
|
||||||
call IO_open_file(myUnit,trim(geometryFile))
|
call IO_open_file(myUnit,trim(geometryFile))
|
||||||
|
@ -1982,12 +1985,12 @@ function mesh_deformedCoordsFFT(gDim,F,scalingIn,FavgIn) result(coords)
|
||||||
|
|
||||||
if (present(FavgIn)) then
|
if (present(FavgIn)) then
|
||||||
if (all(FavgIn < 0.0_pReal)) then
|
if (all(FavgIn < 0.0_pReal)) then
|
||||||
Favg = real(F_fourier(1,1,1,1:3,1:3)*real(product(iRes),pReal),pReal) !the f2py way to tell it is not present
|
Favg = real(F_fourier(1,1,1,1:3,1:3),pReal)*real(product(iRes),pReal) !the f2py way to tell it is not present
|
||||||
else
|
else
|
||||||
Favg = FavgIn
|
Favg = FavgIn
|
||||||
endif
|
endif
|
||||||
else
|
else
|
||||||
Favg = real(F_fourier(1,1,1,1:3,1:3)*real(product(iRes),pReal),pReal)
|
Favg = real(F_fourier(1,1,1,1:3,1:3),pReal)*real(product(iRes),pReal)
|
||||||
endif
|
endif
|
||||||
|
|
||||||
!remove highest frequency in each direction
|
!remove highest frequency in each direction
|
||||||
|
@ -2014,7 +2017,7 @@ function mesh_deformedCoordsFFT(gDim,F,scalingIn,FavgIn) result(coords)
|
||||||
coords_fourier(i,j,k,m) = sum(F_fourier(i,j,k,m,1:3)*cmplx(0.0_pReal,real(k_s,pReal)*integrator,pReal))
|
coords_fourier(i,j,k,m) = sum(F_fourier(i,j,k,m,1:3)*cmplx(0.0_pReal,real(k_s,pReal)*integrator,pReal))
|
||||||
enddo
|
enddo
|
||||||
if (k_s(3) /= 0_pInt .or. k_s(2) /= 0_pInt .or. k_s(1) /= 0_pInt) &
|
if (k_s(3) /= 0_pInt .or. k_s(2) /= 0_pInt .or. k_s(1) /= 0_pInt) &
|
||||||
coords_fourier(i,j,k,1:3) = coords_fourier(i,j,k,1:3) / real(-sum(k_s*k_s),pReal)
|
coords_fourier(i,j,k,1:3) = coords_fourier(i,j,k,1:3) / cmplx(-sum(k_s*k_s),0.0_pReal,pReal)
|
||||||
enddo; enddo; enddo
|
enddo; enddo; enddo
|
||||||
|
|
||||||
call fftw_execute_dft_c2r(fftw_back,coords_fourier,coords_real)
|
call fftw_execute_dft_c2r(fftw_back,coords_fourier,coords_real)
|
||||||
|
|
Loading…
Reference in New Issue