substitute phasememberAt with material_phaseMemberAt

need to be clear where a global variable is defined
This commit is contained in:
Martin Diehl 2019-06-14 09:09:16 +02:00
parent 7a878cab3a
commit 9c4f92a01c
8 changed files with 35 additions and 35 deletions

View File

@ -282,11 +282,11 @@ subroutine constitutive_microstructure(Fe, Fp, ipc, ip, el)
plasticityType: select case (phase_plasticity(material_phase(ipc,ip,el)))
case (PLASTICITY_DISLOTWIN_ID) plasticityType
of = phasememberAt(ipc,ip,el)
of = material_phasememberAt(ipc,ip,el)
instance = phase_plasticityInstance(material_phase(ipc,ip,el))
call plastic_dislotwin_dependentState(temperature(ho)%p(tme),instance,of)
case (PLASTICITY_DISLOUCLA_ID) plasticityType
of = phasememberAt(ipc,ip,el)
of = material_phasememberAt(ipc,ip,el)
instance = phase_plasticityInstance(material_phase(ipc,ip,el))
call plastic_disloUCLA_dependentState(instance,of)
case (PLASTICITY_NONLOCAL_ID) plasticityType
@ -338,17 +338,17 @@ subroutine constitutive_LpAndItsTangents(Lp, dLp_dS, dLp_dFi, &
dLp_dMp = 0.0_pReal
case (PLASTICITY_ISOTROPIC_ID) plasticityType
of = phasememberAt(ipc,ip,el)
of = material_phasememberAt(ipc,ip,el)
instance = phase_plasticityInstance(material_phase(ipc,ip,el))
call plastic_isotropic_LpAndItsTangent (Lp,dLp_dMp,Mp,instance,of)
case (PLASTICITY_PHENOPOWERLAW_ID) plasticityType
of = phasememberAt(ipc,ip,el)
of = material_phasememberAt(ipc,ip,el)
instance = phase_plasticityInstance(material_phase(ipc,ip,el))
call plastic_phenopowerlaw_LpAndItsTangent (Lp,dLp_dMp,Mp,instance,of)
case (PLASTICITY_KINEHARDENING_ID) plasticityType
of = phasememberAt(ipc,ip,el)
of = material_phasememberAt(ipc,ip,el)
instance = phase_plasticityInstance(material_phase(ipc,ip,el))
call plastic_kinehardening_LpAndItsTangent (Lp,dLp_dMp, Mp,instance,of)
@ -357,12 +357,12 @@ subroutine constitutive_LpAndItsTangents(Lp, dLp_dS, dLp_dFi, &
temperature(ho)%p(tme),geometry_plastic_nonlocal_IPvolume0(ip,el),ip,el)
case (PLASTICITY_DISLOTWIN_ID) plasticityType
of = phasememberAt(ipc,ip,el)
of = material_phasememberAt(ipc,ip,el)
instance = phase_plasticityInstance(material_phase(ipc,ip,el))
call plastic_dislotwin_LpAndItsTangent (Lp,dLp_dMp,Mp,temperature(ho)%p(tme),instance,of)
case (PLASTICITY_DISLOUCLA_ID) plasticityType
of = phasememberAt(ipc,ip,el)
of = material_phasememberAt(ipc,ip,el)
instance = phase_plasticityInstance(material_phase(ipc,ip,el))
call plastic_disloucla_LpAndItsTangent (Lp,dLp_dMp,Mp,temperature(ho)%p(tme),instance,of)
@ -416,7 +416,7 @@ subroutine constitutive_LiAndItsTangents(Li, dLi_dS, dLi_dFi, &
plasticityType: select case (phase_plasticity(material_phase(ipc,ip,el)))
case (PLASTICITY_isotropic_ID) plasticityType
of = phasememberAt(ipc,ip,el)
of = material_phasememberAt(ipc,ip,el)
instance = phase_plasticityInstance(material_phase(ipc,ip,el))
call plastic_isotropic_LiAndItsTangent(my_Li, my_dLi_dS, S ,instance,of)
case default plasticityType
@ -600,27 +600,27 @@ subroutine constitutive_collectDotState(S, FeArray, Fi, FpArray, subdt, ipc, ip,
plasticityType: select case (phase_plasticity(material_phase(ipc,ip,el)))
case (PLASTICITY_ISOTROPIC_ID) plasticityType
of = phasememberAt(ipc,ip,el)
of = material_phasememberAt(ipc,ip,el)
instance = phase_plasticityInstance(material_phase(ipc,ip,el))
call plastic_isotropic_dotState (Mp,instance,of)
case (PLASTICITY_PHENOPOWERLAW_ID) plasticityType
of = phasememberAt(ipc,ip,el)
of = material_phasememberAt(ipc,ip,el)
instance = phase_plasticityInstance(material_phase(ipc,ip,el))
call plastic_phenopowerlaw_dotState(Mp,instance,of)
case (PLASTICITY_KINEHARDENING_ID) plasticityType
of = phasememberAt(ipc,ip,el)
of = material_phasememberAt(ipc,ip,el)
instance = phase_plasticityInstance(material_phase(ipc,ip,el))
call plastic_kinehardening_dotState(Mp,instance,of)
case (PLASTICITY_DISLOTWIN_ID) plasticityType
of = phasememberAt(ipc,ip,el)
of = material_phasememberAt(ipc,ip,el)
instance = phase_plasticityInstance(material_phase(ipc,ip,el))
call plastic_dislotwin_dotState (Mp,temperature(ho)%p(tme),instance,of)
case (PLASTICITY_DISLOUCLA_ID) plasticityType
of = phasememberAt(ipc,ip,el)
of = material_phasememberAt(ipc,ip,el)
instance = phase_plasticityInstance(material_phase(ipc,ip,el))
call plastic_disloucla_dotState (Mp,temperature(ho)%p(tme),instance,of)
@ -643,7 +643,7 @@ subroutine constitutive_collectDotState(S, FeArray, Fi, FpArray, subdt, ipc, ip,
call source_damage_anisoDuctile_dotState ( ipc, ip, el)
case (SOURCE_thermal_externalheat_ID) sourceType
of = phasememberAt(ipc,ip,el)
of = material_phasememberAt(ipc,ip,el)
call source_thermal_externalheat_dotState(material_phase(ipc,ip,el),of)
end select sourceType
@ -677,7 +677,7 @@ subroutine constitutive_collectDeltaState(S, Fe, Fi, ipc, ip, el)
plasticityType: select case (phase_plasticity(material_phase(ipc,ip,el)))
case (PLASTICITY_KINEHARDENING_ID) plasticityType
of = phasememberAt(ipc,ip,el)
of = material_phasememberAt(ipc,ip,el)
instance = phase_plasticityInstance(material_phase(ipc,ip,el))
call plastic_kinehardening_deltaState(Mp,instance,of)
@ -736,7 +736,7 @@ function constitutive_postResults(S, Fi, ipc, ip, el)
startPos = 1
endPos = plasticState(material_phase(ipc,ip,el))%sizePostResults
of = phasememberAt(ipc,ip,el)
of = material_phasememberAt(ipc,ip,el)
instance = phase_plasticityInstance(material_phase(ipc,ip,el))
plasticityType: select case (phase_plasticity(material_phase(ipc,ip,el)))
@ -769,7 +769,7 @@ function constitutive_postResults(S, Fi, ipc, ip, el)
SourceLoop: do i = 1, phase_Nsources(material_phase(ipc,ip,el))
startPos = endPos + 1
endPos = endPos + sourceState(material_phase(ipc,ip,el))%p(i)%sizePostResults
of = phasememberAt(ipc,ip,el)
of = material_phasememberAt(ipc,ip,el)
sourceType: select case (phase_source(i,material_phase(ipc,ip,el)))
case (SOURCE_damage_isoBrittle_ID) sourceType
constitutive_postResults(startPos:endPos) = source_damage_isoBrittle_postResults(material_phase(ipc,ip,el),of)

View File

@ -179,7 +179,7 @@ subroutine damage_local_getSourceAndItsTangent(phiDot, dPhiDot_dPhi, phi, ip, el
dPhiDot_dPhi = 0.0_pReal
do grain = 1, homogenization_Ngrains(material_homogenizationAt(el))
phase = material_phaseAt(grain,el)
constituent = phasememberAt(grain,ip,el)
constituent = material_phasememberAt(grain,ip,el)
do source = 1, phase_Nsources(phase)
select case(phase_source(source,phase))
case (SOURCE_damage_isoBrittle_ID)

View File

@ -145,7 +145,7 @@ subroutine damage_nonlocal_getSourceAndItsTangent(phiDot, dPhiDot_dPhi, phi, ip,
dPhiDot_dPhi = 0.0_pReal
do grain = 1, homogenization_Ngrains(material_homogenizationAt(el))
phase = material_phaseAt(grain,el)
constituent = phasememberAt(grain,ip,el)
constituent = material_phasememberAt(grain,ip,el)
do source = 1, phase_Nsources(phase)
select case(phase_source(source,phase))
case (SOURCE_damage_isoBrittle_ID)

View File

@ -326,11 +326,11 @@ subroutine materialpoint_stressAndItsTangent(updateJaco,dt)
do i = FEsolving_execIP(1,e),FEsolving_execIP(2,e);
do g = 1,myNgrains
plasticState (material_phaseAt(g,e))%partionedState0(:,phasememberAt(g,i,e)) = &
plasticState (material_phaseAt(g,e))%state0( :,phasememberAt(g,i,e))
plasticState (material_phaseAt(g,e))%partionedState0(:,material_phasememberAt(g,i,e)) = &
plasticState (material_phaseAt(g,e))%state0( :,material_phasememberAt(g,i,e))
do mySource = 1, phase_Nsources(material_phaseAt(g,e))
sourceState(material_phaseAt(g,e))%p(mySource)%partionedState0(:,phasememberAt(g,i,e)) = &
sourceState(material_phaseAt(g,e))%p(mySource)%state0( :,phasememberAt(g,i,e))
sourceState(material_phaseAt(g,e))%p(mySource)%partionedState0(:,material_phasememberAt(g,i,e)) = &
sourceState(material_phaseAt(g,e))%p(mySource)%state0( :,material_phasememberAt(g,i,e))
enddo
crystallite_partionedFp0(1:3,1:3,g,i,e) = crystallite_Fp0(1:3,1:3,g,i,e)
@ -412,11 +412,11 @@ subroutine materialpoint_stressAndItsTangent(updateJaco,dt)
crystallite_S (1:3,1:3,1:myNgrains,i,e)
do g = 1,myNgrains
plasticState (material_phaseAt(g,e))%partionedState0(:,phasememberAt(g,i,e)) = &
plasticState (material_phaseAt(g,e))%state (:,phasememberAt(g,i,e))
plasticState (material_phaseAt(g,e))%partionedState0(:,material_phasememberAt(g,i,e)) = &
plasticState (material_phaseAt(g,e))%state (:,material_phasememberAt(g,i,e))
do mySource = 1, phase_Nsources(material_phaseAt(g,e))
sourceState(material_phaseAt(g,e))%p(mySource)%partionedState0(:,phasememberAt(g,i,e)) = &
sourceState(material_phaseAt(g,e))%p(mySource)%state (:,phasememberAt(g,i,e))
sourceState(material_phaseAt(g,e))%p(mySource)%partionedState0(:,material_phasememberAt(g,i,e)) = &
sourceState(material_phaseAt(g,e))%p(mySource)%state (:,material_phasememberAt(g,i,e))
enddo
enddo
@ -475,11 +475,11 @@ subroutine materialpoint_stressAndItsTangent(updateJaco,dt)
crystallite_S(1:3,1:3,1:myNgrains,i,e) = &
crystallite_partionedS0(1:3,1:3,1:myNgrains,i,e)
do g = 1, myNgrains
plasticState (material_phaseAt(g,e))%state( :,phasememberAt(g,i,e)) = &
plasticState (material_phaseAt(g,e))%partionedState0(:,phasememberAt(g,i,e))
plasticState (material_phaseAt(g,e))%state( :,material_phasememberAt(g,i,e)) = &
plasticState (material_phaseAt(g,e))%partionedState0(:,material_phasememberAt(g,i,e))
do mySource = 1, phase_Nsources(material_phaseAt(g,e))
sourceState(material_phaseAt(g,e))%p(mySource)%state( :,phasememberAt(g,i,e)) = &
sourceState(material_phaseAt(g,e))%p(mySource)%partionedState0(:,phasememberAt(g,i,e))
sourceState(material_phaseAt(g,e))%p(mySource)%state( :,material_phasememberAt(g,i,e)) = &
sourceState(material_phaseAt(g,e))%p(mySource)%partionedState0(:,material_phasememberAt(g,i,e))
enddo
enddo
if(homogState(material_homogenizationAt(e))%sizeState > 0) &

View File

@ -203,7 +203,7 @@ subroutine source_damage_anisoBrittle_dotState(S, ipc, ip, el)
traction_d, traction_t, traction_n, traction_crit
phase = material_phaseAt(ipc,el)
constituent = phasememberAt(ipc,ip,el)
constituent = material_phasememberAt(ipc,ip,el)
instance = source_damage_anisoBrittle_instance(phase)
sourceOffset = source_damage_anisoBrittle_offset(phase)
homog = material_homogenizationAt(el)

View File

@ -181,7 +181,7 @@ subroutine source_damage_anisoDuctile_dotState(ipc, ip, el)
i
phase = material_phaseAt(ipc,el)
constituent = phasememberAt(ipc,ip,el)
constituent = material_phasememberAt(ipc,ip,el)
instance = source_damage_anisoDuctile_instance(phase)
sourceOffset = source_damage_anisoDuctile_offset(phase)
homog = material_homogenizationAt(el)

View File

@ -165,7 +165,7 @@ subroutine source_damage_isoBrittle_deltaState(C, Fe, ipc, ip, el)
strainenergy
phase = material_phaseAt(ipc,el) !< phase ID at ipc,ip,el
constituent = phasememberAt(ipc,ip,el) !< state array offset for phase ID at ipc,ip,el
constituent = material_phasememberAt(ipc,ip,el) !< state array offset for phase ID at ipc,ip,el
! ToDo: capability for multiple instances of SAME source within given phase. Needs Ninstance loop from here on!
instance = source_damage_isoBrittle_instance(phase) !< instance of damage_isoBrittle source
sourceOffset = source_damage_isoBrittle_offset(phase)

View File

@ -158,7 +158,7 @@ subroutine source_damage_isoDuctile_dotState(ipc, ip, el)
phase, constituent, instance, homog, sourceOffset, damageOffset
phase = material_phaseAt(ipc,el)
constituent = phasememberAt(ipc,ip,el)
constituent = material_phasememberAt(ipc,ip,el)
instance = source_damage_isoDuctile_instance(phase)
sourceOffset = source_damage_isoDuctile_offset(phase)
homog = material_homogenizationAt(el)