Merge branch 'development' into 42-new-coding-style-for-homogenization

This commit is contained in:
Martin Diehl 2018-08-31 06:36:12 +02:00
commit 0b049fc843
7 changed files with 76 additions and 26 deletions

@ -1 +1 @@
Subproject commit a764ade044735df35fac93a5204446291ee29abc
Subproject commit fa02113fa7a0af3376648e4320318ec337fe79aa

View File

@ -1 +1 @@
v2.0.2-474-g38fd517c
v2.0.2-488-ge0cecd4c

View File

@ -18,5 +18,5 @@ tau0_slip 405.8e6 456.7e6 # per family
tausat_slip 872.9e6 971.2e6 # per family
h0_slipslip 563.0e9
interaction_slipslip 1 1 1.4 1.4 1.4 1.4
w0_slip 2.0
a_slip 2.0
(output) totalshear

View File

@ -1363,12 +1363,16 @@ function IO_continuousIntValues(fileUnit,maxN,lookupName,lookupMap,lookupMaxN)
pure function IO_intOut(intToPrint)
implicit none
character(len=19) :: N_Digits ! maximum digits for 64 bit integer
character(len=40) :: IO_intOut
integer(pInt), intent(in) :: intToPrint
character(len=41) :: IO_intOut
integer(pInt) :: N_digits
character(len=19) :: width ! maximum digits for 64 bit integer
character(len=20) :: min_width ! longer for negative values
write(N_Digits, '(I19.19)') 1_pInt + int(log10(real(intToPrint)),pInt)
IO_intOut = 'I'//trim(N_Digits)//'.'//trim(N_Digits)
N_digits = 1_pInt + int(log10(real(max(abs(intToPrint),1_pInt))),pInt)
write(width, '(I19.19)') N_digits
write(min_width, '(I20.20)') N_digits + merge(1_pInt,0_pInt,intToPrint < 0_pInt)
IO_intOut = 'I'//trim(min_width)//'.'//trim(width)
end function IO_intOut
@ -1473,6 +1477,8 @@ subroutine IO_error(error_ID,el,ip,g,instance,ext_msg)
msg = 'illegal texture transformation specified'
case (160_pInt)
msg = 'no entries in config part'
case (161_pInt)
msg = 'config part found twice'
case (165_pInt)
msg = 'homogenization configuration'
case (170_pInt)
@ -1570,7 +1576,7 @@ subroutine IO_error(error_ID,el,ip,g,instance,ext_msg)
case (845_pInt)
msg = 'incomplete information in spectral mesh header'
case (846_pInt)
msg = 'not a rotation defined for loadcase rotation'
msg = 'rotation for load case rotation ill-defined (R:RT != I)'
case (847_pInt)
msg = 'update of gamma operator not possible when pre-calculated'
case (880_pInt)

View File

