simplify acces with pointer
naming will be adjusted once global deltaState is removed
This commit is contained in:
parent
85ca3a3f24
commit
a9a5c8fb73
|
@ -436,6 +436,8 @@ subroutine phase_allocateState(state, &
|
|||
allocate(state%dotState (sizeDotState,NEntries), source=0.0_pReal)
|
||||
|
||||
allocate(state%deltaState (sizeDeltaState,NEntries), source=0.0_pReal)
|
||||
state%deltaState2 => state%state(state%offsetDeltaState+1: &
|
||||
state%offsetDeltaState+state%sizeDeltaState,:)
|
||||
|
||||
end subroutine phase_allocateState
|
||||
|
||||
|
|
|
@ -81,13 +81,13 @@ submodule(phase) mechanical
|
|||
|
||||
module function plastic_dotState(subdt,co,ip,el,ph,en) result(dotState)
|
||||
integer, intent(in) :: &
|
||||
co, & !< component-ID of integration point
|
||||
ip, & !< integration point
|
||||
el, & !< element
|
||||
co, & !< constituent
|
||||
ip, & !< integration point
|
||||
el, & !< element
|
||||
ph, &
|
||||
en
|
||||
real(pReal), intent(in) :: &
|
||||
subdt !< timestep
|
||||
subdt !< timestep
|
||||
real(pReal), dimension(plasticState(ph)%sizeDotState) :: &
|
||||
dotState
|
||||
end function plastic_dotState
|
||||
|
|
|
@ -415,10 +415,9 @@ module function plastic_deltaState(ph, en) result(broken)
|
|||
|
||||
broken = any(IEEE_is_NaN(plasticState(ph)%deltaState(:,en)))
|
||||
if (.not. broken) then
|
||||
myOffset = plasticState(ph)%offsetDeltaState
|
||||
mySize = plasticState(ph)%sizeDeltaState
|
||||
plasticState(ph)%state(myOffset + 1:myOffset + mySize,en) = &
|
||||
plasticState(ph)%state(myOffset + 1:myOffset + mySize,en) + plasticState(ph)%deltaState(1:mySize,en)
|
||||
mySize = plasticState(ph)%sizeDeltaState
|
||||
plasticState(ph)%deltaState2(1:mySize,en) = plasticState(ph)%deltaState2(1:mySize,en) &
|
||||
+ plasticState(ph)%deltaState(1:mySize,en)
|
||||
end if
|
||||
|
||||
end select
|
||||
|
|
|
@ -45,6 +45,8 @@ module prec
|
|||
state, & !< state
|
||||
dotState, & !< rate of state change
|
||||
deltaState !< increment of state change
|
||||
real(pReal), pointer, dimension(:,:) :: &
|
||||
deltaState2
|
||||
end type
|
||||
|
||||
type, extends(tState) :: tPlasticState
|
||||
|
|
Loading…
Reference in New Issue