standard indexing: ce(ll) instead of element and integration point

This commit is contained in:
Martin Diehl 2023-12-28 19:15:26 +01:00
parent 0d747ae5e4
commit 77e1c5a8a7
No known key found for this signature in database
GPG Key ID: 1FD50837275A0A9B
2 changed files with 14 additions and 12 deletions

View File

@ -326,11 +326,8 @@ module phase
real(pREAL) :: f
end function phase_f_T
module subroutine plastic_nonlocal_updateCompatibility(orientation,ph,ip,el)
integer, intent(in) :: &
ph, &
ip, &
el
module subroutine plastic_nonlocal_updateCompatibility(orientation,ce)
integer, intent(in) :: ce
type(tRotationContainer), dimension(:), intent(in) :: orientation
end subroutine plastic_nonlocal_updateCompatibility
@ -590,7 +587,7 @@ subroutine crystallite_orientations(co,ip,el)
call phase_O(ph)%data(en)%fromMatrix(transpose(math_rotationalPart(mechanical_F_e(ph,en))))
if (plasticState(material_ID_phase(1,(el-1)*discretization_nIPs + ip))%nonlocal) &
call plastic_nonlocal_updateCompatibility(phase_O,material_ID_phase(1,(el-1)*discretization_nIPs + ip),ip,el)
call plastic_nonlocal_updateCompatibility(phase_O,(el-1)*discretization_nIPs + ip)
end subroutine crystallite_orientations

View File

@ -1331,18 +1331,19 @@ end function rhoDotFlux
! plane normals and signed cosine of the angle between the slip directions. Only the largest values
! that sum up to a total of 1 are considered, all others are set to zero.
!--------------------------------------------------------------------------------------------------
module subroutine plastic_nonlocal_updateCompatibility(orientation,ph,ip,el)
module subroutine plastic_nonlocal_updateCompatibility(orientation,ce)
type(tRotationContainer), dimension(:), intent(in) :: &
orientation ! crystal orientation
integer, intent(in) :: &
ph, &
ip, &
el
ce
integer :: &
n, & ! neighbor index
ph, &
en, &
ip, &
el, &
neighbor_e, & ! element index of my neighbor
neighbor_i, & ! integration point index of my neighbor
neighbor_me, &
@ -1350,17 +1351,21 @@ module subroutine plastic_nonlocal_updateCompatibility(orientation,ph,ip,el)
ns, & ! number of active slip systems
s1, & ! slip system index (en)
s2 ! slip system index (my neighbor)
real(pREAL), dimension(2,param(ph)%sum_N_sl,param(ph)%sum_N_sl,nIPneighbors) :: &
real(pREAL), dimension(2,param(material_ID_phase(1,ce))%sum_N_sl,param(material_ID_phase(1,ce))%sum_N_sl,nIPneighbors) :: &
my_compatibility ! my_compatibility for current element and ip
real(pREAL) :: &
my_compatibilitySum, &
thresholdValue, &
nThresholdValues
logical, dimension(param(ph)%sum_N_sl) :: &
logical, dimension(param(material_ID_phase(1,ce))%sum_N_sl) :: &
belowThreshold
type(tRotation) :: mis
ph = material_ID_phase(1,ce)
el = (ce-1)/discretization_nIPs + 1
ip = modulo(ce-1,discretization_nIPs) + 1
associate(prm => param(ph))
ns = prm%sum_N_sl