check for erroneous total phase fraction
This commit is contained in:
parent
d1c2e2114d
commit
4ffca8f0dc
|
@ -878,7 +878,7 @@ function IO_spotTagInPart(fileUnit,part,tag,Nsections)
|
||||||
|
|
||||||
IO_spotTagInPart = .false. ! assume to nowhere spot tag
|
IO_spotTagInPart = .false. ! assume to nowhere spot tag
|
||||||
section = 0_pInt
|
section = 0_pInt
|
||||||
line =''
|
line = ''
|
||||||
|
|
||||||
rewind(fileUnit)
|
rewind(fileUnit)
|
||||||
do while (trim(line) /= IO_EOF .and. IO_lc(IO_getTag(line,'<','>')) /= part) ! search for part
|
do while (trim(line) /= IO_EOF .and. IO_lc(IO_getTag(line,'<','>')) /= part) ! search for part
|
||||||
|
|
|
@ -758,7 +758,7 @@ subroutine material_parseMicrostructure(fileUnit,myPart)
|
||||||
allocate(microstructure_elemhomo(Nsections), source=.false.)
|
allocate(microstructure_elemhomo(Nsections), source=.false.)
|
||||||
|
|
||||||
if(any(mesh_element(4,1:mesh_NcpElems) > Nsections)) &
|
if(any(mesh_element(4,1:mesh_NcpElems) > Nsections)) &
|
||||||
call IO_error(155_pInt,ext_msg='Microstructure in geometry > Sections in material.config')
|
call IO_error(155_pInt,ext_msg='More microstructures in geometry than sections in material.config')
|
||||||
|
|
||||||
forall (e = 1_pInt:mesh_NcpElems) microstructure_active(mesh_element(4,e)) = .true. ! current microstructure used in model? Elementwise view, maximum N operations for N elements
|
forall (e = 1_pInt:mesh_NcpElems) microstructure_active(mesh_element(4,e)) = .true. ! current microstructure used in model? Elementwise view, maximum N operations for N elements
|
||||||
|
|
||||||
|
@ -801,7 +801,7 @@ subroutine material_parseMicrostructure(fileUnit,myPart)
|
||||||
microstructure_crystallite(section) = IO_intValue(line,chunkPos,2_pInt)
|
microstructure_crystallite(section) = IO_intValue(line,chunkPos,2_pInt)
|
||||||
case ('(constituent)')
|
case ('(constituent)')
|
||||||
constituent = constituent + 1_pInt
|
constituent = constituent + 1_pInt
|
||||||
do i=2_pInt,6_pInt,2_pInt
|
do i = 2_pInt,6_pInt,2_pInt
|
||||||
tag = IO_lc(IO_stringValue(line,chunkPos,i))
|
tag = IO_lc(IO_stringValue(line,chunkPos,i))
|
||||||
select case (tag)
|
select case (tag)
|
||||||
case('phase')
|
case('phase')
|
||||||
|
@ -816,6 +816,11 @@ subroutine material_parseMicrostructure(fileUnit,myPart)
|
||||||
endif
|
endif
|
||||||
enddo
|
enddo
|
||||||
|
|
||||||
|
!sanity check
|
||||||
|
do section = 1_pInt, Nsections
|
||||||
|
if (sum(microstructure_fraction(:,section)) /= 1.0_pReal) &
|
||||||
|
call IO_error(153_pInt,ext_msg=microstructure_name(section))
|
||||||
|
enddo
|
||||||
end subroutine material_parseMicrostructure
|
end subroutine material_parseMicrostructure
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue