removed some redundant parts

This commit is contained in:
Luv Sharma 2014-07-08 14:58:23 +00:00
parent cbab10c087
commit a1162e6fb4
6 changed files with 36 additions and 55 deletions

View File

@ -121,7 +121,10 @@ subroutine constitutive_init
if (any(phase_plasticity == PLASTICITY_PHENOPOWERLAW_ID)) call constitutive_phenopowerlaw_init(FILEUNIT)
if (any(phase_plasticity == PLASTICITY_DISLOTWIN_ID)) call constitutive_dislotwin_init(FILEUNIT)
if (any(phase_plasticity == PLASTICITY_TITANMOD_ID)) call constitutive_titanmod_init(FILEUNIT)
if (any(phase_plasticity == PLASTICITY_NONLOCAL_ID)) call constitutive_nonlocal_init(FILEUNIT)
if (any(phase_plasticity == PLASTICITY_NONLOCAL_ID)) then
call constitutive_nonlocal_init(FILEUNIT)
call constitutive_nonlocal_stateInit()
endif
close(FILEUNIT)
write(6,'(/,a)') ' <<<+- constitutive init -+>>>'
@ -175,32 +178,6 @@ subroutine constitutive_init
enddo
close(FILEUNIT)
PhaseLoop:do phase = 1_pInt,material_Nphase ! loop over phases
instance = phase_plasticityInstance(phase)
select case(phase_plasticity(phase))
case (PLASTICITY_NONE_ID)
plasticState(phase)%sizePostResults = constitutive_none_sizePostResults(instance)
case (PLASTICITY_J2_ID)
plasticState(phase)%sizePostResults = constitutive_j2_sizePostResults(instance)
case (PLASTICITY_PHENOPOWERLAW_ID)
plasticState(phase)%sizePostResults = constitutive_phenopowerlaw_sizePostResults(instance)
case (PLASTICITY_DISLOTWIN_ID)
plasticState(phase)%sizePostResults = constitutive_dislotwin_sizePostResults(instance)
case (PLASTICITY_TITANMOD_ID)
plasticState(phase)%sizePostResults = constitutive_titanmod_sizePostResults(instance)
case (PLASTICITY_NONLOCAL_ID)
nonlocalConstitutionPresent = .true.
plasticState(phase)%nonlocal = .true.
plasticState(phase)%sizePostResults = constitutive_nonlocal_sizePostResults(instance)
end select
enddo PhaseLoop
if (nonlocalConstitutionPresent) &
call constitutive_nonlocal_stateInit()
constitutive_maxSizeDotState = 0_pInt
constitutive_maxSizePostResults = 0_pInt

View File

@ -716,6 +716,7 @@ subroutine constitutive_dislotwin_init(fileUnit)
plasticState(phase)%sizeState = sizeState
plasticState(phase)%sizeDotState = sizeDotState
plasticState(phase)%nonlocal = .false.
allocate(plasticState(phase)%aTolState (sizeState), source=0.0_pReal)
allocate(plasticState(phase)%state0 (sizeState,NofMyPhase), source=0.0_pReal)
allocate(plasticState(phase)%partionedState0 (sizeState,NofMyPhase), source=0.0_pReal)

View File

@ -315,6 +315,7 @@ subroutine constitutive_j2_init(fileUnit)
sizeDotState = sizeState
plasticState(phase)%sizeDotState = sizeDotState
plasticState(phase)%sizePostResults = constitutive_j2_sizePostResults(instance)
plasticState(phase)%nonlocal = .false.
allocate(plasticState(phase)%aTolState (sizeState),source=constitutive_j2_aTolResistance(instance))
allocate(plasticState(phase)%state0 (sizeState,NofMyPhase),source=constitutive_j2_tau0(instance))
allocate(plasticState(phase)%partionedState0 (sizeState,NofMyPhase),source=0.0_pReal)

View File

