From 9c4f92a01c9c8375a4870311100dc37a641137dd Mon Sep 17 00:00:00 2001 From: Martin Diehl Date: Fri, 14 Jun 2019 09:09:16 +0200 Subject: [PATCH] substitute phasememberAt with material_phaseMemberAt need to be clear where a global variable is defined --- src/constitutive.f90 | 34 +++++++++++++++--------------- src/damage_local.f90 | 2 +- src/damage_nonlocal.f90 | 2 +- src/homogenization.f90 | 24 ++++++++++----------- src/source_damage_anisoBrittle.f90 | 2 +- src/source_damage_anisoDuctile.f90 | 2 +- src/source_damage_isoBrittle.f90 | 2 +- src/source_damage_isoDuctile.f90 | 2 +- 8 files changed, 35 insertions(+), 35 deletions(-) diff --git a/src/constitutive.f90 b/src/constitutive.f90 index cc70e8f22..2c1a873eb 100644 --- a/src/constitutive.f90 +++ b/src/constitutive.f90 @@ -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) diff --git a/src/damage_local.f90 b/src/damage_local.f90 index 966c9e7f0..74ad47c9b 100644 --- a/src/damage_local.f90 +++ b/src/damage_local.f90 @@ -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) diff --git a/src/damage_nonlocal.f90 b/src/damage_nonlocal.f90 index 1c9763cfe..dce88bc61 100644 --- a/src/damage_nonlocal.f90 +++ b/src/damage_nonlocal.f90 @@ -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) diff --git a/src/homogenization.f90 b/src/homogenization.f90 index 33d169c52..9f7890131 100644 --- a/src/homogenization.f90 +++ b/src/homogenization.f90 @@ -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) & diff --git a/src/source_damage_anisoBrittle.f90 b/src/source_damage_anisoBrittle.f90 index b84b23558..9a82fc6c7 100644 --- a/src/source_damage_anisoBrittle.f90 +++ b/src/source_damage_anisoBrittle.f90 @@ -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) diff --git a/src/source_damage_anisoDuctile.f90 b/src/source_damage_anisoDuctile.f90 index 6b5514c86..ddb985188 100644 --- a/src/source_damage_anisoDuctile.f90 +++ b/src/source_damage_anisoDuctile.f90 @@ -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) diff --git a/src/source_damage_isoBrittle.f90 b/src/source_damage_isoBrittle.f90 index 70e4bbcd1..21724ad8a 100644 --- a/src/source_damage_isoBrittle.f90 +++ b/src/source_damage_isoBrittle.f90 @@ -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) diff --git a/src/source_damage_isoDuctile.f90 b/src/source_damage_isoDuctile.f90 index 69284db9a..d477342c6 100644 --- a/src/source_damage_isoDuctile.f90 +++ b/src/source_damage_isoDuctile.f90 @@ -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)