From 7a878cab3ad43baa965ac9f8f2fda12aaeb51559 Mon Sep 17 00:00:00 2001 From: Martin Diehl Date: Fri, 14 Jun 2019 09:02:28 +0200 Subject: [PATCH] phaseAt(c,i,e) substituted by material_phaseAt(c,e) --- src/CPFEM.f90 | 2 +- src/damage_local.f90 | 2 +- src/damage_nonlocal.f90 | 2 +- src/homogenization.f90 | 30 +++++++++++++++--------------- src/material.f90 | 3 --- src/plastic_nonlocal.f90 | 20 ++++++++++---------- src/source_damage_anisoBrittle.f90 | 2 +- src/source_damage_anisoDuctile.f90 | 2 +- src/source_damage_isoBrittle.f90 | 2 +- src/source_damage_isoDuctile.f90 | 2 +- src/thermal_adiabatic.f90 | 4 ++-- src/thermal_conduction.f90 | 4 ++-- 12 files changed, 36 insertions(+), 39 deletions(-) diff --git a/src/CPFEM.f90 b/src/CPFEM.f90 index dfa8dd09d..be11c0107 100644 --- a/src/CPFEM.f90 +++ b/src/CPFEM.f90 @@ -262,7 +262,7 @@ subroutine CPFEM_general(mode, parallelExecution, ffn, ffn1, temperature_inp, dt if (debug_e <= discretization_nElem .and. debug_i <=discretization_nIP) then write(6,'(a,1x,i8,1x,i2,1x,i4,/,(12x,6(e20.8,1x)),/)') & '<< CPFEM >> aged state of elFE ip grain',debug_e, debug_i, 1, & - plasticState(phaseAt(1,debug_i,debug_e))%state(:,phasememberAt(1,debug_i,debug_e)) + plasticState(material_phaseAt(1,debug_e))%state(:,material_phasememberAt(1,debug_i,debug_e)) endif endif diff --git a/src/damage_local.f90 b/src/damage_local.f90 index 2764bfcb0..966c9e7f0 100644 --- a/src/damage_local.f90 +++ b/src/damage_local.f90 @@ -178,7 +178,7 @@ subroutine damage_local_getSourceAndItsTangent(phiDot, dPhiDot_dPhi, phi, ip, el phiDot = 0.0_pReal dPhiDot_dPhi = 0.0_pReal do grain = 1, homogenization_Ngrains(material_homogenizationAt(el)) - phase = phaseAt(grain,ip,el) + phase = material_phaseAt(grain,el) constituent = phasememberAt(grain,ip,el) do source = 1, phase_Nsources(phase) select case(phase_source(source,phase)) diff --git a/src/damage_nonlocal.f90 b/src/damage_nonlocal.f90 index d8ab8bf1b..1c9763cfe 100644 --- a/src/damage_nonlocal.f90 +++ b/src/damage_nonlocal.f90 @@ -144,7 +144,7 @@ subroutine damage_nonlocal_getSourceAndItsTangent(phiDot, dPhiDot_dPhi, phi, ip, phiDot = 0.0_pReal dPhiDot_dPhi = 0.0_pReal do grain = 1, homogenization_Ngrains(material_homogenizationAt(el)) - phase = phaseAt(grain,ip,el) + phase = material_phaseAt(grain,el) constituent = phasememberAt(grain,ip,el) do source = 1, phase_Nsources(phase) select case(phase_source(source,phase)) diff --git a/src/homogenization.f90 b/src/homogenization.f90 index 35e2e9e03..33d169c52 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 (phaseAt(g,i,e))%partionedState0(:,phasememberAt(g,i,e)) = & - plasticState (phaseAt(g,i,e))%state0( :,phasememberAt(g,i,e)) - do mySource = 1, phase_Nsources(phaseAt(g,i,e)) - sourceState(phaseAt(g,i,e))%p(mySource)%partionedState0(:,phasememberAt(g,i,e)) = & - sourceState(phaseAt(g,i,e))%p(mySource)%state0( :,phasememberAt(g,i,e)) + plasticState (material_phaseAt(g,e))%partionedState0(:,phasememberAt(g,i,e)) = & + plasticState (material_phaseAt(g,e))%state0( :,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)) 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 (phaseAt(g,i,e))%partionedState0(:,phasememberAt(g,i,e)) = & - plasticState (phaseAt(g,i,e))%state (:,phasememberAt(g,i,e)) - do mySource = 1, phase_Nsources(phaseAt(g,i,e)) - sourceState(phaseAt(g,i,e))%p(mySource)%partionedState0(:,phasememberAt(g,i,e)) = & - sourceState(phaseAt(g,i,e))%p(mySource)%state (:,phasememberAt(g,i,e)) + plasticState (material_phaseAt(g,e))%partionedState0(:,phasememberAt(g,i,e)) = & + plasticState (material_phaseAt(g,e))%state (:,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)) 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 (phaseAt(g,i,e))%state( :,phasememberAt(g,i,e)) = & - plasticState (phaseAt(g,i,e))%partionedState0(:,phasememberAt(g,i,e)) - do mySource = 1, phase_Nsources(phaseAt(g,i,e)) - sourceState(phaseAt(g,i,e))%p(mySource)%state( :,phasememberAt(g,i,e)) = & - sourceState(phaseAt(g,i,e))%p(mySource)%partionedState0(:,phasememberAt(g,i,e)) + plasticState (material_phaseAt(g,e))%state( :,phasememberAt(g,i,e)) = & + plasticState (material_phaseAt(g,e))%partionedState0(:,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)) enddo enddo if(homogState(material_homogenizationAt(e))%sizeState > 0) & diff --git a/src/material.f90 b/src/material.f90 index f4a700229..9f3215551 100644 --- a/src/material.f90 +++ b/src/material.f90 @@ -180,7 +180,6 @@ module material homogenization_active ! BEGIN DEPRECATED - integer, dimension(:,:,:), allocatable, public :: phaseAt !< phase ID of every material point (ipc,ip,el) integer, dimension(:,:,:), allocatable, public :: phasememberAt !< memberID of given phase at every material point (ipc,ip,el) integer, dimension(:,:,:), allocatable, public, target :: mappingHomogenization !< mapping from material points to offset in heterogenous state/field @@ -375,7 +374,6 @@ subroutine material_init !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! ! BEGIN DEPRECATED - allocate(phaseAt ( homogenization_maxNgrains,discretization_nIP,discretization_nElem),source=0) allocate(phasememberAt ( homogenization_maxNgrains,discretization_nIP,discretization_nElem),source=0) allocate(mappingHomogenization (2, discretization_nIP,discretization_nElem),source=0) allocate(mappingHomogenizationConst( discretization_nIP,discretization_nElem),source=1) @@ -392,7 +390,6 @@ subroutine material_init do g = 1,homogenization_Ngrains(myHomog) myPhase = material_phase(g,i,e) CounterPhase(myPhase) = CounterPhase(myPhase)+1 ! not distinguishing between instances of same phase - phaseAt(g,i,e) = myPhase phasememberAt(g,i,e) = CounterPhase(myPhase) enddo enddo diff --git a/src/plastic_nonlocal.f90 b/src/plastic_nonlocal.f90 index baed5a066..dd58e60be 100644 --- a/src/plastic_nonlocal.f90 +++ b/src/plastic_nonlocal.f90 @@ -875,8 +875,8 @@ subroutine plastic_nonlocal_dependentState(Fe, Fp, ip, el) real(pReal), dimension(3,totalNslip(phase_plasticityInstance(material_phase(1,ip,el))),2) :: & m ! direction of dislocation motion - ph = phaseAt(1,ip,el) - of = phasememberAt(1,ip,el) + ph = material_phaseAt(1,el) + of = material_phasememberAt(1,ip,el) instance = phase_plasticityInstance(ph) associate(prm => param(instance),dst => microstructure(instance), stt => state(instance)) @@ -1216,8 +1216,8 @@ subroutine plastic_nonlocal_LpAndItsTangent(Lp, dLp_dMp, & gdotTotal !< shear rate !*** shortcut for mapping - ph = phaseAt(1,ip,el) - of = phasememberAt(1,ip,el) + ph = material_phaseAt(1,el) + of = material_phasememberAt(1,ip,el) instance = phase_plasticityInstance(ph) associate(prm => param(instance),dst=>microstructure(instance)) @@ -1338,8 +1338,8 @@ subroutine plastic_nonlocal_deltaState(Mp,ip,el) dUpperOld, & ! old maximum stable dipole distance for edges and screws deltaDUpper ! change in maximum stable dipole distance for edges and screws - ph = phaseAt(1,ip,el) - of = phasememberAt(1,ip,el) + ph = material_phaseAt(1,el) + of = material_phasememberAt(1,ip,el) instance = phase_plasticityInstance(ph) associate(prm => param(instance),dst => microstructure(instance),del => deltaState(instance)) @@ -1507,8 +1507,8 @@ subroutine plastic_nonlocal_dotState(Mp, Fe, Fp, Temperature, & considerEnteringFlux, & considerLeavingFlux - p = phaseAt(1,ip,el) - o = phasememberAt(1,ip,el) + p = material_phaseAt(1,el) + o = material_phasememberAt(1,ip,el) if (timestep <= 0.0_pReal) then plasticState(p)%dotState = 0.0_pReal @@ -1630,8 +1630,8 @@ subroutine plastic_nonlocal_dotState(Mp, Fe, Fp, Temperature, & neighbor_el = IPneighborhood(1,n,ip,el) neighbor_ip = IPneighborhood(2,n,ip,el) neighbor_n = IPneighborhood(3,n,ip,el) - np = phaseAt(1,neighbor_ip,neighbor_el) - no = phasememberAt(1,neighbor_ip,neighbor_el) + np = material_phaseAt(1,neighbor_el) + no = material_phasememberAt(1,neighbor_ip,neighbor_el) opposite_neighbor = n + mod(n,2) - mod(n+1,2) opposite_el = IPneighborhood(1,opposite_neighbor,ip,el) diff --git a/src/source_damage_anisoBrittle.f90 b/src/source_damage_anisoBrittle.f90 index ccad7c6b0..b84b23558 100644 --- a/src/source_damage_anisoBrittle.f90 +++ b/src/source_damage_anisoBrittle.f90 @@ -202,7 +202,7 @@ subroutine source_damage_anisoBrittle_dotState(S, ipc, ip, el) real(pReal) :: & traction_d, traction_t, traction_n, traction_crit - phase = phaseAt(ipc,ip,el) + phase = material_phaseAt(ipc,el) constituent = phasememberAt(ipc,ip,el) instance = source_damage_anisoBrittle_instance(phase) sourceOffset = source_damage_anisoBrittle_offset(phase) diff --git a/src/source_damage_anisoDuctile.f90 b/src/source_damage_anisoDuctile.f90 index aa8c9b8fa..6b5514c86 100644 --- a/src/source_damage_anisoDuctile.f90 +++ b/src/source_damage_anisoDuctile.f90 @@ -180,7 +180,7 @@ subroutine source_damage_anisoDuctile_dotState(ipc, ip, el) instance, & i - phase = phaseAt(ipc,ip,el) + phase = material_phaseAt(ipc,el) constituent = phasememberAt(ipc,ip,el) instance = source_damage_anisoDuctile_instance(phase) sourceOffset = source_damage_anisoDuctile_offset(phase) diff --git a/src/source_damage_isoBrittle.f90 b/src/source_damage_isoBrittle.f90 index cf43fdfb8..70e4bbcd1 100644 --- a/src/source_damage_isoBrittle.f90 +++ b/src/source_damage_isoBrittle.f90 @@ -164,7 +164,7 @@ subroutine source_damage_isoBrittle_deltaState(C, Fe, ipc, ip, el) strain(6), & strainenergy - phase = phaseAt(ipc,ip,el) !< phase ID at ipc,ip,el + 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 ! 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 diff --git a/src/source_damage_isoDuctile.f90 b/src/source_damage_isoDuctile.f90 index 524936077..69284db9a 100644 --- a/src/source_damage_isoDuctile.f90 +++ b/src/source_damage_isoDuctile.f90 @@ -157,7 +157,7 @@ subroutine source_damage_isoDuctile_dotState(ipc, ip, el) integer :: & phase, constituent, instance, homog, sourceOffset, damageOffset - phase = phaseAt(ipc,ip,el) + phase = material_phaseAt(ipc,el) constituent = phasememberAt(ipc,ip,el) instance = source_damage_isoDuctile_instance(phase) sourceOffset = source_damage_isoDuctile_offset(phase) diff --git a/src/thermal_adiabatic.f90 b/src/thermal_adiabatic.f90 index 526c98904..76f519913 100644 --- a/src/thermal_adiabatic.f90 +++ b/src/thermal_adiabatic.f90 @@ -167,8 +167,8 @@ subroutine thermal_adiabatic_getSourceAndItsTangent(Tdot, dTdot_dT, T, ip, el) Tdot = 0.0_pReal dTdot_dT = 0.0_pReal do grain = 1, homogenization_Ngrains(homog) - phase = phaseAt(grain,ip,el) - constituent = phasememberAt(grain,ip,el) + phase = material_phaseAt(grain,el) + constituent = material_phasememberAt(grain,ip,el) do source = 1, phase_Nsources(phase) select case(phase_source(source,phase)) case (SOURCE_thermal_dissipation_ID) diff --git a/src/thermal_conduction.f90 b/src/thermal_conduction.f90 index a31961dc7..c70c59b60 100644 --- a/src/thermal_conduction.f90 +++ b/src/thermal_conduction.f90 @@ -132,8 +132,8 @@ subroutine thermal_conduction_getSourceAndItsTangent(Tdot, dTdot_dT, T, ip, el) Tdot = 0.0_pReal dTdot_dT = 0.0_pReal do grain = 1, homogenization_Ngrains(homog) - phase = phaseAt(grain,ip,el) - constituent = phasememberAt(grain,ip,el) + phase = material_phaseAt(grain,el) + constituent = material_phasememberAt(grain,ip,el) do source = 1, phase_Nsources(phase) select case(phase_source(source,phase)) case (SOURCE_thermal_dissipation_ID)