merge functionality
This commit is contained in:
parent
ce61606c0b
commit
b996b6c42e
|
@ -209,7 +209,7 @@ module subroutine plastic_disloUCLA_init
|
||||||
sizeDotState = size(['rho_mob ','rho_dip ','gamma_sl']) * prm%sum_N_sl
|
sizeDotState = size(['rho_mob ','rho_dip ','gamma_sl']) * prm%sum_N_sl
|
||||||
sizeState = sizeDotState
|
sizeState = sizeDotState
|
||||||
|
|
||||||
call material_allocatePlasticState(p,NipcMyPhase,sizeState,sizeDotState,0)
|
call material_allocateState(plasticState(p),NipcMyPhase,sizeState,sizeDotState,0)
|
||||||
|
|
||||||
!--------------------------------------------------------------------------------------------------
|
!--------------------------------------------------------------------------------------------------
|
||||||
! state aliases and initialization
|
! state aliases and initialization
|
||||||
|
|
|
@ -399,7 +399,7 @@ module subroutine plastic_dislotwin_init
|
||||||
+ size(['f_tr']) * prm%sum_N_tr
|
+ size(['f_tr']) * prm%sum_N_tr
|
||||||
sizeState = sizeDotState
|
sizeState = sizeDotState
|
||||||
|
|
||||||
call material_allocatePlasticState(p,NipcMyPhase,sizeState,sizeDotState,0)
|
call material_allocateState(plasticState(p),NipcMyPhase,sizeState,sizeDotState,0)
|
||||||
|
|
||||||
!--------------------------------------------------------------------------------------------------
|
!--------------------------------------------------------------------------------------------------
|
||||||
! locally defined state aliases and initialization of state0 and atol
|
! locally defined state aliases and initialization of state0 and atol
|
||||||
|
|
|
@ -117,7 +117,7 @@ module subroutine plastic_isotropic_init
|
||||||
sizeDotState = size(['xi ','accumulated_shear'])
|
sizeDotState = size(['xi ','accumulated_shear'])
|
||||||
sizeState = sizeDotState
|
sizeState = sizeDotState
|
||||||
|
|
||||||
call material_allocatePlasticState(p,NipcMyPhase,sizeState,sizeDotState,0)
|
call material_allocateState(plasticState(p),NipcMyPhase,sizeState,sizeDotState,0)
|
||||||
|
|
||||||
!--------------------------------------------------------------------------------------------------
|
!--------------------------------------------------------------------------------------------------
|
||||||
! state aliases and initialization
|
! state aliases and initialization
|
||||||
|
|
|
@ -164,7 +164,7 @@ module subroutine plastic_kinehardening_init
|
||||||
sizeDeltaState = size(['sense ', 'chi0 ', 'gamma0' ]) * prm%sum_N_sl
|
sizeDeltaState = size(['sense ', 'chi0 ', 'gamma0' ]) * prm%sum_N_sl
|
||||||
sizeState = sizeDotState + sizeDeltaState
|
sizeState = sizeDotState + sizeDeltaState
|
||||||
|
|
||||||
call material_allocatePlasticState(p,NipcMyPhase,sizeState,sizeDotState,sizeDeltaState)
|
call material_allocateState(plasticState(p),NipcMyPhase,sizeState,sizeDotState,sizeDeltaState)
|
||||||
|
|
||||||
!--------------------------------------------------------------------------------------------------
|
!--------------------------------------------------------------------------------------------------
|
||||||
! state aliases and initialization
|
! state aliases and initialization
|
||||||
|
|
|
@ -29,7 +29,7 @@ module subroutine plastic_none_init
|
||||||
if (phase_plasticity(p) /= PLASTICITY_NONE_ID) cycle
|
if (phase_plasticity(p) /= PLASTICITY_NONE_ID) cycle
|
||||||
|
|
||||||
NipcMyPhase = count(material_phaseAt == p) * discretization_nIP
|
NipcMyPhase = count(material_phaseAt == p) * discretization_nIP
|
||||||
call material_allocatePlasticState(p,NipcMyPhase,0,0,0)
|
call material_allocateState(plasticState(p),NipcMyPhase,0,0,0)
|
||||||
|
|
||||||
enddo
|
enddo
|
||||||
|
|
||||||
|
|
|
@ -384,7 +384,7 @@ module subroutine plastic_nonlocal_init
|
||||||
'maxDipoleHeightEdge ','maxDipoleHeightScrew' ]) * prm%sum_N_sl !< other dependent state variables that are not updated by microstructure
|
'maxDipoleHeightEdge ','maxDipoleHeightScrew' ]) * prm%sum_N_sl !< other dependent state variables that are not updated by microstructure
|
||||||
sizeDeltaState = sizeDotState
|
sizeDeltaState = sizeDotState
|
||||||
|
|
||||||
call material_allocatePlasticState(p,NipcMyPhase,sizeState,sizeDotState,sizeDeltaState)
|
call material_allocateState(plasticState(p),NipcMyPhase,sizeState,sizeDotState,sizeDeltaState)
|
||||||
|
|
||||||
plasticState(p)%nonlocal = .true.
|
plasticState(p)%nonlocal = .true.
|
||||||
plasticState(p)%offsetDeltaState = 0 ! ToDo: state structure does not follow convention
|
plasticState(p)%offsetDeltaState = 0 ! ToDo: state structure does not follow convention
|
||||||
|
|
|
@ -213,7 +213,7 @@ module subroutine plastic_phenopowerlaw_init
|
||||||
+ size(['xi_tw ','gamma_tw']) * prm%sum_N_tw
|
+ size(['xi_tw ','gamma_tw']) * prm%sum_N_tw
|
||||||
sizeState = sizeDotState
|
sizeState = sizeDotState
|
||||||
|
|
||||||
call material_allocatePlasticState(p,NipcMyPhase,sizeState,sizeDotState,0)
|
call material_allocateState(plasticState(p),NipcMyPhase,sizeState,sizeDotState,0)
|
||||||
|
|
||||||
!--------------------------------------------------------------------------------------------------
|
!--------------------------------------------------------------------------------------------------
|
||||||
! state aliases and initialization
|
! state aliases and initialization
|
||||||
|
|
|
@ -173,8 +173,7 @@ module material
|
||||||
|
|
||||||
public :: &
|
public :: &
|
||||||
material_init, &
|
material_init, &
|
||||||
material_allocatePlasticState, &
|
material_allocateState, &
|
||||||
material_allocateSourceState, &
|
|
||||||
ELASTICITY_HOOKE_ID ,&
|
ELASTICITY_HOOKE_ID ,&
|
||||||
PLASTICITY_NONE_ID, &
|
PLASTICITY_NONE_ID, &
|
||||||
PLASTICITY_ISOTROPIC_ID, &
|
PLASTICITY_ISOTROPIC_ID, &
|
||||||
|
@ -699,63 +698,35 @@ end subroutine material_parseTexture
|
||||||
|
|
||||||
|
|
||||||
!--------------------------------------------------------------------------------------------------
|
!--------------------------------------------------------------------------------------------------
|
||||||
!> @brief allocates the plastic state of a phase
|
!> @brief Allocate the components of the state structure for a given phase
|
||||||
!--------------------------------------------------------------------------------------------------
|
!--------------------------------------------------------------------------------------------------
|
||||||
subroutine material_allocatePlasticState(phase,NipcMyPhase,&
|
subroutine material_allocateState(state, &
|
||||||
sizeState,sizeDotState,sizeDeltaState)
|
NipcMyPhase,sizeState,sizeDotState,sizeDeltaState)
|
||||||
|
|
||||||
|
class(tState), intent(out) :: &
|
||||||
|
state
|
||||||
integer, intent(in) :: &
|
integer, intent(in) :: &
|
||||||
phase, &
|
|
||||||
NipcMyPhase, &
|
NipcMyPhase, &
|
||||||
sizeState, &
|
sizeState, &
|
||||||
sizeDotState, &
|
sizeDotState, &
|
||||||
sizeDeltaState
|
sizeDeltaState
|
||||||
|
|
||||||
plasticState(phase)%sizeState = sizeState
|
state%sizeState = sizeState
|
||||||
plasticState(phase)%sizeDotState = sizeDotState
|
state%sizeDotState = sizeDotState
|
||||||
plasticState(phase)%sizeDeltaState = sizeDeltaState
|
state%sizeDeltaState = sizeDeltaState
|
||||||
plasticState(phase)%offsetDeltaState = sizeState-sizeDeltaState ! deltaState occupies latter part of state by definition
|
state%offsetDeltaState = sizeState-sizeDeltaState ! deltaState occupies latter part of state by definition
|
||||||
|
|
||||||
allocate(plasticState(phase)%atol (sizeState), source=0.0_pReal)
|
allocate(state%atol (sizeState), source=0.0_pReal)
|
||||||
allocate(plasticState(phase)%state0 (sizeState,NipcMyPhase), source=0.0_pReal)
|
allocate(state%state0 (sizeState,NipcMyPhase), source=0.0_pReal)
|
||||||
allocate(plasticState(phase)%partionedState0 (sizeState,NipcMyPhase), source=0.0_pReal)
|
allocate(state%partionedState0(sizeState,NipcMyPhase), source=0.0_pReal)
|
||||||
allocate(plasticState(phase)%subState0 (sizeState,NipcMyPhase), source=0.0_pReal)
|
allocate(state%subState0 (sizeState,NipcMyPhase), source=0.0_pReal)
|
||||||
allocate(plasticState(phase)%state (sizeState,NipcMyPhase), source=0.0_pReal)
|
allocate(state%state (sizeState,NipcMyPhase), source=0.0_pReal)
|
||||||
|
|
||||||
allocate(plasticState(phase)%dotState (sizeDotState,NipcMyPhase),source=0.0_pReal)
|
allocate(state%dotState (sizeDotState,NipcMyPhase), source=0.0_pReal)
|
||||||
|
|
||||||
allocate(plasticState(phase)%deltaState (sizeDeltaState,NipcMyPhase),source=0.0_pReal)
|
allocate(state%deltaState(sizeDeltaState,NipcMyPhase), source=0.0_pReal)
|
||||||
|
|
||||||
end subroutine material_allocatePlasticState
|
end subroutine material_allocateState
|
||||||
|
|
||||||
|
|
||||||
!--------------------------------------------------------------------------------------------------
|
|
||||||
!> @brief allocates the source state of a phase
|
|
||||||
!--------------------------------------------------------------------------------------------------
|
|
||||||
subroutine material_allocateSourceState(phase,of,NipcMyPhase,&
|
|
||||||
sizeState,sizeDotState,sizeDeltaState)
|
|
||||||
|
|
||||||
integer, intent(in) :: &
|
|
||||||
phase, &
|
|
||||||
of, &
|
|
||||||
NipcMyPhase, &
|
|
||||||
sizeState, sizeDotState,sizeDeltaState
|
|
||||||
|
|
||||||
sourceState(phase)%p(of)%sizeState = sizeState
|
|
||||||
sourceState(phase)%p(of)%sizeDotState = sizeDotState
|
|
||||||
sourceState(phase)%p(of)%sizeDeltaState = sizeDeltaState
|
|
||||||
sourceState(phase)%p(of)%offsetDeltaState = sizeState-sizeDeltaState ! deltaState occupies latter part of state by definition
|
|
||||||
|
|
||||||
allocate(sourceState(phase)%p(of)%atol (sizeState), source=0.0_pReal)
|
|
||||||
allocate(sourceState(phase)%p(of)%state0 (sizeState,NipcMyPhase), source=0.0_pReal)
|
|
||||||
allocate(sourceState(phase)%p(of)%partionedState0 (sizeState,NipcMyPhase), source=0.0_pReal)
|
|
||||||
allocate(sourceState(phase)%p(of)%subState0 (sizeState,NipcMyPhase), source=0.0_pReal)
|
|
||||||
allocate(sourceState(phase)%p(of)%state (sizeState,NipcMyPhase), source=0.0_pReal)
|
|
||||||
|
|
||||||
allocate(sourceState(phase)%p(of)%dotState (sizeDotState,NipcMyPhase),source=0.0_pReal)
|
|
||||||
|
|
||||||
allocate(sourceState(phase)%p(of)%deltaState (sizeDeltaState,NipcMyPhase),source=0.0_pReal)
|
|
||||||
|
|
||||||
end subroutine material_allocateSourceState
|
|
||||||
|
|
||||||
end module material
|
end module material
|
||||||
|
|
|
@ -107,7 +107,7 @@ subroutine source_damage_anisoBrittle_init
|
||||||
if (any(prm%critDisp < 0.0_pReal)) extmsg = trim(extmsg)//' anisobrittle_critDisp'
|
if (any(prm%critDisp < 0.0_pReal)) extmsg = trim(extmsg)//' anisobrittle_critDisp'
|
||||||
|
|
||||||
NipcMyPhase = count(material_phaseAt==p) * discretization_nIP
|
NipcMyPhase = count(material_phaseAt==p) * discretization_nIP
|
||||||
call material_allocateSourceState(p,sourceOffset,NipcMyPhase,1,1,0)
|
call material_allocateState(sourceState(p)%p(sourceOffset),NipcMyPhase,1,1,0)
|
||||||
sourceState(p)%p(sourceOffset)%atol = config%getFloat('anisobrittle_atol',defaultVal=1.0e-3_pReal)
|
sourceState(p)%p(sourceOffset)%atol = config%getFloat('anisobrittle_atol',defaultVal=1.0e-3_pReal)
|
||||||
if(any(sourceState(p)%p(sourceOffset)%atol < 0.0_pReal)) extmsg = trim(extmsg)//' anisobrittle_atol'
|
if(any(sourceState(p)%p(sourceOffset)%atol < 0.0_pReal)) extmsg = trim(extmsg)//' anisobrittle_atol'
|
||||||
|
|
||||||
|
|
|
@ -89,7 +89,7 @@ subroutine source_damage_anisoDuctile_init
|
||||||
if (any(prm%critPlasticStrain < 0.0_pReal)) extmsg = trim(extmsg)//' anisoductile_criticalplasticstrain'
|
if (any(prm%critPlasticStrain < 0.0_pReal)) extmsg = trim(extmsg)//' anisoductile_criticalplasticstrain'
|
||||||
|
|
||||||
NipcMyPhase=count(material_phaseAt==p) * discretization_nIP
|
NipcMyPhase=count(material_phaseAt==p) * discretization_nIP
|
||||||
call material_allocateSourceState(p,sourceOffset,NipcMyPhase,1,1,0)
|
call material_allocateState(sourceState(p)%p(sourceOffset),NipcMyPhase,1,1,0)
|
||||||
sourceState(p)%p(sourceOffset)%atol = config%getFloat('anisoductile_atol',defaultVal=1.0e-3_pReal)
|
sourceState(p)%p(sourceOffset)%atol = config%getFloat('anisoductile_atol',defaultVal=1.0e-3_pReal)
|
||||||
if(any(sourceState(p)%p(sourceOffset)%atol < 0.0_pReal)) extmsg = trim(extmsg)//' anisoductile_atol'
|
if(any(sourceState(p)%p(sourceOffset)%atol < 0.0_pReal)) extmsg = trim(extmsg)//' anisoductile_atol'
|
||||||
|
|
||||||
|
|
|
@ -83,7 +83,7 @@ subroutine source_damage_isoBrittle_init
|
||||||
if (prm%critStrainEnergy <= 0.0_pReal) extmsg = trim(extmsg)//' isobrittle_criticalstrainenergy'
|
if (prm%critStrainEnergy <= 0.0_pReal) extmsg = trim(extmsg)//' isobrittle_criticalstrainenergy'
|
||||||
|
|
||||||
NipcMyPhase = count(material_phaseAt==p) * discretization_nIP
|
NipcMyPhase = count(material_phaseAt==p) * discretization_nIP
|
||||||
call material_allocateSourceState(p,sourceOffset,NipcMyPhase,1,1,1)
|
call material_allocateState(sourceState(p)%p(sourceOffset),NipcMyPhase,1,1,1)
|
||||||
sourceState(p)%p(sourceOffset)%atol = config%getFloat('isobrittle_atol',defaultVal=1.0e-3_pReal)
|
sourceState(p)%p(sourceOffset)%atol = config%getFloat('isobrittle_atol',defaultVal=1.0e-3_pReal)
|
||||||
if(any(sourceState(p)%p(sourceOffset)%atol < 0.0_pReal)) extmsg = trim(extmsg)//' isobrittle_atol'
|
if(any(sourceState(p)%p(sourceOffset)%atol < 0.0_pReal)) extmsg = trim(extmsg)//' isobrittle_atol'
|
||||||
|
|
||||||
|
|
|
@ -82,7 +82,7 @@ subroutine source_damage_isoDuctile_init
|
||||||
if (prm%critPlasticStrain <= 0.0_pReal) extmsg = trim(extmsg)//' isoductile_criticalplasticstrain'
|
if (prm%critPlasticStrain <= 0.0_pReal) extmsg = trim(extmsg)//' isoductile_criticalplasticstrain'
|
||||||
|
|
||||||
NipcMyPhase=count(material_phaseAt==p) * discretization_nIP
|
NipcMyPhase=count(material_phaseAt==p) * discretization_nIP
|
||||||
call material_allocateSourceState(p,sourceOffset,NipcMyPhase,1,1,0)
|
call material_allocateState(sourceState(p)%p(sourceOffset),NipcMyPhase,1,1,0)
|
||||||
sourceState(p)%p(sourceOffset)%atol = config%getFloat('isoductile_atol',defaultVal=1.0e-3_pReal)
|
sourceState(p)%p(sourceOffset)%atol = config%getFloat('isoductile_atol',defaultVal=1.0e-3_pReal)
|
||||||
if(any(sourceState(p)%p(sourceOffset)%atol < 0.0_pReal)) extmsg = trim(extmsg)//' isoductile_atol'
|
if(any(sourceState(p)%p(sourceOffset)%atol < 0.0_pReal)) extmsg = trim(extmsg)//' isoductile_atol'
|
||||||
|
|
||||||
|
|
|
@ -67,7 +67,7 @@ subroutine source_thermal_dissipation_init
|
||||||
prm%kappa = config%getFloat('dissipation_coldworkcoeff')
|
prm%kappa = config%getFloat('dissipation_coldworkcoeff')
|
||||||
|
|
||||||
NipcMyPhase = count(material_phaseAt==p) * discretization_nIP
|
NipcMyPhase = count(material_phaseAt==p) * discretization_nIP
|
||||||
call material_allocateSourceState(p,sourceOffset,NipcMyPhase,0,0,0)
|
call material_allocateState(sourceState(p)%p(sourceOffset),NipcMyPhase,0,0,0)
|
||||||
|
|
||||||
end associate
|
end associate
|
||||||
enddo
|
enddo
|
||||||
|
|
|
@ -74,7 +74,7 @@ subroutine source_thermal_externalheat_init
|
||||||
prm%heat_rate = config%getFloats('externalheat_rate',requiredSize = size(prm%time))
|
prm%heat_rate = config%getFloats('externalheat_rate',requiredSize = size(prm%time))
|
||||||
|
|
||||||
NipcMyPhase = count(material_phaseAt==p) * discretization_nIP
|
NipcMyPhase = count(material_phaseAt==p) * discretization_nIP
|
||||||
call material_allocateSourceState(p,sourceOffset,NipcMyPhase,1,1,0)
|
call material_allocateState(sourceState(p)%p(sourceOffset),NipcMyPhase,1,1,0)
|
||||||
|
|
||||||
end associate
|
end associate
|
||||||
enddo
|
enddo
|
||||||
|
|
Loading…
Reference in New Issue