material.config is read in centrally

moving data from material to config_material. use statements need to
change. All aspects of reading from file will be removed from the
individual modules
This commit is contained in:
Martin Diehl 2018-06-10 18:01:52 +02:00
parent f8ae0ec925
commit 91d9c11612
46 changed files with 146 additions and 345 deletions

View File

@ -42,7 +42,7 @@ add_dependencies(CHAINED_LIST DEBUG)
list(APPEND OBJECTFILES $<TARGET_OBJECTS:CHAINED_LIST>)
add_library(CONFIG_MATERIAL OBJECT "config_material.f90")
add_dependencies(CONFIG_MATERIAL DEBUG)
add_dependencies(CONFIG_MATERIAL CHAINED_LIST)
list(APPEND OBJECTFILES $<TARGET_OBJECTS:CONFIG_MATERIAL>)
add_library(FEsolving OBJECT "FEsolving.f90")
@ -68,7 +68,7 @@ elseif ("${PROJECT_NAME}" STREQUAL "DAMASK_FEM")
endif()
add_library(MATERIAL OBJECT "material.f90")
add_dependencies(MATERIAL MESH CHAINED_LIST)
add_dependencies(MATERIAL MESH CONFIG_MATERIAL)
list(APPEND OBJECTFILES $<TARGET_OBJECTS:MATERIAL>)
add_library(DAMASK_HELPERS OBJECT "lattice.f90")

View File

