1 # 1 "/home/damask_user/GitLabCI_Pipeline_4301/DAMASK/src/damage_local.f90"
4 # 1 "/home/damask_user/GitLabCI_Pipeline_4301/DAMASK/src/damage_local.f90"
24 character(len=pStringLen),
allocatable,
dimension(:) :: &
44 integer :: ninstance,nofmyhomog,h
49 allocate(
param(ninstance))
79 integer,
intent(in) :: &
80 ip, & !< integration point number
82 real(preal),
intent(in) :: &
84 logical,
dimension(2) :: &
90 phi, phidot, dphidot_dphi
92 homog = material_homogenizationat(el)
93 offset = material_homogenizationmemberat(ip,el)
94 phi = damagestate(homog)%subState0(1,offset)
96 phi = max(residualstiffness,min(1.0_preal,phi + subdt*phidot))
99 <= err_damage_tolabs &
100 .or. abs(phi - damagestate(homog)%state(1,offset)) &
101 <= err_damage_tolrel*abs(damagestate(homog)%state(1,offset)), &
104 damagestate(homog)%state(1,offset) = phi
114 integer,
intent(in) :: &
115 ip, & !< integration point number
117 real(pReal),
intent(in) :: &
125 phiDot, dPhiDot_dPhi, localphiDot, dLocalphiDot_dPhi
128 dphidot_dphi = 0.0_preal
129 do grain = 1, homogenization_ngrains(material_homogenizationat(el))
130 phase = material_phaseat(grain,el)
131 constituent = material_phasememberat(grain,ip,el)
132 do source = 1, phase_nsources(phase)
133 select case(phase_source(source,phase))
134 case (source_damage_isobrittle_id)
135 call source_damage_isobrittle_getrateanditstangent (localphidot, dlocalphidot_dphi, phi, phase, constituent)
137 case (source_damage_isoductile_id)
138 call source_damage_isoductile_getrateanditstangent (localphidot, dlocalphidot_dphi, phi, phase, constituent)
140 case (source_damage_anisobrittle_id)
141 call source_damage_anisobrittle_getrateanditstangent(localphidot, dlocalphidot_dphi, phi, phase, constituent)
143 case (source_damage_anisoductile_id)
144 call source_damage_anisoductile_getrateanditstangent(localphidot, dlocalphidot_dphi, phi, phase, constituent)
147 localphidot = 0.0_preal
148 dlocalphidot_dphi = 0.0_preal
151 phidot = phidot + localphidot
152 dphidot_dphi = dphidot_dphi + dlocalphidot_dphi
156 phidot = phidot/real(homogenization_ngrains(material_homogenizationat(el)),preal)
157 dphidot_dphi = dphidot_dphi/real(homogenization_ngrains(material_homogenizationat(el)),preal)
167 integer,
intent(in) :: homog
168 character(len=*),
intent(in) :: group
172 associate(prm =>
param(damage_typeinstance(homog)))
173 outputsloop:
do o = 1,
size(prm%output)
174 select case(prm%output(o))
176 call results_writedataset(group,damage(homog)%p,
'phi',&
177 'damage indicator',
'-')