handle twin and slip systems

This commit is contained in:
Martin Diehl 2021-07-25 10:11:19 +02:00
parent c388ab97c9
commit 18b3424975
3 changed files with 28 additions and 23 deletions

View File

@ -2062,7 +2062,7 @@ function getlabels(active,potential,system) result(labels)
enddo normal
label(i:i) = ')'
labels(s) = label
labels(a) = label
enddo activeSystems
enddo activeFamilies

View File

@ -372,28 +372,33 @@ module subroutine plastic_phenopowerlaw_results(ph,group)
integer, intent(in) :: ph
character(len=*), intent(in) :: group
integer :: o
integer :: ou
associate(prm => param(ph), stt => state(ph))
outputsLoop: do o = 1,size(prm%output)
select case(trim(prm%output(o)))
case('xi_sl')
call results_writeState_slip(stt%xi_sl,group,trim(prm%output(o)),prm%systems_sl, &
'resistance against plastic slip','Pa')
case('gamma_sl')
call results_writeState_slip(stt%gamma_sl,group,trim(prm%output(o)),prm%systems_sl, &
'plastic shear','1')
do ou = 1,size(prm%output)
case('xi_tw')
if(prm%sum_N_tw>0) call results_writeDataset(stt%xi_tw,group,trim(prm%output(o)), &
'resistance against twinning','Pa')
case('gamma_tw')
if(prm%sum_N_tw>0) call results_writeDataset(stt%gamma_tw,group,trim(prm%output(o)), &
'twinning shear','1')
select case(trim(prm%output(ou)))
case('xi_sl')
call results_writePhaseState(stt%xi_sl,group,trim(prm%output(ou)),prm%systems_sl, &
'resistance against plastic slip','Pa')
case('gamma_sl')
call results_writePhaseState(stt%gamma_sl,group,trim(prm%output(ou)),prm%systems_sl, &
'plastic shear','1')
case('xi_tw')
call results_writePhaseState(stt%xi_tw,group,trim(prm%output(ou)),prm%systems_tw, &
'resistance against twinning','Pa')
case('gamma_tw')
call results_writePhaseState(stt%gamma_tw,group,trim(prm%output(ou)),prm%systems_tw, &
'twinning shear','1')
end select
enddo
end select
enddo outputsLoop
end associate
end subroutine plastic_phenopowerlaw_results

View File

@ -53,7 +53,7 @@ module results
results_openGroup, &
results_closeGroup, &
results_writeDataset, &
results_writeState_slip, &
results_writePhaseState, &
results_setLink, &
results_addAttribute, &
results_removeLink, &
@ -361,7 +361,7 @@ end subroutine results_writeVectorDataset_real
!--------------------------------------------------------------------------------------------------
!> @brief Store real vector dataset with associated metadata for slip
!--------------------------------------------------------------------------------------------------
subroutine results_writeState_slip(dataset,group,label,systems,description,SIunit)
subroutine results_writePhaseState(dataset,group,label,systems,description,SIunit)
character(len=*), intent(in) :: label,group,description,SIunit
real(pReal), intent(in), dimension(:,:) :: dataset
@ -370,15 +370,15 @@ subroutine results_writeState_slip(dataset,group,label,systems,description,SIuni
integer(HID_T) :: groupHandle
if (size(systems) == 0) return
if (size(systems)*size(dataset,2) == 0 ) return !ToDo: maybe use for other results_write (not sure about scalar)
groupHandle = results_openGroup(group)
call HDF5_write(dataset,groupHandle,label)
call executionStamp(group//'/'//label,description,SIunit)
call HDF5_addAttribute(resultsFile,'slip_systems',systems,group//'/'//label)
call HDF5_addAttribute(resultsFile,'systems',systems,group//'/'//label)
call HDF5_closeGroup(groupHandle)
end subroutine results_writeState_slip
end subroutine results_writePhaseState
!--------------------------------------------------------------------------------------------------