ntwin = [0] cause problems

math_expand now works for sum(how) == 0
This commit is contained in:
Martin Diehl 2018-05-02 16:44:27 +02:00
parent 74956de9bd
commit 235b2fe3c8
2 changed files with 4 additions and 1 deletions

View File

@ -386,6 +386,9 @@ pure function math_expand(what,how)
real(pReal), dimension(sum(how)) :: math_expand
integer(pInt) :: i
if (sum(how) == 0_pInt) &
return
do i = 1_pInt, size(how)
math_expand(sum(how(1:i-1))+1:sum(how(1:i))) = what(mod(i-1_pInt,size(what))+1_pInt)
enddo

View File

@ -202,7 +202,7 @@ subroutine plastic_phenopowerlaw_init(fileUnit)
allocate(totalNslip(maxNinstance), source=0_pInt)
allocate(totalNtwin(maxNinstance), source=0_pInt)
allocate(param(maxNinstance)) ! one container of parameters per instance
allocate(param(maxNinstance)) ! one container of parameters per instance
rewind(fileUnit)
phase = 0_pInt