sanity check for phase and texture index out of bounds was errorenous...

This commit is contained in:
Philip Eisenlohr 2009-03-09 13:58:59 +00:00
parent c0899b3097
commit dde0af0b37
1 changed files with 4 additions and 2 deletions

View File

@ -77,9 +77,11 @@ subroutine material_init()
call material_parsePhase(fileunit) call material_parsePhase(fileunit)
close(fileunit) close(fileunit)
if (minval(microstructure_phase) < 1 .or. maxval(microstructure_phase) > material_Nphase) call IO_error(150)
if (minval(microstructure_texture) < 1 .or. maxval(microstructure_texture) > material_Ntexture) call IO_error(160)
do i = 1,material_Nmicrostructure do i = 1,material_Nmicrostructure
if (minval(microstructure_phase(1:microstructure_Nconstituents(i),i)) < 1 .or. &
maxval(microstructure_phase(1:microstructure_Nconstituents(i),i)) > material_Nphase) call IO_error(150,i)
if (minval(microstructure_texture(1:microstructure_Nconstituents(i),i)) < 1 .or. &
maxval(microstructure_texture(1:microstructure_Nconstituents(i),i)) > material_Nphase) call IO_error(160,i)
if (sum(microstructure_fraction(:,i)) /= 1.0_pReal) call IO_error(170,i) if (sum(microstructure_fraction(:,i)) /= 1.0_pReal) call IO_error(170,i)
enddo enddo
write (6,*) write (6,*)