@ -141,23 +141,23 @@ subroutine config_init()
select case (trim(part))
case (trim(material_partPhase))
call parseFile(line,phase_name,config_phase,fileContent(i+1:))
call parseFile(phase_name,config_phase,line,fileContent(i+1:))
if (iand(myDebug,debug_levelBasic) /= 0_pInt) write(6,'(a)') ' Phase parsed'; flush(6)
case (trim(material_partMicrostructure))
call parseFile(line,microstructure_name,config_microstructure,fileContent(i+1:))
call parseFile(microstructure_name,config_microstructure,line,fileContent(i+1:))
if (iand(myDebug,debug_levelBasic) /= 0_pInt) write(6,'(a)') ' Microstructure parsed'; flush(6)
case (trim(material_partCrystallite))
call parseFile(line,crystallite_name,config_crystallite,fileContent(i+1:))
call parseFile(crystallite_name,config_crystallite,line,fileContent(i+1:))
if (iand(myDebug,debug_levelBasic) /= 0_pInt) write(6,'(a)') ' Crystallite parsed'; flush(6)
case (trim(material_partHomogenization))
call parseFile(line,homogenization_name,config_homogenization,fileContent(i+1:))
call parseFile(homogenization_name,config_homogenization,line,fileContent(i+1:))
if (iand(myDebug,debug_levelBasic) /= 0_pInt) write(6,'(a)') ' Homogenization parsed'; flush(6)
case (trim(material_partTexture))
call parseFile(line,texture_name,config_texture,fileContent(i+1:))
call parseFile(texture_name,config_texture,line,fileContent(i+1:))
if (iand(myDebug,debug_levelBasic) /= 0_pInt) write(6,'(a)') ' Texture parsed'; flush(6)
end select
@ -180,7 +180,7 @@ end subroutine config_init
!--------------------------------------------------------------------------------------------------
!> @brief parses the material.config file
!--------------------------------------------------------------------------------------------------
subroutine parseFile(line,sectionNames,part,&
subroutine parseFile(sectionNames,part,line, &
fileContent)
use prec, only: &
pStringLen
@ -189,9 +189,9 @@ subroutine parseFile(line,sectionNames,part,&
IO_getTag
implicit none
character(len=pStringLen), intent(out) :: line
character(len=64), allocatable, dimension(:), intent(out) :: sectionNames
type(tPartitionedStringList), allocatable, dimension(:), intent(out) :: part
type(tPartitionedStringList), allocatable, dimension(:), intent(inout) :: part
character(len=pStringLen), intent(inout) :: line
character(len=pStringLen), dimension(:), intent(in) :: fileContent
integer(pInt), allocatable, dimension(:) :: partPosition ! position of [] tags + last line in section
@ -199,6 +199,8 @@ subroutine parseFile(line,sectionNames,part,&
logical :: echo
echo = .false.
if (allocated(part)) call IO_error(161_pInt,ext_msg=trim(line))
allocate(partPosition(0))
do i = 1_pInt, size(fileContent)
@ -351,7 +353,7 @@ end subroutine finalize
!--------------------------------------------------------------------------------------------------
!> @brief cleans entire array of linke lists
!> @details called when variable goes out of scope.
!> @details called when variable goes out of scope and deallocates the list at each array entry
!--------------------------------------------------------------------------------------------------
subroutine finalizeArray(this)
@ -361,11 +363,11 @@ subroutine finalizeArray(this)
type(tPartitionedStringList), pointer :: temp ! bug in Gfortran?
do i=1, size(this)
!if (associated(this(i)%next)) then
if (associated(this(i)%next)) then
temp => this(i)%next
!deallocate(this(i)) !internal compiler error: in gfc_build_final_call, at fortran/trans.c:975
deallocate(temp)
!endif
endif
enddo
end subroutine finalizeArray

View File

@ -111,6 +111,9 @@ module lattice
-1,-1, 0, -1, 1,-1 & ! D6
],pReal),[ 3_pInt + 3_pInt,LATTICE_fcc_Nslip]) !< Slip system <110>{111} directions. Sorted according to Eisenlohr & Hantcherli
character(len=*), dimension(1), parameter, public :: LATTICE_FCC_SLIPFAMILY_NAME = &
['<0 1 -1>{1 1 1}']
real(pReal), dimension(3+3,LATTICE_fcc_Ntwin), parameter, private :: &
LATTICE_fcc_systemTwin = reshape(real( [&
-2, 1, 1, 1, 1, 1, &
@ -127,6 +130,9 @@ module lattice
-1, 1, 2, -1, 1,-1 &
],pReal),[ 3_pInt + 3_pInt,LATTICE_fcc_Ntwin]) !< Twin system <112>{111} directions. Sorted according to Eisenlohr & Hantcherli
character(len=*), dimension(1), parameter, public :: LATTICE_FCC_TWINFAMILY_NAME = &
['<-2 1 1>{1 1 1}']
real(pReal), dimension(3+3,LATTICE_fcc_Ntrans), parameter, private :: &
LATTICE_fccTohex_systemTrans = reshape(real( [&
-2, 1, 1, 1, 1, 1, &
@ -433,6 +439,10 @@ module lattice
! 1,-1, 1, 3, 2,-1 &
],pReal),[ 3_pInt + 3_pInt ,LATTICE_bcc_Nslip])
character(len=*), dimension(2), parameter, public :: LATTICE_BCC_SLIPFAMILY_NAME = &
['<1 -1 1>{0 1 1}', &
'<1 -1 1>{2 1 1}']
real(pReal), dimension(3+3,LATTICE_bcc_Ntwin), parameter, private :: &
LATTICE_bcc_systemTwin = reshape(real([&
! Twin system <111>{112}
@ -450,6 +460,9 @@ module lattice
1, 1, 1, 1, 1,-2 &
],pReal),[ 3_pInt + 3_pInt,LATTICE_bcc_Ntwin])
character(len=*), dimension(1), parameter, public :: LATTICE_BCC_TWINFAMILY_NAME = &
['<1 1 1>{2 1 1}']
real(pReal), dimension(LATTICE_bcc_Ntwin), parameter, private :: &
LATTICE_bcc_shearTwin = 0.5_pReal*sqrt(2.0_pReal)
@ -618,6 +631,14 @@ module lattice
1, 1, -2, 3, -1, -1, 2, 2 &
],pReal),[ 4_pInt + 4_pInt,LATTICE_hex_Nslip]) !< slip systems for hex sorted by A. Alankar & P. Eisenlohr
character(len=*), dimension(6), parameter, public :: LATTICE_HEX_SLIPFAMILY_NAME = &
['<1 1 . 1>{0 0 . 1} ', &
'<1 1 . 1>{1 0 . 0} ', &
'<1 0 . 0>{1 1 . 0} ', &
'<1 1 . 0>{-1 1 . 1} ', &
'<1 1 . 3>{-1 0 . 1} ', &
'<1 1 . 3>{-1 -1 . 2}']
real(pReal), dimension(4+4,LATTICE_hex_Ntwin), parameter, private :: &
LATTICE_hex_systemTwin = reshape(real([&
! Compression or Tension =f(twinning shear=f(c/a)) for each metal ! (according to Yoo 1981)
@ -650,6 +671,12 @@ module lattice
1, 1, -2, -3, 1, 1, -2, 2 &
],pReal),[ 4_pInt + 4_pInt ,LATTICE_hex_Ntwin]) !< twin systems for hex, order follows Prof. Tom Bieler's scheme; but numbering in data was restarted from 1
character(len=*), dimension(4), parameter, public :: LATTICE_HEX_TWINFAMILY_NAME = &
['<-1 0 . 1>{1 0 . 2} ', &
'<1 1 . 6>{-1 -1 . 1}', &
'<1 0 . -2>{1 0 . 1} ', &
'<1 1 . -3>{1 1 . 2} ']
integer(pInt), dimension(LATTICE_hex_Ntwin), parameter, private :: &
LATTICE_hex_shearTwin = reshape(int( [& ! indicator to formula further below
1, & ! <-10.1>{10.2}
@ -926,6 +953,21 @@ module lattice
1, 1, 1, 1,-2, 1 &
],pReal),[ 3_pInt + 3_pInt,LATTICE_bct_Nslip]) !< slip systems for bct sorted by Bieler
character(len=*), dimension(13), parameter, public :: LATTICE_BCT_SLIPFAMILY_NAME = &
['{1 0 0)<0 0 1] ', &
'{1 1 0)<0 0 1] ', &
'{1 0 0)<0 1 0] ', &
'{1 1 0)<1 -1 1]', &
'{1 1 0)<1 -1 0]', &
'{1 0 0)<0 1 1] ', &
'{0 0 1)<0 1 0] ', &
'{0 0 1)<1 1 0] ', &
'{0 1 1)<0 1 -1]', &
'{0 1 1)<1 -1 1]', &
'{0 1 1)<1 0 0] ', &
'{2 1 1)<0 1 -1]', &
'{2 1 1)<-1 1 1]']
integer(pInt), dimension(LATTICE_bct_Nslip,LATTICE_bct_Nslip), parameter, public :: &
LATTICE_bct_interactionSlipSlip = reshape(int( [&
1, 2, 3, 3, 7, 7, 13, 13, 13, 13, 21, 21, 31, 31, 31, 31, 43, 43, 57, 57, 73, 73, 73, 73, 91, 91, 91, 91, 91, 91, 91, 91, 111, 111, 111, 111, 133,133,133,133,133,133,133,133, 157,157,157,157,157,157,157,157, &

View File

@ -37,12 +37,12 @@ module math
real(pReal), dimension(6), parameter, private :: &
nrmMandel = [&
1.0_pReal, 1.0_pReal, 1.0_pReal, &
1.414213562373095_pReal, 1.414213562373095_pReal, 1.414213562373095_pReal ] !< weighting for Mandel notation (forward)
sqrt(2.0_pReal), sqrt(2.0_pReal), sqrt(2.0_pReal) ] !< weighting for Mandel notation (forward)
real(pReal), dimension(6), parameter , public :: &
invnrmMandel = [&
1.0_pReal, 1.0_pReal, 1.0_pReal, &
0.7071067811865476_pReal, 0.7071067811865476_pReal, 0.7071067811865476_pReal ] !< weighting for Mandel notation (backward)
1.0_pReal/sqrt(2.0_pReal), 1.0_pReal/sqrt(2.0_pReal), 1.0_pReal/sqrt(2.0_pReal) ] !< weighting for Mandel notation (backward)
integer(pInt), dimension (2,6), parameter, private :: &
mapVoigt = reshape([&