cleaning up, removing unused variables and variable initialisation

This commit is contained in:
Pratheek Shanthraj 2015-04-21 15:16:13 +00:00
parent 0681f67570
commit 1330dae432
11 changed files with 53 additions and 52 deletions

View File

@ -112,7 +112,7 @@ subroutine damage_anisoBrittle_init(fileUnit)
integer(pInt) :: maxNinstance,mySize=0_pInt,phase,instance,o
integer(pInt) :: sizeState, sizeDotState
integer(pInt) :: NofMyPhase
integer(pInt) :: Nchunks_CleavageFamilies, j
integer(pInt) :: Nchunks_CleavageFamilies = 0_pInt, j
character(len=65536) :: &
tag = '', &
line = ''
@ -338,7 +338,6 @@ subroutine damage_anisoBrittle_microstructure(Tstar_v, subdt, ipc, ip, el)
damageState
use lattice, only: &
lattice_DamageMobility, &
lattice_Scleavage, &
lattice_Scleavage_v, &
lattice_maxNcleavageFamily, &
lattice_NcleavageSystem
@ -400,10 +399,11 @@ end subroutine damage_anisoBrittle_microstructure
!> @brief contains the constitutive equation for calculating the velocity gradient
!--------------------------------------------------------------------------------------------------
subroutine damage_anisoBrittle_LdAndItsTangent(Ld, dLd_dTstar3333, Tstar_v, ipc, ip, el)
use prec, only: &
tol_math_check
use material, only: &
mappingConstitutive, &
phase_damageInstance, &
damageState
phase_damageInstance
use math, only: &
math_Plain3333to99
use lattice, only: &
@ -450,7 +450,7 @@ subroutine damage_anisoBrittle_LdAndItsTangent(Ld, dLd_dTstar3333, Tstar_v, ipc,
sign(1.0_pReal,traction_d)* &
damage_anisoBrittle_sdot_0(instance)* &
(max(0.0_pReal, abs(traction_d) - traction_crit)/traction_crit)**damage_anisoBrittle_N(instance)
if (udotd /= 0.0_pReal) then
if (abs(udotd) > tol_math_check) then
Ld = Ld + udotd*lattice_Scleavage(1:3,1:3,1,index_myFamily+i,phase)
dudotd_dt = sign(1.0_pReal,traction_d)*udotd*damage_anisoBrittle_N(instance)/ &
max(0.0_pReal, abs(traction_d) - traction_crit)
@ -464,7 +464,7 @@ subroutine damage_anisoBrittle_LdAndItsTangent(Ld, dLd_dTstar3333, Tstar_v, ipc,
sign(1.0_pReal,traction_t)* &
damage_anisoBrittle_sdot_0(instance)* &
(max(0.0_pReal, abs(traction_t) - traction_crit)/traction_crit)**damage_anisoBrittle_N(instance)
if (udott /= 0.0_pReal) then
if (abs(udott) > tol_math_check) then
Ld = Ld + udott*lattice_Scleavage(1:3,1:3,2,index_myFamily+i,phase)
dudott_dt = sign(1.0_pReal,traction_t)*udott*damage_anisoBrittle_N(instance)/ &
max(0.0_pReal, abs(traction_t) - traction_crit)
@ -478,7 +478,7 @@ subroutine damage_anisoBrittle_LdAndItsTangent(Ld, dLd_dTstar3333, Tstar_v, ipc,
sign(1.0_pReal,traction_n)* &
damage_anisoBrittle_sdot_0(instance)* &
(max(0.0_pReal, abs(traction_n) - traction_crit)/traction_crit)**damage_anisoBrittle_N(instance)
if (udotn /= 0.0_pReal) then
if (abs(udotn) > tol_math_check) then
Ld = Ld + udotn*lattice_Scleavage(1:3,1:3,3,index_myFamily+i,phase)
dudotn_dt = sign(1.0_pReal,traction_n)*udotn*damage_anisoBrittle_N(instance)/ &
max(0.0_pReal, abs(traction_n) - traction_crit)
@ -496,7 +496,7 @@ end subroutine damage_anisoBrittle_LdAndItsTangent
!--------------------------------------------------------------------------------------------------
!> @brief returns damage
!--------------------------------------------------------------------------------------------------
function damage_anisoBrittle_getDamage(ipc, ip, el)
pure function damage_anisoBrittle_getDamage(ipc, ip, el)
use material, only: &
material_homog, &
mappingHomogenization, &
@ -515,7 +515,7 @@ function damage_anisoBrittle_getDamage(ipc, ip, el)
real(pReal) :: damage_anisoBrittle_getDamage
select case(field_damage_type(material_homog(ip,el)))
case (FIELD_DAMAGE_LOCAL_ID)
case default
damage_anisoBrittle_getDamage = damageState(mappingConstitutive(2,ipc,ip,el))% &
state(1,mappingConstitutive(1,ipc,ip,el))
@ -551,7 +551,7 @@ end subroutine damage_anisoBrittle_putLocalDamage
!--------------------------------------------------------------------------------------------------
!> @brief returns local damage
!--------------------------------------------------------------------------------------------------
function damage_anisoBrittle_getLocalDamage(ipc, ip, el)
pure function damage_anisoBrittle_getLocalDamage(ipc, ip, el)
use material, only: &
mappingConstitutive, &
damageState
@ -572,12 +572,11 @@ end function damage_anisoBrittle_getLocalDamage
!--------------------------------------------------------------------------------------------------
!> @brief returns brittle damage diffusion tensor
!--------------------------------------------------------------------------------------------------
function damage_anisoBrittle_getDamageDiffusion33(ipc, ip, el)
pure function damage_anisoBrittle_getDamageDiffusion33(ipc, ip, el)
use lattice, only: &
lattice_DamageDiffusion33
use material, only: &
mappingConstitutive, &
damageState
mappingConstitutive
implicit none
integer(pInt), intent(in) :: &
@ -602,8 +601,7 @@ end function damage_anisoBrittle_getDamageDiffusion33
function damage_anisoBrittle_postResults(ipc,ip,el)
use material, only: &
mappingConstitutive, &
phase_damageInstance, &
damageState
phase_damageInstance
implicit none
integer(pInt), intent(in) :: &

View File

@ -114,7 +114,7 @@ subroutine damage_anisoDuctile_init(fileUnit)
integer(pInt) :: maxNinstance,mySize=0_pInt,phase,instance,o
integer(pInt) :: sizeState, sizeDotState
integer(pInt) :: NofMyPhase
integer(pInt) :: Nchunks_SlipFamilies, j
integer(pInt) :: Nchunks_SlipFamilies = 0_pInt, j
character(len=65536) :: &
tag = '', &
line = ''
@ -379,6 +379,8 @@ end subroutine damage_anisoDuctile_microstructure
!> @brief contains the constitutive equation for calculating the velocity gradient
!--------------------------------------------------------------------------------------------------
subroutine damage_anisoDuctile_LdAndItsTangent(Ld, dLd_dTstar3333, Tstar_v, ipc, ip, el)
use prec, only: &
tol_math_check
use lattice, only: &
lattice_maxNslipFamily, &
lattice_NslipSystem, &
@ -387,8 +389,7 @@ subroutine damage_anisoDuctile_LdAndItsTangent(Ld, dLd_dTstar3333, Tstar_v, ipc,
lattice_sn
use material, only: &
mappingConstitutive, &
phase_damageInstance, &
damageState
phase_damageInstance
use math, only: &
math_Plain3333to99, &
math_I3, &
@ -455,7 +456,7 @@ subroutine damage_anisoDuctile_LdAndItsTangent(Ld, dLd_dTstar3333, Tstar_v, ipc,
damage_anisoDuctile_sdot_0(instance)* &
(abs(traction_d)/traction_crit - &
abs(traction_d)/damage_anisoDuctile_critLoad(f,instance))**damage_anisoDuctile_N(instance)
if (udotd /= 0.0_pReal) then
if (abs(udotd) > tol_math_check) then
Ld = Ld + udotd*projection_d
dudotd_dt = udotd*damage_anisoDuctile_N(instance)/traction_d
forall (k=1_pInt:3_pInt,l=1_pInt:3_pInt,m=1_pInt:3_pInt,n=1_pInt:3_pInt) &
@ -468,7 +469,7 @@ subroutine damage_anisoDuctile_LdAndItsTangent(Ld, dLd_dTstar3333, Tstar_v, ipc,
damage_anisoDuctile_sdot_0(instance)* &
(abs(traction_t)/traction_crit - &
abs(traction_t)/damage_anisoDuctile_critLoad(f,instance))**damage_anisoDuctile_N(instance)
if (udott /= 0.0_pReal) then
if (abs(udott) > tol_math_check) then
Ld = Ld + udott*projection_t
dudott_dt = udott*damage_anisoDuctile_N(instance)/traction_t
forall (k=1_pInt:3_pInt,l=1_pInt:3_pInt,m=1_pInt:3_pInt,n=1_pInt:3_pInt) &
@ -479,7 +480,7 @@ subroutine damage_anisoDuctile_LdAndItsTangent(Ld, dLd_dTstar3333, Tstar_v, ipc,
damage_anisoDuctile_sdot_0(instance)* &
(max(0.0_pReal,traction_n)/traction_crit - &
max(0.0_pReal,traction_n)/damage_anisoDuctile_critLoad(f,instance))**damage_anisoDuctile_N(instance)
if (udotn /= 0.0_pReal) then
if (abs(udotn) > tol_math_check) then
Ld = Ld + udotn*projection_n
dudotn_dt = udotn*damage_anisoDuctile_N(instance)/traction_n
forall (k=1_pInt:3_pInt,l=1_pInt:3_pInt,m=1_pInt:3_pInt,n=1_pInt:3_pInt) &
@ -494,7 +495,7 @@ end subroutine damage_anisoDuctile_LdAndItsTangent
!--------------------------------------------------------------------------------------------------
!> @brief returns damage
!--------------------------------------------------------------------------------------------------
function damage_anisoDuctile_getDamage(ipc, ip, el)
pure function damage_anisoDuctile_getDamage(ipc, ip, el)
use material, only: &
material_homog, &
mappingHomogenization, &
@ -513,7 +514,7 @@ function damage_anisoDuctile_getDamage(ipc, ip, el)
real(pReal) :: damage_anisoDuctile_getDamage
select case(field_damage_type(material_homog(ip,el)))
case (FIELD_DAMAGE_LOCAL_ID)
case default
damage_anisoDuctile_getDamage = damageState(mappingConstitutive(2,ipc,ip,el))% &
state(1,mappingConstitutive(1,ipc,ip,el))
@ -549,7 +550,7 @@ end subroutine damage_anisoDuctile_putLocalDamage
!--------------------------------------------------------------------------------------------------
!> @brief returns local damage
!--------------------------------------------------------------------------------------------------
function damage_anisoDuctile_getLocalDamage(ipc, ip, el)
pure function damage_anisoDuctile_getLocalDamage(ipc, ip, el)
use material, only: &
mappingConstitutive, &
damageState

View File

@ -319,7 +319,7 @@ end subroutine damage_isoBrittle_microstructure
!--------------------------------------------------------------------------------------------------
!> @brief returns damage
!--------------------------------------------------------------------------------------------------
function damage_isoBrittle_getDamage(ipc, ip, el)
pure function damage_isoBrittle_getDamage(ipc, ip, el)
use material, only: &
material_homog, &
mappingHomogenization, &
@ -327,7 +327,6 @@ function damage_isoBrittle_getDamage(ipc, ip, el)
damageState, &
fieldDamage, &
field_damage_type, &
FIELD_DAMAGE_LOCAL_ID, &
FIELD_DAMAGE_NONLOCAL_ID
implicit none
@ -338,14 +337,14 @@ function damage_isoBrittle_getDamage(ipc, ip, el)
real(pReal) :: damage_isoBrittle_getDamage
select case(field_damage_type(material_homog(ip,el)))
case (FIELD_DAMAGE_LOCAL_ID)
damage_isoBrittle_getDamage = damageState(mappingConstitutive(2,ipc,ip,el))% &
state0(1,mappingConstitutive(1,ipc,ip,el))
case (FIELD_DAMAGE_NONLOCAL_ID)
damage_isoBrittle_getDamage = fieldDamage(material_homog(ip,el))% &
field(1,mappingHomogenization(1,ip,el)) ! Taylor type
case default
damage_isoBrittle_getDamage = damageState(mappingConstitutive(2,ipc,ip,el))% &
state0(1,mappingConstitutive(1,ipc,ip,el))
end select
end function damage_isoBrittle_getDamage
@ -373,7 +372,7 @@ end subroutine damage_isoBrittle_putLocalDamage
!--------------------------------------------------------------------------------------------------
!> @brief returns local damage
!--------------------------------------------------------------------------------------------------
function damage_isoBrittle_getLocalDamage(ipc, ip, el)
pure function damage_isoBrittle_getLocalDamage(ipc, ip, el)
use material, only: &
mappingConstitutive, &
damageState
@ -393,7 +392,7 @@ end function damage_isoBrittle_getLocalDamage
!--------------------------------------------------------------------------------------------------
!> @brief returns brittle damage diffusion tensor
!--------------------------------------------------------------------------------------------------
function damage_isoBrittle_getDamageDiffusion33(ipc, ip, el)
pure function damage_isoBrittle_getDamageDiffusion33(ipc, ip, el)
use lattice, only: &
lattice_DamageDiffusion33
use material, only: &
@ -419,7 +418,7 @@ end function damage_isoBrittle_getDamageDiffusion33
!--------------------------------------------------------------------------------------------------
!> @brief returns brittle damaged stiffness tensor
!--------------------------------------------------------------------------------------------------
function damage_isoBrittle_getDamagedC66(C, ipc, ip, el)
pure function damage_isoBrittle_getDamagedC66(C, ipc, ip, el)
use material, only: &
mappingConstitutive

View File

@ -318,7 +318,7 @@ end subroutine damage_isoDuctile_microstructure
!--------------------------------------------------------------------------------------------------
!> @brief returns damage
!--------------------------------------------------------------------------------------------------
function damage_isoDuctile_getDamage(ipc, ip, el)
pure function damage_isoDuctile_getDamage(ipc, ip, el)
use material, only: &
material_homog, &
mappingHomogenization, &
@ -337,7 +337,7 @@ function damage_isoDuctile_getDamage(ipc, ip, el)
real(pReal) :: damage_isoDuctile_getDamage
select case(field_damage_type(material_homog(ip,el)))
case (FIELD_DAMAGE_LOCAL_ID)
case default
damage_isoDuctile_getDamage = damageState(mappingConstitutive(2,ipc,ip,el))% &
state0(1,mappingConstitutive(1,ipc,ip,el))
@ -372,7 +372,7 @@ end subroutine damage_isoDuctile_putLocalDamage
!--------------------------------------------------------------------------------------------------
!> @brief returns local damage
!--------------------------------------------------------------------------------------------------
function damage_isoDuctile_getLocalDamage(ipc, ip, el)
pure function damage_isoDuctile_getLocalDamage(ipc, ip, el)
use material, only: &
mappingConstitutive, &
damageState
@ -391,7 +391,7 @@ end function damage_isoDuctile_getLocalDamage
!--------------------------------------------------------------------------------------------------
!> @brief returns ductile damaged stiffness tensor
!--------------------------------------------------------------------------------------------------
function damage_isoDuctile_getDamagedC66(C, ipc, ip, el)
pure function damage_isoDuctile_getDamagedC66(C, ipc, ip, el)
use material, only: &
mappingConstitutive

View File

@ -197,8 +197,9 @@ subroutine plastic_disloKMC_init(fileUnit)
integer(pInt), dimension(1+2*MAXNCHUNKS) :: positions
integer(pInt) :: maxNinstance,mySize=0_pInt,phase,maxTotalNslip,maxTotalNtwin,&
f,instance,j,k,l,m,n,o,p,q,r,s,ns,nt, &
Nchunks_SlipSlip, Nchunks_SlipTwin, Nchunks_TwinSlip, Nchunks_TwinTwin, &
Nchunks_SlipFamilies, Nchunks_TwinFamilies, Nchunks_nonSchmid, &
Nchunks_SlipSlip = 0_pInt, Nchunks_SlipTwin = 0_pInt, &
Nchunks_TwinSlip = 0_pInt, Nchunks_TwinTwin = 0_pInt, &
Nchunks_SlipFamilies = 0_pInt, Nchunks_TwinFamilies = 0_pInt, Nchunks_nonSchmid = 0_pInt, &
offset_slip, index_myFamily, index_otherFamily
integer(pInt) :: sizeState, sizeDotState
integer(pInt) :: NofMyPhase

View File

@ -1,4 +1,4 @@
!--------------------------------------------------------------------------------------------------
!--------------------------------------------------------------------------------------------------
! $Id$
!--------------------------------------------------------------------------------------------------
!> @author Franz Roters, Max-Planck-Institut für Eisenforschung GmbH
@ -202,8 +202,9 @@ subroutine plastic_disloUCLA_init(fileUnit)
integer(pInt), dimension(1+2*MAXNCHUNKS) :: positions
integer(pInt) :: maxNinstance,mySize=0_pInt,phase,maxTotalNslip,maxTotalNtwin,&
f,instance,j,k,l,m,n,o,p,q,r,s,ns,nt, &
Nchunks_SlipSlip, Nchunks_SlipTwin, Nchunks_TwinSlip, Nchunks_TwinTwin, &
Nchunks_SlipFamilies, Nchunks_TwinFamilies, Nchunks_nonSchmid, &
Nchunks_SlipSlip = 0_pInt, Nchunks_SlipTwin = 0_pInt, &
Nchunks_TwinSlip = 0_pInt, Nchunks_TwinTwin = 0_pInt, &
Nchunks_SlipFamilies = 0_pInt, Nchunks_TwinFamilies = 0_pInt, Nchunks_nonSchmid = 0_pInt, &
offset_slip, index_myFamily, index_otherFamily
integer(pInt) :: sizeState, sizeDotState
integer(pInt) :: NofMyPhase

View File

@ -229,8 +229,9 @@ subroutine plastic_dislotwin_init(fileUnit)
integer(pInt), dimension(1+2*MAXNCHUNKS) :: positions
integer(pInt) :: maxNinstance,mySize=0_pInt,phase,maxTotalNslip,maxTotalNtwin,maxTotalNtrans,&
f,instance,j,k,l,m,n,o,p,q,r,s,ns,nt,nr, &
Nchunks_SlipSlip, Nchunks_SlipTwin, Nchunks_TwinSlip, Nchunks_TwinTwin, &
Nchunks_SlipFamilies, Nchunks_TwinFamilies, Nchunks_TransFamilies, &
Nchunks_SlipSlip = 0_pInt, Nchunks_SlipTwin = 0_pInt, &
Nchunks_TwinSlip = 0_pInt, Nchunks_TwinTwin = 0_pInt, &
Nchunks_SlipFamilies = 0_pInt, Nchunks_TwinFamilies = 0_pInt, Nchunks_TransFamilies = 0_pInt, &
offset_slip, index_myFamily, index_otherFamily
integer(pInt) :: sizeState, sizeDotState
integer(pInt) :: NofMyPhase

View File

@ -153,8 +153,10 @@ subroutine plastic_phenopowerlaw_init(fileUnit)
integer(pInt) :: &
maxNinstance, &
instance,phase,j,k, f,o, &
Nchunks_SlipSlip, Nchunks_SlipTwin, Nchunks_TwinSlip, Nchunks_TwinTwin, &
Nchunks_SlipFamilies, Nchunks_TwinFamilies, Nchunks_TransFamilies, Nchunks_nonSchmid, &
Nchunks_SlipSlip = 0_pInt, Nchunks_SlipTwin = 0_pInt, &
Nchunks_TwinSlip = 0_pInt, Nchunks_TwinTwin = 0_pInt, &
Nchunks_SlipFamilies = 0_pInt, Nchunks_TwinFamilies = 0_pInt, &
Nchunks_TransFamilies = 0_pInt, Nchunks_nonSchmid = 0_pInt, &
NipcMyPhase, &
offset_slip, index_myFamily, index_otherFamily, &
mySize=0_pInt,sizeState,sizeDotState

View File

@ -233,12 +233,12 @@ subroutine plastic_titanmod_init(fileUnit)
s, s1, s2, &
t, t1, t2, &
ns, nt, &
Nchunks_SlipSlip, Nchunks_SlipTwin, Nchunks_TwinSlip, Nchunks_TwinTwin, &
Nchunks_SlipFamilies, Nchunks_TwinFamilies, &
Nchunks_SlipSlip = 0_pInt, Nchunks_SlipTwin = 0_pInt, Nchunks_TwinSlip = 0_pInt, Nchunks_TwinTwin = 0_pInt, &
Nchunks_SlipFamilies = 0_pInt, Nchunks_TwinFamilies = 0_pInt, &
offset_slip, mySize, &
maxTotalNslip,maxTotalNtwin, maxNinstance
integer(pInt) :: sizeState, sizeDotState
integer(pInt) :: NofMyPhase
integer(pInt) :: NofMyPhase = 0_pInt
character(len=65536) :: &
tag = '', &
line = ''

View File

@ -44,7 +44,6 @@ subroutine thermal_isothermal_init(temperature_init)
numerics_integrator
use material, only: &
phase_thermal, &
phase_Noutput, &
LOCAL_THERMAL_ISOTHERMAL_label, &
LOCAL_THERMAL_ISOTHERMAL_ID, &
material_phase, &

View File

@ -39,7 +39,6 @@ subroutine vacancy_constant_init
numerics_integrator
use material, only: &
phase_vacancy, &
phase_Noutput, &
LOCAL_VACANCY_CONSTANT_label, &
LOCAL_VACANCY_CONSTANT_ID, &
material_phase, &