@ -1055,37 +1055,14 @@ allocate(nonSchmidProjection(3,3,4,maxTotalNslip,maxNinstances),
!*** determine size of state array
ns = totalNslip(instance)
! Determine size of state array
! plasticState(phase)%nonlocal = .true.
sizeDotState = int(size(BASICSTATES),pInt) * ns
sizeDependentState = int(size(DEPENDENTSTATES),pInt) * ns
sizeState = sizeDotState + sizeDependentState &
+ int(size(OTHERSTATES),pInt) * ns
plasticState(phase)%sizeState = sizeState
plasticState(phase)%sizeDotState = sizeDotState
allocate(plasticState(phase)%aTolState (sizeState), source=0.0_pReal)
allocate(plasticState(phase)%state0 (sizeState,NofMyPhase), source=0.0_pReal)
allocate(plasticState(phase)%partionedState0 (sizeState,NofMyPhase), source=0.0_pReal)
allocate(plasticState(phase)%subState0 (sizeState,NofMyPhase), source=0.0_pReal)
allocate(plasticState(phase)%state (sizeState,NofMyPhase), source=0.0_pReal)
allocate(plasticState(phase)%state_backup (sizeState,NofMyPhase), source=0.0_pReal)
allocate(plasticState(phase)%dotState (sizeDotState,NofMyPhase), source=0.0_pReal)
allocate(plasticState(phase)%deltaState (sizeDotState,NofMyPhase), source=0.0_pReal)
allocate(plasticState(phase)%dotState_backup (sizeDotState,NofMyPhase), source=0.0_pReal)
if (any(numerics_integrator == 1_pInt)) then
allocate(plasticState(phase)%previousDotState (sizeDotState,NofMyPhase), source=0.0_pReal)
allocate(plasticState(phase)%previousDotState2 (sizeDotState,NofMyPhase), source=0.0_pReal)
endif
if (any(numerics_integrator == 4_pInt)) &
allocate(plasticState(phase)%RK4dotState (sizeDotState,NofMyPhase), source=0.0_pReal)
if (any(numerics_integrator == 5_pInt)) &
allocate(plasticState(phase)%RKCK45dotState (6,sizeDotState,NofMyPhase),source=0.0_pReal)
!*** determine indices to state array
l = 0_pInt
do t = 1_pInt,4_pInt
do s = 1_pInt,ns
@ -1235,7 +1212,30 @@ allocate(nonSchmidProjection(3,3,4,maxTotalNslip,maxNinstances),
constitutive_nonlocal_sizePostResults(instance) = constitutive_nonlocal_sizePostResults(instance) + mySize
endif
enddo outputsLoop
plasticState(phase)%sizeState = sizeState
plasticState(phase)%sizeDotState = sizeDotState
plasticState(phase)%sizePostResults = constitutive_nonlocal_sizePostResults(instance)
plasticState(phase)%nonlocal = .true.
allocate(plasticState(phase)%aTolState (sizeState), source=0.0_pReal)
allocate(plasticState(phase)%state0 (sizeState,NofMyPhase), source=0.0_pReal)
allocate(plasticState(phase)%partionedState0 (sizeState,NofMyPhase), source=0.0_pReal)
allocate(plasticState(phase)%subState0 (sizeState,NofMyPhase), source=0.0_pReal)
allocate(plasticState(phase)%state (sizeState,NofMyPhase), source=0.0_pReal)
allocate(plasticState(phase)%state_backup (sizeState,NofMyPhase), source=0.0_pReal)
allocate(plasticState(phase)%dotState (sizeDotState,NofMyPhase), source=0.0_pReal)
allocate(plasticState(phase)%deltaState (sizeDotState,NofMyPhase), source=0.0_pReal)
allocate(plasticState(phase)%dotState_backup (sizeDotState,NofMyPhase), source=0.0_pReal)
if (any(numerics_integrator == 1_pInt)) then
allocate(plasticState(phase)%previousDotState (sizeDotState,NofMyPhase), source=0.0_pReal)
allocate(plasticState(phase)%previousDotState2 (sizeDotState,NofMyPhase), source=0.0_pReal)
endif
if (any(numerics_integrator == 4_pInt)) &
allocate(plasticState(phase)%RK4dotState (sizeDotState,NofMyPhase), source=0.0_pReal)
if (any(numerics_integrator == 5_pInt)) &
allocate(plasticState(phase)%RKCK45dotState (6,sizeDotState,NofMyPhase),source=0.0_pReal)
do s1 = 1_pInt,ns
f = slipFamily(s1,instance)

View File

@ -510,10 +510,11 @@ subroutine constitutive_phenopowerlaw_init(fileUnit)
2_pInt + &
constitutive_phenopowerlaw_totalNslip(instance)+ &
constitutive_phenopowerlaw_totalNtwin(instance) ! s_slip, s_twin, sum(gamma), sum(f), accshear_slip, accshear_twin
plasticState(phase)%sizeState = sizeState
sizeDotState = sizeState
plasticState(phase)%sizeDotState = sizeState
plasticState(phase)%sizeState = sizeState
plasticState(phase)%sizeDotState = sizeDotState
plasticState(phase)%sizePostResults = constitutive_phenopowerlaw_sizePostResults(instance)
plasticState(phase)%nonlocal = .false.
allocate(plasticState(phase)%aTolState ( sizeState), source=0.0_pReal)
allocate(plasticState(phase)%state0 ( sizeState,NofMyPhase), source=0.0_pReal)
allocate(plasticState(phase)%partionedState0 ( sizeState,NofMyPhase), source=0.0_pReal)

View File

@ -847,6 +847,7 @@ subroutine constitutive_titanmod_init(fileUnit)
plasticState(phase)%sizeState = sizeState
plasticState(phase)%sizeDotState = sizeDotState
plasticState(phase)%sizePostResults = constitutive_titanmod_sizePostResults(instance)
plasticState(phase)%nonlocal = .false.
allocate(plasticState(phase)%aTolState (sizeState), source=constitutive_titanmod_aTolRho(instance))
allocate(plasticState(phase)%state0 (sizeState,NofMyPhase), source=0.0_pReal)
allocate(plasticState(phase)%partionedState0 (sizeState,NofMyPhase), source=0.0_pReal)