read phase part in material.f90 only once and operate then on data in main memory
This commit is contained in:
parent
bf43156112
commit
69aee3ccdd
87
src/list.f90
87
src/list.f90
|
@ -13,8 +13,10 @@ module chained_list
|
||||||
type, public :: tPartitionedStringList
|
type, public :: tPartitionedStringList
|
||||||
type(tPartitionedString) :: string
|
type(tPartitionedString) :: string
|
||||||
type(tPartitionedStringList), pointer :: next => null()
|
type(tPartitionedStringList), pointer :: next => null()
|
||||||
|
type(tPartitionedStringList), pointer :: prev => null()
|
||||||
contains
|
contains
|
||||||
procedure :: add => add
|
procedure :: add => add
|
||||||
|
procedure :: show => show
|
||||||
procedure :: getRaw => getRaw
|
procedure :: getRaw => getRaw
|
||||||
procedure :: getRaws => getRaws
|
procedure :: getRaws => getRaws
|
||||||
|
|
||||||
|
@ -24,11 +26,15 @@ module chained_list
|
||||||
procedure :: getInt => getInt
|
procedure :: getInt => getInt
|
||||||
procedure :: getIntArray => getIntArray
|
procedure :: getIntArray => getIntArray
|
||||||
|
|
||||||
|
procedure :: getString => getString
|
||||||
procedure :: getStrings => getStrings
|
procedure :: getStrings => getStrings
|
||||||
procedure :: keyExists => keyExists
|
procedure :: keyExists => keyExists
|
||||||
|
procedure :: countKeys => countKeys
|
||||||
|
|
||||||
end type tPartitionedStringList
|
end type tPartitionedStringList
|
||||||
|
|
||||||
|
type(tPartitionedStringList), public :: emptyList
|
||||||
|
|
||||||
contains
|
contains
|
||||||
|
|
||||||
!--------------------------------------------------------------------------------------------------
|
!--------------------------------------------------------------------------------------------------
|
||||||
|
@ -59,6 +65,24 @@ subroutine add(this,string,stringPos)
|
||||||
end subroutine add
|
end subroutine add
|
||||||
|
|
||||||
|
|
||||||
|
!--------------------------------------------------------------------------------------------------
|
||||||
|
!> @brief add element
|
||||||
|
!> @details adds raw string and start/end position of chunks in this string
|
||||||
|
!--------------------------------------------------------------------------------------------------
|
||||||
|
subroutine show(this)
|
||||||
|
implicit none
|
||||||
|
class(tPartitionedStringList) :: this
|
||||||
|
type(tPartitionedStringList), pointer :: tmp
|
||||||
|
|
||||||
|
tmp => this%next
|
||||||
|
do
|
||||||
|
if (.not. associated(tmp)) exit
|
||||||
|
write(6,*) trim(tmp%string%val)
|
||||||
|
tmp => tmp%next
|
||||||
|
end do
|
||||||
|
|
||||||
|
end subroutine show
|
||||||
|
|
||||||
!--------------------------------------------------------------------------------------------------
|
!--------------------------------------------------------------------------------------------------
|
||||||
!> @brief gets raw data
|
!> @brief gets raw data
|
||||||
!> @details returns raw string and start/end position of chunks in this string
|
!> @details returns raw string and start/end position of chunks in this string
|
||||||
|
@ -205,6 +229,40 @@ integer(pInt) function getInt(this,key,defaultVal)
|
||||||
end function getInt
|
end function getInt
|
||||||
|
|
||||||
|
|
||||||
|
!--------------------------------------------------------------------------------------------------
|
||||||
|
!> @brief gets string value for given key
|
||||||
|
!> @details if key is not found exits with error unless default is given
|
||||||
|
!--------------------------------------------------------------------------------------------------
|
||||||
|
character(len=64) function getString(this,key,defaultVal)
|
||||||
|
use IO, only: &
|
||||||
|
IO_error, &
|
||||||
|
IO_stringValue
|
||||||
|
|
||||||
|
implicit none
|
||||||
|
class(tPartitionedStringList), intent(in) :: this
|
||||||
|
character(len=*), intent(in) :: key
|
||||||
|
character(len=64), intent(in), optional :: defaultVal
|
||||||
|
type(tPartitionedStringList), pointer :: tmp
|
||||||
|
|
||||||
|
tmp => this%next
|
||||||
|
do
|
||||||
|
endOfList: if (.not. associated(tmp)) then
|
||||||
|
if(present(defaultVal)) then
|
||||||
|
getString = defaultVal
|
||||||
|
exit
|
||||||
|
else
|
||||||
|
call IO_error(1_pInt,ext_msg=key)
|
||||||
|
endif
|
||||||
|
endif endOfList
|
||||||
|
foundKey: if (trim(IO_stringValue(tmp%string%val,tmp%string%pos,1))==trim(key)) then
|
||||||
|
if (tmp%string%pos(1) < 2_pInt) call IO_error(1_pInt,ext_msg=key)
|
||||||
|
getString = IO_StringValue(tmp%string%val,tmp%string%pos,2)
|
||||||
|
exit
|
||||||
|
endif foundKey
|
||||||
|
tmp => tmp%next
|
||||||
|
end do
|
||||||
|
end function getString
|
||||||
|
|
||||||
!--------------------------------------------------------------------------------------------------
|
!--------------------------------------------------------------------------------------------------
|
||||||
!> @brief gets array of int values for given key
|
!> @brief gets array of int values for given key
|
||||||
!> @details if key is not found exits with error unless default is given
|
!> @details if key is not found exits with error unless default is given
|
||||||
|
@ -314,6 +372,27 @@ end function getFloatArray
|
||||||
end function
|
end function
|
||||||
|
|
||||||
|
|
||||||
|
integer(pInt) function countKeys(this,key)
|
||||||
|
use IO
|
||||||
|
|
||||||
|
implicit none
|
||||||
|
class(tPartitionedStringList), intent(in) :: this
|
||||||
|
character(len=*), intent(in) :: key
|
||||||
|
type(tPartitionedStringList), pointer :: tmp
|
||||||
|
integer(pInt) :: i
|
||||||
|
|
||||||
|
countKeys = 0_pInt
|
||||||
|
|
||||||
|
tmp => this%next
|
||||||
|
do
|
||||||
|
if (.not. associated(tmp)) exit
|
||||||
|
if (trim(IO_stringValue(tmp%string%val,tmp%string%pos,1))==trim(key)) then
|
||||||
|
countKeys = countKeys + 1_pInt
|
||||||
|
endif
|
||||||
|
tmp => tmp%next
|
||||||
|
end do
|
||||||
|
end function
|
||||||
|
|
||||||
function getStrings(this,key)
|
function getStrings(this,key)
|
||||||
use IO
|
use IO
|
||||||
|
|
||||||
|
@ -326,17 +405,15 @@ end function getFloatArray
|
||||||
type(tPartitionedStringList), pointer :: tmp
|
type(tPartitionedStringList), pointer :: tmp
|
||||||
integer(pInt) :: i
|
integer(pInt) :: i
|
||||||
|
|
||||||
|
allocate(getStrings(0))
|
||||||
|
|
||||||
tmp => this%next
|
tmp => this%next
|
||||||
do
|
do
|
||||||
if (.not. associated(tmp)) exit
|
if (.not. associated(tmp)) exit
|
||||||
if (trim(IO_stringValue(tmp%string%val,tmp%string%pos,1))==trim(key)) then
|
if (trim(IO_stringValue(tmp%string%val,tmp%string%pos,1))==trim(key)) then
|
||||||
if (tmp%string%pos(1) < 2) print*, "NOT WORKKING"
|
if (tmp%string%pos(1) < 2) print*, "NOT WORKKING"
|
||||||
str = IO_StringValue(tmp%string%val,tmp%string%pos,2)
|
str = IO_StringValue(tmp%string%val,tmp%string%pos,2)
|
||||||
if (.not. allocated(getStrings)) then
|
getStrings = [getStrings,str]
|
||||||
getStrings = [str]
|
|
||||||
else
|
|
||||||
getStrings = [getStrings,str]
|
|
||||||
endif
|
|
||||||
endif
|
endif
|
||||||
tmp => tmp%next
|
tmp => tmp%next
|
||||||
end do
|
end do
|
||||||
|
|
254
src/material.f90
254
src/material.f90
|
@ -388,8 +388,6 @@ subroutine material_init()
|
||||||
mesh_element, &
|
mesh_element, &
|
||||||
FE_Nips, &
|
FE_Nips, &
|
||||||
FE_geomtype
|
FE_geomtype
|
||||||
use numerics, only: &
|
|
||||||
worldrank
|
|
||||||
|
|
||||||
implicit none
|
implicit none
|
||||||
integer(pInt), parameter :: FILEUNIT = 200_pInt
|
integer(pInt), parameter :: FILEUNIT = 200_pInt
|
||||||
|
@ -405,11 +403,9 @@ subroutine material_init()
|
||||||
|
|
||||||
myDebug = debug_level(debug_material)
|
myDebug = debug_level(debug_material)
|
||||||
|
|
||||||
mainProcess: if (worldrank == 0) then
|
write(6,'(/,a)') ' <<<+- material init -+>>>'
|
||||||
write(6,'(/,a)') ' <<<+- material init -+>>>'
|
write(6,'(a15,a)') ' Current time: ',IO_timeStamp()
|
||||||
write(6,'(a15,a)') ' Current time: ',IO_timeStamp()
|
|
||||||
#include "compilation_info.f90"
|
#include "compilation_info.f90"
|
||||||
endif mainProcess
|
|
||||||
|
|
||||||
if (.not. IO_open_jobFile_stat(FILEUNIT,material_localFileExt)) & ! no local material configuration present...
|
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
|
call IO_open_file(FILEUNIT,material_configFile) ! ...open material.config file
|
||||||
|
@ -894,6 +890,8 @@ end subroutine material_parseCrystallite
|
||||||
!> @brief parses the phase part in the material configuration file
|
!> @brief parses the phase part in the material configuration file
|
||||||
!--------------------------------------------------------------------------------------------------
|
!--------------------------------------------------------------------------------------------------
|
||||||
subroutine material_parsePhase(fileUnit,myPart)
|
subroutine material_parsePhase(fileUnit,myPart)
|
||||||
|
use chained_list, only: &
|
||||||
|
emptyList
|
||||||
use IO, only: &
|
use IO, only: &
|
||||||
IO_read, &
|
IO_read, &
|
||||||
IO_globalTagInPart, &
|
IO_globalTagInPart, &
|
||||||
|
@ -917,141 +915,153 @@ subroutine material_parsePhase(fileUnit,myPart)
|
||||||
integer(pInt) :: Nsections, section, sourceCtr, kinematicsCtr, stiffDegradationCtr, p
|
integer(pInt) :: Nsections, section, sourceCtr, kinematicsCtr, stiffDegradationCtr, p
|
||||||
character(len=65536) :: &
|
character(len=65536) :: &
|
||||||
tag,line
|
tag,line
|
||||||
|
character(len=64), dimension(:), allocatable :: &
|
||||||
|
str
|
||||||
logical :: echo
|
logical :: echo
|
||||||
|
|
||||||
echo = IO_globalTagInPart(fileUnit,myPart,'/echo/')
|
allocate(phase_name(0))
|
||||||
|
allocate(phaseConfig(0))
|
||||||
|
line = '' ! to have it initialized
|
||||||
|
section = 0_pInt ! - " -
|
||||||
|
echo =.false.
|
||||||
|
|
||||||
Nsections = IO_countSections(fileUnit,myPart)
|
rewind(fileUnit)
|
||||||
|
do while (trim(line) /= IO_EOF .and. IO_lc(IO_getTag(line,'<','>')) /= myPart) ! wind forward to <Phase>
|
||||||
|
line = IO_read(fileUnit)
|
||||||
|
enddo
|
||||||
|
|
||||||
|
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
|
||||||
|
line = IO_read(fileUnit, .true.) ! reset IO_read
|
||||||
|
exit
|
||||||
|
endif foundNextPart
|
||||||
|
nextSection: if (IO_getTag(line,'[',']') /= '') then
|
||||||
|
section = section + 1_pInt
|
||||||
|
phaseConfig = [phaseConfig, emptyList]
|
||||||
|
phase_name = [phase_Name,IO_getTag(line,'[',']')]
|
||||||
|
endif nextSection
|
||||||
|
chunkPos = IO_stringPos(line)
|
||||||
|
tag = IO_lc(IO_stringValue(trim(line),chunkPos,1_pInt)) ! extract key
|
||||||
|
inSection: if (section > 0_pInt) then
|
||||||
|
chunkPos = IO_stringPos(line)
|
||||||
|
call phaseConfig(section)%add(IO_lc(trim(line)),chunkPos)
|
||||||
|
else inSection
|
||||||
|
echo = (trim(tag) == '/echo/')
|
||||||
|
endif inSection
|
||||||
|
enddo
|
||||||
|
|
||||||
|
Nsections = size(phaseConfig)
|
||||||
material_Nphase = Nsections
|
material_Nphase = Nsections
|
||||||
if (Nsections < 1_pInt) call IO_error(160_pInt,ext_msg=myPart)
|
if (Nsections < 1_pInt) call IO_error(160_pInt,ext_msg=myPart)
|
||||||
|
|
||||||
allocate(phase_name(Nsections)); phase_name = ''
|
allocate(phase_elasticity(Nsections),source=ELASTICITY_undefined_ID)
|
||||||
allocate(phase_elasticity(Nsections), source=ELASTICITY_undefined_ID)
|
allocate(phase_plasticity(Nsections),source=PLASTICITY_undefined_ID)
|
||||||
allocate(phase_elasticityInstance(Nsections), source=0_pInt)
|
allocate(phase_Nsources(Nsections), source=0_pInt)
|
||||||
allocate(phase_plasticity(Nsections) , source=PLASTICITY_undefined_ID)
|
allocate(phase_Nkinematics(Nsections), source=0_pInt)
|
||||||
allocate(phase_plasticityInstance(Nsections), source=0_pInt)
|
|
||||||
allocate(phase_Nsources(Nsections), source=0_pInt)
|
|
||||||
allocate(phase_Nkinematics(Nsections), source=0_pInt)
|
|
||||||
allocate(phase_NstiffnessDegradations(Nsections),source=0_pInt)
|
allocate(phase_NstiffnessDegradations(Nsections),source=0_pInt)
|
||||||
allocate(phase_Noutput(Nsections), source=0_pInt)
|
allocate(phase_Noutput(Nsections), source=0_pInt)
|
||||||
allocate(phase_localPlasticity(Nsections), source=.false.)
|
allocate(phase_localPlasticity(Nsections), source=.false.)
|
||||||
|
|
||||||
allocate(phaseConfig(Nsections))
|
do p=1_pInt, Nsections
|
||||||
|
phase_Noutput(p) = phaseConfig(p)%countKeys('(output)')
|
||||||
|
phase_Nsources(p) = phaseConfig(p)%countKeys('(source)')
|
||||||
|
phase_Nkinematics(p) = phaseConfig(p)%countKeys('(kinematics)')
|
||||||
|
phase_NstiffnessDegradations(p) = phaseConfig(p)%countKeys('(stiffness_degradation)')
|
||||||
|
!phase_localPlasticity(p) = .not. IO_spotTagInPart(fileUnit,myPart,'/nonlocal/')
|
||||||
|
|
||||||
phase_Noutput = IO_countTagInPart(fileUnit,myPart,'(output)',Nsections)
|
select case (phaseConfig(p)%getString('elasticity'))
|
||||||
phase_Nsources = IO_countTagInPart(fileUnit,myPart,'(source)',Nsections)
|
case (ELASTICITY_HOOKE_label)
|
||||||
phase_Nkinematics = IO_countTagInPart(fileUnit,myPart,'(kinematics)',Nsections)
|
phase_elasticity(p) = ELASTICITY_HOOKE_ID
|
||||||
phase_NstiffnessDegradations = IO_countTagInPart(fileUnit,myPart,'(stiffness_degradation)',Nsections)
|
case default
|
||||||
phase_localPlasticity = .not. IO_spotTagInPart(fileUnit,myPart,'/nonlocal/',Nsections)
|
call IO_error(200_pInt,ext_msg=trim(phaseConfig(p)%getString('elasticity')))
|
||||||
|
end select
|
||||||
|
|
||||||
|
select case (phaseConfig(p)%getString('plasticity'))
|
||||||
|
case (PLASTICITY_NONE_label)
|
||||||
|
phase_plasticity(p) = PLASTICITY_NONE_ID
|
||||||
|
case (PLASTICITY_ISOTROPIC_label)
|
||||||
|
phase_plasticity(p) = PLASTICITY_ISOTROPIC_ID
|
||||||
|
case (PLASTICITY_PHENOPOWERLAW_label)
|
||||||
|
phase_plasticity(p) = PLASTICITY_PHENOPOWERLAW_ID
|
||||||
|
case (PLASTICITY_KINEHARDENING_label)
|
||||||
|
phase_plasticity(p) = PLASTICITY_KINEHARDENING_ID
|
||||||
|
case (PLASTICITY_DISLOTWIN_label)
|
||||||
|
phase_plasticity(p) = PLASTICITY_DISLOTWIN_ID
|
||||||
|
case (PLASTICITY_DISLOUCLA_label)
|
||||||
|
phase_plasticity(p) = PLASTICITY_DISLOUCLA_ID
|
||||||
|
case (PLASTICITY_NONLOCAL_label)
|
||||||
|
phase_plasticity(p) = PLASTICITY_NONLOCAL_ID
|
||||||
|
case default
|
||||||
|
call IO_error(201_pInt,ext_msg=trim(phaseConfig(p)%getString('plasticity')))
|
||||||
|
end select
|
||||||
|
|
||||||
|
enddo
|
||||||
|
|
||||||
allocate(phase_source(maxval(phase_Nsources),Nsections), source=SOURCE_undefined_ID)
|
allocate(phase_source(maxval(phase_Nsources),Nsections), source=SOURCE_undefined_ID)
|
||||||
allocate(phase_kinematics(maxval(phase_Nkinematics),Nsections), source=KINEMATICS_undefined_ID)
|
allocate(phase_kinematics(maxval(phase_Nkinematics),Nsections), source=KINEMATICS_undefined_ID)
|
||||||
allocate(phase_stiffnessDegradation(maxval(phase_NstiffnessDegradations),Nsections), &
|
allocate(phase_stiffnessDegradation(maxval(phase_NstiffnessDegradations),Nsections), &
|
||||||
source=STIFFNESS_DEGRADATION_undefined_ID)
|
source=STIFFNESS_DEGRADATION_undefined_ID)
|
||||||
|
do p=1_pInt, Nsections
|
||||||
rewind(fileUnit)
|
if (phase_Nsources(p) /= 0_pInt) then
|
||||||
line = '' ! to have it initialized
|
str = phaseConfig(p)%getStrings('(source)')
|
||||||
section = 0_pInt ! - " -
|
do sourceCtr = 1_pInt, size(str)
|
||||||
do while (trim(line) /= IO_EOF .and. IO_lc(IO_getTag(line,'<','>')) /= myPart) ! wind forward to <Phase>
|
select case (trim(str(sourceCtr)))
|
||||||
line = IO_read(fileUnit)
|
case (SOURCE_thermal_dissipation_label)
|
||||||
enddo
|
phase_source(sourceCtr,section) = SOURCE_thermal_dissipation_ID
|
||||||
if (echo) write(6,'(/,1x,a)') trim(line) ! echo part header
|
case (SOURCE_thermal_externalheat_label)
|
||||||
|
phase_source(sourceCtr,section) = SOURCE_thermal_externalheat_ID
|
||||||
do while (trim(line) /= IO_EOF) ! read through sections of material part
|
case (SOURCE_damage_isoBrittle_label)
|
||||||
line = IO_read(fileUnit)
|
phase_source(sourceCtr,section) = SOURCE_damage_isoBrittle_ID
|
||||||
if (IO_isBlank(line)) cycle ! skip empty lines
|
case (SOURCE_damage_isoDuctile_label)
|
||||||
if (IO_getTag(line,'<','>') /= '') then ! stop at next part
|
phase_source(sourceCtr,section) = SOURCE_damage_isoDuctile_ID
|
||||||
line = IO_read(fileUnit, .true.) ! reset IO_read
|
case (SOURCE_damage_anisoBrittle_label)
|
||||||
exit
|
phase_source(sourceCtr,section) = SOURCE_damage_anisoBrittle_ID
|
||||||
|
case (SOURCE_damage_anisoDuctile_label)
|
||||||
|
phase_source(sourceCtr,section) = SOURCE_damage_anisoDuctile_ID
|
||||||
|
case (SOURCE_vacancy_phenoplasticity_label)
|
||||||
|
phase_source(sourceCtr,section) = SOURCE_vacancy_phenoplasticity_ID
|
||||||
|
case (SOURCE_vacancy_irradiation_label)
|
||||||
|
phase_source(sourceCtr,section) = SOURCE_vacancy_irradiation_ID
|
||||||
|
case (SOURCE_vacancy_thermalfluc_label)
|
||||||
|
phase_source(sourceCtr,section) = SOURCE_vacancy_thermalfluc_ID
|
||||||
|
end select
|
||||||
|
enddo
|
||||||
endif
|
endif
|
||||||
if (echo) write(6,'(2x,a)') trim(line) ! echo back read lines
|
if (phase_Nkinematics(p) /= 0_pInt) then
|
||||||
if (IO_getTag(line,'[',']') /= '') then ! next section
|
str = phaseConfig(p)%getStrings('(kinematics)')
|
||||||
section = section + 1_pInt
|
do kinematicsCtr = 1_pInt, size(str)
|
||||||
sourceCtr = 0_pInt
|
select case (trim(str(kinematicsCtr)))
|
||||||
kinematicsCtr = 0_pInt
|
case (KINEMATICS_cleavage_opening_label)
|
||||||
stiffDegradationCtr = 0_pInt
|
phase_kinematics(kinematicsCtr,section) = KINEMATICS_cleavage_opening_ID
|
||||||
phase_name(section) = IO_getTag(line,'[',']')
|
case (KINEMATICS_slipplane_opening_label)
|
||||||
|
phase_kinematics(kinematicsCtr,section) = KINEMATICS_slipplane_opening_ID
|
||||||
|
case (KINEMATICS_thermal_expansion_label)
|
||||||
|
phase_kinematics(kinematicsCtr,section) = KINEMATICS_thermal_expansion_ID
|
||||||
|
case (KINEMATICS_vacancy_strain_label)
|
||||||
|
phase_kinematics(kinematicsCtr,section) = KINEMATICS_vacancy_strain_ID
|
||||||
|
case (KINEMATICS_hydrogen_strain_label)
|
||||||
|
phase_kinematics(kinematicsCtr,section) = KINEMATICS_hydrogen_strain_ID
|
||||||
|
end select
|
||||||
|
enddo
|
||||||
endif
|
endif
|
||||||
if (section > 0_pInt) then
|
if (phase_NstiffnessDegradations(p) /= 0_pInt) then
|
||||||
chunkPos = IO_stringPos(line)
|
str = phaseConfig(p)%getStrings('(stiffness_degradation)')
|
||||||
tag = IO_lc(IO_stringValue(line,chunkPos,1_pInt)) ! extract key
|
do stiffDegradationCtr = 1_pInt, size(str)
|
||||||
call phaseConfig(section)%add(IO_lc(trim(line)),chunkPos)
|
select case (trim(str(stiffDegradationCtr)))
|
||||||
select case(tag)
|
case (STIFFNESS_DEGRADATION_damage_label)
|
||||||
case ('elasticity')
|
phase_stiffnessDegradation(stiffDegradationCtr,section) = STIFFNESS_DEGRADATION_damage_ID
|
||||||
select case (IO_lc(IO_stringValue(line,chunkPos,2_pInt)))
|
case (STIFFNESS_DEGRADATION_porosity_label)
|
||||||
case (ELASTICITY_HOOKE_label)
|
phase_stiffnessDegradation(stiffDegradationCtr,section) = STIFFNESS_DEGRADATION_porosity_ID
|
||||||
phase_elasticity(section) = ELASTICITY_HOOKE_ID
|
end select
|
||||||
case default
|
enddo
|
||||||
call IO_error(200_pInt,ext_msg=trim(IO_stringValue(line,chunkPos,2_pInt)))
|
|
||||||
end select
|
|
||||||
case ('plasticity')
|
|
||||||
select case (IO_lc(IO_stringValue(line,chunkPos,2_pInt)))
|
|
||||||
case (PLASTICITY_NONE_label)
|
|
||||||
phase_plasticity(section) = PLASTICITY_NONE_ID
|
|
||||||
case (PLASTICITY_ISOTROPIC_label)
|
|
||||||
phase_plasticity(section) = PLASTICITY_ISOTROPIC_ID
|
|
||||||
case (PLASTICITY_PHENOPOWERLAW_label)
|
|
||||||
phase_plasticity(section) = PLASTICITY_PHENOPOWERLAW_ID
|
|
||||||
case (PLASTICITY_KINEHARDENING_label)
|
|
||||||
phase_plasticity(section) = PLASTICITY_KINEHARDENING_ID
|
|
||||||
case (PLASTICITY_DISLOTWIN_label)
|
|
||||||
phase_plasticity(section) = PLASTICITY_DISLOTWIN_ID
|
|
||||||
case (PLASTICITY_DISLOUCLA_label)
|
|
||||||
phase_plasticity(section) = PLASTICITY_DISLOUCLA_ID
|
|
||||||
case (PLASTICITY_NONLOCAL_label)
|
|
||||||
phase_plasticity(section) = PLASTICITY_NONLOCAL_ID
|
|
||||||
case default
|
|
||||||
call IO_error(201_pInt,ext_msg=trim(IO_stringValue(line,chunkPos,2_pInt)))
|
|
||||||
end select
|
|
||||||
case ('(source)')
|
|
||||||
sourceCtr = sourceCtr + 1_pInt
|
|
||||||
select case (IO_lc(IO_stringValue(line,chunkPos,2_pInt)))
|
|
||||||
case (SOURCE_thermal_dissipation_label)
|
|
||||||
phase_source(sourceCtr,section) = SOURCE_thermal_dissipation_ID
|
|
||||||
case (SOURCE_thermal_externalheat_label)
|
|
||||||
phase_source(sourceCtr,section) = SOURCE_thermal_externalheat_ID
|
|
||||||
case (SOURCE_damage_isoBrittle_label)
|
|
||||||
phase_source(sourceCtr,section) = SOURCE_damage_isoBrittle_ID
|
|
||||||
case (SOURCE_damage_isoDuctile_label)
|
|
||||||
phase_source(sourceCtr,section) = SOURCE_damage_isoDuctile_ID
|
|
||||||
case (SOURCE_damage_anisoBrittle_label)
|
|
||||||
phase_source(sourceCtr,section) = SOURCE_damage_anisoBrittle_ID
|
|
||||||
case (SOURCE_damage_anisoDuctile_label)
|
|
||||||
phase_source(sourceCtr,section) = SOURCE_damage_anisoDuctile_ID
|
|
||||||
case (SOURCE_vacancy_phenoplasticity_label)
|
|
||||||
phase_source(sourceCtr,section) = SOURCE_vacancy_phenoplasticity_ID
|
|
||||||
case (SOURCE_vacancy_irradiation_label)
|
|
||||||
phase_source(sourceCtr,section) = SOURCE_vacancy_irradiation_ID
|
|
||||||
case (SOURCE_vacancy_thermalfluc_label)
|
|
||||||
phase_source(sourceCtr,section) = SOURCE_vacancy_thermalfluc_ID
|
|
||||||
end select
|
|
||||||
case ('(kinematics)')
|
|
||||||
kinematicsCtr = kinematicsCtr + 1_pInt
|
|
||||||
select case (IO_lc(IO_stringValue(line,chunkPos,2_pInt)))
|
|
||||||
case (KINEMATICS_cleavage_opening_label)
|
|
||||||
phase_kinematics(kinematicsCtr,section) = KINEMATICS_cleavage_opening_ID
|
|
||||||
case (KINEMATICS_slipplane_opening_label)
|
|
||||||
phase_kinematics(kinematicsCtr,section) = KINEMATICS_slipplane_opening_ID
|
|
||||||
case (KINEMATICS_thermal_expansion_label)
|
|
||||||
phase_kinematics(kinematicsCtr,section) = KINEMATICS_thermal_expansion_ID
|
|
||||||
case (KINEMATICS_vacancy_strain_label)
|
|
||||||
phase_kinematics(kinematicsCtr,section) = KINEMATICS_vacancy_strain_ID
|
|
||||||
case (KINEMATICS_hydrogen_strain_label)
|
|
||||||
phase_kinematics(kinematicsCtr,section) = KINEMATICS_hydrogen_strain_ID
|
|
||||||
end select
|
|
||||||
case ('(stiffness_degradation)')
|
|
||||||
stiffDegradationCtr = stiffDegradationCtr + 1_pInt
|
|
||||||
select case (IO_lc(IO_stringValue(line,chunkPos,2_pInt)))
|
|
||||||
case (STIFFNESS_DEGRADATION_damage_label)
|
|
||||||
phase_stiffnessDegradation(stiffDegradationCtr,section) = STIFFNESS_DEGRADATION_damage_ID
|
|
||||||
case (STIFFNESS_DEGRADATION_porosity_label)
|
|
||||||
phase_stiffnessDegradation(stiffDegradationCtr,section) = STIFFNESS_DEGRADATION_porosity_ID
|
|
||||||
end select
|
|
||||||
|
|
||||||
end select
|
|
||||||
endif
|
endif
|
||||||
enddo
|
enddo
|
||||||
|
|
||||||
|
allocate(phase_plasticityInstance(Nsections), source=0_pInt)
|
||||||
|
allocate(phase_elasticityInstance(Nsections), source=0_pInt)
|
||||||
|
|
||||||
do p=1_pInt, Nsections
|
do p=1_pInt, Nsections
|
||||||
phase_elasticityInstance(p) = count(phase_elasticity(1:p) == phase_elasticity(p))
|
phase_elasticityInstance(p) = count(phase_elasticity(1:p) == phase_elasticity(p))
|
||||||
phase_plasticityInstance(p) = count(phase_plasticity(1:p) == phase_plasticity(p))
|
phase_plasticityInstance(p) = count(phase_plasticity(1:p) == phase_plasticity(p))
|
||||||
|
|
Loading…
Reference in New Issue