added consitency check: At least one phase must be present

This commit is contained in:
Martin Diehl 2014-05-21 13:03:59 +00:00
parent d426be49d0
commit d9e8e8fc10
1 changed files with 7 additions and 4 deletions

View File

@ -846,6 +846,13 @@ subroutine lattice_init
call IO_open_file(FILEUNIT,material_configFile) ! ... open material.config file call IO_open_file(FILEUNIT,material_configFile) ! ... open material.config file
Nphases = IO_countSections(FILEUNIT,material_partPhase) Nphases = IO_countSections(FILEUNIT,material_partPhase)
if(Nphases<1_pInt) &
call IO_error(160_pInt,Nphases, ext_msg='No phases found')
if (iand(debug_level(debug_lattice),debug_levelBasic) /= 0_pInt) then
write(6,'(a16,1x,i5)') ' # phases:',Nphases
endif
allocate(lattice_structure(Nphases),source = LATTICE_undefined_ID) allocate(lattice_structure(Nphases),source = LATTICE_undefined_ID)
allocate(lattice_C66(6,6,Nphases), source=0.0_pReal) allocate(lattice_C66(6,6,Nphases), source=0.0_pReal)
allocate(lattice_C3333(3,3,3,3,Nphases), source=0.0_pReal) allocate(lattice_C3333(3,3,3,3,Nphases), source=0.0_pReal)
@ -939,10 +946,6 @@ subroutine lattice_init
endif endif
enddo enddo
if (iand(debug_level(debug_lattice),debug_levelBasic) /= 0_pInt) then
write(6,'(a16,1x,i5)') ' # phases:',Nphases
endif
do i = 1_pInt,Nphases do i = 1_pInt,Nphases
call lattice_initializeStructure(i, CoverA(i)) call lattice_initializeStructure(i, CoverA(i))
enddo enddo