more work on the new state
This commit is contained in:
parent
f7e574d7ab
commit
164252213b
|
@ -33,7 +33,7 @@ module constitutive
|
||||||
constitutive_sizeDotState, & !< size of dotState array
|
constitutive_sizeDotState, & !< size of dotState array
|
||||||
constitutive_sizeState, & !< size of state array per grain
|
constitutive_sizeState, & !< size of state array per grain
|
||||||
constitutive_sizePostResults !< size of postResults array per grain
|
constitutive_sizePostResults !< size of postResults array per grain
|
||||||
integer(pInt), public :: &
|
integer(pInt), public, protected :: &
|
||||||
constitutive_maxSizeDotState, &
|
constitutive_maxSizeDotState, &
|
||||||
constitutive_maxSizePostResults
|
constitutive_maxSizePostResults
|
||||||
integer(pInt), private :: &
|
integer(pInt), private :: &
|
||||||
|
@ -41,8 +41,9 @@ module constitutive
|
||||||
#else
|
#else
|
||||||
integer(pInt), public, dimension(:,:,:), allocatable :: &
|
integer(pInt), public, dimension(:,:,:), allocatable :: &
|
||||||
constitutive_sizePostResults !< size of postResults array per grain
|
constitutive_sizePostResults !< size of postResults array per grain
|
||||||
integer(pInt), public :: &
|
integer(pInt), public, protected :: &
|
||||||
constitutive_maxSizePostResults
|
constitutive_maxSizePostResults, &
|
||||||
|
constitutive_maxSizeDotState
|
||||||
#endif
|
#endif
|
||||||
public :: &
|
public :: &
|
||||||
constitutive_init, &
|
constitutive_init, &
|
||||||
|
@ -148,6 +149,7 @@ subroutine constitutive_init
|
||||||
eMax, & !< maximum number of elements
|
eMax, & !< maximum number of elements
|
||||||
phase, &
|
phase, &
|
||||||
s, &
|
s, &
|
||||||
|
p, &
|
||||||
instance,&
|
instance,&
|
||||||
myNgrains
|
myNgrains
|
||||||
|
|
||||||
|
@ -508,6 +510,10 @@ subroutine constitutive_init
|
||||||
flush(6)
|
flush(6)
|
||||||
#else
|
#else
|
||||||
constitutive_maxSizePostResults = maxval(constitutive_sizePostResults)
|
constitutive_maxSizePostResults = maxval(constitutive_sizePostResults)
|
||||||
|
constitutive_maxSizeDotState = 0_pInt
|
||||||
|
do p = 1, size(plasticState)
|
||||||
|
constitutive_maxSizeDotState = max(constitutive_maxSizeDotState, plasticState(p)%sizeDotState)
|
||||||
|
enddo
|
||||||
#endif
|
#endif
|
||||||
end subroutine constitutive_init
|
end subroutine constitutive_init
|
||||||
|
|
||||||
|
|
|
@ -312,7 +312,8 @@ subroutine constitutive_j2_init(fileUnit)
|
||||||
enddo outputsLoop
|
enddo outputsLoop
|
||||||
#ifdef NEWSTATE
|
#ifdef NEWSTATE
|
||||||
sizeState = 1
|
sizeState = 1
|
||||||
plasticState(phase)%stateSize = sizeState
|
plasticState(phase)%sizeState = sizeState
|
||||||
|
plasticState(phase)%sizeDotState = sizeState
|
||||||
allocate(plasticState(phase)%state0 (sizeState,NofMyPhase),source=constitutive_j2_tau0(instance))
|
allocate(plasticState(phase)%state0 (sizeState,NofMyPhase),source=constitutive_j2_tau0(instance))
|
||||||
allocate(plasticState(phase)%partionedState0(sizeState,NofMyPhase),source=constitutive_j2_tau0(instance))
|
allocate(plasticState(phase)%partionedState0(sizeState,NofMyPhase),source=constitutive_j2_tau0(instance))
|
||||||
allocate(plasticState(phase)%subState0 (sizeState,NofMyPhase),source=0.0_pReal)
|
allocate(plasticState(phase)%subState0 (sizeState,NofMyPhase),source=0.0_pReal)
|
||||||
|
|
|
@ -72,7 +72,7 @@ subroutine constitutive_none_init(fileUnit)
|
||||||
#ifdef NEWSTATE
|
#ifdef NEWSTATE
|
||||||
initializeInstances: do phase = 1_pInt, size(phase_plasticity)
|
initializeInstances: do phase = 1_pInt, size(phase_plasticity)
|
||||||
if (phase_plasticity(phase) == PLASTICITY_none_ID .and. count(material_phase==phase)/=0) &
|
if (phase_plasticity(phase) == PLASTICITY_none_ID .and. count(material_phase==phase)/=0) &
|
||||||
plasticState(phase)%stateSize = 0_pInt
|
plasticState(phase)%sizeState = 0_pInt
|
||||||
enddo initializeInstances
|
enddo initializeInstances
|
||||||
#else
|
#else
|
||||||
allocate(constitutive_none_sizeDotState(maxNinstance), source=1_pInt)
|
allocate(constitutive_none_sizeDotState(maxNinstance), source=1_pInt)
|
||||||
|
|
|
@ -506,7 +506,8 @@ allocate(constitutive_phenopowerlaw_sizePostResults(maxNinstance),
|
||||||
2_pInt + &
|
2_pInt + &
|
||||||
constitutive_phenopowerlaw_totalNslip(instance)+ &
|
constitutive_phenopowerlaw_totalNslip(instance)+ &
|
||||||
constitutive_phenopowerlaw_totalNtwin(instance) ! s_slip, s_twin, sum(gamma), sum(f), accshear_slip, accshear_twin
|
constitutive_phenopowerlaw_totalNtwin(instance) ! s_slip, s_twin, sum(gamma), sum(f), accshear_slip, accshear_twin
|
||||||
plasticState(phase)%stateSize = sizeState
|
plasticState(phase)%sizeState = sizeState
|
||||||
|
plasticState(phase)%sizeDotState = sizeState
|
||||||
allocate(plasticState(phase)%aTolState (sizeState), source=0.0_pReal)
|
allocate(plasticState(phase)%aTolState (sizeState), source=0.0_pReal)
|
||||||
allocate(plasticState(phase)%state0 (sizeState,NofMyPhase), 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)%partionedState0(sizeState,NofMyPhase), source=0.0_pReal)
|
||||||
|
|
1048
code/crystallite.f90
1048
code/crystallite.f90
File diff suppressed because it is too large
Load Diff
|
@ -60,7 +60,7 @@ module prec
|
||||||
#ifdef NEWSTATE
|
#ifdef NEWSTATE
|
||||||
!http://stackoverflow.com/questions/3948210/can-i-have-a-pointer-to-an-item-in-an-allocatable-array
|
!http://stackoverflow.com/questions/3948210/can-i-have-a-pointer-to-an-item-in-an-allocatable-array
|
||||||
type, public :: tState
|
type, public :: tState
|
||||||
integer(pInt) :: stateSize
|
integer(pInt) :: sizeState,sizeDotState
|
||||||
real(pReal), pointer, dimension(:) :: atolState
|
real(pReal), pointer, dimension(:) :: atolState
|
||||||
real(pReal), pointer, dimension(:,:) :: state, & ! material points, state size
|
real(pReal), pointer, dimension(:,:) :: state, & ! material points, state size
|
||||||
dotState, &
|
dotState, &
|
||||||
|
|
Loading…
Reference in New Issue