no need for 2 loops
This commit is contained in:
parent
df6ec59f76
commit
31906e3ebd
|
@ -2016,6 +2016,8 @@ subroutine integrateStateRKCK45()
|
||||||
mySizePlasticDotState, & ! size of dot States
|
mySizePlasticDotState, & ! size of dot States
|
||||||
mySizeSourceDotState
|
mySizeSourceDotState
|
||||||
|
|
||||||
|
! ToDo: MD: once all constitutives use allocate state, attach residuum arrays to the state in case of adaptive Euler
|
||||||
|
! ToDo: MD: rel residuu don't have to be pointwise
|
||||||
|
|
||||||
real(pReal), dimension(constitutive_plasticity_maxSizeDotState, &
|
real(pReal), dimension(constitutive_plasticity_maxSizeDotState, &
|
||||||
homogenization_maxNgrains,mesh_maxNips,mesh_NcpElems) :: &
|
homogenization_maxNgrains,mesh_maxNips,mesh_NcpElems) :: &
|
||||||
|
@ -2080,54 +2082,41 @@ subroutine integrateStateRKCK45()
|
||||||
|
|
||||||
relPlasticStateResiduum = 0.0_pReal
|
relPlasticStateResiduum = 0.0_pReal
|
||||||
relSourceStateResiduum = 0.0_pReal
|
relSourceStateResiduum = 0.0_pReal
|
||||||
!$OMP PARALLEL
|
!$OMP PARALLEL DO PRIVATE(mySizePlasticDotState,mySizeSourceDotState,p,cc)
|
||||||
!$OMP DO PRIVATE(p,cc)
|
|
||||||
do e = FEsolving_execElem(1),FEsolving_execElem(2)
|
do e = FEsolving_execElem(1),FEsolving_execElem(2)
|
||||||
do i = FEsolving_execIP(1,e),FEsolving_execIP(2,e)
|
do i = FEsolving_execIP(1,e),FEsolving_execIP(2,e)
|
||||||
do g = 1,homogenization_Ngrains(mesh_element(3,e))
|
do g = 1,homogenization_Ngrains(mesh_element(3,e))
|
||||||
if (crystallite_todo(g,i,e)) then
|
if (crystallite_todo(g,i,e)) then
|
||||||
p = phaseAt(g,i,e)
|
p = phaseAt(g,i,e); cc = phasememberAt(g,i,e)
|
||||||
cc = phasememberAt(g,i,e)
|
|
||||||
plasticState(p)%RKCK45dotState(6,:,cc) = plasticState (p)%dotState(:,cc) ! store Runge-Kutta dotState
|
mySizePlasticDotState = plasticState(p)%sizeDotState
|
||||||
do mySource = 1_pInt, phase_Nsources(p)
|
|
||||||
sourceState(p)%p(mySource)%RKCK45dotState(6,:,cc) = sourceState(p)%p(mySource)%dotState(:,cc) ! store Runge-Kutta dotState
|
plasticState(p)%RKCK45dotState(6,:,cc) = plasticState (p)%dotState(:,cc)
|
||||||
enddo
|
|
||||||
endif
|
|
||||||
enddo; enddo; enddo
|
|
||||||
!$OMP ENDDO
|
|
||||||
|
|
||||||
!$OMP DO PRIVATE(mySizePlasticDotState,mySizeSourceDotState,p,cc)
|
|
||||||
do e = FEsolving_execElem(1),FEsolving_execElem(2)
|
|
||||||
do i = FEsolving_execIP(1,e),FEsolving_execIP(2,e)
|
|
||||||
do g = 1,homogenization_Ngrains(mesh_element(3,e))
|
|
||||||
if (crystallite_todo(g,i,e)) then
|
|
||||||
p = phaseAt(g,i,e)
|
|
||||||
cc = phasememberAt(g,i,e)
|
|
||||||
|
|
||||||
! --- absolute residuum in state ---
|
|
||||||
mySizePlasticDotState = plasticState(p)%sizeDotState
|
|
||||||
plasticStateResiduum(1:mySizePlasticDotState,g,i,e) = &
|
plasticStateResiduum(1:mySizePlasticDotState,g,i,e) = &
|
||||||
matmul(transpose(plasticState(p)%RKCK45dotState(1:6,1:mySizePlasticDotState,cc)),DB) &
|
matmul(transpose(plasticState(p)%RKCK45dotState(1:6,1:mySizePlasticDotState,cc)),DB) &
|
||||||
* crystallite_subdt(g,i,e)
|
* crystallite_subdt(g,i,e)
|
||||||
|
|
||||||
|
plasticState(p)%dotState(:,cc) = &
|
||||||
|
matmul(transpose(plasticState(p)%RKCK45dotState(1:6,1:mySizePlasticDotState,cc)), B)
|
||||||
|
|
||||||
do mySource = 1_pInt, phase_Nsources(p)
|
do mySource = 1_pInt, phase_Nsources(p)
|
||||||
mySizeSourceDotState = sourceState(p)%p(mySource)%sizeDotState
|
mySizeSourceDotState = sourceState(p)%p(mySource)%sizeDotState
|
||||||
|
|
||||||
|
sourceState(p)%p(mySource)%RKCK45dotState(6,:,cc) = sourceState(p)%p(mySource)%dotState(:,cc) ! store Runge-Kutta dotState
|
||||||
|
|
||||||
sourceStateResiduum(1:mySizeSourceDotState,mySource,g,i,e) = &
|
sourceStateResiduum(1:mySizeSourceDotState,mySource,g,i,e) = &
|
||||||
matmul(transpose(sourceState(p)%p(mySource)%RKCK45dotState(1:6,1:mySizeSourceDotState,cc)),DB) &
|
matmul(transpose(sourceState(p)%p(mySource)%RKCK45dotState(1:6,1:mySizeSourceDotState,cc)),DB) &
|
||||||
* crystallite_subdt(g,i,e)
|
* crystallite_subdt(g,i,e)
|
||||||
enddo
|
|
||||||
|
|
||||||
! --- dot state ---
|
|
||||||
plasticState(p)%dotState(:,cc) = &
|
|
||||||
matmul(transpose(plasticState(p)%RKCK45dotState(1:6,1:mySizePlasticDotState,cc)), B)
|
|
||||||
do mySource = 1_pInt, phase_Nsources(p)
|
|
||||||
mySizeSourceDotState = sourceState(p)%p(mySource)%sizeDotState
|
mySizeSourceDotState = sourceState(p)%p(mySource)%sizeDotState
|
||||||
sourceState(p)%p(mySource)%dotState(:,cc) = &
|
sourceState(p)%p(mySource)%dotState(:,cc) = &
|
||||||
matmul(transpose(sourceState(p)%p(mySource)%RKCK45dotState(1:6,1:mySizeSourceDotState,cc)),B)
|
matmul(transpose(sourceState(p)%p(mySource)%RKCK45dotState(1:6,1:mySizeSourceDotState,cc)),B)
|
||||||
enddo
|
enddo
|
||||||
|
|
||||||
endif
|
endif
|
||||||
enddo; enddo; enddo
|
enddo; enddo; enddo
|
||||||
!$OMP ENDDO
|
!$OMP END PARALLEL DO
|
||||||
!$OMP END PARALLEL
|
|
||||||
|
|
||||||
call update_state(1.0_pReal)
|
call update_state(1.0_pReal)
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue