adjusting indentation
This commit is contained in:
parent
6370dd1a43
commit
2c4f1eb173
923
src/IO.f90
923
src/IO.f90
File diff suppressed because it is too large
Load Diff
|
@ -102,15 +102,15 @@ subroutine kinematics_cleavage_opening_init
|
|||
kinematics_cleavage_opening_Ncleavage(1:lattice_maxNcleavageFamily,instance) = &
|
||||
min(lattice_NcleavageSystem(1:lattice_maxNcleavageFamily,p),& ! limit active cleavage systems per family to min of available and requested
|
||||
kinematics_cleavage_opening_Ncleavage(1:lattice_maxNcleavageFamily,instance))
|
||||
kinematics_cleavage_opening_totalNcleavage(instance) = sum(kinematics_cleavage_opening_Ncleavage(:,instance)) ! how many cleavage systems altogether
|
||||
if (kinematics_cleavage_opening_sdot_0(instance) <= 0.0_pReal) &
|
||||
call IO_error(211,el=instance,ext_msg='sdot_0 ('//KINEMATICS_cleavage_opening_LABEL//')')
|
||||
if (any(kinematics_cleavage_opening_critDisp(1:size(tempInt),instance) < 0.0_pReal)) &
|
||||
call IO_error(211,el=instance,ext_msg='critical_displacement ('//KINEMATICS_cleavage_opening_LABEL//')')
|
||||
if (any(kinematics_cleavage_opening_critLoad(1:size(tempInt),instance) < 0.0_pReal)) &
|
||||
call IO_error(211,el=instance,ext_msg='critical_load ('//KINEMATICS_cleavage_opening_LABEL//')')
|
||||
if (kinematics_cleavage_opening_N(instance) <= 0.0_pReal) &
|
||||
call IO_error(211,el=instance,ext_msg='rate_sensitivity ('//KINEMATICS_cleavage_opening_LABEL//')')
|
||||
kinematics_cleavage_opening_totalNcleavage(instance) = sum(kinematics_cleavage_opening_Ncleavage(:,instance)) ! how many cleavage systems altogether
|
||||
if (kinematics_cleavage_opening_sdot_0(instance) <= 0.0_pReal) &
|
||||
call IO_error(211,el=instance,ext_msg='sdot_0 ('//KINEMATICS_cleavage_opening_LABEL//')')
|
||||
if (any(kinematics_cleavage_opening_critDisp(1:size(tempInt),instance) < 0.0_pReal)) &
|
||||
call IO_error(211,el=instance,ext_msg='critical_displacement ('//KINEMATICS_cleavage_opening_LABEL//')')
|
||||
if (any(kinematics_cleavage_opening_critLoad(1:size(tempInt),instance) < 0.0_pReal)) &
|
||||
call IO_error(211,el=instance,ext_msg='critical_load ('//KINEMATICS_cleavage_opening_LABEL//')')
|
||||
if (kinematics_cleavage_opening_N(instance) <= 0.0_pReal) &
|
||||
call IO_error(211,el=instance,ext_msg='rate_sensitivity ('//KINEMATICS_cleavage_opening_LABEL//')')
|
||||
enddo
|
||||
|
||||
end subroutine kinematics_cleavage_opening_init
|
||||
|
|
|
@ -5,40 +5,40 @@
|
|||
!> @details to be done
|
||||
!--------------------------------------------------------------------------------------------------
|
||||
module kinematics_slipplane_opening
|
||||
use prec
|
||||
use config
|
||||
use IO
|
||||
use debug
|
||||
use math
|
||||
use lattice
|
||||
use material
|
||||
use prec
|
||||
use config
|
||||
use IO
|
||||
use debug
|
||||
use math
|
||||
use lattice
|
||||
use material
|
||||
|
||||
implicit none
|
||||
private
|
||||
implicit none
|
||||
private
|
||||
|
||||
integer, dimension(:), allocatable :: kinematics_slipplane_opening_instance
|
||||
integer, dimension(:), allocatable :: kinematics_slipplane_opening_instance
|
||||
|
||||
type :: tParameters !< container type for internal constitutive parameters
|
||||
integer :: &
|
||||
totalNslip
|
||||
integer, dimension(:), allocatable :: &
|
||||
Nslip !< active number of slip systems per family
|
||||
real(pReal) :: &
|
||||
sdot0, &
|
||||
n
|
||||
real(pReal), dimension(:), allocatable :: &
|
||||
critLoad
|
||||
real(pReal), dimension(:,:), allocatable :: &
|
||||
slip_direction, &
|
||||
slip_normal, &
|
||||
slip_transverse
|
||||
end type tParameters
|
||||
type :: tParameters !< container type for internal constitutive parameters
|
||||
integer :: &
|
||||
totalNslip
|
||||
integer, dimension(:), allocatable :: &
|
||||
Nslip !< active number of slip systems per family
|
||||
real(pReal) :: &
|
||||
sdot0, &
|
||||
n
|
||||
real(pReal), dimension(:), allocatable :: &
|
||||
critLoad
|
||||
real(pReal), dimension(:,:), allocatable :: &
|
||||
slip_direction, &
|
||||
slip_normal, &
|
||||
slip_transverse
|
||||
end type tParameters
|
||||
|
||||
type(tParameters), dimension(:), allocatable :: param !< containers of constitutive parameters (len Ninstance)
|
||||
type(tParameters), dimension(:), allocatable :: param !< containers of constitutive parameters (len Ninstance)
|
||||
|
||||
public :: &
|
||||
kinematics_slipplane_opening_init, &
|
||||
kinematics_slipplane_opening_LiAndItsTangent
|
||||
public :: &
|
||||
kinematics_slipplane_opening_init, &
|
||||
kinematics_slipplane_opening_LiAndItsTangent
|
||||
|
||||
contains
|
||||
|
||||
|
@ -49,53 +49,53 @@ contains
|
|||
!--------------------------------------------------------------------------------------------------
|
||||
subroutine kinematics_slipplane_opening_init
|
||||
|
||||
integer :: maxNinstance,p,instance
|
||||
integer :: maxNinstance,p,instance
|
||||
|
||||
write(6,'(/,a)') ' <<<+- kinematics_'//KINEMATICS_slipplane_opening_LABEL//' init -+>>>'
|
||||
write(6,'(/,a)') ' <<<+- kinematics_'//KINEMATICS_slipplane_opening_LABEL//' init -+>>>'
|
||||
|
||||
maxNinstance = count(phase_kinematics == KINEMATICS_slipplane_opening_ID)
|
||||
if (maxNinstance == 0) return
|
||||
maxNinstance = count(phase_kinematics == KINEMATICS_slipplane_opening_ID)
|
||||
if (maxNinstance == 0) return
|
||||
|
||||
if (iand(debug_level(debug_constitutive),debug_levelBasic) /= 0) &
|
||||
write(6,'(a16,1x,i5,/)') '# instances:',maxNinstance
|
||||
if (iand(debug_level(debug_constitutive),debug_levelBasic) /= 0) &
|
||||
write(6,'(a16,1x,i5,/)') '# instances:',maxNinstance
|
||||
|
||||
allocate(kinematics_slipplane_opening_instance(size(config_phase)), source=0)
|
||||
do p = 1, size(config_phase)
|
||||
kinematics_slipplane_opening_instance(p) = count(phase_kinematics(:,1:p) == kinematics_slipplane_opening_ID) ! ToDo: count correct?
|
||||
enddo
|
||||
allocate(kinematics_slipplane_opening_instance(size(config_phase)), source=0)
|
||||
do p = 1, size(config_phase)
|
||||
kinematics_slipplane_opening_instance(p) = count(phase_kinematics(:,1:p) == kinematics_slipplane_opening_ID) ! ToDo: count correct?
|
||||
enddo
|
||||
|
||||
allocate(param(maxNinstance))
|
||||
allocate(param(maxNinstance))
|
||||
|
||||
do p = 1, size(config_phase)
|
||||
if (all(phase_kinematics(:,p) /= KINEMATICS_slipplane_opening_ID)) cycle
|
||||
associate(prm => param(kinematics_slipplane_opening_instance(p)), &
|
||||
config => config_phase(p))
|
||||
instance = kinematics_slipplane_opening_instance(p)
|
||||
prm%sdot0 = config_phase(p)%getFloat('anisoductile_sdot0')
|
||||
prm%n = config_phase(p)%getFloat('anisoductile_ratesensitivity')
|
||||
do p = 1, size(config_phase)
|
||||
if (all(phase_kinematics(:,p) /= KINEMATICS_slipplane_opening_ID)) cycle
|
||||
associate(prm => param(kinematics_slipplane_opening_instance(p)), &
|
||||
config => config_phase(p))
|
||||
instance = kinematics_slipplane_opening_instance(p)
|
||||
prm%sdot0 = config_phase(p)%getFloat('anisoductile_sdot0')
|
||||
prm%n = config_phase(p)%getFloat('anisoductile_ratesensitivity')
|
||||
|
||||
prm%Nslip = config%getInts('nslip')
|
||||
prm%Nslip = config%getInts('nslip')
|
||||
|
||||
prm%critLoad = config_phase(p)%getFloats('anisoductile_criticalload',requiredSize=size(prm%Nslip ))
|
||||
prm%critLoad = config_phase(p)%getFloats('anisoductile_criticalload',requiredSize=size(prm%Nslip ))
|
||||
|
||||
prm%critLoad = math_expand(prm%critLoad, prm%Nslip)
|
||||
prm%critLoad = math_expand(prm%critLoad, prm%Nslip)
|
||||
|
||||
prm%slip_direction = lattice_slip_direction (prm%Nslip,config%getString('lattice_structure'),&
|
||||
config%getFloat('c/a',defaultVal=0.0_pReal))
|
||||
prm%slip_normal = lattice_slip_normal (prm%Nslip,config%getString('lattice_structure'),&
|
||||
config%getFloat('c/a',defaultVal=0.0_pReal))
|
||||
prm%slip_transverse = lattice_slip_transverse(prm%Nslip,config%getString('lattice_structure'),&
|
||||
config%getFloat('c/a',defaultVal=0.0_pReal))
|
||||
prm%slip_direction = lattice_slip_direction (prm%Nslip,config%getString('lattice_structure'),&
|
||||
config%getFloat('c/a',defaultVal=0.0_pReal))
|
||||
prm%slip_normal = lattice_slip_normal (prm%Nslip,config%getString('lattice_structure'),&
|
||||
config%getFloat('c/a',defaultVal=0.0_pReal))
|
||||
prm%slip_transverse = lattice_slip_transverse(prm%Nslip,config%getString('lattice_structure'),&
|
||||
config%getFloat('c/a',defaultVal=0.0_pReal))
|
||||
|
||||
! if (kinematics_slipplane_opening_sdot_0(instance) <= 0.0_pReal) &
|
||||
! call IO_error(211,el=instance,ext_msg='sdot_0 ('//KINEMATICS_slipplane_opening_LABEL//')')
|
||||
! if (any(kinematics_slipplane_opening_critPlasticStrain(:,instance) < 0.0_pReal)) &
|
||||
! call IO_error(211,el=instance,ext_msg='criticaPlasticStrain ('//KINEMATICS_slipplane_opening_LABEL//')')
|
||||
! if (kinematics_slipplane_opening_N(instance) <= 0.0_pReal) &
|
||||
! call IO_error(211,el=instance,ext_msg='rate_sensitivity ('//KINEMATICS_slipplane_opening_LABEL//')')
|
||||
! if (kinematics_slipplane_opening_sdot_0(instance) <= 0.0_pReal) &
|
||||
! call IO_error(211,el=instance,ext_msg='sdot_0 ('//KINEMATICS_slipplane_opening_LABEL//')')
|
||||
! if (any(kinematics_slipplane_opening_critPlasticStrain(:,instance) < 0.0_pReal)) &
|
||||
! call IO_error(211,el=instance,ext_msg='criticaPlasticStrain ('//KINEMATICS_slipplane_opening_LABEL//')')
|
||||
! if (kinematics_slipplane_opening_N(instance) <= 0.0_pReal) &
|
||||
! call IO_error(211,el=instance,ext_msg='rate_sensitivity ('//KINEMATICS_slipplane_opening_LABEL//')')
|
||||
|
||||
end associate
|
||||
enddo
|
||||
end associate
|
||||
enddo
|
||||
|
||||
end subroutine kinematics_slipplane_opening_init
|
||||
|
||||
|
@ -104,84 +104,84 @@ end subroutine kinematics_slipplane_opening_init
|
|||
!--------------------------------------------------------------------------------------------------
|
||||
subroutine kinematics_slipplane_opening_LiAndItsTangent(Ld, dLd_dTstar, S, ipc, ip, el)
|
||||
|
||||
integer, intent(in) :: &
|
||||
ipc, & !< grain number
|
||||
ip, & !< integration point number
|
||||
el !< element number
|
||||
real(pReal), intent(in), dimension(3,3) :: &
|
||||
S
|
||||
real(pReal), intent(out), dimension(3,3) :: &
|
||||
Ld !< damage velocity gradient
|
||||
real(pReal), intent(out), dimension(3,3,3,3) :: &
|
||||
dLd_dTstar !< derivative of Ld with respect to Tstar (4th-order tensor)
|
||||
real(pReal), dimension(3,3) :: &
|
||||
projection_d, projection_t, projection_n !< projection modes 3x3 tensor
|
||||
integer :: &
|
||||
instance, phase, &
|
||||
homog, damageOffset, &
|
||||
i, k, l, m, n
|
||||
real(pReal) :: &
|
||||
traction_d, traction_t, traction_n, traction_crit, &
|
||||
udotd, dudotd_dt, udott, dudott_dt, udotn, dudotn_dt
|
||||
integer, intent(in) :: &
|
||||
ipc, & !< grain number
|
||||
ip, & !< integration point number
|
||||
el !< element number
|
||||
real(pReal), intent(in), dimension(3,3) :: &
|
||||
S
|
||||
real(pReal), intent(out), dimension(3,3) :: &
|
||||
Ld !< damage velocity gradient
|
||||
real(pReal), intent(out), dimension(3,3,3,3) :: &
|
||||
dLd_dTstar !< derivative of Ld with respect to Tstar (4th-order tensor)
|
||||
real(pReal), dimension(3,3) :: &
|
||||
projection_d, projection_t, projection_n !< projection modes 3x3 tensor
|
||||
integer :: &
|
||||
instance, phase, &
|
||||
homog, damageOffset, &
|
||||
i, k, l, m, n
|
||||
real(pReal) :: &
|
||||
traction_d, traction_t, traction_n, traction_crit, &
|
||||
udotd, dudotd_dt, udott, dudott_dt, udotn, dudotn_dt
|
||||
|
||||
phase = material_phaseAt(ipc,el)
|
||||
instance = kinematics_slipplane_opening_instance(phase)
|
||||
homog = material_homogenizationAt(el)
|
||||
damageOffset = damageMapping(homog)%p(ip,el)
|
||||
phase = material_phaseAt(ipc,el)
|
||||
instance = kinematics_slipplane_opening_instance(phase)
|
||||
homog = material_homogenizationAt(el)
|
||||
damageOffset = damageMapping(homog)%p(ip,el)
|
||||
|
||||
associate(prm => param(instance))
|
||||
Ld = 0.0_pReal
|
||||
dLd_dTstar = 0.0_pReal
|
||||
do i = 1, prm%totalNslip
|
||||
associate(prm => param(instance))
|
||||
Ld = 0.0_pReal
|
||||
dLd_dTstar = 0.0_pReal
|
||||
do i = 1, prm%totalNslip
|
||||
|
||||
projection_d = math_outer(prm%slip_direction(1:3,i),prm%slip_normal(1:3,i))
|
||||
projection_t = math_outer(prm%slip_transverse(1:3,i),prm%slip_normal(1:3,i))
|
||||
projection_n = math_outer(prm%slip_normal(1:3,i),prm%slip_normal(1:3,i))
|
||||
projection_d = math_outer(prm%slip_direction(1:3,i),prm%slip_normal(1:3,i))
|
||||
projection_t = math_outer(prm%slip_transverse(1:3,i),prm%slip_normal(1:3,i))
|
||||
projection_n = math_outer(prm%slip_normal(1:3,i),prm%slip_normal(1:3,i))
|
||||
|
||||
traction_d = math_mul33xx33(S,projection_d)
|
||||
traction_t = math_mul33xx33(S,projection_t)
|
||||
traction_n = math_mul33xx33(S,projection_n)
|
||||
traction_d = math_mul33xx33(S,projection_d)
|
||||
traction_t = math_mul33xx33(S,projection_t)
|
||||
traction_n = math_mul33xx33(S,projection_n)
|
||||
|
||||
traction_crit = prm%critLoad(i)* damage(homog)%p(damageOffset) ! degrading critical load carrying capacity by damage
|
||||
traction_crit = prm%critLoad(i)* damage(homog)%p(damageOffset) ! degrading critical load carrying capacity by damage
|
||||
|
||||
udotd = sign(1.0_pReal,traction_d)* &
|
||||
prm%sdot0* &
|
||||
(abs(traction_d)/traction_crit - &
|
||||
abs(traction_d)/prm%critLoad(i))**prm%n
|
||||
if (abs(udotd) > tol_math_check) then
|
||||
Ld = Ld + udotd*projection_d
|
||||
dudotd_dt = udotd*prm%n/traction_d
|
||||
forall (k=1:3,l=1:3,m=1:3,n=1:3) &
|
||||
dLd_dTstar(k,l,m,n) = dLd_dTstar(k,l,m,n) + &
|
||||
dudotd_dt*projection_d(k,l)*projection_d(m,n)
|
||||
endif
|
||||
udotd = sign(1.0_pReal,traction_d)* &
|
||||
prm%sdot0* &
|
||||
(abs(traction_d)/traction_crit - &
|
||||
abs(traction_d)/prm%critLoad(i))**prm%n
|
||||
if (abs(udotd) > tol_math_check) then
|
||||
Ld = Ld + udotd*projection_d
|
||||
dudotd_dt = udotd*prm%n/traction_d
|
||||
forall (k=1:3,l=1:3,m=1:3,n=1:3) &
|
||||
dLd_dTstar(k,l,m,n) = dLd_dTstar(k,l,m,n) + &
|
||||
dudotd_dt*projection_d(k,l)*projection_d(m,n)
|
||||
endif
|
||||
|
||||
udott = sign(1.0_pReal,traction_t)* &
|
||||
prm%sdot0* &
|
||||
(abs(traction_t)/traction_crit - &
|
||||
abs(traction_t)/prm%critLoad(i))**prm%n
|
||||
if (abs(udott) > tol_math_check) then
|
||||
Ld = Ld + udott*projection_t
|
||||
dudott_dt = udott*prm%n/traction_t
|
||||
forall (k=1:3,l=1:3,m=1:3,n=1:3) &
|
||||
dLd_dTstar(k,l,m,n) = dLd_dTstar(k,l,m,n) + &
|
||||
dudott_dt*projection_t(k,l)*projection_t(m,n)
|
||||
endif
|
||||
udott = sign(1.0_pReal,traction_t)* &
|
||||
prm%sdot0* &
|
||||
(abs(traction_t)/traction_crit - &
|
||||
abs(traction_t)/prm%critLoad(i))**prm%n
|
||||
if (abs(udott) > tol_math_check) then
|
||||
Ld = Ld + udott*projection_t
|
||||
dudott_dt = udott*prm%n/traction_t
|
||||
forall (k=1:3,l=1:3,m=1:3,n=1:3) &
|
||||
dLd_dTstar(k,l,m,n) = dLd_dTstar(k,l,m,n) + &
|
||||
dudott_dt*projection_t(k,l)*projection_t(m,n)
|
||||
endif
|
||||
|
||||
udotn = &
|
||||
prm%sdot0* &
|
||||
(max(0.0_pReal,traction_n)/traction_crit - &
|
||||
max(0.0_pReal,traction_n)/prm%critLoad(i))**prm%n
|
||||
if (abs(udotn) > tol_math_check) then
|
||||
Ld = Ld + udotn*projection_n
|
||||
dudotn_dt = udotn*prm%n/traction_n
|
||||
forall (k=1:3,l=1:3,m=1:3,n=1:3) &
|
||||
dLd_dTstar(k,l,m,n) = dLd_dTstar(k,l,m,n) + &
|
||||
dudotn_dt*projection_n(k,l)*projection_n(m,n)
|
||||
endif
|
||||
enddo
|
||||
udotn = &
|
||||
prm%sdot0* &
|
||||
(max(0.0_pReal,traction_n)/traction_crit - &
|
||||
max(0.0_pReal,traction_n)/prm%critLoad(i))**prm%n
|
||||
if (abs(udotn) > tol_math_check) then
|
||||
Ld = Ld + udotn*projection_n
|
||||
dudotn_dt = udotn*prm%n/traction_n
|
||||
forall (k=1:3,l=1:3,m=1:3,n=1:3) &
|
||||
dLd_dTstar(k,l,m,n) = dLd_dTstar(k,l,m,n) + &
|
||||
dudotn_dt*projection_n(k,l)*projection_n(m,n)
|
||||
endif
|
||||
enddo
|
||||
|
||||
end associate
|
||||
end associate
|
||||
|
||||
end subroutine kinematics_slipplane_opening_LiAndItsTangent
|
||||
|
||||
|
|
|
@ -84,11 +84,11 @@ pure function kinematics_thermal_expansion_initialStrain(homog,phase,offset)
|
|||
|
||||
kinematics_thermal_expansion_initialStrain = &
|
||||
(temperature(homog)%p(offset) - lattice_referenceTemperature(phase))**1 / 1. * &
|
||||
lattice_thermalExpansion33(1:3,1:3,1,phase) + & ! constant coefficient
|
||||
lattice_thermalExpansion33(1:3,1:3,1,phase) + & ! constant coefficient
|
||||
(temperature(homog)%p(offset) - lattice_referenceTemperature(phase))**2 / 2. * &
|
||||
lattice_thermalExpansion33(1:3,1:3,2,phase) + & ! linear coefficient
|
||||
lattice_thermalExpansion33(1:3,1:3,2,phase) + & ! linear coefficient
|
||||
(temperature(homog)%p(offset) - lattice_referenceTemperature(phase))**3 / 3. * &
|
||||
lattice_thermalExpansion33(1:3,1:3,3,phase) ! quadratic coefficient
|
||||
lattice_thermalExpansion33(1:3,1:3,3,phase) ! quadratic coefficient
|
||||
|
||||
end function kinematics_thermal_expansion_initialStrain
|
||||
|
||||
|
@ -99,13 +99,13 @@ end function kinematics_thermal_expansion_initialStrain
|
|||
subroutine kinematics_thermal_expansion_LiAndItsTangent(Li, dLi_dTstar, ipc, ip, el)
|
||||
|
||||
integer, intent(in) :: &
|
||||
ipc, & !< grain number
|
||||
ip, & !< integration point number
|
||||
el !< element number
|
||||
ipc, & !< grain number
|
||||
ip, & !< integration point number
|
||||
el !< element number
|
||||
real(pReal), intent(out), dimension(3,3) :: &
|
||||
Li !< thermal velocity gradient
|
||||
Li !< thermal velocity gradient
|
||||
real(pReal), intent(out), dimension(3,3,3,3) :: &
|
||||
dLi_dTstar !< derivative of Li with respect to Tstar (4th-order tensor defined to be zero)
|
||||
dLi_dTstar !< derivative of Li with respect to Tstar (4th-order tensor defined to be zero)
|
||||
integer :: &
|
||||
phase, &
|
||||
homog, offset
|
||||
|
@ -120,9 +120,9 @@ subroutine kinematics_thermal_expansion_LiAndItsTangent(Li, dLi_dTstar, ipc, ip,
|
|||
TRef = lattice_referenceTemperature(phase)
|
||||
|
||||
Li = TDot * ( &
|
||||
lattice_thermalExpansion33(1:3,1:3,1,phase)*(T - TRef)**0 & ! constant coefficient
|
||||
+ lattice_thermalExpansion33(1:3,1:3,2,phase)*(T - TRef)**1 & ! linear coefficient
|
||||
+ lattice_thermalExpansion33(1:3,1:3,3,phase)*(T - TRef)**2 & ! quadratic coefficient
|
||||
lattice_thermalExpansion33(1:3,1:3,1,phase)*(T - TRef)**0 & ! constant coefficient
|
||||
+ lattice_thermalExpansion33(1:3,1:3,2,phase)*(T - TRef)**1 & ! linear coefficient
|
||||
+ lattice_thermalExpansion33(1:3,1:3,3,phase)*(T - TRef)**2 & ! quadratic coefficient
|
||||
) / &
|
||||
(1.0_pReal &
|
||||
+ lattice_thermalExpansion33(1:3,1:3,1,phase)*(T - TRef)**1 / 1. &
|
||||
|
|
110
src/material.f90
110
src/material.f90
|
@ -774,41 +774,41 @@ subroutine material_allocatePlasticState(phase,NofMyPhase,&
|
|||
sizeState,sizeDotState,sizeDeltaState,&
|
||||
Nslip,Ntwin,Ntrans)
|
||||
|
||||
integer, intent(in) :: &
|
||||
phase, &
|
||||
NofMyPhase, &
|
||||
sizeState, &
|
||||
sizeDotState, &
|
||||
sizeDeltaState, &
|
||||
Nslip, &
|
||||
Ntwin, &
|
||||
Ntrans
|
||||
integer, intent(in) :: &
|
||||
phase, &
|
||||
NofMyPhase, &
|
||||
sizeState, &
|
||||
sizeDotState, &
|
||||
sizeDeltaState, &
|
||||
Nslip, &
|
||||
Ntwin, &
|
||||
Ntrans
|
||||
|
||||
plasticState(phase)%sizeState = sizeState
|
||||
plasticState(phase)%sizeDotState = sizeDotState
|
||||
plasticState(phase)%sizeDeltaState = sizeDeltaState
|
||||
plasticState(phase)%offsetDeltaState = sizeState-sizeDeltaState ! deltaState occupies latter part of state by definition
|
||||
plasticState(phase)%Nslip = Nslip
|
||||
plasticState(phase)%Ntwin = Ntwin
|
||||
plasticState(phase)%Ntrans= Ntrans
|
||||
plasticState(phase)%sizeState = sizeState
|
||||
plasticState(phase)%sizeDotState = sizeDotState
|
||||
plasticState(phase)%sizeDeltaState = sizeDeltaState
|
||||
plasticState(phase)%offsetDeltaState = sizeState-sizeDeltaState ! deltaState occupies latter part of state by definition
|
||||
plasticState(phase)%Nslip = Nslip
|
||||
plasticState(phase)%Ntwin = Ntwin
|
||||
plasticState(phase)%Ntrans= Ntrans
|
||||
|
||||
allocate(plasticState(phase)%aTolState (sizeState), source=0.0_pReal)
|
||||
allocate(plasticState(phase)%state0 (sizeState,NofMyPhase), source=0.0_pReal)
|
||||
allocate(plasticState(phase)%partionedState0 (sizeState,NofMyPhase), source=0.0_pReal)
|
||||
allocate(plasticState(phase)%subState0 (sizeState,NofMyPhase), source=0.0_pReal)
|
||||
allocate(plasticState(phase)%state (sizeState,NofMyPhase), source=0.0_pReal)
|
||||
allocate(plasticState(phase)%aTolState (sizeState), source=0.0_pReal)
|
||||
allocate(plasticState(phase)%state0 (sizeState,NofMyPhase), source=0.0_pReal)
|
||||
allocate(plasticState(phase)%partionedState0 (sizeState,NofMyPhase), source=0.0_pReal)
|
||||
allocate(plasticState(phase)%subState0 (sizeState,NofMyPhase), source=0.0_pReal)
|
||||
allocate(plasticState(phase)%state (sizeState,NofMyPhase), source=0.0_pReal)
|
||||
|
||||
allocate(plasticState(phase)%dotState (sizeDotState,NofMyPhase), source=0.0_pReal)
|
||||
if (numerics_integrator == 1) then
|
||||
allocate(plasticState(phase)%previousDotState (sizeDotState,NofMyPhase), source=0.0_pReal)
|
||||
allocate(plasticState(phase)%previousDotState2 (sizeDotState,NofMyPhase), source=0.0_pReal)
|
||||
endif
|
||||
if (numerics_integrator == 4) &
|
||||
allocate(plasticState(phase)%RK4dotState (sizeDotState,NofMyPhase), source=0.0_pReal)
|
||||
if (numerics_integrator == 5) &
|
||||
allocate(plasticState(phase)%RKCK45dotState (6,sizeDotState,NofMyPhase), source=0.0_pReal)
|
||||
allocate(plasticState(phase)%dotState (sizeDotState,NofMyPhase), source=0.0_pReal)
|
||||
if (numerics_integrator == 1) then
|
||||
allocate(plasticState(phase)%previousDotState (sizeDotState,NofMyPhase), source=0.0_pReal)
|
||||
allocate(plasticState(phase)%previousDotState2 (sizeDotState,NofMyPhase), source=0.0_pReal)
|
||||
endif
|
||||
if (numerics_integrator == 4) &
|
||||
allocate(plasticState(phase)%RK4dotState (sizeDotState,NofMyPhase), source=0.0_pReal)
|
||||
if (numerics_integrator == 5) &
|
||||
allocate(plasticState(phase)%RKCK45dotState (6,sizeDotState,NofMyPhase), source=0.0_pReal)
|
||||
|
||||
allocate(plasticState(phase)%deltaState (sizeDeltaState,NofMyPhase), source=0.0_pReal)
|
||||
allocate(plasticState(phase)%deltaState (sizeDeltaState,NofMyPhase), source=0.0_pReal)
|
||||
|
||||
end subroutine material_allocatePlasticState
|
||||
|
||||
|
@ -819,34 +819,34 @@ end subroutine material_allocatePlasticState
|
|||
subroutine material_allocateSourceState(phase,of,NofMyPhase,&
|
||||
sizeState,sizeDotState,sizeDeltaState)
|
||||
|
||||
integer, intent(in) :: &
|
||||
phase, &
|
||||
of, &
|
||||
NofMyPhase, &
|
||||
sizeState, sizeDotState,sizeDeltaState
|
||||
integer, intent(in) :: &
|
||||
phase, &
|
||||
of, &
|
||||
NofMyPhase, &
|
||||
sizeState, sizeDotState,sizeDeltaState
|
||||
|
||||
sourceState(phase)%p(of)%sizeState = sizeState
|
||||
sourceState(phase)%p(of)%sizeDotState = sizeDotState
|
||||
sourceState(phase)%p(of)%sizeDeltaState = sizeDeltaState
|
||||
sourceState(phase)%p(of)%offsetDeltaState = sizeState-sizeDeltaState ! deltaState occupies latter part of state by definition
|
||||
sourceState(phase)%p(of)%sizeState = sizeState
|
||||
sourceState(phase)%p(of)%sizeDotState = sizeDotState
|
||||
sourceState(phase)%p(of)%sizeDeltaState = sizeDeltaState
|
||||
sourceState(phase)%p(of)%offsetDeltaState = sizeState-sizeDeltaState ! deltaState occupies latter part of state by definition
|
||||
|
||||
allocate(sourceState(phase)%p(of)%aTolState (sizeState), source=0.0_pReal)
|
||||
allocate(sourceState(phase)%p(of)%state0 (sizeState,NofMyPhase), source=0.0_pReal)
|
||||
allocate(sourceState(phase)%p(of)%partionedState0 (sizeState,NofMyPhase), source=0.0_pReal)
|
||||
allocate(sourceState(phase)%p(of)%subState0 (sizeState,NofMyPhase), source=0.0_pReal)
|
||||
allocate(sourceState(phase)%p(of)%state (sizeState,NofMyPhase), source=0.0_pReal)
|
||||
allocate(sourceState(phase)%p(of)%aTolState (sizeState), source=0.0_pReal)
|
||||
allocate(sourceState(phase)%p(of)%state0 (sizeState,NofMyPhase), source=0.0_pReal)
|
||||
allocate(sourceState(phase)%p(of)%partionedState0 (sizeState,NofMyPhase), source=0.0_pReal)
|
||||
allocate(sourceState(phase)%p(of)%subState0 (sizeState,NofMyPhase), source=0.0_pReal)
|
||||
allocate(sourceState(phase)%p(of)%state (sizeState,NofMyPhase), source=0.0_pReal)
|
||||
|
||||
allocate(sourceState(phase)%p(of)%dotState (sizeDotState,NofMyPhase), source=0.0_pReal)
|
||||
if (numerics_integrator == 1) then
|
||||
allocate(sourceState(phase)%p(of)%previousDotState (sizeDotState,NofMyPhase), source=0.0_pReal)
|
||||
allocate(sourceState(phase)%p(of)%previousDotState2 (sizeDotState,NofMyPhase), source=0.0_pReal)
|
||||
endif
|
||||
if (numerics_integrator == 4) &
|
||||
allocate(sourceState(phase)%p(of)%RK4dotState (sizeDotState,NofMyPhase), source=0.0_pReal)
|
||||
if (numerics_integrator == 5) &
|
||||
allocate(sourceState(phase)%p(of)%RKCK45dotState (6,sizeDotState,NofMyPhase), source=0.0_pReal)
|
||||
allocate(sourceState(phase)%p(of)%dotState (sizeDotState,NofMyPhase), source=0.0_pReal)
|
||||
if (numerics_integrator == 1) then
|
||||
allocate(sourceState(phase)%p(of)%previousDotState (sizeDotState,NofMyPhase), source=0.0_pReal)
|
||||
allocate(sourceState(phase)%p(of)%previousDotState2 (sizeDotState,NofMyPhase), source=0.0_pReal)
|
||||
endif
|
||||
if (numerics_integrator == 4) &
|
||||
allocate(sourceState(phase)%p(of)%RK4dotState (sizeDotState,NofMyPhase), source=0.0_pReal)
|
||||
if (numerics_integrator == 5) &
|
||||
allocate(sourceState(phase)%p(of)%RKCK45dotState (6,sizeDotState,NofMyPhase), source=0.0_pReal)
|
||||
|
||||
allocate(sourceState(phase)%p(of)%deltaState (sizeDeltaState,NofMyPhase), source=0.0_pReal)
|
||||
allocate(sourceState(phase)%p(of)%deltaState (sizeDeltaState,NofMyPhase), source=0.0_pReal)
|
||||
|
||||
end subroutine material_allocateSourceState
|
||||
|
||||
|
|
55
src/quit.f90
55
src/quit.f90
|
@ -7,43 +7,42 @@
|
|||
!--------------------------------------------------------------------------------------------------
|
||||
subroutine quit(stop_id)
|
||||
#include <petsc/finclude/petscsys.h>
|
||||
use PetscSys
|
||||
#ifdef _OPENMP
|
||||
use MPI, only: &
|
||||
MPI_finalize
|
||||
use MPI
|
||||
#endif
|
||||
use PetscSys
|
||||
use hdf5
|
||||
use hdf5
|
||||
|
||||
implicit none
|
||||
integer, intent(in) :: stop_id
|
||||
integer, dimension(8) :: dateAndTime ! type default integer
|
||||
integer :: error
|
||||
PetscErrorCode :: ierr = 0
|
||||
implicit none
|
||||
integer, intent(in) :: stop_id
|
||||
integer, dimension(8) :: dateAndTime
|
||||
integer :: error
|
||||
PetscErrorCode :: ierr = 0
|
||||
|
||||
call h5open_f(error)
|
||||
if (error /= 0) write(6,'(a,i5)') ' Error in h5open_f ',error ! prevents error if not opened yet
|
||||
call h5close_f(error)
|
||||
if (error /= 0) write(6,'(a,i5)') ' Error in h5close_f ',error
|
||||
call h5open_f(error)
|
||||
if (error /= 0) write(6,'(a,i5)') ' Error in h5open_f ',error ! prevents error if not opened yet
|
||||
call h5close_f(error)
|
||||
if (error /= 0) write(6,'(a,i5)') ' Error in h5close_f ',error
|
||||
|
||||
call PETScFinalize(ierr)
|
||||
CHKERRQ(ierr)
|
||||
call PETScFinalize(ierr)
|
||||
CHKERRQ(ierr)
|
||||
|
||||
#ifdef _OPENMP
|
||||
call MPI_finalize(error)
|
||||
if (error /= 0) write(6,'(a,i5)') ' Error in MPI_finalize',error
|
||||
call MPI_finalize(error)
|
||||
if (error /= 0) write(6,'(a,i5)') ' Error in MPI_finalize',error
|
||||
#endif
|
||||
|
||||
call date_and_time(values = dateAndTime)
|
||||
write(6,'(/,a)') ' DAMASK terminated on:'
|
||||
write(6,'(a,2(i2.2,a),i4.4)') ' Date: ',dateAndTime(3),'/',&
|
||||
dateAndTime(2),'/',&
|
||||
dateAndTime(1)
|
||||
write(6,'(a,2(i2.2,a),i2.2)') ' Time: ',dateAndTime(5),':',&
|
||||
dateAndTime(6),':',&
|
||||
dateAndTime(7)
|
||||
call date_and_time(values = dateAndTime)
|
||||
write(6,'(/,a)') ' DAMASK terminated on:'
|
||||
write(6,'(a,2(i2.2,a),i4.4)') ' Date: ',dateAndTime(3),'/',&
|
||||
dateAndTime(2),'/',&
|
||||
dateAndTime(1)
|
||||
write(6,'(a,2(i2.2,a),i2.2)') ' Time: ',dateAndTime(5),':',&
|
||||
dateAndTime(6),':',&
|
||||
dateAndTime(7)
|
||||
|
||||
if (stop_id == 0 .and. ierr == 0 .and. error == 0) stop 0 ! normal termination
|
||||
if (stop_id == 2 .and. ierr == 0 .and. error == 0) stop 2 ! not all incs converged
|
||||
stop 1 ! error (message from IO_error)
|
||||
if (stop_id == 0 .and. ierr == 0 .and. error == 0) stop 0 ! normal termination
|
||||
if (stop_id == 2 .and. ierr == 0 .and. error == 0) stop 2 ! not all incs converged
|
||||
stop 1 ! error (message from IO_error)
|
||||
|
||||
end subroutine quit
|
||||
|
|
Loading…
Reference in New Issue