no need to store relative residual for all points
This commit is contained in:
parent
31906e3ebd
commit
46be595ea8
|
@ -1787,18 +1787,19 @@ subroutine integrateStateAdaptiveEuler()
|
||||||
s, &
|
s, &
|
||||||
sizeDotState
|
sizeDotState
|
||||||
|
|
||||||
! ToDo: MD: once all constitutives use allocate state, attach residuum arrays to the state in case of adaptive Euler
|
! 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) :: &
|
||||||
residuum_plastic, &
|
residuum_plastic
|
||||||
residuum_plastic_rel
|
|
||||||
real(pReal), dimension(constitutive_source_maxSizeDotState,&
|
real(pReal), dimension(constitutive_source_maxSizeDotState,&
|
||||||
maxval(phase_Nsources), &
|
maxval(phase_Nsources), &
|
||||||
homogenization_maxNgrains,mesh_maxNips,mesh_NcpElems) :: &
|
homogenization_maxNgrains,mesh_maxNips,mesh_NcpElems) :: &
|
||||||
residuum_source_rel, &
|
|
||||||
residuum_source
|
residuum_source
|
||||||
|
|
||||||
|
real(pReal), dimension(constitutive_plasticity_maxSizeDotState) :: &
|
||||||
|
residuum_plastic_rel
|
||||||
|
real(pReal), dimension(constitutive_source_maxSizeDotState) :: &
|
||||||
|
residuum_source_rel
|
||||||
|
|
||||||
!--------------------------------------------------------------------------------------------------
|
!--------------------------------------------------------------------------------------------------
|
||||||
! contribution to state and relative residui and from Euler integration
|
! contribution to state and relative residui and from Euler integration
|
||||||
|
@ -1828,10 +1829,10 @@ real(pReal), dimension(constitutive_plasticity_maxSizeDotState, &
|
||||||
enddo; enddo; enddo
|
enddo; enddo; enddo
|
||||||
!$OMP END PARALLEL DO
|
!$OMP END PARALLEL DO
|
||||||
|
|
||||||
call update_deltaState
|
call update_deltaState
|
||||||
call update_dependentState
|
call update_dependentState
|
||||||
call update_stress(1.0_pReal)
|
call update_stress(1.0_pReal)
|
||||||
call update_dotState(1.0_pReal)
|
call update_dotState(1.0_pReal)
|
||||||
|
|
||||||
!$OMP PARALLEL DO PRIVATE(sizeDotState,p,c)
|
!$OMP PARALLEL DO PRIVATE(sizeDotState,p,c)
|
||||||
do e = FEsolving_execElem(1),FEsolving_execElem(2)
|
do e = FEsolving_execElem(1),FEsolving_execElem(2)
|
||||||
|
@ -1840,20 +1841,18 @@ real(pReal), dimension(constitutive_plasticity_maxSizeDotState, &
|
||||||
if (crystallite_todo(g,i,e) .and. .not. crystallite_converged(g,i,e)) then
|
if (crystallite_todo(g,i,e) .and. .not. crystallite_converged(g,i,e)) then
|
||||||
p = phaseAt(g,i,e); c = phasememberAt(g,i,e)
|
p = phaseAt(g,i,e); c = phasememberAt(g,i,e)
|
||||||
sizeDotState = plasticState(p)%sizeDotState
|
sizeDotState = plasticState(p)%sizeDotState
|
||||||
|
|
||||||
! --- contribution of heun step to absolute residui ---
|
|
||||||
|
|
||||||
residuum_plastic(1:sizeDotState,g,i,e) = residuum_plastic(1:sizeDotState,g,i,e) &
|
residuum_plastic(1:sizeDotState,g,i,e) = residuum_plastic(1:sizeDotState,g,i,e) &
|
||||||
+ 0.5_pReal * plasticState(p)%dotState(:,c) * crystallite_subdt(g,i,e)
|
+ 0.5_pReal * plasticState(p)%dotState(:,c) * crystallite_subdt(g,i,e)
|
||||||
|
|
||||||
where(dNeq0(plasticState(p)%dotState(1:sizeDotState,c)))
|
where(dNeq0(plasticState(p)%dotState(1:sizeDotState,c)))
|
||||||
residuum_plastic_rel(1:sizeDotState,g,i,e) = residuum_plastic(1:sizeDotState,g,i,e) &
|
residuum_plastic_rel(1:sizeDotState) = residuum_plastic(1:sizeDotState,g,i,e) &
|
||||||
/ plasticState(p)%dotState(1:sizeDotState,c)
|
/ plasticState(p)%dotState(1:sizeDotState,c)
|
||||||
else where
|
else where
|
||||||
residuum_plastic_rel(1:sizeDotState,g,i,e) = 0.0_pReal
|
residuum_plastic_rel(1:sizeDotState) = 0.0_pReal
|
||||||
end where
|
end where
|
||||||
|
|
||||||
crystallite_converged(g,i,e) = all(abs(residuum_plastic_rel(1:sizeDotState,g,i,e)) < &
|
crystallite_converged(g,i,e) = all(abs(residuum_plastic_rel(1:sizeDotState)) < &
|
||||||
rTol_crystalliteState .or. &
|
rTol_crystalliteState .or. &
|
||||||
abs(residuum_plastic(1:sizeDotState,g,i,e)) < &
|
abs(residuum_plastic(1:sizeDotState,g,i,e)) < &
|
||||||
plasticState(p)%aTolState(1:sizeDotState))
|
plasticState(p)%aTolState(1:sizeDotState))
|
||||||
|
@ -1865,14 +1864,14 @@ real(pReal), dimension(constitutive_plasticity_maxSizeDotState, &
|
||||||
+ 0.5_pReal * sourceState(p)%p(s)%dotState(:,c) * crystallite_subdt(g,i,e)
|
+ 0.5_pReal * sourceState(p)%p(s)%dotState(:,c) * crystallite_subdt(g,i,e)
|
||||||
|
|
||||||
where(dNeq0(sourceState(p)%p(s)%dotState(1:sizeDotState,c)))
|
where(dNeq0(sourceState(p)%p(s)%dotState(1:sizeDotState,c)))
|
||||||
residuum_source_rel(1:sizeDotState,s,g,i,e) = residuum_source(1:sizeDotState,s,g,i,e) &
|
residuum_source_rel(1:sizeDotState) = residuum_source(1:sizeDotState,s,g,i,e) &
|
||||||
/ sourceState(p)%p(s)%dotState(1:sizeDotState,c)
|
/ sourceState(p)%p(s)%dotState(1:sizeDotState,c)
|
||||||
else where
|
else where
|
||||||
residuum_source_rel(1:SizeDotState,s,g,i,e) = 0.0_pReal
|
residuum_source_rel(1:SizeDotState) = 0.0_pReal
|
||||||
end where
|
end where
|
||||||
|
|
||||||
crystallite_converged(g,i,e) = crystallite_converged(g,i,e) .and. &
|
crystallite_converged(g,i,e) = crystallite_converged(g,i,e) .and. &
|
||||||
all(abs(residuum_source_rel(1:sizeDotState,s,g,i,e)) < &
|
all(abs(residuum_source_rel(1:sizeDotState)) < &
|
||||||
rTol_crystalliteState .or. &
|
rTol_crystalliteState .or. &
|
||||||
abs(residuum_source(1:sizeDotState,s,g,i,e)) < &
|
abs(residuum_source(1:sizeDotState,s,g,i,e)) < &
|
||||||
sourceState(p)%p(s)%aTolState(1:sizeDotState))
|
sourceState(p)%p(s)%aTolState(1:sizeDotState))
|
||||||
|
|
Loading…
Reference in New Issue