From 568d1a020cd64dd4ab605d4e3849d666b53885a5 Mon Sep 17 00:00:00 2001 From: Martin Diehl Date: Tue, 27 Oct 2020 21:33:30 +0100 Subject: [PATCH] consistent names for counting variables --- src/constitutive.f90 | 16 ++--- src/constitutive_plastic_disloTungsten.f90 | 30 ++++----- src/constitutive_plastic_dislotwin.f90 | 46 +++++++------- src/constitutive_plastic_isotropic.f90 | 20 +++--- src/constitutive_plastic_kinehardening.f90 | 24 ++++---- src/constitutive_plastic_none.f90 | 14 ++--- src/constitutive_plastic_nonlocal.f90 | 72 +++++++++++----------- src/constitutive_plastic_phenopowerlaw.f90 | 24 ++++---- src/damage_local.f90 | 14 ++--- src/damage_none.f90 | 10 +-- src/damage_nonlocal.f90 | 14 ++--- src/homogenization_mech_RGC.f90 | 36 +++++------ src/homogenization_mech_isostrain.f90 | 20 +++--- src/homogenization_mech_none.f90 | 16 ++--- src/kinematics_cleavage_opening.f90 | 12 ++-- src/kinematics_slipplane_opening.f90 | 12 ++-- src/kinematics_thermal_expansion.f90 | 10 +-- src/source_damage_anisoBrittle.f90 | 16 ++--- src/source_damage_anisoDuctile.f90 | 16 ++--- src/source_damage_isoBrittle.f90 | 16 ++--- src/source_damage_isoDuctile.f90 | 16 ++--- src/source_thermal_dissipation.f90 | 18 +++--- src/source_thermal_externalheat.f90 | 16 ++--- src/thermal_adiabatic.f90 | 18 +++--- src/thermal_conduction.f90 | 18 +++--- src/thermal_isothermal.f90 | 10 +-- 26 files changed, 267 insertions(+), 267 deletions(-) diff --git a/src/constitutive.f90 b/src/constitutive.f90 index c7658b77f..358937e4b 100644 --- a/src/constitutive.f90 +++ b/src/constitutive.f90 @@ -905,12 +905,12 @@ end function constitutive_deltaState !> @brief Allocate the components of the state structure for a given phase !-------------------------------------------------------------------------------------------------- subroutine constitutive_allocateState(state, & - NipcMyPhase,sizeState,sizeDotState,sizeDeltaState) + Nconstituents,sizeState,sizeDotState,sizeDeltaState) class(tState), intent(out) :: & state integer, intent(in) :: & - NipcMyPhase, & + Nconstituents, & sizeState, & sizeDotState, & sizeDeltaState @@ -921,14 +921,14 @@ subroutine constitutive_allocateState(state, & state%offsetDeltaState = sizeState-sizeDeltaState ! deltaState occupies latter part of state by definition allocate(state%atol (sizeState), source=0.0_pReal) - allocate(state%state0 (sizeState,NipcMyPhase), source=0.0_pReal) - allocate(state%partitionedState0(sizeState,NipcMyPhase), source=0.0_pReal) - allocate(state%subState0 (sizeState,NipcMyPhase), source=0.0_pReal) - allocate(state%state (sizeState,NipcMyPhase), source=0.0_pReal) + allocate(state%state0 (sizeState,Nconstituents), source=0.0_pReal) + allocate(state%partitionedState0(sizeState,Nconstituents), source=0.0_pReal) + allocate(state%subState0 (sizeState,Nconstituents), source=0.0_pReal) + allocate(state%state (sizeState,Nconstituents), source=0.0_pReal) - allocate(state%dotState (sizeDotState,NipcMyPhase), source=0.0_pReal) + allocate(state%dotState (sizeDotState,Nconstituents), source=0.0_pReal) - allocate(state%deltaState(sizeDeltaState,NipcMyPhase), source=0.0_pReal) + allocate(state%deltaState(sizeDeltaState,Nconstituents), source=0.0_pReal) end subroutine constitutive_allocateState diff --git a/src/constitutive_plastic_disloTungsten.f90 b/src/constitutive_plastic_disloTungsten.f90 index d9eec28e8..aef3bef89 100644 --- a/src/constitutive_plastic_disloTungsten.f90 +++ b/src/constitutive_plastic_disloTungsten.f90 @@ -78,9 +78,9 @@ module function plastic_disloTungsten_init() result(myPlasticity) logical, dimension(:), allocatable :: myPlasticity integer :: & - Ninstance, & + Ninstances, & p, i, & - NipcMyPhase, & + Nconstituents, & sizeState, sizeDotState, & startIndex, endIndex integer, dimension(:), allocatable :: & @@ -99,17 +99,17 @@ module function plastic_disloTungsten_init() result(myPlasticity) print'(/,a)', ' <<<+- plastic_dislotungsten init -+>>>' myPlasticity = plastic_active('disloTungsten') - Ninstance = count(myPlasticity) - print'(a,i2)', ' # instances: ',Ninstance; flush(IO_STDOUT) - if(Ninstance == 0) return + Ninstances = count(myPlasticity) + print'(a,i2)', ' # instances: ',Ninstances; flush(IO_STDOUT) + if(Ninstances == 0) return print*, 'Cereceda et al., International Journal of Plasticity 78:242–256, 2016' print*, 'https://dx.doi.org/10.1016/j.ijplas.2015.09.002' - allocate(param(Ninstance)) - allocate(state(Ninstance)) - allocate(dotState(Ninstance)) - allocate(dependentState(Ninstance)) + allocate(param(Ninstances)) + allocate(state(Ninstances)) + allocate(dotState(Ninstances)) + allocate(dependentState(Ninstances)) phases => config_material%get('phase') i = 0 @@ -221,18 +221,18 @@ module function plastic_disloTungsten_init() result(myPlasticity) !-------------------------------------------------------------------------------------------------- ! allocate state arrays - NipcMyPhase = count(material_phaseAt == p) * discretization_nIPs + Nconstituents = count(material_phaseAt == p) * discretization_nIPs sizeDotState = size(['rho_mob ','rho_dip ','gamma_sl']) * prm%sum_N_sl sizeState = sizeDotState - call constitutive_allocateState(plasticState(p),NipcMyPhase,sizeState,sizeDotState,0) + call constitutive_allocateState(plasticState(p),Nconstituents,sizeState,sizeDotState,0) !-------------------------------------------------------------------------------------------------- ! state aliases and initialization startIndex = 1 endIndex = prm%sum_N_sl stt%rho_mob => plasticState(p)%state(startIndex:endIndex,:) - stt%rho_mob = spread(rho_mob_0,2,NipcMyPhase) + stt%rho_mob = spread(rho_mob_0,2,Nconstituents) dot%rho_mob => plasticState(p)%dotState(startIndex:endIndex,:) plasticState(p)%atol(startIndex:endIndex) = pl%get_asFloat('atol_rho',defaultVal=1.0_pReal) if (any(plasticState(p)%atol(startIndex:endIndex) < 0.0_pReal)) extmsg = trim(extmsg)//' atol_rho' @@ -240,7 +240,7 @@ module function plastic_disloTungsten_init() result(myPlasticity) startIndex = endIndex + 1 endIndex = endIndex + prm%sum_N_sl stt%rho_dip => plasticState(p)%state(startIndex:endIndex,:) - stt%rho_dip = spread(rho_dip_0,2,NipcMyPhase) + stt%rho_dip = spread(rho_dip_0,2,Nconstituents) dot%rho_dip => plasticState(p)%dotState(startIndex:endIndex,:) plasticState(p)%atol(startIndex:endIndex) = pl%get_asFloat('atol_rho',defaultVal=1.0_pReal) @@ -252,8 +252,8 @@ module function plastic_disloTungsten_init() result(myPlasticity) ! global alias plasticState(p)%slipRate => plasticState(p)%dotState(startIndex:endIndex,:) - allocate(dst%Lambda_sl(prm%sum_N_sl,NipcMyPhase), source=0.0_pReal) - allocate(dst%threshold_stress(prm%sum_N_sl,NipcMyPhase), source=0.0_pReal) + allocate(dst%Lambda_sl(prm%sum_N_sl,Nconstituents), source=0.0_pReal) + allocate(dst%threshold_stress(prm%sum_N_sl,Nconstituents), source=0.0_pReal) plasticState(p)%state0 = plasticState(p)%state ! ToDo: this could be done centrally diff --git a/src/constitutive_plastic_dislotwin.f90 b/src/constitutive_plastic_dislotwin.f90 index 880c1cb99..30527e301 100644 --- a/src/constitutive_plastic_dislotwin.f90 +++ b/src/constitutive_plastic_dislotwin.f90 @@ -126,9 +126,9 @@ module function plastic_dislotwin_init() result(myPlasticity) logical, dimension(:), allocatable :: myPlasticity integer :: & - Ninstance, & + Ninstances, & p, i, & - NipcMyPhase, & + Nconstituents, & sizeState, sizeDotState, & startIndex, endIndex integer, dimension(:), allocatable :: & @@ -146,9 +146,9 @@ module function plastic_dislotwin_init() result(myPlasticity) print'(/,a)', ' <<<+- plastic_dislotwin init -+>>>' myPlasticity = plastic_active('dislotwin') - Ninstance = count(myPlasticity) - print'(a,i2)', ' # instances: ',Ninstance; flush(IO_STDOUT) - if(Ninstance == 0) return + Ninstances = count(myPlasticity) + print'(a,i2)', ' # instances: ',Ninstances; flush(IO_STDOUT) + if(Ninstances == 0) return print*, 'Ma and Roters, Acta Materialia 52(12):3603–3612, 2004' print*, 'https://doi.org/10.1016/j.actamat.2004.04.012'//IO_EOL @@ -159,10 +159,10 @@ module function plastic_dislotwin_init() result(myPlasticity) print*, 'Wong et al., Acta Materialia 118:140–151, 2016' print*, 'https://doi.org/10.1016/j.actamat.2016.07.032' - allocate(param(Ninstance)) - allocate(state(Ninstance)) - allocate(dotState(Ninstance)) - allocate(dependentState(Ninstance)) + allocate(param(Ninstances)) + allocate(state(Ninstances)) + allocate(dotState(Ninstances)) + allocate(dependentState(Ninstances)) phases => config_material%get('phase') i = 0 @@ -407,21 +407,21 @@ module function plastic_dislotwin_init() result(myPlasticity) !-------------------------------------------------------------------------------------------------- ! allocate state arrays - NipcMyPhase = count(material_phaseAt == p) * discretization_nIPs + Nconstituents = count(material_phaseAt == p) * discretization_nIPs sizeDotState = size(['rho_mob ','rho_dip ','gamma_sl']) * prm%sum_N_sl & + size(['f_tw']) * prm%sum_N_tw & + size(['f_tr']) * prm%sum_N_tr sizeState = sizeDotState - call constitutive_allocateState(plasticState(p),NipcMyPhase,sizeState,sizeDotState,0) + call constitutive_allocateState(plasticState(p),Nconstituents,sizeState,sizeDotState,0) !-------------------------------------------------------------------------------------------------- ! locally defined state aliases and initialization of state0 and atol startIndex = 1 endIndex = prm%sum_N_sl stt%rho_mob=>plasticState(p)%state(startIndex:endIndex,:) - stt%rho_mob= spread(rho_mob_0,2,NipcMyPhase) + stt%rho_mob= spread(rho_mob_0,2,Nconstituents) dot%rho_mob=>plasticState(p)%dotState(startIndex:endIndex,:) plasticState(p)%atol(startIndex:endIndex) = pl%get_asFloat('atol_rho',defaultVal=1.0_pReal) if (any(plasticState(p)%atol(startIndex:endIndex) < 0.0_pReal)) extmsg = trim(extmsg)//' atol_rho' @@ -429,7 +429,7 @@ module function plastic_dislotwin_init() result(myPlasticity) startIndex = endIndex + 1 endIndex = endIndex + prm%sum_N_sl stt%rho_dip=>plasticState(p)%state(startIndex:endIndex,:) - stt%rho_dip= spread(rho_dip_0,2,NipcMyPhase) + stt%rho_dip= spread(rho_dip_0,2,Nconstituents) dot%rho_dip=>plasticState(p)%dotState(startIndex:endIndex,:) plasticState(p)%atol(startIndex:endIndex) = pl%get_asFloat('atol_rho',defaultVal=1.0_pReal) @@ -455,18 +455,18 @@ module function plastic_dislotwin_init() result(myPlasticity) plasticState(p)%atol(startIndex:endIndex) = pl%get_asFloat('f_trans',defaultVal=1.0e-6_pReal) if (any(plasticState(p)%atol(startIndex:endIndex) < 0.0_pReal)) extmsg = trim(extmsg)//' f_trans' - allocate(dst%Lambda_sl (prm%sum_N_sl,NipcMyPhase),source=0.0_pReal) - allocate(dst%tau_pass (prm%sum_N_sl,NipcMyPhase),source=0.0_pReal) + allocate(dst%Lambda_sl (prm%sum_N_sl,Nconstituents),source=0.0_pReal) + allocate(dst%tau_pass (prm%sum_N_sl,Nconstituents),source=0.0_pReal) - allocate(dst%Lambda_tw (prm%sum_N_tw,NipcMyPhase),source=0.0_pReal) - allocate(dst%tau_hat_tw (prm%sum_N_tw,NipcMyPhase),source=0.0_pReal) - allocate(dst%tau_r_tw (prm%sum_N_tw,NipcMyPhase),source=0.0_pReal) - allocate(dst%V_tw (prm%sum_N_tw,NipcMyPhase),source=0.0_pReal) + allocate(dst%Lambda_tw (prm%sum_N_tw,Nconstituents),source=0.0_pReal) + allocate(dst%tau_hat_tw (prm%sum_N_tw,Nconstituents),source=0.0_pReal) + allocate(dst%tau_r_tw (prm%sum_N_tw,Nconstituents),source=0.0_pReal) + allocate(dst%V_tw (prm%sum_N_tw,Nconstituents),source=0.0_pReal) - allocate(dst%Lambda_tr (prm%sum_N_tr,NipcMyPhase),source=0.0_pReal) - allocate(dst%tau_hat_tr (prm%sum_N_tr,NipcMyPhase),source=0.0_pReal) - allocate(dst%tau_r_tr (prm%sum_N_tr,NipcMyPhase),source=0.0_pReal) - allocate(dst%V_tr (prm%sum_N_tr,NipcMyPhase),source=0.0_pReal) + allocate(dst%Lambda_tr (prm%sum_N_tr,Nconstituents),source=0.0_pReal) + allocate(dst%tau_hat_tr (prm%sum_N_tr,Nconstituents),source=0.0_pReal) + allocate(dst%tau_r_tr (prm%sum_N_tr,Nconstituents),source=0.0_pReal) + allocate(dst%V_tr (prm%sum_N_tr,Nconstituents),source=0.0_pReal) plasticState(p)%state0 = plasticState(p)%state ! ToDo: this could be done centrally diff --git a/src/constitutive_plastic_isotropic.f90 b/src/constitutive_plastic_isotropic.f90 index 1d26fc54c..db418663f 100644 --- a/src/constitutive_plastic_isotropic.f90 +++ b/src/constitutive_plastic_isotropic.f90 @@ -53,10 +53,10 @@ module function plastic_isotropic_init() result(myPlasticity) logical, dimension(:), allocatable :: myPlasticity integer :: & - Ninstance, & + Ninstances, & p, & i, & - NipcMyPhase, & + Nconstituents, & sizeState, sizeDotState real(pReal) :: & xi_0 !< initial critical stress @@ -70,16 +70,16 @@ module function plastic_isotropic_init() result(myPlasticity) print'(/,a)', ' <<<+- plastic_isotropic init -+>>>' myPlasticity = plastic_active('isotropic') - Ninstance = count(myPlasticity) - print'(a,i2)', ' # instances: ',Ninstance; flush(IO_STDOUT) - if(Ninstance == 0) return + Ninstances = count(myPlasticity) + print'(a,i2)', ' # instances: ',Ninstances; flush(IO_STDOUT) + if(Ninstances == 0) return print*, 'Maiti and Eisenlohr, Scripta Materialia 145:37–40, 2018' print*, 'https://doi.org/10.1016/j.scriptamat.2017.09.047' - allocate(param(Ninstance)) - allocate(state(Ninstance)) - allocate(dotState(Ninstance)) + allocate(param(Ninstances)) + allocate(state(Ninstances)) + allocate(dotState(Ninstances)) phases => config_material%get('phase') i = 0 @@ -130,11 +130,11 @@ module function plastic_isotropic_init() result(myPlasticity) !-------------------------------------------------------------------------------------------------- ! allocate state arrays - NipcMyPhase = count(material_phaseAt == p) * discretization_nIPs + Nconstituents = count(material_phaseAt == p) * discretization_nIPs sizeDotState = size(['xi ','gamma']) sizeState = sizeDotState - call constitutive_allocateState(plasticState(p),NipcMyPhase,sizeState,sizeDotState,0) + call constitutive_allocateState(plasticState(p),Nconstituents,sizeState,sizeDotState,0) !-------------------------------------------------------------------------------------------------- ! state aliases and initialization diff --git a/src/constitutive_plastic_kinehardening.f90 b/src/constitutive_plastic_kinehardening.f90 index 65c92423c..3faf7dc41 100644 --- a/src/constitutive_plastic_kinehardening.f90 +++ b/src/constitutive_plastic_kinehardening.f90 @@ -62,9 +62,9 @@ module function plastic_kinehardening_init() result(myPlasticity) logical, dimension(:), allocatable :: myPlasticity integer :: & - Ninstance, & + Ninstances, & p, i, o, & - NipcMyPhase, & + Nconstituents, & sizeState, sizeDeltaState, sizeDotState, & startIndex, endIndex integer, dimension(:), allocatable :: & @@ -82,14 +82,14 @@ module function plastic_kinehardening_init() result(myPlasticity) print'(/,a)', ' <<<+- plastic_kinehardening init -+>>>' myPlasticity = plastic_active('kinehardening') - Ninstance = count(myPlasticity) - print'(a,i2)', ' # instances: ',Ninstance; flush(IO_STDOUT) - if(Ninstance == 0) return + Ninstances = count(myPlasticity) + print'(a,i2)', ' # instances: ',Ninstances; flush(IO_STDOUT) + if(Ninstances == 0) return - allocate(param(Ninstance)) - allocate(state(Ninstance)) - allocate(dotState(Ninstance)) - allocate(deltaState(Ninstance)) + allocate(param(Ninstances)) + allocate(state(Ninstances)) + allocate(dotState(Ninstances)) + allocate(deltaState(Ninstances)) phases => config_material%get('phase') i = 0 @@ -174,19 +174,19 @@ module function plastic_kinehardening_init() result(myPlasticity) !-------------------------------------------------------------------------------------------------- ! allocate state arrays - NipcMyPhase = count(material_phaseAt == p) * discretization_nIPs + Nconstituents = count(material_phaseAt == p) * discretization_nIPs sizeDotState = size(['crss ','crss_back', 'accshear ']) * prm%sum_N_sl!ToDo: adjust names, ask Philip sizeDeltaState = size(['sense ', 'chi0 ', 'gamma0' ]) * prm%sum_N_sl !ToDo: adjust names sizeState = sizeDotState + sizeDeltaState - call constitutive_allocateState(plasticState(p),NipcMyPhase,sizeState,sizeDotState,sizeDeltaState) + call constitutive_allocateState(plasticState(p),Nconstituents,sizeState,sizeDotState,sizeDeltaState) !-------------------------------------------------------------------------------------------------- ! state aliases and initialization startIndex = 1 endIndex = prm%sum_N_sl stt%crss => plasticState(p)%state (startIndex:endIndex,:) - stt%crss = spread(xi_0, 2, NipcMyPhase) + stt%crss = spread(xi_0, 2, Nconstituents) dot%crss => plasticState(p)%dotState(startIndex:endIndex,:) plasticState(p)%atol(startIndex:endIndex) = pl%get_asFloat('atol_xi',defaultVal=1.0_pReal) if(any(plasticState(p)%atol(startIndex:endIndex) < 0.0_pReal)) extmsg = trim(extmsg)//' atol_xi' diff --git a/src/constitutive_plastic_none.f90 b/src/constitutive_plastic_none.f90 index cf2942414..923ae354a 100644 --- a/src/constitutive_plastic_none.f90 +++ b/src/constitutive_plastic_none.f90 @@ -16,9 +16,9 @@ module function plastic_none_init() result(myPlasticity) logical, dimension(:), allocatable :: myPlasticity integer :: & - Ninstance, & + Ninstances, & p, & - NipcMyPhase + Nconstituents class(tNode), pointer :: & phases, & phase, & @@ -34,15 +34,15 @@ module function plastic_none_init() result(myPlasticity) if(pl%get_asString('type') == 'none') myPlasticity(p) = .true. enddo - Ninstance = count(myPlasticity) - print'(a,i2)', ' # instances: ',Ninstance; flush(IO_STDOUT) - if(Ninstance == 0) return + Ninstances = count(myPlasticity) + print'(a,i2)', ' # instances: ',Ninstances; flush(IO_STDOUT) + if(Ninstances == 0) return do p = 1, phases%length phase => phases%get(p) if(.not. myPlasticity(p)) cycle - NipcMyPhase = count(material_phaseAt == p) * discretization_nIPs - call constitutive_allocateState(plasticState(p),NipcMyPhase,0,0,0) + Nconstituents = count(material_phaseAt == p) * discretization_nIPs + call constitutive_allocateState(plasticState(p),Nconstituents,0,0,0) enddo end function plastic_none_init diff --git a/src/constitutive_plastic_nonlocal.f90 b/src/constitutive_plastic_nonlocal.f90 index a860b21da..472415ba9 100644 --- a/src/constitutive_plastic_nonlocal.f90 +++ b/src/constitutive_plastic_nonlocal.f90 @@ -153,7 +153,7 @@ submodule(constitutive:constitutive_plastic) plastic_nonlocal state, & state0 - type(tParameters), dimension(:), allocatable :: param !< containers of constitutive parameters (len Ninstance) + type(tParameters), dimension(:), allocatable :: param !< containers of constitutive parameters (len Ninstances) type(tNonlocalMicrostructure), dimension(:), allocatable :: microstructure @@ -168,9 +168,9 @@ module function plastic_nonlocal_init() result(myPlasticity) logical, dimension(:), allocatable :: myPlasticity integer :: & - Ninstance, & + Ninstances, & p, i, & - NipcMyPhase, & + Nconstituents, & sizeState, sizeDotState, sizeDependentState, sizeDeltaState, & s1, s2, & s, t, l @@ -188,9 +188,9 @@ module function plastic_nonlocal_init() result(myPlasticity) print'(/,a)', ' <<<+- plastic_nonlocal init -+>>>' myPlasticity = plastic_active('nonlocal') - Ninstance = count(myPlasticity) - print'(a,i2)', ' # instances: ',Ninstance; flush(IO_STDOUT) - if(Ninstance == 0) then + Ninstances = count(myPlasticity) + print'(a,i2)', ' # instances: ',Ninstances; flush(IO_STDOUT) + if(Ninstances == 0) then call geometry_plastic_nonlocal_disable return endif @@ -201,12 +201,12 @@ module function plastic_nonlocal_init() result(myPlasticity) print*, 'Kords, Dissertation RWTH Aachen, 2014' print*, 'http://publications.rwth-aachen.de/record/229993' - allocate(param(Ninstance)) - allocate(state(Ninstance)) - allocate(state0(Ninstance)) - allocate(dotState(Ninstance)) - allocate(deltaState(Ninstance)) - allocate(microstructure(Ninstance)) + allocate(param(Ninstances)) + allocate(state(Ninstances)) + allocate(state0(Ninstances)) + allocate(dotState(Ninstances)) + allocate(deltaState(Ninstances)) + allocate(microstructure(Ninstances)) phases => config_material%get('phase') i = 0 @@ -391,7 +391,7 @@ module function plastic_nonlocal_init() result(myPlasticity) !-------------------------------------------------------------------------------------------------- ! allocate state arrays - NipcMyPhase = count(material_phaseAt==p) * discretization_nIPs + Nconstituents = count(material_phaseAt==p) * discretization_nIPs sizeDotState = size([ 'rhoSglEdgePosMobile ','rhoSglEdgeNegMobile ', & 'rhoSglScrewPosMobile ','rhoSglScrewNegMobile ', & 'rhoSglEdgePosImmobile ','rhoSglEdgeNegImmobile ', & @@ -405,7 +405,7 @@ module function plastic_nonlocal_init() result(myPlasticity) 'maxDipoleHeightEdge ','maxDipoleHeightScrew' ]) * prm%sum_N_sl !< other dependent state variables that are not updated by microstructure sizeDeltaState = sizeDotState - call constitutive_allocateState(plasticState(p),NipcMyPhase,sizeState,sizeDotState,sizeDeltaState) + call constitutive_allocateState(plasticState(p),Nconstituents,sizeState,sizeDotState,sizeDeltaState) plasticState(p)%nonlocal = pl%get_asBool('nonlocal') if(plasticState(p)%nonlocal .and. .not. allocated(IPneighborhood)) & @@ -476,26 +476,26 @@ module function plastic_nonlocal_init() result(myPlasticity) dot%rho_dip_scr => plasticState(p)%dotState (9*prm%sum_N_sl+1:10*prm%sum_N_sl,:) del%rho_dip_scr => plasticState(p)%deltaState (9*prm%sum_N_sl+1:10*prm%sum_N_sl,:) - stt%gamma => plasticState(p)%state (10*prm%sum_N_sl + 1:11*prm%sum_N_sl,1:NipcMyPhase) - dot%gamma => plasticState(p)%dotState (10*prm%sum_N_sl + 1:11*prm%sum_N_sl,1:NipcMyPhase) - del%gamma => plasticState(p)%deltaState (10*prm%sum_N_sl + 1:11*prm%sum_N_sl,1:NipcMyPhase) + stt%gamma => plasticState(p)%state (10*prm%sum_N_sl + 1:11*prm%sum_N_sl,1:Nconstituents) + dot%gamma => plasticState(p)%dotState (10*prm%sum_N_sl + 1:11*prm%sum_N_sl,1:Nconstituents) + del%gamma => plasticState(p)%deltaState (10*prm%sum_N_sl + 1:11*prm%sum_N_sl,1:Nconstituents) plasticState(p)%atol(10*prm%sum_N_sl+1:11*prm%sum_N_sl ) = pl%get_asFloat('atol_gamma', defaultVal = 1.0e-2_pReal) if(any(plasticState(p)%atol(10*prm%sum_N_sl+1:11*prm%sum_N_sl) < 0.0_pReal)) & extmsg = trim(extmsg)//' atol_gamma' - plasticState(p)%slipRate => plasticState(p)%dotState (10*prm%sum_N_sl + 1:11*prm%sum_N_sl,1:NipcMyPhase) + plasticState(p)%slipRate => plasticState(p)%dotState (10*prm%sum_N_sl + 1:11*prm%sum_N_sl,1:Nconstituents) - stt%rho_forest => plasticState(p)%state (11*prm%sum_N_sl + 1:12*prm%sum_N_sl,1:NipcMyPhase) - stt%v => plasticState(p)%state (12*prm%sum_N_sl + 1:16*prm%sum_N_sl,1:NipcMyPhase) - stt%v_edg_pos => plasticState(p)%state (12*prm%sum_N_sl + 1:13*prm%sum_N_sl,1:NipcMyPhase) - stt%v_edg_neg => plasticState(p)%state (13*prm%sum_N_sl + 1:14*prm%sum_N_sl,1:NipcMyPhase) - stt%v_scr_pos => plasticState(p)%state (14*prm%sum_N_sl + 1:15*prm%sum_N_sl,1:NipcMyPhase) - stt%v_scr_neg => plasticState(p)%state (15*prm%sum_N_sl + 1:16*prm%sum_N_sl,1:NipcMyPhase) + stt%rho_forest => plasticState(p)%state (11*prm%sum_N_sl + 1:12*prm%sum_N_sl,1:Nconstituents) + stt%v => plasticState(p)%state (12*prm%sum_N_sl + 1:16*prm%sum_N_sl,1:Nconstituents) + stt%v_edg_pos => plasticState(p)%state (12*prm%sum_N_sl + 1:13*prm%sum_N_sl,1:Nconstituents) + stt%v_edg_neg => plasticState(p)%state (13*prm%sum_N_sl + 1:14*prm%sum_N_sl,1:Nconstituents) + stt%v_scr_pos => plasticState(p)%state (14*prm%sum_N_sl + 1:15*prm%sum_N_sl,1:Nconstituents) + stt%v_scr_neg => plasticState(p)%state (15*prm%sum_N_sl + 1:16*prm%sum_N_sl,1:Nconstituents) - allocate(dst%tau_pass(prm%sum_N_sl,NipcMyPhase),source=0.0_pReal) - allocate(dst%tau_back(prm%sum_N_sl,NipcMyPhase),source=0.0_pReal) + allocate(dst%tau_pass(prm%sum_N_sl,Nconstituents),source=0.0_pReal) + allocate(dst%tau_back(prm%sum_N_sl,Nconstituents),source=0.0_pReal) end associate - if (NipcMyPhase > 0) call stateInit(ini,p,NipcMyPhase,i) + if (Nconstituents > 0) call stateInit(ini,p,Nconstituents,i) plasticState(p)%state0 = plasticState(p)%state !-------------------------------------------------------------------------------------------------- @@ -508,9 +508,9 @@ module function plastic_nonlocal_init() result(myPlasticity) discretization_nIPs,discretization_Nelems), source=0.0_pReal) ! BEGIN DEPRECATED---------------------------------------------------------------------------------- - allocate(iRhoU(maxval(param%sum_N_sl),4,Ninstance), source=0) - allocate(iV(maxval(param%sum_N_sl),4,Ninstance), source=0) - allocate(iD(maxval(param%sum_N_sl),2,Ninstance), source=0) + allocate(iRhoU(maxval(param%sum_N_sl),4,Ninstances), source=0) + allocate(iV(maxval(param%sum_N_sl),4,Ninstances), source=0) + allocate(iD(maxval(param%sum_N_sl),2,Ninstances), source=0) i = 0 do p = 1, phases%length @@ -519,7 +519,7 @@ module function plastic_nonlocal_init() result(myPlasticity) if(.not. myPlasticity(p)) cycle i = i + 1 - NipcMyPhase = count(material_phaseAt==p) * discretization_nIPs + Nconstituents = count(material_phaseAt==p) * discretization_nIPs l = 0 do t = 1,4 do s = 1,param(i)%sum_N_sl @@ -1601,13 +1601,13 @@ end subroutine plastic_nonlocal_results !-------------------------------------------------------------------------------------------------- !> @brief populates the initial dislocation density !-------------------------------------------------------------------------------------------------- -subroutine stateInit(ini,phase,NipcMyPhase,instance) +subroutine stateInit(ini,phase,Nconstituents,instance) type(tInitialParameters) :: & ini integer,intent(in) :: & phase, & - NipcMyPhase, & + Nconstituents, & instance integer :: & e, & @@ -1625,7 +1625,7 @@ subroutine stateInit(ini,phase,NipcMyPhase,instance) totalVolume, & densityBinning, & minimumIpVolume - real(pReal), dimension(NipcMyPhase) :: & + real(pReal), dimension(Nconstituents) :: & volume @@ -1645,13 +1645,13 @@ subroutine stateInit(ini,phase,NipcMyPhase,instance) meanDensity = 0.0_pReal do while(meanDensity < ini%random_rho_u) call random_number(rnd) - phasemember = nint(rnd(1)*real(NipcMyPhase,pReal) + 0.5_pReal) + phasemember = nint(rnd(1)*real(Nconstituents,pReal) + 0.5_pReal) s = nint(rnd(2)*real(sum(ini%N_sl),pReal)*4.0_pReal + 0.5_pReal) meanDensity = meanDensity + densityBinning * volume(phasemember) / totalVolume stt%rhoSglMobile(s,phasemember) = densityBinning enddo else ! homogeneous distribution with noise - do e = 1, NipcMyPhase + do e = 1, Nconstituents do f = 1,size(ini%N_sl,1) from = 1 + sum(ini%N_sl(1:f-1)) upto = sum(ini%N_sl(1:f)) diff --git a/src/constitutive_plastic_phenopowerlaw.f90 b/src/constitutive_plastic_phenopowerlaw.f90 index 50c8e835a..72fa0e9e6 100644 --- a/src/constitutive_plastic_phenopowerlaw.f90 +++ b/src/constitutive_plastic_phenopowerlaw.f90 @@ -70,9 +70,9 @@ module function plastic_phenopowerlaw_init() result(myPlasticity) logical, dimension(:), allocatable :: myPlasticity integer :: & - Ninstance, & + Ninstances, & p, i, & - NipcMyPhase, & + Nconstituents, & sizeState, sizeDotState, & startIndex, endIndex integer, dimension(:), allocatable :: & @@ -91,13 +91,13 @@ module function plastic_phenopowerlaw_init() result(myPlasticity) print'(/,a)', ' <<<+- plastic_phenopowerlaw init -+>>>' myPlasticity = plastic_active('phenopowerlaw') - Ninstance = count(myPlasticity) - print'(a,i2)', ' # instances: ',Ninstance; flush(IO_STDOUT) - if(Ninstance == 0) return + Ninstances = count(myPlasticity) + print'(a,i2)', ' # instances: ',Ninstances; flush(IO_STDOUT) + if(Ninstances == 0) return - allocate(param(Ninstance)) - allocate(state(Ninstance)) - allocate(dotState(Ninstance)) + allocate(param(Ninstances)) + allocate(state(Ninstances)) + allocate(dotState(Ninstances)) phases => config_material%get('phase') i = 0 @@ -224,20 +224,20 @@ module function plastic_phenopowerlaw_init() result(myPlasticity) !-------------------------------------------------------------------------------------------------- ! allocate state arrays - NipcMyPhase = count(material_phaseAt == p) * discretization_nIPs + Nconstituents = count(material_phaseAt == p) * discretization_nIPs sizeDotState = size(['xi_sl ','gamma_sl']) * prm%sum_N_sl & + size(['xi_tw ','gamma_tw']) * prm%sum_N_tw sizeState = sizeDotState - call constitutive_allocateState(plasticState(p),NipcMyPhase,sizeState,sizeDotState,0) + call constitutive_allocateState(plasticState(p),Nconstituents,sizeState,sizeDotState,0) !-------------------------------------------------------------------------------------------------- ! state aliases and initialization startIndex = 1 endIndex = prm%sum_N_sl stt%xi_slip => plasticState(p)%state (startIndex:endIndex,:) - stt%xi_slip = spread(xi_0_sl, 2, NipcMyPhase) + stt%xi_slip = spread(xi_0_sl, 2, Nconstituents) dot%xi_slip => plasticState(p)%dotState(startIndex:endIndex,:) plasticState(p)%atol(startIndex:endIndex) = pl%get_asFloat('atol_xi',defaultVal=1.0_pReal) if(any(plasticState(p)%atol(startIndex:endIndex) < 0.0_pReal)) extmsg = trim(extmsg)//' atol_xi' @@ -245,7 +245,7 @@ module function plastic_phenopowerlaw_init() result(myPlasticity) startIndex = endIndex + 1 endIndex = endIndex + prm%sum_N_tw stt%xi_twin => plasticState(p)%state (startIndex:endIndex,:) - stt%xi_twin = spread(xi_0_tw, 2, NipcMyPhase) + stt%xi_twin = spread(xi_0_tw, 2, Nconstituents) dot%xi_twin => plasticState(p)%dotState(startIndex:endIndex,:) plasticState(p)%atol(startIndex:endIndex) = pl%get_asFloat('atol_xi',defaultVal=1.0_pReal) if(any(plasticState(p)%atol(startIndex:endIndex) < 0.0_pReal)) extmsg = trim(extmsg)//' atol_xi' diff --git a/src/damage_local.f90 b/src/damage_local.f90 index fefdffce2..e63db90b0 100644 --- a/src/damage_local.f90 +++ b/src/damage_local.f90 @@ -42,7 +42,7 @@ contains !-------------------------------------------------------------------------------------------------- subroutine damage_local_init - integer :: Ninstance,NofMyHomog,h + integer :: Ninstances,Nmaterialpoints,h class(tNode), pointer :: & num_generic, & material_homogenization, & @@ -57,8 +57,8 @@ subroutine damage_local_init num%residualStiffness = num_generic%get_asFloat('residualStiffness', defaultVal=1.0e-6_pReal) if (num%residualStiffness < 0.0_pReal) call IO_error(301,ext_msg='residualStiffness') - Ninstance = count(damage_type == DAMAGE_local_ID) - allocate(param(Ninstance)) + Ninstances = count(damage_type == DAMAGE_local_ID) + allocate(param(Ninstances)) material_homogenization => config_material%get('homogenization') do h = 1, material_homogenization%length @@ -73,11 +73,11 @@ subroutine damage_local_init prm%output = homogDamage%get_asStrings('output',defaultVal=emptyStringArray) #endif - NofMyHomog = count(material_homogenizationAt == h) + Nmaterialpoints = count(material_homogenizationAt == h) damageState(h)%sizeState = 1 - allocate(damageState(h)%state0 (1,NofMyHomog), source=damage_initialPhi(h)) - allocate(damageState(h)%subState0(1,NofMyHomog), source=damage_initialPhi(h)) - allocate(damageState(h)%state (1,NofMyHomog), source=damage_initialPhi(h)) + allocate(damageState(h)%state0 (1,Nmaterialpoints), source=damage_initialPhi(h)) + allocate(damageState(h)%subState0(1,Nmaterialpoints), source=damage_initialPhi(h)) + allocate(damageState(h)%state (1,Nmaterialpoints), source=damage_initialPhi(h)) nullify(damageMapping(h)%p) damageMapping(h)%p => material_homogenizationMemberAt diff --git a/src/damage_none.f90 b/src/damage_none.f90 index 52100707e..2279bc06b 100644 --- a/src/damage_none.f90 +++ b/src/damage_none.f90 @@ -16,18 +16,18 @@ contains !-------------------------------------------------------------------------------------------------- subroutine damage_none_init - integer :: h,NofMyHomog + integer :: h,Nmaterialpoints print'(/,a)', ' <<<+- damage_none init -+>>>'; flush(6) do h = 1, size(material_name_homogenization) if (damage_type(h) /= DAMAGE_NONE_ID) cycle - NofMyHomog = count(material_homogenizationAt == h) + Nmaterialpoints = count(material_homogenizationAt == h) damageState(h)%sizeState = 0 - allocate(damageState(h)%state0 (0,NofMyHomog)) - allocate(damageState(h)%subState0(0,NofMyHomog)) - allocate(damageState(h)%state (0,NofMyHomog)) + allocate(damageState(h)%state0 (0,Nmaterialpoints)) + allocate(damageState(h)%subState0(0,Nmaterialpoints)) + allocate(damageState(h)%state (0,Nmaterialpoints)) deallocate(damage(h)%p) allocate (damage(h)%p(1), source=damage_initialPhi(h)) diff --git a/src/damage_nonlocal.f90 b/src/damage_nonlocal.f90 index 8b494678e..24a51cf54 100644 --- a/src/damage_nonlocal.f90 +++ b/src/damage_nonlocal.f90 @@ -46,7 +46,7 @@ contains !-------------------------------------------------------------------------------------------------- subroutine damage_nonlocal_init - integer :: Ninstance,NofMyHomog,h + integer :: Ninstances,Nmaterialpoints,h class(tNode), pointer :: & num_generic, & material_homogenization, & @@ -60,8 +60,8 @@ subroutine damage_nonlocal_init num_generic => config_numerics%get('generic',defaultVal= emptyDict) num%charLength = num_generic%get_asFloat('charLength',defaultVal=1.0_pReal) - Ninstance = count(damage_type == DAMAGE_nonlocal_ID) - allocate(param(Ninstance)) + Ninstances = count(damage_type == DAMAGE_nonlocal_ID) + allocate(param(Ninstances)) material_homogenization => config_material%get('homogenization') do h = 1, material_homogenization%length @@ -76,11 +76,11 @@ subroutine damage_nonlocal_init prm%output = homogDamage%get_asStrings('output',defaultVal=emptyStringArray) #endif - NofMyHomog = count(material_homogenizationAt == h) + Nmaterialpoints = count(material_homogenizationAt == h) damageState(h)%sizeState = 1 - allocate(damageState(h)%state0 (1,NofMyHomog), source=damage_initialPhi(h)) - allocate(damageState(h)%subState0(1,NofMyHomog), source=damage_initialPhi(h)) - allocate(damageState(h)%state (1,NofMyHomog), source=damage_initialPhi(h)) + allocate(damageState(h)%state0 (1,Nmaterialpoints), source=damage_initialPhi(h)) + allocate(damageState(h)%subState0(1,Nmaterialpoints), source=damage_initialPhi(h)) + allocate(damageState(h)%state (1,Nmaterialpoints), source=damage_initialPhi(h)) nullify(damageMapping(h)%p) damageMapping(h)%p => material_homogenizationMemberAt diff --git a/src/homogenization_mech_RGC.f90 b/src/homogenization_mech_RGC.f90 index 1a0f7a5d3..5fcea1f8d 100644 --- a/src/homogenization_mech_RGC.f90 +++ b/src/homogenization_mech_RGC.f90 @@ -81,9 +81,9 @@ module subroutine mech_RGC_init(num_homogMech) num_homogMech !< pointer to mechanical homogenization numerics data integer :: & - Ninstance, & + Ninstances, & h, & - NofMyHomog, & + Nmaterialpoints, & sizeState, nIntFaceTot class (tNode), pointer :: & @@ -94,8 +94,8 @@ module subroutine mech_RGC_init(num_homogMech) print'(/,a)', ' <<<+- homogenization_mech_rgc init -+>>>' - Ninstance = count(homogenization_type == HOMOGENIZATION_RGC_ID) - print'(a,i2)', ' # instances: ',Ninstance; flush(IO_STDOUT) + Ninstances = count(homogenization_type == HOMOGENIZATION_RGC_ID) + print'(a,i2)', ' # instances: ',Ninstances; flush(IO_STDOUT) print*, 'Tjahjanto et al., International Journal of Material Forming 2(1):939–942, 2009' print*, 'https://doi.org/10.1007/s12289-009-0619-1'//IO_EOL @@ -105,10 +105,10 @@ module subroutine mech_RGC_init(num_homogMech) - allocate(param(Ninstance)) - allocate(state(Ninstance)) - allocate(state0(Ninstance)) - allocate(dependentState(Ninstance)) + allocate(param(Ninstances)) + allocate(state(Ninstances)) + allocate(state0(Ninstances)) + allocate(dependentState(Ninstances)) num_RGC => num_homogMech%get('RGC',defaultVal=emptyDict) @@ -173,7 +173,7 @@ module subroutine mech_RGC_init(num_homogMech) prm%D_alpha = homogMech%get_asFloats('D_alpha', requiredSize=3) prm%a_g = homogMech%get_asFloats('a_g', requiredSize=3) - NofMyHomog = count(material_homogenizationAt == h) + Nmaterialpoints = count(material_homogenizationAt == h) nIntFaceTot = 3*( (prm%N_constituents(1)-1)*prm%N_constituents(2)*prm%N_constituents(3) & + prm%N_constituents(1)*(prm%N_constituents(2)-1)*prm%N_constituents(3) & + prm%N_constituents(1)*prm%N_constituents(2)*(prm%N_constituents(3)-1)) @@ -181,24 +181,24 @@ module subroutine mech_RGC_init(num_homogMech) + size(['avg constitutive work ','average penalty energy']) homogState(h)%sizeState = sizeState - allocate(homogState(h)%state0 (sizeState,NofMyHomog), source=0.0_pReal) - allocate(homogState(h)%subState0(sizeState,NofMyHomog), source=0.0_pReal) - allocate(homogState(h)%state (sizeState,NofMyHomog), source=0.0_pReal) + allocate(homogState(h)%state0 (sizeState,Nmaterialpoints), source=0.0_pReal) + allocate(homogState(h)%subState0(sizeState,Nmaterialpoints), source=0.0_pReal) + allocate(homogState(h)%state (sizeState,Nmaterialpoints), source=0.0_pReal) stt%relaxationVector => homogState(h)%state(1:nIntFaceTot,:) st0%relaxationVector => homogState(h)%state0(1:nIntFaceTot,:) stt%work => homogState(h)%state(nIntFaceTot+1,:) stt%penaltyEnergy => homogState(h)%state(nIntFaceTot+2,:) - allocate(dst%volumeDiscrepancy( NofMyHomog), source=0.0_pReal) - allocate(dst%relaxationRate_avg( NofMyHomog), source=0.0_pReal) - allocate(dst%relaxationRate_max( NofMyHomog), source=0.0_pReal) - allocate(dst%mismatch( 3,NofMyHomog), source=0.0_pReal) + allocate(dst%volumeDiscrepancy( Nmaterialpoints), source=0.0_pReal) + allocate(dst%relaxationRate_avg( Nmaterialpoints), source=0.0_pReal) + allocate(dst%relaxationRate_max( Nmaterialpoints), source=0.0_pReal) + allocate(dst%mismatch( 3,Nmaterialpoints), source=0.0_pReal) !-------------------------------------------------------------------------------------------------- ! assigning cluster orientations - dependentState(homogenization_typeInstance(h))%orientation = spread(eu2om(prm%a_g*inRad),3,NofMyHomog) - !dst%orientation = spread(eu2om(prm%a_g*inRad),3,NofMyHomog) ifort version 18.0.1 crashes (for whatever reason) + dependentState(homogenization_typeInstance(h))%orientation = spread(eu2om(prm%a_g*inRad),3,Nmaterialpoints) + !dst%orientation = spread(eu2om(prm%a_g*inRad),3,Nmaterialpoints) ifort version 18.0.1 crashes (for whatever reason) end associate diff --git a/src/homogenization_mech_isostrain.f90 b/src/homogenization_mech_isostrain.f90 index 7f3724ae1..994c1b410 100644 --- a/src/homogenization_mech_isostrain.f90 +++ b/src/homogenization_mech_isostrain.f90 @@ -18,7 +18,7 @@ submodule(homogenization) homogenization_mech_isostrain mapping end type - type(tParameters), dimension(:), allocatable :: param !< containers of constitutive parameters (len Ninstance) + type(tParameters), dimension(:), allocatable :: param !< containers of constitutive parameters (len Ninstances) contains @@ -29,9 +29,9 @@ contains module subroutine mech_isostrain_init integer :: & - Ninstance, & + Ninstances, & h, & - NofMyHomog + Nmaterialpoints class(tNode), pointer :: & material_homogenization, & homog, & @@ -39,10 +39,10 @@ module subroutine mech_isostrain_init print'(/,a)', ' <<<+- homogenization_mech_isostrain init -+>>>' - Ninstance = count(homogenization_type == HOMOGENIZATION_ISOSTRAIN_ID) - print'(a,i2)', ' # instances: ',Ninstance; flush(IO_STDOUT) + Ninstances = count(homogenization_type == HOMOGENIZATION_ISOSTRAIN_ID) + print'(a,i2)', ' # instances: ',Ninstances; flush(IO_STDOUT) - allocate(param(Ninstance)) ! one container of parameters per instance + allocate(param(Ninstances)) ! one container of parameters per instance material_homogenization => config_material%get('homogenization') do h = 1, size(homogenization_type) @@ -61,11 +61,11 @@ module subroutine mech_isostrain_init call IO_error(211,ext_msg='sum'//' (mech_isostrain)') end select - NofMyHomog = count(material_homogenizationAt == h) + Nmaterialpoints = count(material_homogenizationAt == h) homogState(h)%sizeState = 0 - allocate(homogState(h)%state0 (0,NofMyHomog)) - allocate(homogState(h)%subState0(0,NofMyHomog)) - allocate(homogState(h)%state (0,NofMyHomog)) + allocate(homogState(h)%state0 (0,Nmaterialpoints)) + allocate(homogState(h)%subState0(0,Nmaterialpoints)) + allocate(homogState(h)%state (0,Nmaterialpoints)) end associate diff --git a/src/homogenization_mech_none.f90 b/src/homogenization_mech_none.f90 index 80949010e..5b12247cd 100644 --- a/src/homogenization_mech_none.f90 +++ b/src/homogenization_mech_none.f90 @@ -14,14 +14,14 @@ contains module subroutine mech_none_init integer :: & - Ninstance, & + Ninstances, & h, & - NofMyHomog + Nmaterialpoints print'(/,a)', ' <<<+- homogenization_mech_none init -+>>>' - Ninstance = count(homogenization_type == HOMOGENIZATION_NONE_ID) - print'(a,i2)', ' # instances: ',Ninstance; flush(IO_STDOUT) + Ninstances = count(homogenization_type == HOMOGENIZATION_NONE_ID) + print'(a,i2)', ' # instances: ',Ninstances; flush(IO_STDOUT) do h = 1, size(homogenization_type) if(homogenization_type(h) /= HOMOGENIZATION_NONE_ID) cycle @@ -29,11 +29,11 @@ module subroutine mech_none_init if(homogenization_Nconstituents(h) /= 1) & call IO_error(211,ext_msg='N_constituents (mech_none)') - NofMyHomog = count(material_homogenizationAt == h) + Nmaterialpoints = count(material_homogenizationAt == h) homogState(h)%sizeState = 0 - allocate(homogState(h)%state0 (0,NofMyHomog)) - allocate(homogState(h)%subState0(0,NofMyHomog)) - allocate(homogState(h)%state (0,NofMyHomog)) + allocate(homogState(h)%state0 (0,Nmaterialpoints)) + allocate(homogState(h)%subState0(0,Nmaterialpoints)) + allocate(homogState(h)%state (0,Nmaterialpoints)) enddo diff --git a/src/kinematics_cleavage_opening.f90 b/src/kinematics_cleavage_opening.f90 index d52fdbc1c..44bbcb4f4 100644 --- a/src/kinematics_cleavage_opening.f90 +++ b/src/kinematics_cleavage_opening.f90 @@ -20,7 +20,7 @@ submodule(constitutive:constitutive_damage) kinematics_cleavage_opening cleavage_systems end type tParameters - type(tParameters), dimension(:), allocatable :: param !< containers of constitutive parameters (len Ninstance) + type(tParameters), dimension(:), allocatable :: param !< containers of constitutive parameters (len Ninstances) contains @@ -35,7 +35,7 @@ module function kinematics_cleavage_opening_init(kinematics_length) result(myKin integer, intent(in) :: kinematics_length logical, dimension(:,:), allocatable :: myKinematics - integer :: Ninstance,p,k + integer :: Ninstances,p,k integer, dimension(:), allocatable :: N_cl !< active number of cleavage systems per family character(len=pStringLen) :: extmsg = '' class(tNode), pointer :: & @@ -48,12 +48,12 @@ module function kinematics_cleavage_opening_init(kinematics_length) result(myKin print'(/,a)', ' <<<+- kinematics_cleavage_opening init -+>>>' myKinematics = kinematics_active('cleavage_opening',kinematics_length) - Ninstance = count(myKinematics) - print'(a,i2)', ' # instances: ',Ninstance; flush(IO_STDOUT) - if(Ninstance == 0) return + Ninstances = count(myKinematics) + print'(a,i2)', ' # instances: ',Ninstances; flush(IO_STDOUT) + if(Ninstances == 0) return phases => config_material%get('phase') - allocate(param(Ninstance)) + allocate(param(Ninstances)) allocate(kinematics_cleavage_opening_instance(phases%length), source=0) do p = 1, phases%length diff --git a/src/kinematics_slipplane_opening.f90 b/src/kinematics_slipplane_opening.f90 index e0de5e181..ea8f51427 100644 --- a/src/kinematics_slipplane_opening.f90 +++ b/src/kinematics_slipplane_opening.f90 @@ -22,7 +22,7 @@ submodule(constitutive:constitutive_damage) kinematics_slipplane_opening P_n end type tParameters - type(tParameters), dimension(:), allocatable :: param !< containers of constitutive parameters (len Ninstance) + type(tParameters), dimension(:), allocatable :: param !< containers of constitutive parameters (len Ninstances) contains @@ -37,7 +37,7 @@ module function kinematics_slipplane_opening_init(kinematics_length) result(myKi integer, intent(in) :: kinematics_length logical, dimension(:,:), allocatable :: myKinematics - integer :: Ninstance,p,i,k + integer :: Ninstances,p,i,k character(len=pStringLen) :: extmsg = '' integer, dimension(:), allocatable :: N_sl real(pReal), dimension(:,:), allocatable :: d,n,t @@ -51,13 +51,13 @@ module function kinematics_slipplane_opening_init(kinematics_length) result(myKi print'(/,a)', ' <<<+- kinematics_slipplane init -+>>>' myKinematics = kinematics_active('slipplane_opening',kinematics_length) - Ninstance = count(myKinematics) - print'(a,i2)', ' # instances: ',Ninstance; flush(IO_STDOUT) - if(Ninstance == 0) return + Ninstances = count(myKinematics) + print'(a,i2)', ' # instances: ',Ninstances; flush(IO_STDOUT) + if(Ninstances == 0) return phases => config_material%get('phase') allocate(kinematics_slipplane_opening_instance(phases%length), source=0) - allocate(param(Ninstance)) + allocate(param(Ninstances)) do p = 1, phases%length if(any(myKinematics(:,p))) kinematics_slipplane_opening_instance(p) = count(myKinematics(:,1:p)) diff --git a/src/kinematics_thermal_expansion.f90 b/src/kinematics_thermal_expansion.f90 index 772f5abbf..4afde82e3 100644 --- a/src/kinematics_thermal_expansion.f90 +++ b/src/kinematics_thermal_expansion.f90 @@ -29,7 +29,7 @@ module function kinematics_thermal_expansion_init(kinematics_length) result(myKi integer, intent(in) :: kinematics_length logical, dimension(:,:), allocatable :: myKinematics - integer :: Ninstance,p,i,k + integer :: Ninstances,p,i,k real(pReal), dimension(:), allocatable :: temp class(tNode), pointer :: & phases, & @@ -41,12 +41,12 @@ module function kinematics_thermal_expansion_init(kinematics_length) result(myKi print'(/,a)', ' <<<+- kinematics_thermal_expansion init -+>>>' myKinematics = kinematics_active('thermal_expansion',kinematics_length) - Ninstance = count(myKinematics) - print'(a,i2)', ' # instances: ',Ninstance; flush(IO_STDOUT) - if(Ninstance == 0) return + Ninstances = count(myKinematics) + print'(a,i2)', ' # instances: ',Ninstances; flush(IO_STDOUT) + if(Ninstances == 0) return phases => config_material%get('phase') - allocate(param(Ninstance)) + allocate(param(Ninstances)) allocate(kinematics_thermal_expansion_instance(phases%length), source=0) do p = 1, phases%length diff --git a/src/source_damage_anisoBrittle.f90 b/src/source_damage_anisoBrittle.f90 index faeb8bd87..ca8d6ec2b 100644 --- a/src/source_damage_anisoBrittle.f90 +++ b/src/source_damage_anisoBrittle.f90 @@ -25,7 +25,7 @@ submodule (constitutive:constitutive_damage) source_damage_anisoBrittle output end type tParameters - type(tParameters), dimension(:), allocatable :: param !< containers of constitutive parameters (len Ninstance) + type(tParameters), dimension(:), allocatable :: param !< containers of constitutive parameters (len Ninstances) contains @@ -45,19 +45,19 @@ module function source_damage_anisoBrittle_init(source_length) result(mySources) phase, & sources, & src - integer :: Ninstance,sourceOffset,NipcMyPhase,p + integer :: Ninstances,sourceOffset,Nconstituents,p integer, dimension(:), allocatable :: N_cl character(len=pStringLen) :: extmsg = '' print'(/,a)', ' <<<+- source_damage_anisoBrittle init -+>>>' mySources = source_active('damage_anisoBrittle',source_length) - Ninstance = count(mySources) - print'(a,i2)', ' # instances: ',Ninstance; flush(IO_STDOUT) - if(Ninstance == 0) return + Ninstances = count(mySources) + print'(a,i2)', ' # instances: ',Ninstances; flush(IO_STDOUT) + if(Ninstances == 0) return phases => config_material%get('phase') - allocate(param(Ninstance)) + allocate(param(Ninstances)) allocate(source_damage_anisoBrittle_offset (phases%length), source=0) allocate(source_damage_anisoBrittle_instance(phases%length), source=0) @@ -100,8 +100,8 @@ module function source_damage_anisoBrittle_init(source_length) result(mySources) if (any(prm%g_crit < 0.0_pReal)) extmsg = trim(extmsg)//' g_crit' if (any(prm%s_crit < 0.0_pReal)) extmsg = trim(extmsg)//' s_crit' - NipcMyPhase = count(material_phaseAt==p) * discretization_nIPs - call constitutive_allocateState(sourceState(p)%p(sourceOffset),NipcMyPhase,1,1,0) + Nconstituents = count(material_phaseAt==p) * discretization_nIPs + call constitutive_allocateState(sourceState(p)%p(sourceOffset),Nconstituents,1,1,0) sourceState(p)%p(sourceOffset)%atol = src%get_asFloat('anisobrittle_atol',defaultVal=1.0e-3_pReal) if(any(sourceState(p)%p(sourceOffset)%atol < 0.0_pReal)) extmsg = trim(extmsg)//' anisobrittle_atol' diff --git a/src/source_damage_anisoDuctile.f90 b/src/source_damage_anisoDuctile.f90 index fd3fa38ed..2fdd46bb4 100644 --- a/src/source_damage_anisoDuctile.f90 +++ b/src/source_damage_anisoDuctile.f90 @@ -19,7 +19,7 @@ submodule(constitutive:constitutive_damage) source_damage_anisoDuctile output end type tParameters - type(tParameters), dimension(:), allocatable :: param !< containers of constitutive parameters (len Ninstance) + type(tParameters), dimension(:), allocatable :: param !< containers of constitutive parameters (len Ninstances) contains @@ -39,19 +39,19 @@ module function source_damage_anisoDuctile_init(source_length) result(mySources) pl, & sources, & src - integer :: Ninstance,sourceOffset,NipcMyPhase,p + integer :: Ninstances,sourceOffset,Nconstituents,p integer, dimension(:), allocatable :: N_sl character(len=pStringLen) :: extmsg = '' print'(/,a)', ' <<<+- source_damage_anisoDuctile init -+>>>' mySources = source_active('damage_anisoDuctile',source_length) - Ninstance = count(mySources) - print'(a,i2)', ' # instances: ',Ninstance; flush(IO_STDOUT) - if(Ninstance == 0) return + Ninstances = count(mySources) + print'(a,i2)', ' # instances: ',Ninstances; flush(IO_STDOUT) + if(Ninstances == 0) return phases => config_material%get('phase') - allocate(param(Ninstance)) + allocate(param(Ninstances)) allocate(source_damage_anisoDuctile_offset (phases%length), source=0) allocate(source_damage_anisoDuctile_instance(phases%length), source=0) @@ -84,8 +84,8 @@ module function source_damage_anisoDuctile_init(source_length) result(mySources) if (prm%q <= 0.0_pReal) extmsg = trim(extmsg)//' q' if (any(prm%gamma_crit < 0.0_pReal)) extmsg = trim(extmsg)//' gamma_crit' - NipcMyPhase=count(material_phaseAt==p) * discretization_nIPs - call constitutive_allocateState(sourceState(p)%p(sourceOffset),NipcMyPhase,1,1,0) + Nconstituents=count(material_phaseAt==p) * discretization_nIPs + call constitutive_allocateState(sourceState(p)%p(sourceOffset),Nconstituents,1,1,0) sourceState(p)%p(sourceOffset)%atol = src%get_asFloat('anisoDuctile_atol',defaultVal=1.0e-3_pReal) if(any(sourceState(p)%p(sourceOffset)%atol < 0.0_pReal)) extmsg = trim(extmsg)//' anisoductile_atol' diff --git a/src/source_damage_isoBrittle.f90 b/src/source_damage_isoBrittle.f90 index c56407c3d..7fcf17ee0 100644 --- a/src/source_damage_isoBrittle.f90 +++ b/src/source_damage_isoBrittle.f90 @@ -17,7 +17,7 @@ submodule(constitutive:constitutive_damage) source_damage_isoBrittle output end type tParameters - type(tParameters), dimension(:), allocatable :: param !< containers of constitutive parameters (len Ninstance) + type(tParameters), dimension(:), allocatable :: param !< containers of constitutive parameters (len Ninstances) contains @@ -36,18 +36,18 @@ module function source_damage_isoBrittle_init(source_length) result(mySources) phase, & sources, & src - integer :: Ninstance,sourceOffset,NipcMyPhase,p + integer :: Ninstances,sourceOffset,Nconstituents,p character(len=pStringLen) :: extmsg = '' print'(/,a)', ' <<<+- source_damage_isoBrittle init -+>>>' mySources = source_active('damage_isoBrittle',source_length) - Ninstance = count(mySources) - print'(a,i2)', ' # instances: ',Ninstance; flush(IO_STDOUT) - if(Ninstance == 0) return + Ninstances = count(mySources) + print'(a,i2)', ' # instances: ',Ninstances; flush(IO_STDOUT) + if(Ninstances == 0) return phases => config_material%get('phase') - allocate(param(Ninstance)) + allocate(param(Ninstances)) allocate(source_damage_isoBrittle_offset (phases%length), source=0) allocate(source_damage_isoBrittle_instance(phases%length), source=0) @@ -73,8 +73,8 @@ module function source_damage_isoBrittle_init(source_length) result(mySources) ! sanity checks if (prm%W_crit <= 0.0_pReal) extmsg = trim(extmsg)//' W_crit' - NipcMyPhase = count(material_phaseAt==p) * discretization_nIPs - call constitutive_allocateState(sourceState(p)%p(sourceOffset),NipcMyPhase,1,1,1) + Nconstituents = count(material_phaseAt==p) * discretization_nIPs + call constitutive_allocateState(sourceState(p)%p(sourceOffset),Nconstituents,1,1,1) sourceState(p)%p(sourceOffset)%atol = src%get_asFloat('isoBrittle_atol',defaultVal=1.0e-3_pReal) if(any(sourceState(p)%p(sourceOffset)%atol < 0.0_pReal)) extmsg = trim(extmsg)//' isobrittle_atol' diff --git a/src/source_damage_isoDuctile.f90 b/src/source_damage_isoDuctile.f90 index 0d068b6e4..1bff20570 100644 --- a/src/source_damage_isoDuctile.f90 +++ b/src/source_damage_isoDuctile.f90 @@ -18,7 +18,7 @@ submodule (constitutive:constitutive_damage) source_damage_isoDuctile output end type tParameters - type(tParameters), dimension(:), allocatable :: param !< containers of constitutive parameters (len Ninstance) + type(tParameters), dimension(:), allocatable :: param !< containers of constitutive parameters (len Ninstances) contains @@ -38,18 +38,18 @@ module function source_damage_isoDuctile_init(source_length) result(mySources) phase, & sources, & src - integer :: Ninstance,sourceOffset,NipcMyPhase,p + integer :: Ninstances,sourceOffset,Nconstituents,p character(len=pStringLen) :: extmsg = '' print'(/,a)', ' <<<+- source_damage_isoDuctile init -+>>>' mySources = source_active('damage_isoDuctile',source_length) - Ninstance = count(mySources) - print'(a,i2)', ' # instances: ',Ninstance; flush(IO_STDOUT) - if(Ninstance == 0) return + Ninstances = count(mySources) + print'(a,i2)', ' # instances: ',Ninstances; flush(IO_STDOUT) + if(Ninstances == 0) return phases => config_material%get('phase') - allocate(param(Ninstance)) + allocate(param(Ninstances)) allocate(source_damage_isoDuctile_offset (phases%length), source=0) allocate(source_damage_isoDuctile_instance(phases%length), source=0) @@ -77,8 +77,8 @@ module function source_damage_isoDuctile_init(source_length) result(mySources) if (prm%q <= 0.0_pReal) extmsg = trim(extmsg)//' q' if (prm%gamma_crit <= 0.0_pReal) extmsg = trim(extmsg)//' gamma_crit' - NipcMyPhase=count(material_phaseAt==p) * discretization_nIPs - call constitutive_allocateState(sourceState(p)%p(sourceOffset),NipcMyPhase,1,1,0) + Nconstituents=count(material_phaseAt==p) * discretization_nIPs + call constitutive_allocateState(sourceState(p)%p(sourceOffset),Nconstituents,1,1,0) sourceState(p)%p(sourceOffset)%atol = src%get_asFloat('isoDuctile_atol',defaultVal=1.0e-3_pReal) if(any(sourceState(p)%p(sourceOffset)%atol < 0.0_pReal)) extmsg = trim(extmsg)//' isoductile_atol' diff --git a/src/source_thermal_dissipation.f90 b/src/source_thermal_dissipation.f90 index 734451a72..f28567aa7 100644 --- a/src/source_thermal_dissipation.f90 +++ b/src/source_thermal_dissipation.f90 @@ -15,7 +15,7 @@ submodule(constitutive:constitutive_thermal) source_thermal_dissipation kappa !< TAYLOR-QUINNEY factor end type tParameters - type(tParameters), dimension(:), allocatable :: param !< containers of constitutive parameters (len Ninstance) + type(tParameters), dimension(:), allocatable :: param !< containers of constitutive parameters (len Ninstances) contains @@ -35,17 +35,17 @@ module function source_thermal_dissipation_init(source_length) result(mySources) phase, & sources, & src - integer :: Ninstance,sourceOffset,NipcMyPhase,p + integer :: Ninstances,sourceOffset,Nconstituents,p print'(/,a)', ' <<<+- source_thermal_dissipation init -+>>>' mySources = source_active('thermal_dissipation',source_length) - Ninstance = count(mySources) - print'(a,i2)', ' # instances: ',Ninstance; flush(IO_STDOUT) - if(Ninstance == 0) return + Ninstances = count(mySources) + print'(a,i2)', ' # instances: ',Ninstances; flush(IO_STDOUT) + if(Ninstances == 0) return phases => config_material%get('phase') - allocate(param(Ninstance)) + allocate(param(Ninstances)) allocate(source_thermal_dissipation_offset (phases%length), source=0) allocate(source_thermal_dissipation_instance(phases%length), source=0) @@ -61,8 +61,8 @@ module function source_thermal_dissipation_init(source_length) result(mySources) src => sources%get(sourceOffset) prm%kappa = src%get_asFloat('kappa') - NipcMyPhase = count(material_phaseAt==p) * discretization_nIPs - call constitutive_allocateState(sourceState(p)%p(sourceOffset),NipcMyPhase,0,0,0) + Nconstituents = count(material_phaseAt==p) * discretization_nIPs + call constitutive_allocateState(sourceState(p)%p(sourceOffset),Nconstituents,0,0,0) end associate endif @@ -74,7 +74,7 @@ end function source_thermal_dissipation_init !-------------------------------------------------------------------------------------------------- -!> @brief Ninstances dissipation rate +!> @brief Ninstancess dissipation rate !-------------------------------------------------------------------------------------------------- module subroutine source_thermal_dissipation_getRateAndItsTangent(TDot, dTDot_dT, Tstar, Lp, phase) diff --git a/src/source_thermal_externalheat.f90 b/src/source_thermal_externalheat.f90 index cbc1fa69d..9ba4a051b 100644 --- a/src/source_thermal_externalheat.f90 +++ b/src/source_thermal_externalheat.f90 @@ -19,7 +19,7 @@ submodule(constitutive:constitutive_thermal) source_thermal_externalheat nIntervals end type tParameters - type(tParameters), dimension(:), allocatable :: param !< containers of constitutive parameters (len Ninstance) + type(tParameters), dimension(:), allocatable :: param !< containers of constitutive parameters (len Ninstances) contains @@ -39,17 +39,17 @@ module function source_thermal_externalheat_init(source_length) result(mySources phase, & sources, & src - integer :: Ninstance,sourceOffset,NipcMyPhase,p + integer :: Ninstances,sourceOffset,Nconstituents,p print'(/,a)', ' <<<+- source_thermal_externalHeat init -+>>>' mySources = source_active('thermal_externalheat',source_length) - Ninstance = count(mySources) - print'(a,i2)', ' # instances: ',Ninstance; flush(IO_STDOUT) - if(Ninstance == 0) return + Ninstances = count(mySources) + print'(a,i2)', ' # instances: ',Ninstances; flush(IO_STDOUT) + if(Ninstances == 0) return phases => config_material%get('phase') - allocate(param(Ninstance)) + allocate(param(Ninstances)) allocate(source_thermal_externalheat_offset (phases%length), source=0) allocate(source_thermal_externalheat_instance(phases%length), source=0) @@ -69,8 +69,8 @@ module function source_thermal_externalheat_init(source_length) result(mySources prm%f_T = src%get_asFloats('f_T',requiredSize = size(prm%t_n)) - NipcMyPhase = count(material_phaseAt==p) * discretization_nIPs - call constitutive_allocateState(sourceState(p)%p(sourceOffset),NipcMyPhase,1,1,0) + Nconstituents = count(material_phaseAt==p) * discretization_nIPs + call constitutive_allocateState(sourceState(p)%p(sourceOffset),Nconstituents,1,1,0) end associate endif diff --git a/src/thermal_adiabatic.f90 b/src/thermal_adiabatic.f90 index 189a7131a..aa807924c 100644 --- a/src/thermal_adiabatic.f90 +++ b/src/thermal_adiabatic.f90 @@ -40,7 +40,7 @@ contains !-------------------------------------------------------------------------------------------------- subroutine thermal_adiabatic_init - integer :: maxNinstance,h,NofMyHomog + integer :: maxNinstances,h,Nmaterialpoints class(tNode), pointer :: & material_homogenization, & homog, & @@ -48,10 +48,10 @@ subroutine thermal_adiabatic_init print'(/,a)', ' <<<+- thermal_adiabatic init -+>>>'; flush(6) - maxNinstance = count(thermal_type == THERMAL_adiabatic_ID) - if (maxNinstance == 0) return + maxNinstances = count(thermal_type == THERMAL_adiabatic_ID) + if (maxNinstances == 0) return - allocate(param(maxNinstance)) + allocate(param(maxNinstances)) material_homogenization => config_material%get('homogenization') do h = 1, size(material_name_homogenization) @@ -67,17 +67,17 @@ subroutine thermal_adiabatic_init prm%output = homogThermal%get_asStrings('output',defaultVal=emptyStringArray) #endif - NofMyHomog=count(material_homogenizationAt==h) + Nmaterialpoints=count(material_homogenizationAt==h) thermalState(h)%sizeState = 1 - allocate(thermalState(h)%state0 (1,NofMyHomog), source=thermal_initialT(h)) - allocate(thermalState(h)%subState0(1,NofMyHomog), source=thermal_initialT(h)) - allocate(thermalState(h)%state (1,NofMyHomog), source=thermal_initialT(h)) + allocate(thermalState(h)%state0 (1,Nmaterialpoints), source=thermal_initialT(h)) + allocate(thermalState(h)%subState0(1,Nmaterialpoints), source=thermal_initialT(h)) + allocate(thermalState(h)%state (1,Nmaterialpoints), source=thermal_initialT(h)) thermalMapping(h)%p => material_homogenizationMemberAt deallocate(temperature(h)%p) temperature(h)%p => thermalState(h)%state(1,:) deallocate(temperatureRate(h)%p) - allocate (temperatureRate(h)%p(NofMyHomog), source=0.0_pReal) + allocate (temperatureRate(h)%p(Nmaterialpoints), source=0.0_pReal) end associate enddo diff --git a/src/thermal_conduction.f90 b/src/thermal_conduction.f90 index ead06306a..daa7391a9 100644 --- a/src/thermal_conduction.f90 +++ b/src/thermal_conduction.f90 @@ -41,7 +41,7 @@ contains !-------------------------------------------------------------------------------------------------- subroutine thermal_conduction_init - integer :: Ninstance,NofMyHomog,h + integer :: Ninstances,Nmaterialpoints,h class(tNode), pointer :: & material_homogenization, & homog, & @@ -49,8 +49,8 @@ subroutine thermal_conduction_init print'(/,a)', ' <<<+- thermal_conduction init -+>>>'; flush(6) - Ninstance = count(thermal_type == THERMAL_conduction_ID) - allocate(param(Ninstance)) + Ninstances = count(thermal_type == THERMAL_conduction_ID) + allocate(param(Ninstances)) material_homogenization => config_material%get('homogenization') do h = 1, size(material_name_homogenization) @@ -65,17 +65,17 @@ subroutine thermal_conduction_init prm%output = homogThermal%get_asStrings('output',defaultVal=emptyStringArray) #endif - NofMyHomog=count(material_homogenizationAt==h) + Nmaterialpoints=count(material_homogenizationAt==h) thermalState(h)%sizeState = 0 - allocate(thermalState(h)%state0 (0,NofMyHomog)) - allocate(thermalState(h)%subState0(0,NofMyHomog)) - allocate(thermalState(h)%state (0,NofMyHomog)) + allocate(thermalState(h)%state0 (0,Nmaterialpoints)) + allocate(thermalState(h)%subState0(0,Nmaterialpoints)) + allocate(thermalState(h)%state (0,Nmaterialpoints)) thermalMapping(h)%p => material_homogenizationMemberAt deallocate(temperature (h)%p) - allocate (temperature (h)%p(NofMyHomog), source=thermal_initialT(h)) + allocate (temperature (h)%p(Nmaterialpoints), source=thermal_initialT(h)) deallocate(temperatureRate(h)%p) - allocate (temperatureRate(h)%p(NofMyHomog), source=0.0_pReal) + allocate (temperatureRate(h)%p(Nmaterialpoints), source=0.0_pReal) end associate enddo diff --git a/src/thermal_isothermal.f90 b/src/thermal_isothermal.f90 index 703a9aaac..39c8efe91 100644 --- a/src/thermal_isothermal.f90 +++ b/src/thermal_isothermal.f90 @@ -16,18 +16,18 @@ contains !-------------------------------------------------------------------------------------------------- subroutine thermal_isothermal_init - integer :: h,NofMyHomog + integer :: h,Nmaterialpoints print'(/,a)', ' <<<+- thermal_isothermal init -+>>>'; flush(6) do h = 1, size(material_name_homogenization) if (thermal_type(h) /= THERMAL_isothermal_ID) cycle - NofMyHomog = count(material_homogenizationAt == h) + Nmaterialpoints = count(material_homogenizationAt == h) thermalState(h)%sizeState = 0 - allocate(thermalState(h)%state0 (0,NofMyHomog)) - allocate(thermalState(h)%subState0(0,NofMyHomog)) - allocate(thermalState(h)%state (0,NofMyHomog)) + allocate(thermalState(h)%state0 (0,Nmaterialpoints)) + allocate(thermalState(h)%subState0(0,Nmaterialpoints)) + allocate(thermalState(h)%state (0,Nmaterialpoints)) deallocate(temperature (h)%p) allocate (temperature (h)%p(1), source=thermal_initialT(h))