using array size not to rely on correctly set variable, cleaning crystallite data after use
This commit is contained in:
parent
98cc56968e
commit
bb415e8a02
|
@ -171,7 +171,10 @@ subroutine crystallite_init
|
|||
IO_write_jobFile, &
|
||||
IO_error
|
||||
use material
|
||||
use config
|
||||
use config, only: &
|
||||
crystalliteConfig, &
|
||||
crystallite_name, &
|
||||
config_deallocate
|
||||
use constitutive, only: &
|
||||
constitutive_initialFi, &
|
||||
constitutive_microstructure ! derived (shortcut) quantities of given state
|
||||
|
@ -259,15 +262,15 @@ subroutine crystallite_init
|
|||
allocate(crystallite_clearToCutback(iMax,eMax), source=.true.)
|
||||
allocate(crystallite_neighborEnforcedCutback(iMax,eMax), source=.false.)
|
||||
allocate(crystallite_output(maxval(crystallite_Noutput), &
|
||||
material_Ncrystallite)) ; crystallite_output = ''
|
||||
size(crystalliteConfig))) ; crystallite_output = ''
|
||||
allocate(crystallite_outputID(maxval(crystallite_Noutput), &
|
||||
material_Ncrystallite), source=undefined_ID)
|
||||
allocate(crystallite_sizePostResults(material_Ncrystallite),source=0_pInt)
|
||||
size(crystalliteConfig)), source=undefined_ID)
|
||||
allocate(crystallite_sizePostResults(size(crystalliteConfig)),source=0_pInt)
|
||||
allocate(crystallite_sizePostResult(maxval(crystallite_Noutput), &
|
||||
material_Ncrystallite), source=0_pInt)
|
||||
size(crystalliteConfig)), source=0_pInt)
|
||||
|
||||
|
||||
do c = 1_pInt, material_Ncrystallite
|
||||
do c = 1_pInt, size(crystalliteConfig)
|
||||
#if defined(__GFORTRAN__)
|
||||
str = ['GfortranBug86277']
|
||||
str = crystalliteConfig(c)%getStrings('(output)',defaultVal=str)
|
||||
|
@ -329,7 +332,7 @@ subroutine crystallite_init
|
|||
enddo
|
||||
|
||||
|
||||
do r = 1_pInt,material_Ncrystallite
|
||||
do r = 1_pInt,size(crystalliteConfig)
|
||||
do o = 1_pInt,crystallite_Noutput(r)
|
||||
select case(crystallite_outputID(o,r))
|
||||
case(phase_ID,texture_ID,volume_ID,grainrotationx_ID,grainrotationy_ID,grainrotationz_ID)
|
||||
|
@ -361,7 +364,7 @@ subroutine crystallite_init
|
|||
if (worldrank == 0_pInt) then
|
||||
call IO_write_jobFile(FILEUNIT,'outputCrystallite')
|
||||
|
||||
do r = 1_pInt,material_Ncrystallite
|
||||
do r = 1_pInt,size(crystalliteConfig)
|
||||
if (any(microstructure_crystallite(mesh_element(4,:)) == r)) then
|
||||
write(FILEUNIT,'(/,a,/)') '['//trim(crystallite_name(r))//']'
|
||||
do o = 1_pInt,crystallite_Noutput(r)
|
||||
|
@ -373,6 +376,8 @@ subroutine crystallite_init
|
|||
close(FILEUNIT)
|
||||
endif
|
||||
|
||||
call config_deallocate('material.config/crystallite')
|
||||
|
||||
!--------------------------------------------------------------------------------------------------
|
||||
! initialize
|
||||
!$OMP PARALLEL DO PRIVATE(myNcomponents)
|
||||
|
|
Loading…
Reference in New Issue