small polishing

This commit is contained in:
Martin Diehl 2019-04-07 14:47:21 +02:00
parent 0b70f01e04
commit c3925b3497
2 changed files with 23 additions and 6 deletions

View File

@ -1081,6 +1081,7 @@ end function crystallite_postResults
!--------------------------------------------------------------------------------------------------
subroutine crystallite_results
#if defined(PETSc) || defined(DAMASK_HDF5)
use lattice
use results
use HDF5_utilities
use rotations
@ -1094,7 +1095,7 @@ subroutine crystallite_results
integer :: p,o
real(pReal), allocatable, dimension(:,:,:) :: selected_tensors
type(rotation), allocatable, dimension(:) :: selected_rotations
character(len=256) :: group
character(len=256) :: group,lattice_label
call HDF5_closeGroup(results_addGroup('current/constituent'))
@ -1136,9 +1137,23 @@ subroutine crystallite_results
call results_writeDataset(group,selected_tensors,'S',&
'2nd Piola-Kirchoff stress','Pa')
case('orientation')
select case(lattice_structure(p))
case(LATTICE_iso_ID)
lattice_label = 'iso'
case(LATTICE_fcc_ID)
lattice_label = 'fcc'
case(LATTICE_bcc_ID)
lattice_label = 'bcc'
case(LATTICE_bct_ID)
lattice_label = 'bct'
case(LATTICE_hex_ID)
lattice_label = 'hex'
case(LATTICE_ort_ID)
lattice_label = 'ort'
end select
selected_rotations = select_rotations(crystallite_orientation,p)
call results_writeDataset(group,selected_rotations,'orientation',&
'crystal orientation as quaternion','1')
'crystal orientation as quaternion',lattice_label)
end select
enddo
enddo

View File

@ -507,10 +507,12 @@ module lattice
public :: &
lattice_init, &
lattice_qDisorientation, &
LATTICE_iso_ID, &
LATTICE_fcc_ID, &
LATTICE_bcc_ID, &
LATTICE_bct_ID, &
LATTICE_hex_ID, &
LATTICE_ort_ID, &
lattice_SchmidMatrix_slip, &
lattice_SchmidMatrix_twin, &
lattice_SchmidMatrix_trans, &
@ -581,18 +583,18 @@ subroutine lattice_init
do p = 1, size(config_phase)
tag = config_phase(p)%getString('lattice_structure')
select case(trim(tag))
case('iso','isotropic')
select case(trim(tag(1:3)))
case('iso')
lattice_structure(p) = LATTICE_iso_ID
case('fcc')
lattice_structure(p) = LATTICE_fcc_ID
case('bcc')
lattice_structure(p) = LATTICE_bcc_ID
case('hex','hexagonal')
case('hex')
lattice_structure(p) = LATTICE_hex_ID
case('bct')
lattice_structure(p) = LATTICE_bct_ID
case('ort','orthorhombic')
case('ort')
lattice_structure(p) = LATTICE_ort_ID
end select