HDF5 results output for constitutive damage models
This commit is contained in:
parent
5abe27ab60
commit
4be7aa990c
|
@ -13,6 +13,7 @@ module source_damage_anisoBrittle
|
||||||
use discretization
|
use discretization
|
||||||
use config
|
use config
|
||||||
use lattice
|
use lattice
|
||||||
|
use results
|
||||||
|
|
||||||
implicit none
|
implicit none
|
||||||
private
|
private
|
||||||
|
@ -21,9 +22,6 @@ module source_damage_anisoBrittle
|
||||||
source_damage_anisoBrittle_offset, & !< which source is my current source mechanism?
|
source_damage_anisoBrittle_offset, & !< which source is my current source mechanism?
|
||||||
source_damage_anisoBrittle_instance !< instance of source mechanism
|
source_damage_anisoBrittle_instance !< instance of source mechanism
|
||||||
|
|
||||||
integer, dimension(:,:), allocatable :: &
|
|
||||||
source_damage_anisoBrittle_sizePostResult !< size of each post result output
|
|
||||||
|
|
||||||
character(len=64), dimension(:,:), allocatable :: &
|
character(len=64), dimension(:,:), allocatable :: &
|
||||||
source_damage_anisoBrittle_output !< name of each post result output
|
source_damage_anisoBrittle_output !< name of each post result output
|
||||||
|
|
||||||
|
@ -61,7 +59,7 @@ module source_damage_anisoBrittle
|
||||||
source_damage_anisoBrittle_init, &
|
source_damage_anisoBrittle_init, &
|
||||||
source_damage_anisoBrittle_dotState, &
|
source_damage_anisoBrittle_dotState, &
|
||||||
source_damage_anisobrittle_getRateAndItsTangent, &
|
source_damage_anisobrittle_getRateAndItsTangent, &
|
||||||
source_damage_anisoBrittle_postResults
|
source_damage_anisoBrittle_results
|
||||||
|
|
||||||
contains
|
contains
|
||||||
|
|
||||||
|
@ -102,7 +100,6 @@ subroutine source_damage_anisoBrittle_init
|
||||||
enddo
|
enddo
|
||||||
enddo
|
enddo
|
||||||
|
|
||||||
allocate(source_damage_anisoBrittle_sizePostResult(maxval(phase_Noutput),Ninstance), source=0)
|
|
||||||
allocate(source_damage_anisoBrittle_output(maxval(phase_Noutput),Ninstance))
|
allocate(source_damage_anisoBrittle_output(maxval(phase_Noutput),Ninstance))
|
||||||
source_damage_anisoBrittle_output = ''
|
source_damage_anisoBrittle_output = ''
|
||||||
|
|
||||||
|
@ -154,7 +151,6 @@ subroutine source_damage_anisoBrittle_init
|
||||||
select case(outputs(i))
|
select case(outputs(i))
|
||||||
|
|
||||||
case ('anisobrittle_drivingforce')
|
case ('anisobrittle_drivingforce')
|
||||||
source_damage_anisoBrittle_sizePostResult(i,source_damage_anisoBrittle_instance(p)) = 1
|
|
||||||
source_damage_anisoBrittle_output(i,source_damage_anisoBrittle_instance(p)) = outputs(i)
|
source_damage_anisoBrittle_output(i,source_damage_anisoBrittle_instance(p)) = outputs(i)
|
||||||
prm%outputID = [prm%outputID, damage_drivingforce_ID]
|
prm%outputID = [prm%outputID, damage_drivingforce_ID]
|
||||||
|
|
||||||
|
@ -171,7 +167,6 @@ subroutine source_damage_anisoBrittle_init
|
||||||
|
|
||||||
|
|
||||||
call material_allocateSourceState(phase,sourceOffset,NofMyPhase,1,1,0)
|
call material_allocateSourceState(phase,sourceOffset,NofMyPhase,1,1,0)
|
||||||
sourceState(phase)%p(sourceOffset)%sizePostResults = sum(source_damage_anisoBrittle_sizePostResult(:,instance))
|
|
||||||
sourceState(phase)%p(sourceOffset)%aTolState=param(instance)%aTol
|
sourceState(phase)%p(sourceOffset)%aTolState=param(instance)%aTol
|
||||||
|
|
||||||
|
|
||||||
|
@ -262,39 +257,32 @@ subroutine source_damage_anisobrittle_getRateAndItsTangent(localphiDot, dLocalph
|
||||||
|
|
||||||
dLocalphiDot_dPhi = -sourceState(phase)%p(sourceOffset)%state(1,constituent)
|
dLocalphiDot_dPhi = -sourceState(phase)%p(sourceOffset)%state(1,constituent)
|
||||||
|
|
||||||
end subroutine source_damage_anisobrittle_getRateAndItsTangent
|
end subroutine source_damage_anisoBrittle_getRateAndItsTangent
|
||||||
|
|
||||||
|
|
||||||
!--------------------------------------------------------------------------------------------------
|
!--------------------------------------------------------------------------------------------------
|
||||||
!> @brief return array of local damage results
|
!> @brief writes results to HDF5 output file
|
||||||
!--------------------------------------------------------------------------------------------------
|
!--------------------------------------------------------------------------------------------------
|
||||||
function source_damage_anisoBrittle_postResults(phase, constituent)
|
subroutine source_damage_anisoBrittle_results(phase,group)
|
||||||
|
|
||||||
integer, intent(in) :: &
|
integer, intent(in) :: phase
|
||||||
phase, &
|
character(len=*), intent(in) :: group
|
||||||
constituent
|
#if defined(PETSc) || defined(DAMASK_HDF5)
|
||||||
|
integer :: sourceOffset, o, instance
|
||||||
real(pReal), dimension(sum(source_damage_anisoBrittle_sizePostResult(:, &
|
|
||||||
source_damage_anisoBrittle_instance(phase)))) :: &
|
instance = source_damage_anisoBrittle_instance(phase)
|
||||||
source_damage_anisoBrittle_postResults
|
|
||||||
|
|
||||||
integer :: &
|
|
||||||
instance, sourceOffset, o, c
|
|
||||||
|
|
||||||
instance = source_damage_anisoBrittle_instance(phase)
|
|
||||||
sourceOffset = source_damage_anisoBrittle_offset(phase)
|
sourceOffset = source_damage_anisoBrittle_offset(phase)
|
||||||
|
|
||||||
c = 0
|
associate(prm => param(instance), stt => sourceState(phase)%p(sourceOffset)%state)
|
||||||
|
outputsLoop: do o = 1,size(prm%outputID)
|
||||||
do o = 1,size(param(instance)%outputID)
|
select case(prm%outputID(o))
|
||||||
select case(param(instance)%outputID(o))
|
|
||||||
case (damage_drivingforce_ID)
|
case (damage_drivingforce_ID)
|
||||||
source_damage_anisoBrittle_postResults(c+1) = &
|
call results_writeDataset(group,stt,'tbd','driving force','tbd')
|
||||||
sourceState(phase)%p(sourceOffset)%state(1,constituent)
|
|
||||||
c = c + 1
|
|
||||||
|
|
||||||
end select
|
end select
|
||||||
enddo
|
enddo outputsLoop
|
||||||
end function source_damage_anisoBrittle_postResults
|
end associate
|
||||||
|
#endif
|
||||||
|
|
||||||
|
end subroutine source_damage_anisoBrittle_results
|
||||||
|
|
||||||
end module source_damage_anisoBrittle
|
end module source_damage_anisoBrittle
|
||||||
|
|
|
@ -12,6 +12,7 @@ module source_damage_anisoDuctile
|
||||||
use discretization
|
use discretization
|
||||||
use material
|
use material
|
||||||
use config
|
use config
|
||||||
|
use results
|
||||||
|
|
||||||
implicit none
|
implicit none
|
||||||
private
|
private
|
||||||
|
@ -20,9 +21,6 @@ module source_damage_anisoDuctile
|
||||||
source_damage_anisoDuctile_offset, & !< which source is my current damage mechanism?
|
source_damage_anisoDuctile_offset, & !< which source is my current damage mechanism?
|
||||||
source_damage_anisoDuctile_instance !< instance of damage source mechanism
|
source_damage_anisoDuctile_instance !< instance of damage source mechanism
|
||||||
|
|
||||||
integer, dimension(:,:), allocatable, target, public :: &
|
|
||||||
source_damage_anisoDuctile_sizePostResult !< size of each post result output
|
|
||||||
|
|
||||||
character(len=64), dimension(:,:), allocatable, target, public :: &
|
character(len=64), dimension(:,:), allocatable, target, public :: &
|
||||||
source_damage_anisoDuctile_output !< name of each post result output
|
source_damage_anisoDuctile_output !< name of each post result output
|
||||||
|
|
||||||
|
@ -54,7 +52,7 @@ module source_damage_anisoDuctile
|
||||||
source_damage_anisoDuctile_init, &
|
source_damage_anisoDuctile_init, &
|
||||||
source_damage_anisoDuctile_dotState, &
|
source_damage_anisoDuctile_dotState, &
|
||||||
source_damage_anisoDuctile_getRateAndItsTangent, &
|
source_damage_anisoDuctile_getRateAndItsTangent, &
|
||||||
source_damage_anisoDuctile_postResults
|
source_damage_anisoDuctile_results
|
||||||
|
|
||||||
contains
|
contains
|
||||||
|
|
||||||
|
@ -96,7 +94,6 @@ subroutine source_damage_anisoDuctile_init
|
||||||
enddo
|
enddo
|
||||||
enddo
|
enddo
|
||||||
|
|
||||||
allocate(source_damage_anisoDuctile_sizePostResult(maxval(phase_Noutput),Ninstance),source=0)
|
|
||||||
allocate(source_damage_anisoDuctile_output(maxval(phase_Noutput),Ninstance))
|
allocate(source_damage_anisoDuctile_output(maxval(phase_Noutput),Ninstance))
|
||||||
source_damage_anisoDuctile_output = ''
|
source_damage_anisoDuctile_output = ''
|
||||||
|
|
||||||
|
@ -139,7 +136,6 @@ subroutine source_damage_anisoDuctile_init
|
||||||
select case(outputs(i))
|
select case(outputs(i))
|
||||||
|
|
||||||
case ('anisoductile_drivingforce')
|
case ('anisoductile_drivingforce')
|
||||||
source_damage_anisoDuctile_sizePostResult(i,source_damage_anisoDuctile_instance(p)) = 1
|
|
||||||
source_damage_anisoDuctile_output(i,source_damage_anisoDuctile_instance(p)) = outputs(i)
|
source_damage_anisoDuctile_output(i,source_damage_anisoDuctile_instance(p)) = outputs(i)
|
||||||
prm%outputID = [prm%outputID, damage_drivingforce_ID]
|
prm%outputID = [prm%outputID, damage_drivingforce_ID]
|
||||||
|
|
||||||
|
@ -156,8 +152,7 @@ subroutine source_damage_anisoDuctile_init
|
||||||
sourceOffset = source_damage_anisoDuctile_offset(phase)
|
sourceOffset = source_damage_anisoDuctile_offset(phase)
|
||||||
|
|
||||||
call material_allocateSourceState(phase,sourceOffset,NofMyPhase,1,1,0)
|
call material_allocateSourceState(phase,sourceOffset,NofMyPhase,1,1,0)
|
||||||
sourceState(phase)%p(sourceOffset)%sizePostResults = sum(source_damage_anisoDuctile_sizePostResult(:,instance))
|
sourceState(phase)%p(sourceOffset)%aTolState=param(instance)%aTol
|
||||||
sourceState(phase)%p(sourceOffset)%aTolState=param(instance)%aTol
|
|
||||||
|
|
||||||
enddo
|
enddo
|
||||||
|
|
||||||
|
@ -226,35 +221,28 @@ end subroutine source_damage_anisoDuctile_getRateAndItsTangent
|
||||||
|
|
||||||
|
|
||||||
!--------------------------------------------------------------------------------------------------
|
!--------------------------------------------------------------------------------------------------
|
||||||
!> @brief return array of local damage results
|
!> @brief writes results to HDF5 output file
|
||||||
!--------------------------------------------------------------------------------------------------
|
!--------------------------------------------------------------------------------------------------
|
||||||
function source_damage_anisoDuctile_postResults(phase, constituent)
|
subroutine source_damage_anisoDuctile_results(phase,group)
|
||||||
|
|
||||||
integer, intent(in) :: &
|
integer, intent(in) :: phase
|
||||||
phase, &
|
character(len=*), intent(in) :: group
|
||||||
constituent
|
#if defined(PETSc) || defined(DAMASK_HDF5)
|
||||||
real(pReal), dimension(sum(source_damage_anisoDuctile_sizePostResult(:, &
|
integer :: sourceOffset, o, instance
|
||||||
source_damage_anisoDuctile_instance(phase)))) :: &
|
|
||||||
source_damage_anisoDuctile_postResults
|
instance = source_damage_anisoDuctile_instance(phase)
|
||||||
|
|
||||||
integer :: &
|
|
||||||
instance, sourceOffset, o, c
|
|
||||||
|
|
||||||
instance = source_damage_anisoDuctile_instance(phase)
|
|
||||||
sourceOffset = source_damage_anisoDuctile_offset(phase)
|
sourceOffset = source_damage_anisoDuctile_offset(phase)
|
||||||
|
|
||||||
c = 0
|
|
||||||
|
|
||||||
do o = 1,size(param(instance)%outputID)
|
|
||||||
select case(param(instance)%outputID(o))
|
|
||||||
case (damage_drivingforce_ID)
|
|
||||||
source_damage_anisoDuctile_postResults(c+1) = &
|
|
||||||
sourceState(phase)%p(sourceOffset)%state(1,constituent)
|
|
||||||
c = c + 1
|
|
||||||
|
|
||||||
end select
|
|
||||||
enddo
|
|
||||||
|
|
||||||
end function source_damage_anisoDuctile_postResults
|
associate(prm => param(instance), stt => sourceState(phase)%p(sourceOffset)%state)
|
||||||
|
outputsLoop: do o = 1,size(prm%outputID)
|
||||||
|
select case(prm%outputID(o))
|
||||||
|
case (damage_drivingforce_ID)
|
||||||
|
call results_writeDataset(group,stt,'tbd','driving force','tbd')
|
||||||
|
end select
|
||||||
|
enddo outputsLoop
|
||||||
|
end associate
|
||||||
|
#endif
|
||||||
|
|
||||||
|
end subroutine source_damage_anisoDuctile_results
|
||||||
|
|
||||||
end module source_damage_anisoDuctile
|
end module source_damage_anisoDuctile
|
||||||
|
|
|
@ -12,14 +12,13 @@ module source_damage_isoBrittle
|
||||||
use discretization
|
use discretization
|
||||||
use material
|
use material
|
||||||
use config
|
use config
|
||||||
|
use results
|
||||||
|
|
||||||
implicit none
|
implicit none
|
||||||
private
|
private
|
||||||
integer, dimension(:), allocatable, public, protected :: &
|
integer, dimension(:), allocatable, public, protected :: &
|
||||||
source_damage_isoBrittle_offset, &
|
source_damage_isoBrittle_offset, &
|
||||||
source_damage_isoBrittle_instance
|
source_damage_isoBrittle_instance
|
||||||
integer, dimension(:,:), allocatable :: &
|
|
||||||
source_damage_isoBrittle_sizePostResult
|
|
||||||
character(len=64), dimension(:,:), allocatable :: &
|
character(len=64), dimension(:,:), allocatable :: &
|
||||||
source_damage_isoBrittle_output
|
source_damage_isoBrittle_output
|
||||||
|
|
||||||
|
@ -46,7 +45,7 @@ module source_damage_isoBrittle
|
||||||
source_damage_isoBrittle_init, &
|
source_damage_isoBrittle_init, &
|
||||||
source_damage_isoBrittle_deltaState, &
|
source_damage_isoBrittle_deltaState, &
|
||||||
source_damage_isoBrittle_getRateAndItsTangent, &
|
source_damage_isoBrittle_getRateAndItsTangent, &
|
||||||
source_damage_isoBrittle_postResults
|
source_damage_isoBrittle_Results
|
||||||
|
|
||||||
contains
|
contains
|
||||||
|
|
||||||
|
@ -85,8 +84,7 @@ subroutine source_damage_isoBrittle_init
|
||||||
source_damage_isoBrittle_offset(phase) = source
|
source_damage_isoBrittle_offset(phase) = source
|
||||||
enddo
|
enddo
|
||||||
enddo
|
enddo
|
||||||
|
|
||||||
allocate(source_damage_isoBrittle_sizePostResult(maxval(phase_Noutput),Ninstance),source=0)
|
|
||||||
allocate(source_damage_isoBrittle_output(maxval(phase_Noutput),Ninstance))
|
allocate(source_damage_isoBrittle_output(maxval(phase_Noutput),Ninstance))
|
||||||
source_damage_isoBrittle_output = ''
|
source_damage_isoBrittle_output = ''
|
||||||
|
|
||||||
|
@ -122,7 +120,6 @@ subroutine source_damage_isoBrittle_init
|
||||||
select case(outputs(i))
|
select case(outputs(i))
|
||||||
|
|
||||||
case ('isobrittle_drivingforce')
|
case ('isobrittle_drivingforce')
|
||||||
source_damage_isoBrittle_sizePostResult(i,source_damage_isoBrittle_instance(p)) = 1
|
|
||||||
source_damage_isoBrittle_output(i,source_damage_isoBrittle_instance(p)) = outputs(i)
|
source_damage_isoBrittle_output(i,source_damage_isoBrittle_instance(p)) = outputs(i)
|
||||||
prm%outputID = [prm%outputID, damage_drivingforce_ID]
|
prm%outputID = [prm%outputID, damage_drivingforce_ID]
|
||||||
|
|
||||||
|
@ -139,7 +136,6 @@ subroutine source_damage_isoBrittle_init
|
||||||
sourceOffset = source_damage_isoBrittle_offset(phase)
|
sourceOffset = source_damage_isoBrittle_offset(phase)
|
||||||
|
|
||||||
call material_allocateSourceState(phase,sourceOffset,NofMyPhase,1,1,1)
|
call material_allocateSourceState(phase,sourceOffset,NofMyPhase,1,1,1)
|
||||||
sourceState(phase)%p(sourceOffset)%sizePostResults = sum(source_damage_isoBrittle_sizePostResult(:,instance))
|
|
||||||
sourceState(phase)%p(sourceOffset)%aTolState=param(instance)%aTol
|
sourceState(phase)%p(sourceOffset)%aTolState=param(instance)%aTol
|
||||||
|
|
||||||
enddo
|
enddo
|
||||||
|
@ -214,35 +210,31 @@ subroutine source_damage_isoBrittle_getRateAndItsTangent(localphiDot, dLocalphiD
|
||||||
- sourceState(phase)%p(sourceOffset)%state(1,constituent)
|
- sourceState(phase)%p(sourceOffset)%state(1,constituent)
|
||||||
|
|
||||||
end subroutine source_damage_isoBrittle_getRateAndItsTangent
|
end subroutine source_damage_isoBrittle_getRateAndItsTangent
|
||||||
|
|
||||||
!--------------------------------------------------------------------------------------------------
|
|
||||||
!> @brief return array of local damage results
|
|
||||||
!--------------------------------------------------------------------------------------------------
|
|
||||||
function source_damage_isoBrittle_postResults(phase, constituent)
|
|
||||||
|
|
||||||
integer, intent(in) :: &
|
|
||||||
phase, &
|
|
||||||
constituent
|
|
||||||
real(pReal), dimension(sum(source_damage_isoBrittle_sizePostResult(:, &
|
|
||||||
source_damage_isoBrittle_instance(phase)))) :: &
|
|
||||||
source_damage_isoBrittle_postResults
|
|
||||||
|
|
||||||
integer :: &
|
!--------------------------------------------------------------------------------------------------
|
||||||
instance, sourceOffset, o, c
|
!> @brief writes results to HDF5 output file
|
||||||
|
!--------------------------------------------------------------------------------------------------
|
||||||
instance = source_damage_isoBrittle_instance(phase)
|
subroutine source_damage_isoBrittle_results(phase,group)
|
||||||
|
|
||||||
|
integer, intent(in) :: phase
|
||||||
|
character(len=*), intent(in) :: group
|
||||||
|
#if defined(PETSc) || defined(DAMASK_HDF5)
|
||||||
|
integer :: sourceOffset, o, instance
|
||||||
|
|
||||||
|
instance = source_damage_isoBrittle_instance(phase)
|
||||||
sourceOffset = source_damage_isoBrittle_offset(phase)
|
sourceOffset = source_damage_isoBrittle_offset(phase)
|
||||||
|
|
||||||
c = 0
|
associate(prm => param(instance), stt => sourceState(phase)%p(sourceOffset)%state)
|
||||||
|
outputsLoop: do o = 1,size(prm%outputID)
|
||||||
do o = 1,size(param(instance)%outputID)
|
select case(prm%outputID(o))
|
||||||
select case(param(instance)%outputID(o))
|
|
||||||
case (damage_drivingforce_ID)
|
case (damage_drivingforce_ID)
|
||||||
source_damage_isoBrittle_postResults(c+1) = sourceState(phase)%p(sourceOffset)%state(1,constituent)
|
call results_writeDataset(group,stt,'tbd','driving force','tbd')
|
||||||
c = c + 1
|
|
||||||
|
|
||||||
end select
|
end select
|
||||||
enddo
|
enddo outputsLoop
|
||||||
end function source_damage_isoBrittle_postResults
|
end associate
|
||||||
|
#endif
|
||||||
|
|
||||||
|
end subroutine source_damage_isoBrittle_results
|
||||||
|
|
||||||
end module source_damage_isoBrittle
|
end module source_damage_isoBrittle
|
||||||
|
|
|
@ -11,6 +11,7 @@ module source_damage_isoDuctile
|
||||||
use discretization
|
use discretization
|
||||||
use material
|
use material
|
||||||
use config
|
use config
|
||||||
|
use results
|
||||||
|
|
||||||
implicit none
|
implicit none
|
||||||
private
|
private
|
||||||
|
@ -18,9 +19,6 @@ module source_damage_isoDuctile
|
||||||
source_damage_isoDuctile_offset, & !< which source is my current damage mechanism?
|
source_damage_isoDuctile_offset, & !< which source is my current damage mechanism?
|
||||||
source_damage_isoDuctile_instance !< instance of damage source mechanism
|
source_damage_isoDuctile_instance !< instance of damage source mechanism
|
||||||
|
|
||||||
integer, dimension(:,:), allocatable, target, public :: &
|
|
||||||
source_damage_isoDuctile_sizePostResult !< size of each post result output
|
|
||||||
|
|
||||||
character(len=64), dimension(:,:), allocatable, target, public :: &
|
character(len=64), dimension(:,:), allocatable, target, public :: &
|
||||||
source_damage_isoDuctile_output !< name of each post result output
|
source_damage_isoDuctile_output !< name of each post result output
|
||||||
|
|
||||||
|
@ -46,7 +44,7 @@ module source_damage_isoDuctile
|
||||||
source_damage_isoDuctile_init, &
|
source_damage_isoDuctile_init, &
|
||||||
source_damage_isoDuctile_dotState, &
|
source_damage_isoDuctile_dotState, &
|
||||||
source_damage_isoDuctile_getRateAndItsTangent, &
|
source_damage_isoDuctile_getRateAndItsTangent, &
|
||||||
source_damage_isoDuctile_postResults
|
source_damage_isoDuctile_Results
|
||||||
|
|
||||||
contains
|
contains
|
||||||
|
|
||||||
|
@ -86,7 +84,6 @@ subroutine source_damage_isoDuctile_init
|
||||||
enddo
|
enddo
|
||||||
enddo
|
enddo
|
||||||
|
|
||||||
allocate(source_damage_isoDuctile_sizePostResult(maxval(phase_Noutput),Ninstance),source=0)
|
|
||||||
allocate(source_damage_isoDuctile_output(maxval(phase_Noutput),Ninstance))
|
allocate(source_damage_isoDuctile_output(maxval(phase_Noutput),Ninstance))
|
||||||
source_damage_isoDuctile_output = ''
|
source_damage_isoDuctile_output = ''
|
||||||
|
|
||||||
|
@ -122,7 +119,6 @@ subroutine source_damage_isoDuctile_init
|
||||||
select case(outputs(i))
|
select case(outputs(i))
|
||||||
|
|
||||||
case ('isoductile_drivingforce')
|
case ('isoductile_drivingforce')
|
||||||
source_damage_isoDuctile_sizePostResult(i,source_damage_isoDuctile_instance(p)) = 1
|
|
||||||
source_damage_isoDuctile_output(i,source_damage_isoDuctile_instance(p)) = outputs(i)
|
source_damage_isoDuctile_output(i,source_damage_isoDuctile_instance(p)) = outputs(i)
|
||||||
prm%outputID = [prm%outputID, damage_drivingforce_ID]
|
prm%outputID = [prm%outputID, damage_drivingforce_ID]
|
||||||
|
|
||||||
|
@ -138,9 +134,7 @@ subroutine source_damage_isoDuctile_init
|
||||||
sourceOffset = source_damage_isoDuctile_offset(phase)
|
sourceOffset = source_damage_isoDuctile_offset(phase)
|
||||||
|
|
||||||
call material_allocateSourceState(phase,sourceOffset,NofMyPhase,1,1,0)
|
call material_allocateSourceState(phase,sourceOffset,NofMyPhase,1,1,0)
|
||||||
sourceState(phase)%p(sourceOffset)%sizePostResults = sum(source_damage_isoDuctile_sizePostResult(:,instance))
|
|
||||||
sourceState(phase)%p(sourceOffset)%aTolState=param(instance)%aTol
|
sourceState(phase)%p(sourceOffset)%aTolState=param(instance)%aTol
|
||||||
|
|
||||||
|
|
||||||
enddo
|
enddo
|
||||||
|
|
||||||
|
@ -196,35 +190,32 @@ subroutine source_damage_isoDuctile_getRateAndItsTangent(localphiDot, dLocalphiD
|
||||||
dLocalphiDot_dPhi = -sourceState(phase)%p(sourceOffset)%state(1,constituent)
|
dLocalphiDot_dPhi = -sourceState(phase)%p(sourceOffset)%state(1,constituent)
|
||||||
|
|
||||||
end subroutine source_damage_isoDuctile_getRateAndItsTangent
|
end subroutine source_damage_isoDuctile_getRateAndItsTangent
|
||||||
|
|
||||||
!--------------------------------------------------------------------------------------------------
|
|
||||||
!> @brief return array of local damage results
|
|
||||||
!--------------------------------------------------------------------------------------------------
|
|
||||||
function source_damage_isoDuctile_postResults(phase, constituent)
|
|
||||||
|
|
||||||
integer, intent(in) :: &
|
|
||||||
phase, &
|
|
||||||
constituent
|
|
||||||
real(pReal), dimension(sum(source_damage_isoDuctile_sizePostResult(:, &
|
|
||||||
source_damage_isoDuctile_instance(phase)))) :: &
|
|
||||||
source_damage_isoDuctile_postResults
|
|
||||||
|
|
||||||
integer :: &
|
!--------------------------------------------------------------------------------------------------
|
||||||
instance, sourceOffset, o, c
|
!> @brief writes results to HDF5 output file
|
||||||
|
!--------------------------------------------------------------------------------------------------
|
||||||
|
subroutine source_damage_isoDuctile_results(phase,group)
|
||||||
|
|
||||||
|
integer, intent(in) :: phase
|
||||||
|
character(len=*), intent(in) :: group
|
||||||
|
#if defined(PETSc) || defined(DAMASK_HDF5)
|
||||||
|
integer :: sourceOffset, o, instance
|
||||||
|
|
||||||
instance = source_damage_isoDuctile_instance(phase)
|
instance = source_damage_isoDuctile_instance(phase)
|
||||||
sourceOffset = source_damage_isoDuctile_offset(phase)
|
sourceOffset = source_damage_isoDuctile_offset(phase)
|
||||||
|
|
||||||
c = 0
|
associate(prm => param(instance), stt => sourceState(phase)%p(sourceOffset)%state)
|
||||||
|
outputsLoop: do o = 1,size(prm%outputID)
|
||||||
|
select case(prm%outputID(o))
|
||||||
|
case (damage_drivingforce_ID)
|
||||||
|
call results_writeDataset(group,stt,'tbd','driving force','tbd')
|
||||||
|
end select
|
||||||
|
enddo outputsLoop
|
||||||
|
end associate
|
||||||
|
#endif
|
||||||
|
|
||||||
do o = 1,size(param(instance)%outputID)
|
end subroutine source_damage_isoDuctile_results
|
||||||
select case(param(instance)%outputID(o))
|
|
||||||
case (damage_drivingforce_ID)
|
|
||||||
source_damage_isoDuctile_postResults(c+1) = sourceState(phase)%p(sourceOffset)%state(1,constituent)
|
|
||||||
c = c + 1
|
|
||||||
|
|
||||||
end select
|
|
||||||
enddo
|
|
||||||
end function source_damage_isoDuctile_postResults
|
|
||||||
|
|
||||||
end module source_damage_isoDuctile
|
end module source_damage_isoDuctile
|
||||||
|
|
Loading…
Reference in New Issue