@ -143,7 +143,8 @@ subroutine CPFEM_init
material_phase, &
homogState, &
phase_plasticity, &
plasticState, &
plasticState
use config_material, only: &
material_Nhomogenization
use crystallite, only: &
crystallite_F0, &
@ -310,7 +311,8 @@ subroutine CPFEM_general(mode, parallelExecution, ffn, ffn1, temperature_inp, dt
thermal_type, &
THERMAL_conduction_ID, &
phase_Nsources, &
material_homog, &
material_homog
use config_material, only: &
material_Nhomogenization
use crystallite, only: &
crystallite_partionedF,&

View File

@ -108,7 +108,8 @@ subroutine CPFEM_init
material_phase, &
homogState, &
phase_plasticity, &
plasticState, &
plasticState
use config_material, only: &
material_Nhomogenization
use crystallite, only: &
crystallite_F0, &
@ -228,7 +229,8 @@ subroutine CPFEM_age()
hydrogenfluxState, &
material_phase, &
phase_plasticity, &
phase_Nsources, &
phase_Nsources
use config_material, only: &
material_Nhomogenization
use crystallite, only: &
crystallite_partionedF,&

View File

@ -11,8 +11,8 @@ module config_material
pReal, &
pInt
implicit none
private
type(tPartitionedStringList), private,protected, allocatable, dimension(:) :: &
!private
type(tPartitionedStringList), public, protected, allocatable, dimension(:) :: &
phaseConfig, &
microstructureConfig, &
homogenizationConfig, &
@ -24,7 +24,7 @@ module config_material
crystallite_name, & !< name of each crystallite setting
microstructure_name, & !< name of each microstructure
texture_name !< name of each texture
character(len=*), parameter :: &
character(len=*), parameter, public :: &
MATERIAL_partHomogenization = 'homogenization', & !< keyword for homogenization part
MATERIAL_partCrystallite = 'crystallite', & !< keyword for crystallite part
MATERIAL_partPhase = 'phase',& !< keyword for phase part
@ -38,6 +38,9 @@ module config_material
material_Nmicrostructure, & !< number of microstructures
material_Ncrystallite !< number of crystallite settings
character(len=*), parameter, public :: &
MATERIAL_configFile = 'material.config', & !< generic name for material configuration file
MATERIAL_localFileExt = 'materialConfig' !< extension of solver job name depending material configuration file
contains
@ -59,14 +62,7 @@ subroutine config_material_init()
use debug, only: &
debug_level, &
debug_material, &
debug_levelBasic, &
debug_levelExtensive
use mesh, only: &
mesh_maxNips, &
mesh_NcpElems, &
mesh_element, &
FE_Nips, &
FE_geomtype
debug_levelBasic
implicit none
integer(pInt), parameter :: FILEUNIT = 200_pInt
@ -83,9 +79,6 @@ subroutine config_material_init()
character(len=65536) :: &
line,part
character(len=*), parameter :: &
MATERIAL_configFile = 'material.config', & !< generic name for material configuration file
MATERIAL_localFileExt = 'materialConfig' !< extension of solver job name depending material configuration file
myDebug = debug_level(debug_material)
@ -147,7 +140,7 @@ end subroutine config_material_init
!--------------------------------------------------------------------------------------------------
!> @brief parses the homogenization part in the material configuration file
!--------------------------------------------------------------------------------------------------
subroutine parseFile(partLabel,part,fileUnit,nextLine)
subroutine parseFile(sectionNames,part,fileUnit,line)
use IO, only: &
IO_read, &
IO_error, &
@ -160,21 +153,19 @@ subroutine parseFile(partLabel,part,fileUnit,nextLine)
implicit none
integer(pInt), intent(in) :: fileUnit
character(len=*), dimension(:), allocatable, intent(inout) :: sectionNames
type(tPartitionedStringList), allocatable, dimension(:), intent(inout) :: part
character(len=65536),intent(out) :: line
integer(pInt), allocatable, dimension(:) :: chunkPos
integer(pInt) :: Nsections, h
character(len=65536) :: line, tag,devNull
character(len=65536) :: nextLine
character(len=64) :: tag2
integer(pInt) :: Nsections, s
character(len=65536) :: devNull
character(len=64) :: tag
logical :: echo
type(tPartitionedStringList), allocatable, dimension(:), intent(inout) :: &
part
character(len=*), dimension(:), allocatable, intent(inout) :: partLabel
allocate(part(0))
h = 0_pInt
s = 0_pInt
do while (trim(line) /= IO_EOF) ! read through sections of material part
line = IO_read(fileUnit)
if (IO_isBlank(line)) cycle ! skip empty lines
@ -183,20 +174,19 @@ subroutine parseFile(partLabel,part,fileUnit,nextLine)
exit
endif foundNextPart
nextSection: if (IO_getTag(line,'[',']') /= '') then
h = h + 1_pInt
s = s + 1_pInt
part = [part, emptyList]
tag2 = IO_getTag(line,'[',']')
GfortranBug86033: if (.not. allocated(partLabel)) then
allocate(partLabel(1),source=tag2)
tag = IO_getTag(line,'[',']')
GfortranBug86033: if (.not. allocated(sectionNames)) then
allocate(sectionNames(1),source=tag)
else GfortranBug86033
partLabel = [partLabel,tag2]
sectionNames = [sectionNames,tag]
endif GfortranBug86033
endif nextSection
chunkPos = IO_stringPos(line)
tag = IO_lc(IO_stringValue(trim(line),chunkPos,1_pInt)) ! extract key
inSection: if (h > 0_pInt) then
chunkPos = IO_stringPos(line)
call part(h)%add(IO_lc(trim(line)))
inSection: if (s > 0_pInt) then
call part(s)%add(IO_lc(trim(line)))
else inSection
echo = (trim(tag) == '/echo/')
endif inSection

View File

@ -59,12 +59,13 @@ subroutine constitutive_init()
IO_timeStamp
use mesh, only: &
FE_geomtype
use material, only: &
material_phase, &
use config_material, only: &
material_Nphase, &
material_localFileExt, &
material_configFile, &
phase_name, &
material_configFile
use material, only: &
material_phase, &
phase_plasticity, &
phase_plasticityInstance, &
phase_Nsources, &

View File

@ -171,6 +171,7 @@ subroutine crystallite_init
IO_write_jobFile, &
IO_error
use material
use config_material
use constitutive, only: &
constitutive_initialFi, &
constitutive_microstructure ! derived (shortcut) quantities of given state
@ -1236,8 +1237,9 @@ subroutine crystallite_integrateStateRK4()
plasticState, &
sourceState, &
phase_Nsources, &
material_Nphase, &
phaseAt, phasememberAt
use config_material, only: &
material_Nphase
use constitutive, only: &
constitutive_collectDotState, &
constitutive_microstructure

View File

@ -70,7 +70,8 @@ subroutine damage_local_init(fileUnit)
damageState, &
damageMapping, &
damage, &
damage_initialPhi, &
damage_initialPhi
use config_material, only: &
material_partHomogenization
implicit none

View File

@ -26,6 +26,7 @@ subroutine damage_none_init()
use IO, only: &
IO_timeStamp
use material
use config_material
implicit none
integer(pInt) :: &

View File

@ -75,7 +75,8 @@ subroutine damage_nonlocal_init(fileUnit)
damageState, &
damageMapping, &
damage, &
damage_initialPhi, &
damage_initialPhi
use config_material, only: &
material_partHomogenization
implicit none

View File

@ -101,6 +101,7 @@ subroutine homogenization_init
crystallite_maxSizePostResults
#endif
use material
use config_material
use homogenization_none
use homogenization_isostrain
use homogenization_RGC

View File

@ -100,6 +100,7 @@ subroutine homogenization_RGC_init(fileUnit)
FE_geomtype
use IO
use material
use config_material
implicit none
integer(pInt), intent(in) :: fileUnit !< file pointer to material configuration

View File

@ -62,6 +62,7 @@ subroutine homogenization_isostrain_init(fileUnit)
debug_levelBasic
use IO
use material
use config_material
implicit none
integer(pInt), intent(in) :: fileUnit

View File

@ -29,6 +29,7 @@ subroutine homogenization_none_init()
use IO, only: &
IO_timeStamp
use material
use config_material
implicit none
integer(pInt) :: &

View File

@ -81,7 +81,8 @@ subroutine hydrogenflux_cahnhilliard_init(fileUnit)
hydrogenfluxMapping, &
hydrogenConc, &
hydrogenConcRate, &
hydrogenflux_initialCh, &
hydrogenflux_initialCh
use config_material, only: &
material_partHomogenization, &
material_partPhase

View File

@ -27,6 +27,7 @@ subroutine hydrogenflux_isoconc_init()
use IO, only: &
IO_timeStamp
use material
use config_material
implicit none
integer(pInt) :: &

View File

@ -78,7 +78,8 @@ subroutine kinematics_cleavage_opening_init(fileUnit)
phase_Nkinematics, &
phase_Noutput, &
KINEMATICS_cleavage_opening_label, &
KINEMATICS_cleavage_opening_ID, &
KINEMATICS_cleavage_opening_ID
use config_material, only: &
material_Nphase, &
MATERIAL_partPhase
use lattice, only: &

View File

@ -68,7 +68,8 @@ subroutine kinematics_hydrogen_strain_init(fileUnit)
phase_Nkinematics, &
phase_Noutput, &
KINEMATICS_hydrogen_strain_label, &
KINEMATICS_hydrogen_strain_ID, &
KINEMATICS_hydrogen_strain_ID
use config_material, only: &
material_Nphase, &
MATERIAL_partPhase

View File

@ -78,7 +78,8 @@ subroutine kinematics_slipplane_opening_init(fileUnit)
phase_Nkinematics, &
phase_Noutput, &
KINEMATICS_slipplane_opening_label, &
KINEMATICS_slipplane_opening_ID, &
KINEMATICS_slipplane_opening_ID
use config_material, only: &
material_Nphase, &
MATERIAL_partPhase
use lattice, only: &

View File

@ -68,7 +68,8 @@ subroutine kinematics_thermal_expansion_init(fileUnit)
phase_Nkinematics, &
phase_Noutput, &
KINEMATICS_thermal_expansion_label, &
KINEMATICS_thermal_expansion_ID, &
KINEMATICS_thermal_expansion_ID
use config_material, only: &
material_Nphase, &
MATERIAL_partPhase

View File

@ -68,7 +68,8 @@ subroutine kinematics_vacancy_strain_init(fileUnit)
phase_Nkinematics, &
phase_Noutput, &
KINEMATICS_vacancy_strain_label, &
KINEMATICS_vacancy_strain_ID, &
KINEMATICS_vacancy_strain_ID
use config_material, only: &
material_Nphase, &
MATERIAL_partPhase

View File

@ -1263,7 +1263,7 @@ subroutine lattice_init
IO_stringPos, &
IO_stringValue, &
IO_floatValue
use material, only: &
use config_material, only: &
material_configfile, &
material_localFileExt, &
material_partPhase

View File

@ -49,7 +49,7 @@ subroutine add(this,string)
IO_stringPos
implicit none
class(tPartitionedStringList) :: this
class(tPartitionedStringList), target :: this
character(len=*), intent(in) :: string
integer(pInt), allocatable,dimension(:) :: p
@ -61,14 +61,11 @@ subroutine add(this,string)
new%string%val=trim(string)
new%string%pos=IO_stringPos(trim(string))
if (.not. associated(this%next)) then
this%next => new
else
tmp => this%next
this%next => new
this%next%next => tmp
!new%prev => this%prev%next
end if
tmp => this
do while (associated(tmp%next))
tmp => tmp%next
enddo
tmp%next => new
end subroutine add
@ -85,7 +82,7 @@ subroutine show(this)
tmp => this%next
do
if (.not. associated(tmp)) exit
write(6,*) trim(tmp%string%val)
write(6,'(a)') trim(tmp%string%val)
tmp => tmp%next
end do

View File

@ -7,6 +7,7 @@
!! 'phase', 'texture', and 'microstucture'
!--------------------------------------------------------------------------------------------------
module material
use config_material
use chained_list
use prec, only: &
pReal, &
@ -142,15 +143,6 @@ module material
HOMOGENIZATION_rgc_ID
end enum
character(len=*), parameter, public :: &
MATERIAL_configFile = 'material.config', & !< generic name for material configuration file
MATERIAL_localFileExt = 'materialConfig' !< extension of solver job name depending material configuration file
character(len=*), parameter, public :: &
MATERIAL_partHomogenization = 'homogenization', & !< keyword for homogenization part
MATERIAL_partCrystallite = 'crystallite', & !< keyword for crystallite part
MATERIAL_partPhase = 'phase' !< keyword for phase part
integer(kind(ELASTICITY_undefined_ID)), dimension(:), allocatable, public, protected :: &
phase_elasticity !< elasticity of each phase
integer(kind(PLASTICITY_undefined_ID)), dimension(:), allocatable, public, protected :: &
@ -174,17 +166,8 @@ module material
integer(kind(HOMOGENIZATION_undefined_ID)), dimension(:), allocatable, public, protected :: &
homogenization_type !< type of each homogenization
character(len=64), dimension(:), allocatable, public, protected :: &
phase_name, & !< name of each phase
homogenization_name, & !< name of each homogenization
crystallite_name !< name of each crystallite setting
integer(pInt), public, protected :: &
homogenization_maxNgrains, & !< max number of grains in any USED homogenization
material_Nphase, & !< number of phases
material_Nhomogenization, & !< number of homogenizations
material_Nmicrostructure, & !< number of microstructures
material_Ncrystallite !< number of crystallite settings
homogenization_maxNgrains !< max number of grains in any USED homogenization
integer(pInt), dimension(:), allocatable, public, protected :: &
phase_Nsources, & !< number of source mechanisms active in each phase
@ -243,19 +226,10 @@ module material
phase_localPlasticity !< flags phases with local constitutive law
character(len=*), parameter, private :: &
MATERIAL_partMicrostructure = 'microstructure', & !< keyword for microstructure part
MATERIAL_partTexture = 'texture' !< keyword for texture part
character(len=64), dimension(:), allocatable, private :: &
microstructure_name, & !< name of each microstructure
texture_name !< name of each texture
character(len=256), dimension(:), allocatable, private :: &
texture_ODFfile !< name of each ODF file
integer(pInt), private :: &
material_Ntexture, & !< number of textures
microstructure_maxNconstituents, & !< max number of constituents in any phase
texture_maxNgauss, & !< max number of Gauss components in any texture
texture_maxNfiber !< max number of Fiber components in any texture
@ -305,13 +279,6 @@ module material
vacancyConcRate, & !< vacancy conc change field
hydrogenConcRate !< hydrogen conc change field
type(tPartitionedStringList), public,protected, allocatable, dimension(:) :: &
phaseConfig, &
microstructureConfig, &
homogenizationConfig, &
textureConfig, &
crystalliteConfig
public :: &
material_init, &
ELASTICITY_hooke_ID ,&
@ -419,43 +386,21 @@ subroutine material_init()
write(6,'(a15,a)') ' Current time: ',IO_timeStamp()
#include "compilation_info.f90"
if (.not. IO_open_jobFile_stat(FILEUNIT,material_localFileExt)) & ! no local material configuration present...
call IO_open_file(FILEUNIT,material_configFile) ! ...open material.config file
rewind(fileUnit)
line = '' ! to have it initialized
do while (trim(line) /= IO_EOF)
part = IO_lc(IO_getTag(line,'<','>'))
select case (trim(part))
case (trim(material_partPhase))
line = material_parsePhase(FILEUNIT)
call material_parsePhase()
if (iand(myDebug,debug_levelBasic) /= 0_pInt) write(6,'(a)') ' Phase parsed'; flush(6)
case (trim(material_partMicrostructure))
line = material_parseMicrostructure(FILEUNIT)
call material_parseMicrostructure()
if (iand(myDebug,debug_levelBasic) /= 0_pInt) write(6,'(a)') ' Microstructure parsed'; flush(6)
case (trim(material_partCrystallite))
line = material_parseCrystallite(FILEUNIT)
call material_parseCrystallite()
if (iand(myDebug,debug_levelBasic) /= 0_pInt) write(6,'(a)') ' Crystallite parsed'; flush(6)
case (trim(material_partHomogenization))
line = material_parseHomogenization(FILEUNIT)
call material_parseHomogenization()
if (iand(myDebug,debug_levelBasic) /= 0_pInt) write(6,'(a)') ' Homogenization parsed'; flush(6)
case (trim(material_partTexture))
line = material_parseTexture(FILEUNIT)
call material_parseTexture()
if (iand(myDebug,debug_levelBasic) /= 0_pInt) write(6,'(a)') ' Texture parsed'; flush(6)
case default
line = IO_read(fileUnit)
end select
enddo
allocate(plasticState (material_Nphase))
allocate(sourceState (material_Nphase))
do myPhase = 1,material_Nphase
@ -571,7 +516,9 @@ end subroutine material_init
!--------------------------------------------------------------------------------------------------
!> @brief parses the homogenization part in the material configuration file
!--------------------------------------------------------------------------------------------------
character(len=65536) function material_parseHomogenization(fileUnit)
subroutine material_parseHomogenization
use config_material, only : &
homogenizationConfig
use IO, only: &
IO_read, &
IO_globalTagInPart, &
@ -590,7 +537,6 @@ character(len=65536) function material_parseHomogenization(fileUnit)
mesh_element
implicit none
integer(pInt), intent(in) :: fileUnit
integer(pInt), allocatable, dimension(:) :: chunkPos
@ -598,40 +544,6 @@ character(len=65536) function material_parseHomogenization(fileUnit)
character(len=65536) :: line, tag,devNull
character(len=64) :: tag2
logical :: echo
allocate(homogenizationConfig(0))
h = 0_pInt
do while (trim(line) /= IO_EOF) ! read through sections of material part
line = IO_read(fileUnit)
if (IO_isBlank(line)) cycle ! skip empty lines
foundNextPart: if (IO_getTag(line,'<','>') /= '') then
devNull = IO_read(fileUnit, .true.) ! reset IO_read
exit
endif foundNextPart
nextSection: if (IO_getTag(line,'[',']') /= '') then
h = h + 1_pInt
homogenizationConfig = [homogenizationConfig, emptyList]
tag2 = IO_getTag(line,'[',']')
GfortranBug86033: if (.not. allocated(homogenization_name)) then
allocate(homogenization_name(1),source=tag2)
else GfortranBug86033
homogenization_name = [homogenization_name,tag2]
endif GfortranBug86033
endif nextSection
chunkPos = IO_stringPos(line)
tag = IO_lc(IO_stringValue(trim(line),chunkPos,1_pInt)) ! extract key
inSection: if (h > 0_pInt) then
call homogenizationConfig(h)%add(line)
else inSection
echo = (trim(tag) == '/echo/')
endif inSection
enddo
if (echo) call homogenizationConfig(1)%show()
material_Nhomogenization = size(homogenizationConfig)
if (material_Nhomogenization < 1_pInt) call IO_error(160_pInt,ext_msg=material_partHomogenization)
allocate(homogenization_type(material_Nhomogenization), source=HOMOGENIZATION_undefined_ID)
allocate(thermal_type(material_Nhomogenization), source=THERMAL_isothermal_ID)
@ -760,15 +672,14 @@ endif
enddo
homogenization_maxNgrains = maxval(homogenization_Ngrains,homogenization_active)
material_parseHomogenization=line
end function material_parseHomogenization
end subroutine material_parseHomogenization
!--------------------------------------------------------------------------------------------------
!> @brief parses the microstructure part in the material configuration file
!--------------------------------------------------------------------------------------------------
character(len=65536) function material_parseMicrostructure(fileUnit)
subroutine material_parseMicrostructure
use prec, only: &
dNeq
use IO
@ -777,8 +688,6 @@ character(len=65536) function material_parseMicrostructure(fileUnit)
mesh_NcpElems
implicit none
integer(pInt), intent(in) :: fileUnit
character(len=256), dimension(:), allocatable :: &
str
character(len=64) :: tag2
@ -789,40 +698,10 @@ character(len=65536) function material_parseMicrostructure(fileUnit)
tag,line,devNull
logical :: echo
allocate(MicrostructureConfig(0))
line = '' ! to have it initialized
m = 0_pInt
echo =.false.
do while (trim(line) /= IO_EOF) ! read through sections of material part
line = IO_read(fileUnit)
if (IO_isBlank(line)) cycle ! skip empty lines
foundNextPart: if (IO_getTag(line,'<','>') /= '') then
devNull = IO_read(fileUnit, .true.) ! reset IO_read
exit
endif foundNextPart
nextSection: if (IO_getTag(line,'[',']') /= '') then
m = m + 1_pInt
microstructureConfig = [microstructureConfig, emptyList]
tag2 = IO_getTag(line,'[',']')
GfortranBug86033: if (.not. allocated(microstructure_name)) then
allocate(microstructure_name(1),source=tag2)
else GfortranBug86033
microstructure_name = [microstructure_name,tag2]
endif GfortranBug86033
endif nextSection
chunkPos = IO_stringPos(line)
tag = IO_lc(IO_stringValue(trim(line),chunkPos,1_pInt)) ! extract key
inSection: if (m > 0_pInt) then
chunkPos = IO_stringPos(line)
call microstructureConfig(m)%add(IO_lc(line))
else inSection
echo = (trim(tag) == '/echo/')
endif inSection
enddo
material_Nmicrostructure = size(microstructureConfig)
if (material_Nmicrostructure < 1_pInt) call IO_error(160_pInt,ext_msg=material_partMicrostructure)
allocate(microstructure_crystallite(material_Nmicrostructure), source=0_pInt)
allocate(microstructure_Nconstituents(material_Nmicrostructure), source=0_pInt)
@ -871,14 +750,13 @@ enddo
call IO_error(153_pInt,ext_msg=microstructure_name(m))
enddo
material_parseMicrostructure = line
end function material_parseMicrostructure
end subroutine material_parseMicrostructure
!--------------------------------------------------------------------------------------------------
!> @brief parses the crystallite part in the material configuration file
!--------------------------------------------------------------------------------------------------
character(len=65536) function material_parseCrystallite(fileUnit)
subroutine material_parseCrystallite
use IO, only: &
IO_read, &
IO_error, &
@ -890,7 +768,6 @@ character(len=65536) function material_parseCrystallite(fileUnit)
IO_EOF
implicit none
integer(pInt), intent(in) :: fileUnit
integer(pInt), allocatable, dimension(:) :: chunkPos
character(len=64) :: tag2
@ -898,53 +775,18 @@ character(len=65536) function material_parseCrystallite(fileUnit)
character(len=65536) :: line, tag,devNull
logical :: echo
allocate(crystalliteConfig(0))
c = 0_pInt
do while (trim(line) /= IO_EOF) ! read through sections of material part
line = IO_read(fileUnit)
if (IO_isBlank(line)) cycle ! skip empty lines
foundNextPart: if (IO_getTag(line,'<','>') /= '') then
devNull = IO_read(fileUnit, .true.) ! reset IO_read
exit
endif foundNextPart
nextSection: if (IO_getTag(line,'[',']') /= '') then
c = c + 1_pInt
crystalliteConfig = [crystalliteConfig, emptyList]
tag2 = IO_getTag(line,'[',']')
GfortranBug86033: if (.not. allocated(crystallite_name)) then
allocate(crystallite_name(1),source=tag2)
else GfortranBug86033
crystallite_name = [crystallite_name,tag2]
endif GfortranBug86033
endif nextSection
chunkPos = IO_stringPos(line)
tag = IO_lc(IO_stringValue(trim(line),chunkPos,1_pInt)) ! extract key
inSection: if (c > 0_pInt) then
chunkPos = IO_stringPos(trim(line))
call crystalliteConfig(c)%add(IO_lc(line))
else inSection
echo = (trim(tag) == '/echo/')
endif inSection
enddo
material_Ncrystallite = size(crystalliteConfig)
if (material_Ncrystallite < 1_pInt) call IO_error(160_pInt,ext_msg=material_partCrystallite)
allocate(crystallite_Noutput(material_Ncrystallite), source=0_pInt)
do c=1_pInt, material_Ncrystallite
crystallite_Noutput(c) = crystalliteConfig(c)%countKeys('(output)')
enddo
material_parseCrystallite = line
end function material_parseCrystallite
end subroutine material_parseCrystallite
!--------------------------------------------------------------------------------------------------
!> @brief parses the phase part in the material configuration file
!--------------------------------------------------------------------------------------------------
character(len=65536) function material_parsePhase(fileUnit)
use chained_list, only: &
emptyList
subroutine material_parsePhase
use IO, only: &
IO_read, &
IO_globalTagInPart, &
@ -960,7 +802,6 @@ character(len=65536) function material_parsePhase(fileUnit)
IO_EOF
implicit none
integer(pInt), intent(in) :: fileUnit
integer(pInt), allocatable, dimension(:) :: chunkPos
@ -972,41 +813,10 @@ character(len=65536) function material_parsePhase(fileUnit)
str
logical :: echo
allocate(phaseConfig(0))
line = '' ! to have it initialized
p = 0_pInt ! - " -
echo =.false.
do while (trim(line) /= IO_EOF) ! read through sections of material part
line = IO_read(fileUnit)
if (IO_isBlank(line)) cycle ! skip empty lines
foundNextPart: if (IO_getTag(line,'<','>') /= '') then
devNull = IO_read(fileUnit, .true.) ! reset IO_read
exit
endif foundNextPart
nextSection: if (IO_getTag(line,'[',']') /= '') then
p = p + 1_pInt
phaseConfig = [phaseConfig, emptyList]
tag2 = IO_getTag(line,'[',']')
GfortranBug86033: if (.not. allocated(phase_name)) then
allocate(phase_name(1),source=tag2)
else GfortranBug86033
phase_name = [phase_name,tag2]
endif GfortranBug86033
endif nextSection
chunkPos = IO_stringPos(line)
tag = IO_lc(IO_stringValue(trim(line),chunkPos,1_pInt)) ! extract key
inSection: if (p > 0_pInt) then
chunkPos = IO_stringPos(line)
call phaseConfig(p)%add(IO_lc(trim(line)))
else inSection
echo = (trim(tag) == '/echo/')
endif inSection
enddo
material_Nphase = size(phaseConfig)
if (material_Nphase < 1_pInt) call IO_error(160_pInt,ext_msg=material_partPhase)
allocate(phase_elasticity(material_Nphase),source=ELASTICITY_undefined_ID)
allocate(phase_plasticity(material_Nphase),source=PLASTICITY_undefined_ID)
allocate(phase_Nsources(material_Nphase), source=0_pInt)
@ -1118,13 +928,12 @@ character(len=65536) function material_parsePhase(fileUnit)
phase_plasticityInstance(p) = count(phase_plasticity(1:p) == phase_plasticity(p))
enddo
material_parsePhase = line
end function material_parsePhase
end subroutine material_parsePhase
!--------------------------------------------------------------------------------------------------
!> @brief parses the texture part in the material configuration file
!--------------------------------------------------------------------------------------------------
character(len=65536) function material_parseTexture(fileUnit)
subroutine material_parseTexture
use prec, only: &
dNeq
use IO, only: &
@ -1149,7 +958,6 @@ character(len=65536) function material_parseTexture(fileUnit)
math_inv33
implicit none
integer(pInt), intent(in) :: fileUnit
integer(pInt), allocatable, dimension(:) :: chunkPos
@ -1160,39 +968,6 @@ character(len=65536) function material_parseTexture(fileUnit)
character(len=65536) :: line, tag,devNull, line2
allocate(textureConfig(0))
t = 0_pInt
do while (trim(line2) /= IO_EOF) ! read through sections of material part
line2 = IO_read(fileUnit)
if (IO_isBlank(line2)) cycle ! skip empty lines
foundNextPart: if (IO_getTag(line2,'<','>') /= '') then
devNull = IO_read(fileUnit, .true.) ! reset IO_read
exit
endif foundNextPart
nextSection: if (IO_getTag(line2,'[',']') /= '') then
t = t + 1_pInt
textureConfig = [textureConfig, emptyList]
tag2 = IO_getTag(line2,'[',']')
GfortranBug86033: if (.not. allocated(texture_name)) then
allocate(texture_name(1),source=tag2)
else GfortranBug86033
texture_name = [texture_name,tag2]
endif GfortranBug86033
endif nextSection
chunkPos = IO_stringPos(line2)
tag = IO_lc(IO_stringValue(trim(line2),chunkPos,1_pInt)) ! extract key
inSection: if (t > 0_pInt) then
chunkPos = IO_stringPos(line2)
call textureConfig(t)%add(IO_lc(trim(line2)))
else inSection
echo = (trim(tag) == '/echo/')
endif inSection
enddo
material_Ntexture = size(textureConfig)
if (material_Ntexture < 1_pInt) call IO_error(160_pInt,ext_msg=material_partTexture)
allocate(texture_ODFfile(material_Ntexture)); texture_ODFfile=''
allocate(texture_symmetry(material_Ntexture), source=1_pInt)
allocate(texture_Ngauss(material_Ntexture), source=0_pInt)
@ -1316,8 +1091,7 @@ character(len=65536) function material_parseTexture(fileUnit)
enddo lines
enddo
material_parseTexture = line2
end function material_parseTexture
end subroutine material_parseTexture
!--------------------------------------------------------------------------------------------------

View File

@ -151,8 +151,9 @@ subroutine plastic_disloUCLA_init(fileUnit)
phase_Noutput, &
PLASTICITY_DISLOUCLA_label, &
PLASTICITY_DISLOUCLA_ID, &
material_phase, &
plasticState, &
material_phase, &
plasticState
use config_material, only: &
MATERIAL_partPhase
use lattice
use numerics,only: &

View File

@ -239,7 +239,8 @@ subroutine plastic_dislotwin_init(fileUnit)
PLASTICITY_DISLOTWIN_label, &
PLASTICITY_DISLOTWIN_ID, &
material_phase, &
plasticState, &
plasticState
use config_material, only: &
MATERIAL_partPhase
use lattice
use numerics,only: &

View File

@ -97,7 +97,8 @@ use IO
PLASTICITY_ISOTROPIC_label, &
PLASTICITY_ISOTROPIC_ID, &
material_phase, &
plasticState, &
plasticState
use config_material, only: &
MATERIAL_partPhase, &
phaseConfig

View File

@ -145,7 +145,8 @@ subroutine plastic_kinehardening_init(fileUnit)
phase_plasticityInstance, &
phase_Noutput, &
material_phase, &
plasticState, &
plasticState
use config_material, only: &
MATERIAL_partPhase
use lattice
use numerics,only: &

View File

@ -291,8 +291,8 @@ use material, only: phase_plasticity, &
PLASTICITY_NONLOCAL_label, &
PLASTICITY_NONLOCAL_ID, &
plasticState, &
MATERIAL_partPhase ,&
material_phase
use config_material, only: MATERIAL_partPhase
use lattice
use numerics,only: &
numerics_integrator

View File

@ -157,7 +157,8 @@ subroutine plastic_phenopowerlaw_init(fileUnit)
PLASTICITY_PHENOPOWERLAW_label, &
PLASTICITY_PHENOPOWERLAW_ID, &
material_phase, &
plasticState, &
plasticState
use config_material, only: &
MATERIAL_partPhase
use lattice
use numerics,only: &

View File

@ -27,6 +27,7 @@ subroutine porosity_none_init()
use IO, only: &
IO_timeStamp
use material
use config_material
implicit none
integer(pInt) :: &

View File

@ -77,11 +77,10 @@ subroutine porosity_phasefield_init(fileUnit)
porosityState, &
porosityMapping, &
porosity, &
porosity_initialPhi, &
porosity_initialPhi
use config_material, only: &
material_partHomogenization, &
material_partPhase
use numerics,only: &
worldrank
implicit none
integer(pInt), intent(in) :: fileUnit
@ -94,11 +93,9 @@ subroutine porosity_phasefield_init(fileUnit)
tag = '', &
line = ''
mainProcess: if (worldrank == 0) then
write(6,'(/,a)') ' <<<+- porosity_'//POROSITY_phasefield_label//' init -+>>>'
write(6,'(a15,a)') ' Current time: ',IO_timeStamp()
write(6,'(/,a)') ' <<<+- porosity_'//POROSITY_phasefield_label//' init -+>>>'
write(6,'(a15,a)') ' Current time: ',IO_timeStamp()
#include "compilation_info.f90"
endif mainProcess
maxNinstance = int(count(porosity_type == POROSITY_phasefield_ID),pInt)
if (maxNinstance == 0_pInt) return

View File

@ -91,9 +91,10 @@ subroutine source_damage_anisoBrittle_init(fileUnit)
phase_Noutput, &
SOURCE_damage_anisoBrittle_label, &
SOURCE_damage_anisoBrittle_ID, &
material_phase, &
sourceState
use config_material, only: &
material_Nphase, &
material_phase, &
sourceState, &
MATERIAL_partPhase
use numerics,only: &
numerics_integrator

View File

@ -95,9 +95,10 @@ subroutine source_damage_anisoDuctile_init(fileUnit)
phase_Noutput, &
SOURCE_damage_anisoDuctile_label, &
SOURCE_damage_anisoDuctile_ID, &
material_Nphase, &
material_phase, &
sourceState, &
sourceState
use config_material, only: &
material_Nphase, &
MATERIAL_partPhase
use numerics,only: &
numerics_integrator

View File

@ -81,9 +81,10 @@ subroutine source_damage_isoBrittle_init(fileUnit)
phase_Noutput, &
SOURCE_damage_isoBrittle_label, &
SOURCE_damage_isoBrittle_ID, &
material_Nphase, &
material_phase, &
sourceState, &
sourceState
use config_material, only: &
material_Nphase, &
MATERIAL_partPhase
use numerics,only: &
numerics_integrator

View File

@ -81,10 +81,12 @@ subroutine source_damage_isoDuctile_init(fileUnit)
phase_Noutput, &
SOURCE_damage_isoDuctile_label, &
SOURCE_damage_isoDuctile_ID, &
material_Nphase, &
material_phase, &
sourceState, &
sourceState
use config_material, only: &
material_Nphase, &
MATERIAL_partPhase
use numerics,only: &
numerics_integrator

View File

@ -67,9 +67,10 @@ subroutine source_thermal_dissipation_init(fileUnit)
phase_Noutput, &
SOURCE_thermal_dissipation_label, &
SOURCE_thermal_dissipation_ID, &
material_Nphase, &
material_phase, &
sourceState, &
sourceState
use config_material, only: &
material_Nphase, &
MATERIAL_partPhase
use numerics,only: &
numerics_integrator

View File

@ -73,9 +73,10 @@ subroutine source_thermal_externalheat_init(fileUnit)
phase_Noutput, &
SOURCE_thermal_externalheat_label, &
SOURCE_thermal_externalheat_ID, &
material_Nphase, &
material_phase, &
sourceState, &
sourceState
use config_material, only: &
material_Nphase, &
MATERIAL_partPhase
use numerics,only: &
numerics_integrator

View File

@ -69,9 +69,10 @@ subroutine source_vacancy_irradiation_init(fileUnit)
phase_Noutput, &
SOURCE_vacancy_irradiation_label, &
SOURCE_vacancy_irradiation_ID, &
material_Nphase, &
material_phase, &
sourceState, &
sourceState
use config_material, only: &
material_Nphase, &
MATERIAL_partPhase
use numerics,only: &
numerics_integrator

View File

@ -67,9 +67,10 @@ subroutine source_vacancy_phenoplasticity_init(fileUnit)
phase_Noutput, &
SOURCE_vacancy_phenoplasticity_label, &
SOURCE_vacancy_phenoplasticity_ID, &
material_Nphase, &
material_phase, &
sourceState, &
sourceState
use config_material, only: &
material_Nphase, &
MATERIAL_partPhase
use numerics,only: &
numerics_integrator

View File

@ -71,9 +71,10 @@ subroutine source_vacancy_thermalfluc_init(fileUnit)
phase_Noutput, &
SOURCE_vacancy_thermalfluc_label, &
SOURCE_vacancy_thermalfluc_ID, &
material_Nphase, &
material_phase, &
sourceState, &
sourceState
use config_material, only: &
material_Nphase, &
MATERIAL_partPhase
use numerics,only: &
numerics_integrator

View File

@ -64,6 +64,8 @@ subroutine thermal_adiabatic_init(fileUnit)
IO_error, &
IO_timeStamp, &
IO_EOF
use config_material, only: &
material_partHomogenization
use material, only: &
thermal_type, &
thermal_typeInstance, &
@ -76,8 +78,7 @@ subroutine thermal_adiabatic_init(fileUnit)
thermalMapping, &
thermal_initialT, &
temperature, &
temperatureRate, &
material_partHomogenization
temperatureRate
implicit none
integer(pInt), intent(in) :: fileUnit

View File

@ -77,7 +77,8 @@ subroutine thermal_conduction_init(fileUnit)
thermalMapping, &
thermal_initialT, &
temperature, &
temperatureRate, &
temperatureRate
use config_material, only: &
material_partHomogenization
implicit none

View File

@ -27,6 +27,7 @@ subroutine thermal_isothermal_init()
use IO, only: &
IO_timeStamp
use material
use config_material
implicit none
integer(pInt) :: &

View File

@ -91,9 +91,10 @@ subroutine vacancyflux_cahnhilliard_init(fileUnit)
vacancyfluxMapping, &
vacancyConc, &
vacancyConcRate, &
vacancyflux_initialCv, &
material_partHomogenization, &
material_partPhase
vacancyflux_initialCv
use config_material, only: &
material_partPhase, &
material_partHomogenization
implicit none
integer(pInt), intent(in) :: fileUnit

View File

@ -74,7 +74,8 @@ subroutine vacancyflux_isochempot_init(fileUnit)
vacancyfluxMapping, &
vacancyConc, &
vacancyConcRate, &
vacancyflux_initialCv, &
vacancyflux_initialCv
use config_material, only: &
material_partHomogenization
implicit none

View File

@ -27,6 +27,7 @@ subroutine vacancyflux_isoconc_init()
use IO, only: &
IO_timeStamp
use material
use config_material
implicit none
integer(pInt) :: &