From c3925b3497dd66e5218bb8ac5bdae6eee2af3782 Mon Sep 17 00:00:00 2001 From: Martin Diehl Date: Sun, 7 Apr 2019 14:47:21 +0200 Subject: [PATCH] small polishing --- src/crystallite.f90 | 19 +++++++++++++++++-- src/lattice.f90 | 10 ++++++---- 2 files changed, 23 insertions(+), 6 deletions(-) diff --git a/src/crystallite.f90 b/src/crystallite.f90 index 7ebfee8bf..69c7839c7 100644 --- a/src/crystallite.f90 +++ b/src/crystallite.f90 @@ -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 diff --git a/src/lattice.f90 b/src/lattice.f90 index 1b844c31f..d11932c29 100644 --- a/src/lattice.f90 +++ b/src/lattice.f90 @@ -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