1 # 1 "/home/damask_user/GitLabCI_Pipeline_4301/DAMASK/src/damage_nonlocal.f90"
4 # 1 "/home/damask_user/GitLabCI_Pipeline_4301/DAMASK/src/damage_nonlocal.f90"
26 character(len=pStringLen),
allocatable,
dimension(:) :: &
49 integer :: ninstance,nofmyhomog,h
54 allocate(
param(ninstance))
84 integer,
intent(in) :: &
85 ip, & !< integration point number
87 real(preal),
intent(in) :: &
95 phidot, dphidot_dphi, localphidot, dlocalphidot_dphi
98 dphidot_dphi = 0.0_preal
99 do grain = 1, homogenization_ngrains(material_homogenizationat(el))
100 phase = material_phaseat(grain,el)
101 constituent = material_phasememberat(grain,ip,el)
102 do source = 1, phase_nsources(phase)
103 select case(phase_source(source,phase))
104 case (source_damage_isobrittle_id)
105 call source_damage_isobrittle_getrateanditstangent (localphidot, dlocalphidot_dphi, phi, phase, constituent)
107 case (source_damage_isoductile_id)
108 call source_damage_isoductile_getrateanditstangent (localphidot, dlocalphidot_dphi, phi, phase, constituent)
110 case (source_damage_anisobrittle_id)
111 call source_damage_anisobrittle_getrateanditstangent(localphidot, dlocalphidot_dphi, phi, phase, constituent)
113 case (source_damage_anisoductile_id)
114 call source_damage_anisoductile_getrateanditstangent(localphidot, dlocalphidot_dphi, phi, phase, constituent)
117 localphidot = 0.0_preal
118 dlocalphidot_dphi = 0.0_preal
121 phidot = phidot + localphidot
122 dphidot_dphi = dphidot_dphi + dlocalphidot_dphi
126 phidot = phidot/real(homogenization_ngrains(material_homogenizationat(el)),preal)
127 dphidot_dphi = dphidot_dphi/real(homogenization_ngrains(material_homogenizationat(el)),preal)
137 integer,
intent(in) :: &
138 ip, & !< integration point number
140 real(preal),
dimension(3,3) :: &
146 homog = material_homogenizationat(el)
148 do grain = 1, homogenization_ngrains(homog)
150 crystallite_push33toref(grain,ip,el,lattice_damagediffusion(1:3,1:3,material_phaseat(grain,el)))
164 integer,
intent(in) :: &
165 ip, & !< integration point number
172 do ipc = 1, homogenization_ngrains(material_homogenizationat(el))
177 real(homogenization_ngrains(material_homogenizationat(el)),preal)
187 integer,
intent(in) :: &
188 ip, & !< integration point number
190 real(preal),
intent(in) :: &
196 homog = material_homogenizationat(el)
197 offset = damagemapping(homog)%p(ip,el)
198 damage(homog)%p(offset) = phi
208 integer,
intent(in) :: homog
209 character(len=*),
intent(in) :: group
213 associate(prm =>
param(damage_typeinstance(homog)))
214 outputsloop:
do o = 1,
size(prm%output)
215 select case(prm%output(o))
217 call results_writedataset(group,damage(homog)%p,
'phi',&
218 'damage indicator',
'-')