simplifying

This commit is contained in:
Martin Diehl 2018-06-01 11:33:13 +02:00
parent 48851c00f6
commit cfefcaebb8
1 changed files with 21 additions and 22 deletions

View File

@ -160,41 +160,40 @@ use IO
p%aTolShear = phaseConfig(phase)%getFloat('atol_shear',default=1.0e-6_pReal) p%aTolShear = phaseConfig(phase)%getFloat('atol_shear',default=1.0e-6_pReal)
p%dilatation = phaseConfig(phase)%keyExists('/dilatation/') p%dilatation = phaseConfig(phase)%keyExists('/dilatation/')
outputs = phaseConfig(phase)%getStrings('(output)') outputs = phaseConfig(phase)%getStrings('(output)')
allocate(p%outputID(0)) allocate(p%outputID(0))
do i=1_pInt, size(outputs) do i=1_pInt, size(outputs)
select case(outputs(i)) select case(outputs(i))
case ('flowstress') case ('flowstress')
plastic_isotropic_Noutput(instance) = plastic_isotropic_Noutput(instance) + 1_pInt plastic_isotropic_Noutput(instance) = plastic_isotropic_Noutput(instance) + 1_pInt
plastic_isotropic_output(plastic_isotropic_Noutput(instance),instance) = outputs(i) plastic_isotropic_output(plastic_isotropic_Noutput(instance),instance) = outputs(i)
plasticState(phase)%sizePostResults = & plasticState(phase)%sizePostResults = plasticState(phase)%sizePostResults + 1_pInt
plasticState(phase)%sizePostResults + 1_pInt plastic_isotropic_sizePostResult(i,instance) = 1_pInt
plastic_isotropic_sizePostResult(i,instance) = 1_pInt p%outputID = [p%outputID,flowstress_ID]
p%outputID = [p%outputID,flowstress_ID] case ('strainrate')
case ('strainrate') plastic_isotropic_Noutput(instance) = plastic_isotropic_Noutput(instance) + 1_pInt
plastic_isotropic_Noutput(instance) = plastic_isotropic_Noutput(instance) + 1_pInt plastic_isotropic_output(plastic_isotropic_Noutput(instance),instance) = outputs(i)
plastic_isotropic_output(plastic_isotropic_Noutput(instance),instance) = outputs(i) plasticState(phase)%sizePostResults = &
plasticState(phase)%sizePostResults = & plasticState(phase)%sizePostResults + 1_pInt
plasticState(phase)%sizePostResults + 1_pInt plastic_isotropic_sizePostResult(i,instance) = 1_pInt
plastic_isotropic_sizePostResult(i,instance) = 1_pInt p%outputID = [p%outputID,strainrate_ID]
p%outputID = [p%outputID,strainrate_ID] end select
end select
enddo enddo
extmsg = ''
!-------------------------------------------------------------------------------------------------- !--------------------------------------------------------------------------------------------------
! sanity checks ! sanity checks
extmsg = ''
if (p%aTolShear <= 0.0_pReal) extmsg = trim(extmsg)//"'aTolShear' " if (p%aTolShear <= 0.0_pReal) extmsg = trim(extmsg)//"'aTolShear' "
if (p%tau0 < 0.0_pReal) extmsg = trim(extmsg)//"'tau0' " if (p%tau0 < 0.0_pReal) extmsg = trim(extmsg)//"'tau0' "
if (p%gdot0 <= 0.0_pReal) extmsg = trim(extmsg)//"'gdot0' " if (p%gdot0 <= 0.0_pReal) extmsg = trim(extmsg)//"'gdot0' "
if (p%n <= 0.0_pReal) extmsg = trim(extmsg)//"'n' " if (p%n <= 0.0_pReal) extmsg = trim(extmsg)//"'n' "
if (p%tausat <= 0.0_pReal) extmsg = trim(extmsg)//"'tausat' " if (p%tausat <= p%tau0) extmsg = trim(extmsg)//"'tausat' "
if (p%a <= 0.0_pReal) extmsg = trim(extmsg)//"'a' " if (p%a <= 0.0_pReal) extmsg = trim(extmsg)//"'a' "
if (p%fTaylor <= 0.0_pReal) extmsg = trim(extmsg)//"'taylorfactor' " if (p%fTaylor <= 0.0_pReal) extmsg = trim(extmsg)//"'taylorfactor' "
if (p%aTolFlowstress <= 0.0_pReal) extmsg = trim(extmsg)//"'atol_flowstress' " if (p%aTolFlowstress <= 0.0_pReal) extmsg = trim(extmsg)//"'atol_flowstress' "
if (extmsg /= '') then if (extmsg /= '') call IO_error(211_pInt,ip=instance,&
extmsg = trim(extmsg)//' ('//PLASTICITY_ISOTROPIC_label//')' ! prepare error message identifier ext_msg=trim(extmsg)//'('//PLASTICITY_ISOTROPIC_label//')')
call IO_error(211_pInt,ip=instance,ext_msg=extmsg)
endif
!-------------------------------------------------------------------------------------------------- !--------------------------------------------------------------------------------------------------
! allocate state arrays ! allocate state arrays