data structures to output mechanical results (homogenization)
This commit is contained in:
parent
d97f515b77
commit
b44a862a8a
|
@ -50,6 +50,12 @@ submodule(homogenization) mechanical
|
||||||
|
|
||||||
end interface
|
end interface
|
||||||
|
|
||||||
|
type :: tOutput !< requested output (per phase)
|
||||||
|
character(len=pStringLen), allocatable, dimension(:) :: &
|
||||||
|
label
|
||||||
|
end type tOutput
|
||||||
|
type(tOutput), allocatable, dimension(:) :: output_mechanical
|
||||||
|
|
||||||
integer(kind(HOMOGENIZATION_undefined_ID)), dimension(:), allocatable :: &
|
integer(kind(HOMOGENIZATION_undefined_ID)), dimension(:), allocatable :: &
|
||||||
homogenization_type !< type of each homogenization
|
homogenization_type !< type of each homogenization
|
||||||
|
|
||||||
|
@ -206,26 +212,33 @@ subroutine parseMechanical()
|
||||||
class(tNode), pointer :: &
|
class(tNode), pointer :: &
|
||||||
material_homogenization, &
|
material_homogenization, &
|
||||||
homog, &
|
homog, &
|
||||||
homogMech
|
mechanical
|
||||||
|
|
||||||
|
integer :: ho
|
||||||
|
|
||||||
integer :: h
|
|
||||||
|
|
||||||
material_homogenization => config_material%get('homogenization')
|
material_homogenization => config_material%get('homogenization')
|
||||||
|
|
||||||
allocate(homogenization_type(size(material_name_homogenization)), source=HOMOGENIZATION_undefined_ID)
|
allocate(homogenization_type(size(material_name_homogenization)), source=HOMOGENIZATION_undefined_ID)
|
||||||
|
allocate(output_mechanical(size(material_name_homogenization)))
|
||||||
|
|
||||||
do h=1, size(material_name_homogenization)
|
do ho=1, size(material_name_homogenization)
|
||||||
homog => material_homogenization%get(h)
|
homog => material_homogenization%get(ho)
|
||||||
homogMech => homog%get('mechanical')
|
mechanical => homog%get('mechanical')
|
||||||
select case (homogMech%get_asString('type'))
|
#if defined(__GFORTRAN__)
|
||||||
|
output_mechanical(ho)%label = output_as1dString(mechanical)
|
||||||
|
#else
|
||||||
|
output_mechanical(ho)%label = mechanical%get_as1dString('output',defaultVal=emptyStringArray)
|
||||||
|
#endif
|
||||||
|
select case (mechanical%get_asString('type'))
|
||||||
case('pass')
|
case('pass')
|
||||||
homogenization_type(h) = HOMOGENIZATION_NONE_ID
|
homogenization_type(ho) = HOMOGENIZATION_NONE_ID
|
||||||
case('isostrain')
|
case('isostrain')
|
||||||
homogenization_type(h) = HOMOGENIZATION_ISOSTRAIN_ID
|
homogenization_type(ho) = HOMOGENIZATION_ISOSTRAIN_ID
|
||||||
case('RGC')
|
case('RGC')
|
||||||
homogenization_type(h) = HOMOGENIZATION_RGC_ID
|
homogenization_type(ho) = HOMOGENIZATION_RGC_ID
|
||||||
case default
|
case default
|
||||||
call IO_error(500,ext_msg=homogMech%get_asString('type'))
|
call IO_error(500,ext_msg=mechanical%get_asString('type'))
|
||||||
end select
|
end select
|
||||||
end do
|
end do
|
||||||
|
|
||||||
|
|
|
@ -180,11 +180,12 @@ submodule(phase) mechanical
|
||||||
end function elastic_nu
|
end function elastic_nu
|
||||||
|
|
||||||
end interface
|
end interface
|
||||||
type :: tOutput !< new requested output (per phase)
|
|
||||||
|
type :: tOutput !< requested output (per phase)
|
||||||
character(len=pStringLen), allocatable, dimension(:) :: &
|
character(len=pStringLen), allocatable, dimension(:) :: &
|
||||||
label
|
label
|
||||||
end type tOutput
|
end type tOutput
|
||||||
type(tOutput), allocatable, dimension(:) :: output_constituent
|
type(tOutput), allocatable, dimension(:) :: output_mechanical
|
||||||
|
|
||||||
procedure(integrateStateFPI), pointer :: integrateState
|
procedure(integrateStateFPI), pointer :: integrateState
|
||||||
|
|
||||||
|
@ -216,7 +217,7 @@ module subroutine mechanical_init(phases)
|
||||||
print'(/,1x,a)', '<<<+- phase:mechanical init -+>>>'
|
print'(/,1x,a)', '<<<+- phase:mechanical init -+>>>'
|
||||||
|
|
||||||
!-------------------------------------------------------------------------------------------------
|
!-------------------------------------------------------------------------------------------------
|
||||||
allocate(output_constituent(phases%length))
|
allocate(output_mechanical(phases%length))
|
||||||
|
|
||||||
allocate(phase_mechanical_Fe(phases%length))
|
allocate(phase_mechanical_Fe(phases%length))
|
||||||
allocate(phase_mechanical_Fi(phases%length))
|
allocate(phase_mechanical_Fi(phases%length))
|
||||||
|
@ -254,9 +255,9 @@ module subroutine mechanical_init(phases)
|
||||||
phase => phases%get(ph)
|
phase => phases%get(ph)
|
||||||
mech => phase%get('mechanical')
|
mech => phase%get('mechanical')
|
||||||
#if defined(__GFORTRAN__)
|
#if defined(__GFORTRAN__)
|
||||||
output_constituent(ph)%label = output_as1dString(mech)
|
output_mechanical(ph)%label = output_as1dString(mech)
|
||||||
#else
|
#else
|
||||||
output_constituent(ph)%label = mech%get_as1dString('output',defaultVal=emptyStringArray)
|
output_mechanical(ph)%label = mech%get_as1dString('output',defaultVal=emptyStringArray)
|
||||||
#endif
|
#endif
|
||||||
enddo
|
enddo
|
||||||
|
|
||||||
|
@ -891,9 +892,9 @@ subroutine crystallite_results(group,ph)
|
||||||
|
|
||||||
call results_closeGroup(results_addGroup(group//'/mechanical'))
|
call results_closeGroup(results_addGroup(group//'/mechanical'))
|
||||||
|
|
||||||
do ou = 1, size(output_constituent(ph)%label)
|
do ou = 1, size(output_mechanical(ph)%label)
|
||||||
|
|
||||||
select case (output_constituent(ph)%label(ou))
|
select case (output_mechanical(ph)%label(ou))
|
||||||
case('F')
|
case('F')
|
||||||
call results_writeDataset(phase_mechanical_F(ph)%data,group//'/mechanical/','F',&
|
call results_writeDataset(phase_mechanical_F(ph)%data,group//'/mechanical/','F',&
|
||||||
'deformation gradient','1')
|
'deformation gradient','1')
|
||||||
|
@ -919,11 +920,11 @@ subroutine crystallite_results(group,ph)
|
||||||
call results_writeDataset(phase_mechanical_S(ph)%data,group//'/mechanical/','S', &
|
call results_writeDataset(phase_mechanical_S(ph)%data,group//'/mechanical/','S', &
|
||||||
'second Piola-Kirchhoff stress','Pa')
|
'second Piola-Kirchhoff stress','Pa')
|
||||||
case('O')
|
case('O')
|
||||||
call results_writeDataset(to_quaternion(phase_O(ph)%data),group//'/mechanical',output_constituent(ph)%label(ou),&
|
call results_writeDataset(to_quaternion(phase_O(ph)%data),group//'/mechanical',output_mechanical(ph)%label(ou),&
|
||||||
'crystal orientation as quaternion','q_0 (q_1 q_2 q_3)')
|
'crystal orientation as quaternion','q_0 (q_1 q_2 q_3)')
|
||||||
call results_addAttribute('lattice',phase_lattice(ph),group//'/mechanical/'//output_constituent(ph)%label(ou))
|
call results_addAttribute('lattice',phase_lattice(ph),group//'/mechanical/'//output_mechanical(ph)%label(ou))
|
||||||
if (any(phase_lattice(ph) == ['hP', 'tI'])) &
|
if (any(phase_lattice(ph) == ['hP', 'tI'])) &
|
||||||
call results_addAttribute('c/a',phase_cOverA(ph),group//'/mechanical/'//output_constituent(ph)%label(ou))
|
call results_addAttribute('c/a',phase_cOverA(ph),group//'/mechanical/'//output_mechanical(ph)%label(ou))
|
||||||
end select
|
end select
|
||||||
enddo
|
enddo
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue