deallocating config, simplifying
This commit is contained in:
parent
bb415e8a02
commit
ea80e04ea8
|
@ -60,12 +60,12 @@ module config
|
||||||
MATERIAL_partHomogenization = 'homogenization', & !< keyword for homogenization part
|
MATERIAL_partHomogenization = 'homogenization', & !< keyword for homogenization part
|
||||||
MATERIAL_partCrystallite = 'crystallite', & !< keyword for crystallite part
|
MATERIAL_partCrystallite = 'crystallite', & !< keyword for crystallite part
|
||||||
MATERIAL_partPhase = 'phase', & !< keyword for phase part
|
MATERIAL_partPhase = 'phase', & !< keyword for phase part
|
||||||
MATERIAL_partMicrostructure = 'microstructure', & !< keyword for microstructure part
|
MATERIAL_partMicrostructure = 'microstructure' !< keyword for microstructure part
|
||||||
|
character(len=*), parameter, private :: &
|
||||||
MATERIAL_partTexture = 'texture' !< keyword for texture part
|
MATERIAL_partTexture = 'texture' !< keyword for texture part
|
||||||
|
|
||||||
! ToDo: Remove, use size(phaseConfig) etc
|
! ToDo: Remove, use size(phaseConfig) etc
|
||||||
integer(pInt), public, protected :: &
|
integer(pInt), public, protected :: &
|
||||||
material_Ntexture, & !< number of textures
|
|
||||||
material_Nphase, & !< number of phases
|
material_Nphase, & !< number of phases
|
||||||
material_Nhomogenization, & !< number of homogenizations
|
material_Nhomogenization, & !< number of homogenizations
|
||||||
material_Nmicrostructure, & !< number of microstructures
|
material_Nmicrostructure, & !< number of microstructures
|
||||||
|
@ -165,8 +165,7 @@ subroutine config_init()
|
||||||
if (material_Ncrystallite < 1_pInt) call IO_error(160_pInt,ext_msg=material_partCrystallite)
|
if (material_Ncrystallite < 1_pInt) call IO_error(160_pInt,ext_msg=material_partCrystallite)
|
||||||
material_Nphase = size(phaseConfig)
|
material_Nphase = size(phaseConfig)
|
||||||
if (material_Nphase < 1_pInt) call IO_error(160_pInt,ext_msg=material_partPhase)
|
if (material_Nphase < 1_pInt) call IO_error(160_pInt,ext_msg=material_partPhase)
|
||||||
material_Ntexture = size(textureConfig)
|
if (size(textureConfig) < 1_pInt) call IO_error(160_pInt,ext_msg=material_partTexture)
|
||||||
if (material_Ntexture < 1_pInt) call IO_error(160_pInt,ext_msg=material_partTexture)
|
|
||||||
|
|
||||||
end subroutine config_init
|
end subroutine config_init
|
||||||
|
|
||||||
|
|
|
@ -100,8 +100,13 @@ subroutine homogenization_init
|
||||||
use crystallite, only: &
|
use crystallite, only: &
|
||||||
crystallite_maxSizePostResults
|
crystallite_maxSizePostResults
|
||||||
#endif
|
#endif
|
||||||
|
use config, only: &
|
||||||
|
config_deallocate, &
|
||||||
|
material_configFile, &
|
||||||
|
material_localFileExt, &
|
||||||
|
homogenizationConfig, &
|
||||||
|
homogenization_name
|
||||||
use material
|
use material
|
||||||
use config
|
|
||||||
use homogenization_none
|
use homogenization_none
|
||||||
use homogenization_isostrain
|
use homogenization_isostrain
|
||||||
use homogenization_RGC
|
use homogenization_RGC
|
||||||
|
@ -197,7 +202,7 @@ subroutine homogenization_init
|
||||||
! write description file for homogenization output
|
! write description file for homogenization output
|
||||||
mainProcess2: if (worldrank == 0) then
|
mainProcess2: if (worldrank == 0) then
|
||||||
call IO_write_jobFile(FILEUNIT,'outputHomogenization')
|
call IO_write_jobFile(FILEUNIT,'outputHomogenization')
|
||||||
do p = 1,material_Nhomogenization
|
do p = 1,size(homogenizationConfig)
|
||||||
if (any(material_homog == p)) then
|
if (any(material_homog == p)) then
|
||||||
i = homogenization_typeInstance(p) ! which instance of this homogenization type
|
i = homogenization_typeInstance(p) ! which instance of this homogenization type
|
||||||
valid = .true. ! assume valid
|
valid = .true. ! assume valid
|
||||||
|
@ -370,6 +375,8 @@ subroutine homogenization_init
|
||||||
close(FILEUNIT)
|
close(FILEUNIT)
|
||||||
endif mainProcess2
|
endif mainProcess2
|
||||||
|
|
||||||
|
call config_deallocate('material.config/homogenization')
|
||||||
|
|
||||||
!--------------------------------------------------------------------------------------------------
|
!--------------------------------------------------------------------------------------------------
|
||||||
! allocate and initialize global variables
|
! allocate and initialize global variables
|
||||||
allocate(materialpoint_dPdF(3,3,3,3,mesh_maxNips,mesh_NcpElems), source=0.0_pReal)
|
allocate(materialpoint_dPdF(3,3,3,3,mesh_maxNips,mesh_NcpElems), source=0.0_pReal)
|
||||||
|
@ -395,7 +402,7 @@ subroutine homogenization_init
|
||||||
vacancyflux_maxSizePostResults = 0_pInt
|
vacancyflux_maxSizePostResults = 0_pInt
|
||||||
porosity_maxSizePostResults = 0_pInt
|
porosity_maxSizePostResults = 0_pInt
|
||||||
hydrogenflux_maxSizePostResults = 0_pInt
|
hydrogenflux_maxSizePostResults = 0_pInt
|
||||||
do p = 1,material_Nhomogenization
|
do p = 1,size(homogenizationConfig)
|
||||||
homogenization_maxSizePostResults = max(homogenization_maxSizePostResults,homogState (p)%sizePostResults)
|
homogenization_maxSizePostResults = max(homogenization_maxSizePostResults,homogState (p)%sizePostResults)
|
||||||
thermal_maxSizePostResults = max(thermal_maxSizePostResults, thermalState (p)%sizePostResults)
|
thermal_maxSizePostResults = max(thermal_maxSizePostResults, thermalState (p)%sizePostResults)
|
||||||
damage_maxSizePostResults = max(damage_maxSizePostResults ,damageState (p)%sizePostResults)
|
damage_maxSizePostResults = max(damage_maxSizePostResults ,damageState (p)%sizePostResults)
|
||||||
|
|
|
@ -360,7 +360,8 @@ subroutine material_init()
|
||||||
homogenization_name, &
|
homogenization_name, &
|
||||||
microstructure_name, &
|
microstructure_name, &
|
||||||
phase_name, &
|
phase_name, &
|
||||||
texture_name
|
texture_name, &
|
||||||
|
config_deallocate
|
||||||
use mesh, only: &
|
use mesh, only: &
|
||||||
mesh_maxNips, &
|
mesh_maxNips, &
|
||||||
mesh_NcpElems, &
|
mesh_NcpElems, &
|
||||||
|
@ -468,6 +469,7 @@ subroutine material_init()
|
||||||
endif debugOut
|
endif debugOut
|
||||||
|
|
||||||
call material_populateGrains
|
call material_populateGrains
|
||||||
|
call config_deallocate('material.config/microstructure')
|
||||||
|
|
||||||
allocate(phaseAt ( homogenization_maxNgrains,mesh_maxNips,mesh_NcpElems),source=0_pInt)
|
allocate(phaseAt ( homogenization_maxNgrains,mesh_maxNips,mesh_NcpElems),source=0_pInt)
|
||||||
allocate(phasememberAt ( homogenization_maxNgrains,mesh_maxNips,mesh_NcpElems),source=0_pInt)
|
allocate(phasememberAt ( homogenization_maxNgrains,mesh_maxNips,mesh_NcpElems),source=0_pInt)
|
||||||
|
@ -918,7 +920,8 @@ subroutine material_parseTexture
|
||||||
IO_floatValue, &
|
IO_floatValue, &
|
||||||
IO_stringValue
|
IO_stringValue
|
||||||
use config, only: &
|
use config, only: &
|
||||||
textureConfig
|
textureConfig, &
|
||||||
|
config_deallocate
|
||||||
use math, only: &
|
use math, only: &
|
||||||
inRad, &
|
inRad, &
|
||||||
math_sampleRandomOri, &
|
math_sampleRandomOri, &
|
||||||
|
@ -1056,7 +1059,8 @@ subroutine material_parseTexture
|
||||||
enddo
|
enddo
|
||||||
endif
|
endif
|
||||||
enddo
|
enddo
|
||||||
|
|
||||||
|
call config_deallocate('material.config/texture')
|
||||||
|
|
||||||
end subroutine material_parseTexture
|
end subroutine material_parseTexture
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue