simplifying
This commit is contained in:
parent
c8f3808dab
commit
a6c0f500ff
|
@ -172,10 +172,10 @@ module material
|
||||||
microstructure_texture !< texture IDs of each microstructure
|
microstructure_texture !< texture IDs of each microstructure
|
||||||
|
|
||||||
real(pReal), dimension(:,:), allocatable, private :: &
|
real(pReal), dimension(:,:), allocatable, private :: &
|
||||||
|
texture_Gauss, & !< data of each Gauss component
|
||||||
microstructure_fraction !< vol fraction of each constituent in microstructure
|
microstructure_fraction !< vol fraction of each constituent in microstructure
|
||||||
|
|
||||||
real(pReal), dimension(:,:,:), allocatable, private :: &
|
real(pReal), dimension(:,:,:), allocatable, private :: &
|
||||||
texture_Gauss, & !< data of each Gauss component
|
|
||||||
texture_transformation !< transformation for each texture
|
texture_transformation !< transformation for each texture
|
||||||
|
|
||||||
logical, dimension(:), allocatable, private :: &
|
logical, dimension(:), allocatable, private :: &
|
||||||
|
@ -707,7 +707,7 @@ end subroutine material_parsePhase
|
||||||
!--------------------------------------------------------------------------------------------------
|
!--------------------------------------------------------------------------------------------------
|
||||||
subroutine material_parseTexture
|
subroutine material_parseTexture
|
||||||
|
|
||||||
integer :: section, gauss, j, t, i
|
integer :: section, j, t, i
|
||||||
character(len=65536), dimension(:), allocatable :: strings ! Values for given key in material config
|
character(len=65536), dimension(:), allocatable :: strings ! Values for given key in material config
|
||||||
integer, dimension(:), allocatable :: chunkPos
|
integer, dimension(:), allocatable :: chunkPos
|
||||||
|
|
||||||
|
@ -719,13 +719,12 @@ subroutine material_parseTexture
|
||||||
if (config_texture(t)%keyExists('(fiber)')) call IO_error(147,ext_msg='(fiber)')
|
if (config_texture(t)%keyExists('(fiber)')) call IO_error(147,ext_msg='(fiber)')
|
||||||
enddo
|
enddo
|
||||||
|
|
||||||
allocate(texture_Gauss (5,1,size(config_texture)), source=0.0_pReal)
|
allocate(texture_Gauss (5,size(config_texture)), source=0.0_pReal)
|
||||||
allocate(texture_transformation(3,3,size(config_texture)), source=0.0_pReal)
|
allocate(texture_transformation(3,3,size(config_texture)), source=0.0_pReal)
|
||||||
texture_transformation = spread(math_I3,3,size(config_texture))
|
texture_transformation = spread(math_I3,3,size(config_texture))
|
||||||
|
|
||||||
do t=1, size(config_texture)
|
do t=1, size(config_texture)
|
||||||
section = t
|
section = t
|
||||||
gauss = 0
|
|
||||||
|
|
||||||
if (config_texture(t)%keyExists('axes')) then
|
if (config_texture(t)%keyExists('axes')) then
|
||||||
strings = config_texture(t)%getStrings('axes')
|
strings = config_texture(t)%getStrings('axes')
|
||||||
|
@ -750,23 +749,20 @@ subroutine material_parseTexture
|
||||||
if(dNeq(math_det33(texture_transformation(1:3,1:3,t)),1.0_pReal)) call IO_error(157,t)
|
if(dNeq(math_det33(texture_transformation(1:3,1:3,t)),1.0_pReal)) call IO_error(157,t)
|
||||||
endif
|
endif
|
||||||
|
|
||||||
if (config_texture(t)%keyExists('(gauss)')) then
|
|
||||||
gauss = gauss + 1
|
|
||||||
strings = config_texture(t)%getStrings('(gauss)',raw= .true.)
|
strings = config_texture(t)%getStrings('(gauss)',raw= .true.)
|
||||||
do i = 1 , size(strings)
|
do i = 1 , size(strings)
|
||||||
chunkPos = IO_stringPos(strings(i))
|
chunkPos = IO_stringPos(strings(i))
|
||||||
do j = 1,9,2
|
do j = 1,9,2
|
||||||
select case (IO_stringValue(strings(i),chunkPos,j))
|
select case (IO_stringValue(strings(i),chunkPos,j))
|
||||||
case('phi1')
|
case('phi1')
|
||||||
texture_Gauss(1,gauss,t) = IO_floatValue(strings(i),chunkPos,j+1)*inRad
|
texture_Gauss(1,t) = IO_floatValue(strings(i),chunkPos,j+1)*inRad
|
||||||
case('phi')
|
case('phi')
|
||||||
texture_Gauss(2,gauss,t) = IO_floatValue(strings(i),chunkPos,j+1)*inRad
|
texture_Gauss(2,t) = IO_floatValue(strings(i),chunkPos,j+1)*inRad
|
||||||
case('phi2')
|
case('phi2')
|
||||||
texture_Gauss(3,gauss,t) = IO_floatValue(strings(i),chunkPos,j+1)*inRad
|
texture_Gauss(3,t) = IO_floatValue(strings(i),chunkPos,j+1)*inRad
|
||||||
end select
|
end select
|
||||||
enddo
|
enddo
|
||||||
enddo
|
enddo
|
||||||
endif
|
|
||||||
enddo
|
enddo
|
||||||
|
|
||||||
call config_deallocate('material.config/texture')
|
call config_deallocate('material.config/texture')
|
||||||
|
@ -878,7 +874,7 @@ subroutine material_populateGrains
|
||||||
do c = 1, homogenization_Ngrains(homog)
|
do c = 1, homogenization_Ngrains(homog)
|
||||||
material_phase(c,i,e) = microstructure_phase(c,micro)
|
material_phase(c,i,e) = microstructure_phase(c,micro)
|
||||||
material_texture(c,i,e) = microstructure_texture(c,micro)
|
material_texture(c,i,e) = microstructure_texture(c,micro)
|
||||||
material_EulerAngles(1:3,c,i,e) = texture_Gauss(1:3,1,material_texture(c,i,e))
|
material_EulerAngles(1:3,c,i,e) = texture_Gauss(1:3,material_texture(c,i,e))
|
||||||
material_EulerAngles(1:3,c,i,e) = math_RtoEuler( & ! translate back to Euler angles
|
material_EulerAngles(1:3,c,i,e) = math_RtoEuler( & ! translate back to Euler angles
|
||||||
matmul( & ! pre-multiply
|
matmul( & ! pre-multiply
|
||||||
math_EulertoR(material_EulerAngles(1:3,c,i,e)), & ! face-value orientation
|
math_EulertoR(material_EulerAngles(1:3,c,i,e)), & ! face-value orientation
|
||||||
|
|
Loading…
Reference in New Issue