Merge branch 'Fortran-cleaning' into 'development'

Separating functionality

See merge request damask/DAMASK!396
This commit is contained in:
Sharan Roongta 2021-06-02 09:24:47 +00:00
commit 39c2506b8d
27 changed files with 262 additions and 295 deletions

@ -1 +1 @@
Subproject commit 185cb53be76eded17565c5fa91bd9b4499cda4b8
Subproject commit 5ecf7d74a79da155aed31e776963c7bc10eb9890

View File

@ -17,7 +17,7 @@ module HDF5_utilities
public
!--------------------------------------------------------------------------------------------------
!> @brief reads integer or float data of defined shape from file ! ToDo: order of arguments wrong
!> @brief reads integer or float data of defined shape from file
!> @details for parallel IO, all dimension except for the last need to match
!--------------------------------------------------------------------------------------------------
interface HDF5_read
@ -39,7 +39,7 @@ module HDF5_utilities
end interface HDF5_read
!--------------------------------------------------------------------------------------------------
!> @brief writes integer or real data of defined shape to file ! ToDo: order of arguments wrong
!> @brief writes integer or real data of defined shape to file
!> @details for parallel IO, all dimension except for the last need to match
!--------------------------------------------------------------------------------------------------
interface HDF5_write
@ -525,7 +525,7 @@ end subroutine HDF5_setLink
!--------------------------------------------------------------------------------------------------
!> @brief read dataset of type real with 1 dimension
!--------------------------------------------------------------------------------------------------
subroutine HDF5_read_real1(loc_id,dataset,datasetName,parallel)
subroutine HDF5_read_real1(dataset,loc_id,datasetName,parallel)
real(pReal), intent(out), dimension(:) :: dataset !< data read from file
integer(HID_T), intent(in) :: loc_id !< file or group handle
@ -565,7 +565,7 @@ end subroutine HDF5_read_real1
!--------------------------------------------------------------------------------------------------
!> @brief read dataset of type real with 2 dimensions
!--------------------------------------------------------------------------------------------------
subroutine HDF5_read_real2(loc_id,dataset,datasetName,parallel)
subroutine HDF5_read_real2(dataset,loc_id,datasetName,parallel)
real(pReal), intent(out), dimension(:,:) :: dataset !< data read from file
integer(HID_T), intent(in) :: loc_id !< file or group handle
@ -605,7 +605,7 @@ end subroutine HDF5_read_real2
!--------------------------------------------------------------------------------------------------
!> @brief read dataset of type real with 2 dimensions
!--------------------------------------------------------------------------------------------------
subroutine HDF5_read_real3(loc_id,dataset,datasetName,parallel)
subroutine HDF5_read_real3(dataset,loc_id,datasetName,parallel)
real(pReal), intent(out), dimension(:,:,:) :: dataset !< data read from file
integer(HID_T), intent(in) :: loc_id !< file or group handle
@ -645,7 +645,7 @@ end subroutine HDF5_read_real3
!--------------------------------------------------------------------------------------------------
!> @brief read dataset of type real with 4 dimensions
!--------------------------------------------------------------------------------------------------
subroutine HDF5_read_real4(loc_id,dataset,datasetName,parallel)
subroutine HDF5_read_real4(dataset,loc_id,datasetName,parallel)
real(pReal), intent(out), dimension(:,:,:,:) :: dataset !< read data
integer(HID_T), intent(in) :: loc_id !< file or group handle
@ -685,7 +685,7 @@ end subroutine HDF5_read_real4
!--------------------------------------------------------------------------------------------------
!> @brief read dataset of type real with 5 dimensions
!--------------------------------------------------------------------------------------------------
subroutine HDF5_read_real5(loc_id,dataset,datasetName,parallel)
subroutine HDF5_read_real5(dataset,loc_id,datasetName,parallel)
real(pReal), intent(out), dimension(:,:,:,:,:) :: dataset !< data read from file
integer(HID_T), intent(in) :: loc_id !< file or group handle
@ -725,7 +725,7 @@ end subroutine HDF5_read_real5
!--------------------------------------------------------------------------------------------------
!> @brief read dataset of type real with 6 dimensions
!--------------------------------------------------------------------------------------------------
subroutine HDF5_read_real6(loc_id,dataset,datasetName,parallel)
subroutine HDF5_read_real6(dataset,loc_id,datasetName,parallel)
real(pReal), intent(out), dimension(:,:,:,:,:,:) :: dataset !< data read from file
integer(HID_T), intent(in) :: loc_id !< file or group handle
@ -765,7 +765,7 @@ end subroutine HDF5_read_real6
!--------------------------------------------------------------------------------------------------
!> @brief read dataset of type real with 7 dimensions
!--------------------------------------------------------------------------------------------------
subroutine HDF5_read_real7(loc_id,dataset,datasetName,parallel)
subroutine HDF5_read_real7(dataset,loc_id,datasetName,parallel)
real(pReal), intent(out), dimension(:,:,:,:,:,:,:) :: dataset !< data read from file
integer(HID_T), intent(in) :: loc_id !< file or group handle
@ -806,7 +806,7 @@ end subroutine HDF5_read_real7
!--------------------------------------------------------------------------------------------------
!> @brief read dataset of type integer with 1 dimension
!--------------------------------------------------------------------------------------------------
subroutine HDF5_read_int1(loc_id,dataset,datasetName,parallel)
subroutine HDF5_read_int1(dataset,loc_id,datasetName,parallel)
integer, intent(out), dimension(:) :: dataset !< data read from file
integer(HID_T), intent(in) :: loc_id !< file or group handle
@ -847,7 +847,7 @@ end subroutine HDF5_read_int1
!--------------------------------------------------------------------------------------------------
!> @brief read dataset of type integer with 2 dimensions
!--------------------------------------------------------------------------------------------------
subroutine HDF5_read_int2(loc_id,dataset,datasetName,parallel)
subroutine HDF5_read_int2(dataset,loc_id,datasetName,parallel)
integer, intent(out), dimension(:,:) :: dataset !< data read from file
integer(HID_T), intent(in) :: loc_id !< file or group handle
@ -887,7 +887,7 @@ end subroutine HDF5_read_int2
!--------------------------------------------------------------------------------------------------
!> @brief read dataset of type integer with 3 dimensions
!--------------------------------------------------------------------------------------------------
subroutine HDF5_read_int3(loc_id,dataset,datasetName,parallel)
subroutine HDF5_read_int3(dataset,loc_id,datasetName,parallel)
integer, intent(out), dimension(:,:,:) :: dataset !< data read from file
integer(HID_T), intent(in) :: loc_id !< file or group handle
@ -927,7 +927,7 @@ end subroutine HDF5_read_int3
!--------------------------------------------------------------------------------------------------
!> @brief read dataset of type integer withh 4 dimensions
!--------------------------------------------------------------------------------------------------
subroutine HDF5_read_int4(loc_id,dataset,datasetName,parallel)
subroutine HDF5_read_int4(dataset,loc_id,datasetName,parallel)
integer, intent(out), dimension(:,:,:,:) :: dataset !< data read from file
integer(HID_T), intent(in) :: loc_id !< file or group handle
@ -967,7 +967,7 @@ end subroutine HDF5_read_int4
!--------------------------------------------------------------------------------------------------
!> @brief read dataset of type integer with 5 dimensions
!--------------------------------------------------------------------------------------------------
subroutine HDF5_read_int5(loc_id,dataset,datasetName,parallel)
subroutine HDF5_read_int5(dataset,loc_id,datasetName,parallel)
integer, intent(out), dimension(:,:,:,:,:) :: dataset !< data read from file
integer(HID_T), intent(in) :: loc_id !< file or group handle
@ -1007,7 +1007,7 @@ end subroutine HDF5_read_int5
!--------------------------------------------------------------------------------------------------
!> @brief read dataset of type integer with 6 dimensions
!--------------------------------------------------------------------------------------------------
subroutine HDF5_read_int6(loc_id,dataset,datasetName,parallel)
subroutine HDF5_read_int6(dataset,loc_id,datasetName,parallel)
integer, intent(out), dimension(:,:,:,:,:,:) :: dataset !< data read from file
integer(HID_T), intent(in) :: loc_id !< file or group handle
@ -1047,7 +1047,7 @@ end subroutine HDF5_read_int6
!--------------------------------------------------------------------------------------------------
!> @brief read dataset of type integer with 7 dimensions
!--------------------------------------------------------------------------------------------------
subroutine HDF5_read_int7(loc_id,dataset,datasetName,parallel)
subroutine HDF5_read_int7(dataset,loc_id,datasetName,parallel)
integer, intent(out), dimension(:,:,:,:,:,:,:) :: dataset !< data read from file
integer(HID_T), intent(in) :: loc_id !< file or group handle
@ -1088,7 +1088,7 @@ end subroutine HDF5_read_int7
!--------------------------------------------------------------------------------------------------
!> @brief write dataset of type real with 1 dimension
!--------------------------------------------------------------------------------------------------
subroutine HDF5_write_real1(loc_id,dataset,datasetName,parallel)
subroutine HDF5_write_real1(dataset,loc_id,datasetName,parallel)
real(pReal), intent(in), dimension(:) :: dataset !< data written to file
integer(HID_T), intent(in) :: loc_id !< file or group handle
@ -1129,7 +1129,7 @@ end subroutine HDF5_write_real1
!--------------------------------------------------------------------------------------------------
!> @brief write dataset of type real with 2 dimensions
!--------------------------------------------------------------------------------------------------
subroutine HDF5_write_real2(loc_id,dataset,datasetName,parallel)
subroutine HDF5_write_real2(dataset,loc_id,datasetName,parallel)
real(pReal), intent(in), dimension(:,:) :: dataset !< data written to file
integer(HID_T), intent(in) :: loc_id !< file or group handle
@ -1170,7 +1170,7 @@ end subroutine HDF5_write_real2
!--------------------------------------------------------------------------------------------------
!> @brief write dataset of type real with 3 dimensions
!--------------------------------------------------------------------------------------------------
subroutine HDF5_write_real3(loc_id,dataset,datasetName,parallel)
subroutine HDF5_write_real3(dataset,loc_id,datasetName,parallel)
real(pReal), intent(in), dimension(:,:,:) :: dataset !< data written to file
integer(HID_T), intent(in) :: loc_id !< file or group handle
@ -1211,7 +1211,7 @@ end subroutine HDF5_write_real3
!--------------------------------------------------------------------------------------------------
!> @brief write dataset of type real with 4 dimensions
!--------------------------------------------------------------------------------------------------
subroutine HDF5_write_real4(loc_id,dataset,datasetName,parallel)
subroutine HDF5_write_real4(dataset,loc_id,datasetName,parallel)
real(pReal), intent(in), dimension(:,:,:,:) :: dataset !< data written to file
integer(HID_T), intent(in) :: loc_id !< file or group handle
@ -1253,7 +1253,7 @@ end subroutine HDF5_write_real4
!--------------------------------------------------------------------------------------------------
!> @brief write dataset of type real with 5 dimensions
!--------------------------------------------------------------------------------------------------
subroutine HDF5_write_real5(loc_id,dataset,datasetName,parallel)
subroutine HDF5_write_real5(dataset,loc_id,datasetName,parallel)
real(pReal), intent(in), dimension(:,:,:,:,:) :: dataset !< data written to file
integer(HID_T), intent(in) :: loc_id !< file or group handle
@ -1294,7 +1294,7 @@ end subroutine HDF5_write_real5
!--------------------------------------------------------------------------------------------------
!> @brief write dataset of type real with 6 dimensions
!--------------------------------------------------------------------------------------------------
subroutine HDF5_write_real6(loc_id,dataset,datasetName,parallel)
subroutine HDF5_write_real6(dataset,loc_id,datasetName,parallel)
real(pReal), intent(in), dimension(:,:,:,:,:,:) :: dataset !< data written to file
integer(HID_T), intent(in) :: loc_id !< file or group handle
@ -1335,7 +1335,7 @@ end subroutine HDF5_write_real6
!--------------------------------------------------------------------------------------------------
!> @brief write dataset of type real with 7 dimensions
!--------------------------------------------------------------------------------------------------
subroutine HDF5_write_real7(loc_id,dataset,datasetName,parallel)
subroutine HDF5_write_real7(dataset,loc_id,datasetName,parallel)
real(pReal), intent(in), dimension(:,:,:,:,:,:,:) :: dataset !< data written to file
integer(HID_T), intent(in) :: loc_id !< file or group handle
@ -1377,7 +1377,7 @@ end subroutine HDF5_write_real7
!--------------------------------------------------------------------------------------------------
!> @brief write dataset of type integer with 1 dimension
!--------------------------------------------------------------------------------------------------
subroutine HDF5_write_int1(loc_id,dataset,datasetName,parallel)
subroutine HDF5_write_int1(dataset,loc_id,datasetName,parallel)
integer, intent(in), dimension(:) :: dataset !< data written to file
integer(HID_T), intent(in) :: loc_id !< file or group handle
@ -1418,7 +1418,7 @@ end subroutine HDF5_write_int1
!--------------------------------------------------------------------------------------------------
!> @brief write dataset of type integer with 2 dimensions
!--------------------------------------------------------------------------------------------------
subroutine HDF5_write_int2(loc_id,dataset,datasetName,parallel)
subroutine HDF5_write_int2(dataset,loc_id,datasetName,parallel)
integer, intent(in), dimension(:,:) :: dataset !< data written to file
integer(HID_T), intent(in) :: loc_id !< file or group handle
@ -1459,7 +1459,7 @@ end subroutine HDF5_write_int2
!--------------------------------------------------------------------------------------------------
!> @brief write dataset of type integer with 3 dimensions
!--------------------------------------------------------------------------------------------------
subroutine HDF5_write_int3(loc_id,dataset,datasetName,parallel)
subroutine HDF5_write_int3(dataset,loc_id,datasetName,parallel)
integer, intent(in), dimension(:,:,:) :: dataset !< data written to file
integer(HID_T), intent(in) :: loc_id !< file or group handle
@ -1500,7 +1500,7 @@ end subroutine HDF5_write_int3
!--------------------------------------------------------------------------------------------------
!> @brief write dataset of type integer with 4 dimensions
!--------------------------------------------------------------------------------------------------
subroutine HDF5_write_int4(loc_id,dataset,datasetName,parallel)
subroutine HDF5_write_int4(dataset,loc_id,datasetName,parallel)
integer, intent(in), dimension(:,:,:,:) :: dataset !< data written to file
integer(HID_T), intent(in) :: loc_id !< file or group handle
@ -1541,7 +1541,7 @@ end subroutine HDF5_write_int4
!--------------------------------------------------------------------------------------------------
!> @brief write dataset of type integer with 5 dimensions
!--------------------------------------------------------------------------------------------------
subroutine HDF5_write_int5(loc_id,dataset,datasetName,parallel)
subroutine HDF5_write_int5(dataset,loc_id,datasetName,parallel)
integer, intent(in), dimension(:,:,:,:,:) :: dataset !< data written to file
integer(HID_T), intent(in) :: loc_id !< file or group handle
@ -1582,7 +1582,7 @@ end subroutine HDF5_write_int5
!--------------------------------------------------------------------------------------------------
!> @brief write dataset of type integer with 6 dimensions
!--------------------------------------------------------------------------------------------------
subroutine HDF5_write_int6(loc_id,dataset,datasetName,parallel)
subroutine HDF5_write_int6(dataset,loc_id,datasetName,parallel)
integer, intent(in), dimension(:,:,:,:,:,:) :: dataset !< data written to file
integer(HID_T), intent(in) :: loc_id !< file or group handle
@ -1623,7 +1623,7 @@ end subroutine HDF5_write_int6
!--------------------------------------------------------------------------------------------------
!> @brief write dataset of type integer with 7 dimensions
!--------------------------------------------------------------------------------------------------
subroutine HDF5_write_int7(loc_id,dataset,datasetName,parallel)
subroutine HDF5_write_int7(dataset,loc_id,datasetName,parallel)
integer, intent(in), dimension(:,:,:,:,:,:,:) :: dataset !< data written to file
integer(HID_T), intent(in) :: loc_id !< file or group handle

View File

@ -173,17 +173,17 @@ subroutine writeGeometry(elem, &
call results_openJobFile
call results_closeGroup(results_addGroup('geometry'))
call results_writeDataset('geometry',connectivity_elem,'T_e',&
call results_writeDataset(connectivity_elem,'geometry','T_e',&
'connectivity of the elements','-')
call results_writeDataset('geometry',connectivity_cell_reshaped,'T_c', &
call results_writeDataset(connectivity_cell_reshaped,'geometry','T_c', &
'connectivity of the cells','-')
call results_addAttribute('VTK_TYPE',elem%vtkType,'geometry/T_c')
call results_writeDataset('geometry',coordinates_nodes,'x_n', &
call results_writeDataset(coordinates_nodes,'geometry','x_n', &
'initial coordinates of the nodes','m')
call results_writeDataset('geometry',coordinates_points,'x_p', &
call results_writeDataset(coordinates_points,'geometry','x_p', &
'initial coordinates of the materialpoints (cell centers)','m')
call results_closeJobFile

View File

@ -82,11 +82,11 @@ subroutine discretization_results
u = discretization_NodeCoords (1:3,:discretization_sharedNodesBegin) &
- discretization_NodeCoords0(1:3,:discretization_sharedNodesBegin)
call results_writeDataset('current/geometry',u,'u_n','displacements of the nodes','m')
call results_writeDataset(u,'current/geometry','u_n','displacements of the nodes','m')
u = discretization_IPcoords &
- discretization_IPcoords0
call results_writeDataset('current/geometry',u,'u_p','displacements of the materialpoints (cell centers)','m')
call results_writeDataset(u,'current/geometry','u_p','displacements of the materialpoints (cell centers)','m')
end subroutine discretization_results

View File

@ -11,22 +11,22 @@ module geometry_plastic_nonlocal
implicit none
public
integer, protected :: &
geometry_plastic_nonlocal_nIPneighbors
integer, dimension(:,:,:,:), allocatable, protected :: &
geometry_plastic_nonlocal_IPneighborhood !< 6 or less neighboring IPs as [element ID, IP ID, face ID that point to me]
real(pReal), dimension(:,:), allocatable, protected :: &
geometry_plastic_nonlocal_IPvolume0 !< volume associated with IP (initially!)
real(pReal), dimension(:,:,:), allocatable, protected :: &
geometry_plastic_nonlocal_IParea0 !< area of interface to neighboring IP (initially!)
real(pReal), dimension(:,:,:,:), allocatable, protected :: &
geometry_plastic_nonlocal_IPareaNormal0 !< area normal of interface to neighboring IP (initially!)
contains
@ -44,7 +44,7 @@ subroutine geometry_plastic_nonlocal_setIPneighborhood(IPneighborhood)
geometry_plastic_nonlocal_IPneighborhood = IPneighborhood
geometry_plastic_nonlocal_nIPneighbors = size(IPneighborhood,2)
end subroutine geometry_plastic_nonlocal_setIPneighborhood
@ -94,16 +94,16 @@ subroutine geometry_plastic_nonlocal_disable
if(allocated(geometry_plastic_nonlocal_IPneighborhood)) &
deallocate(geometry_plastic_nonlocal_IPneighborhood)
if(allocated(geometry_plastic_nonlocal_IPvolume0)) &
deallocate(geometry_plastic_nonlocal_IPvolume0)
if(allocated(geometry_plastic_nonlocal_IParea0)) &
deallocate(geometry_plastic_nonlocal_IParea0)
if(allocated(geometry_plastic_nonlocal_IPareaNormal0)) &
deallocate(geometry_plastic_nonlocal_IPareaNormal0)
end subroutine geometry_plastic_nonlocal_disable
@ -111,7 +111,7 @@ end subroutine geometry_plastic_nonlocal_disable
!> @brief Write geometry data to results file
!---------------------------------------------------------------------------------------------------
subroutine geometry_plastic_nonlocal_results
integer, dimension(:), allocatable :: shp
call results_openJobFile
@ -120,7 +120,7 @@ subroutine geometry_plastic_nonlocal_results
real(pReal), dimension(:), allocatable :: temp
shp = shape(geometry_plastic_nonlocal_IPvolume0)
temp = reshape(geometry_plastic_nonlocal_IPvolume0,[shp(1)*shp(2)])
call results_writeDataset('geometry',temp,'v_0',&
call results_writeDataset(temp,'geometry','v_0',&
'initial cell volume','m³')
end block writeVolume
@ -128,7 +128,7 @@ subroutine geometry_plastic_nonlocal_results
real(pReal), dimension(:,:), allocatable :: temp
shp = shape(geometry_plastic_nonlocal_IParea0)
temp = reshape(geometry_plastic_nonlocal_IParea0,[shp(1),shp(2)*shp(3)])
call results_writeDataset('geometry',temp,'a_0',&
call results_writeDataset(temp,'geometry','a_0',&
'initial cell face area','m²')
end block writeAreas
@ -136,13 +136,13 @@ subroutine geometry_plastic_nonlocal_results
real(pReal), dimension(:,:,:), allocatable :: temp
shp = shape(geometry_plastic_nonlocal_IPareaNormal0)
temp = reshape(geometry_plastic_nonlocal_IPareaNormal0,[shp(1),shp(2),shp(3)*shp(4)])
call results_writeDataset('geometry',temp,'n_0',&
call results_writeDataset(temp,'geometry','n_0',&
'initial cell face normals','-',transposed=.false.)
end block writeNormals
call results_closeJobFile
end subroutine geometry_plastic_nonlocal_results
end module geometry_plastic_nonlocal

View File

@ -235,22 +235,22 @@ subroutine grid_mechanical_FEM_init
fileHandle = HDF5_openFile(getSolverJobName()//'_restart.hdf5','r')
groupHandle = HDF5_openGroup(fileHandle,'solver')
call HDF5_read(groupHandle,P_aim, 'P_aim',.false.)
call HDF5_read(P_aim,groupHandle,'P_aim',.false.)
call MPI_Bcast(P_aim,9,MPI_DOUBLE,0,PETSC_COMM_WORLD,ierr)
if(ierr /=0) error stop 'MPI error'
call HDF5_read(groupHandle,F_aim, 'F_aim',.false.)
call HDF5_read(F_aim,groupHandle,'F_aim',.false.)
call MPI_Bcast(F_aim,9,MPI_DOUBLE,0,PETSC_COMM_WORLD,ierr)
if(ierr /=0) error stop 'MPI error'
call HDF5_read(groupHandle,F_aim_lastInc,'F_aim_lastInc',.false.)
call HDF5_read(F_aim_lastInc,groupHandle,'F_aim_lastInc',.false.)
call MPI_Bcast(F_aim_lastInc,9,MPI_DOUBLE,0,PETSC_COMM_WORLD,ierr)
if(ierr /=0) error stop 'MPI error'
call HDF5_read(groupHandle,F_aimDot, 'F_aimDot',.false.)
call HDF5_read(F_aimDot,groupHandle,'F_aimDot',.false.)
call MPI_Bcast(F_aimDot,9,MPI_DOUBLE,0,PETSC_COMM_WORLD,ierr)
if(ierr /=0) error stop 'MPI error'
call HDF5_read(groupHandle,F, 'F')
call HDF5_read(groupHandle,F_lastInc, 'F_lastInc')
call HDF5_read(groupHandle,u_current, 'u')
call HDF5_read(groupHandle,u_lastInc, 'u_lastInc')
call HDF5_read(F,groupHandle,'F')
call HDF5_read(F_lastInc,groupHandle,'F_lastInc')
call HDF5_read(u_current,groupHandle,'u')
call HDF5_read(u_lastInc,groupHandle,'u_lastInc')
elseif (interface_restartInc == 0) then restartRead
F_lastInc = spread(spread(spread(math_I3,3,grid(1)),4,grid(2)),5,grid3) ! initialize to identity
@ -269,10 +269,10 @@ subroutine grid_mechanical_FEM_init
restartRead2: if (interface_restartInc > 0) then
print'(a,i0,a)', ' reading more restart data of increment ', interface_restartInc, ' from file'
call HDF5_read(groupHandle,C_volAvg, 'C_volAvg',.false.)
call HDF5_read(C_volAvg,groupHandle,'C_volAvg',.false.)
call MPI_Bcast(C_volAvg,81,MPI_DOUBLE,0,PETSC_COMM_WORLD,ierr)
if(ierr /=0) error stop 'MPI error'
call HDF5_read(groupHandle,C_volAvgLastInc,'C_volAvgLastInc',.false.)
call HDF5_read(C_volAvgLastInc,groupHandle,'C_volAvgLastInc',.false.)
call MPI_Bcast(C_volAvgLastInc,81,MPI_DOUBLE,0,PETSC_COMM_WORLD,ierr)
if(ierr /=0) error stop 'MPI error'
@ -443,17 +443,17 @@ subroutine grid_mechanical_FEM_restartWrite
fileHandle = HDF5_openFile(getSolverJobName()//'_restart.hdf5','w')
groupHandle = HDF5_addGroup(fileHandle,'solver')
call HDF5_write(groupHandle,P_aim, 'P_aim',.false.)
call HDF5_write(groupHandle,F_aim, 'F_aim',.false.)
call HDF5_write(groupHandle,F_aim_lastInc,'F_aim_lastInc',.false.)
call HDF5_write(groupHandle,F_aimDot, 'F_aimDot',.false.)
call HDF5_write(groupHandle,F, 'F')
call HDF5_write(groupHandle,F_lastInc, 'F_lastInc')
call HDF5_write(groupHandle,u_current, 'u')
call HDF5_write(groupHandle,u_lastInc, 'u_lastInc')
call HDF5_write(P_aim,groupHandle,'P_aim',.false.)
call HDF5_write(F_aim,groupHandle,'F_aim',.false.)
call HDF5_write(F_aim_lastInc,groupHandle,'F_aim_lastInc',.false.)
call HDF5_write(F_aimDot,groupHandle,'F_aimDot',.false.)
call HDF5_write(F,groupHandle,'F')
call HDF5_write(F_lastInc,groupHandle,'F_lastInc')
call HDF5_write(u_current,groupHandle,'u')
call HDF5_write(u_lastInc,groupHandle,'u_lastInc')
call HDF5_write(groupHandle,C_volAvg, 'C_volAvg',.false.)
call HDF5_write(groupHandle,C_volAvgLastInc,'C_volAvgLastInc',.false.)
call HDF5_write(C_volAvg,groupHandle,'C_volAvg',.false.)
call HDF5_write(C_volAvgLastInc,groupHandle,'C_volAvgLastInc',.false.)
call HDF5_closeGroup(groupHandle)
call HDF5_closeFile(fileHandle)

View File

@ -183,20 +183,20 @@ subroutine grid_mechanical_spectral_basic_init
fileHandle = HDF5_openFile(getSolverJobName()//'_restart.hdf5','r')
groupHandle = HDF5_openGroup(fileHandle,'solver')
call HDF5_read(groupHandle,P_aim, 'P_aim',.false.)
call HDF5_read(P_aim,groupHandle,'P_aim',.false.)
call MPI_Bcast(P_aim,9,MPI_DOUBLE,0,PETSC_COMM_WORLD,ierr)
if(ierr /=0) error stop 'MPI error'
call HDF5_read(groupHandle,F_aim, 'F_aim',.false.)
call HDF5_read(F_aim,groupHandle,'F_aim',.false.)
call MPI_Bcast(F_aim,9,MPI_DOUBLE,0,PETSC_COMM_WORLD,ierr)
if(ierr /=0) error stop 'MPI error'
call HDF5_read(groupHandle,F_aim_lastInc,'F_aim_lastInc',.false.)
call HDF5_read(F_aim_lastInc,groupHandle,'F_aim_lastInc',.false.)
call MPI_Bcast(F_aim_lastInc,9,MPI_DOUBLE,0,PETSC_COMM_WORLD,ierr)
if(ierr /=0) error stop 'MPI error'
call HDF5_read(groupHandle,F_aimDot, 'F_aimDot',.false.)
call HDF5_read(F_aimDot,groupHandle,'F_aimDot',.false.)
call MPI_Bcast(F_aimDot,9,MPI_DOUBLE,0,PETSC_COMM_WORLD,ierr)
if(ierr /=0) error stop 'MPI error'
call HDF5_read(groupHandle,F, 'F')
call HDF5_read(groupHandle,F_lastInc, 'F_lastInc')
call HDF5_read(F,groupHandle,'F')
call HDF5_read(F_lastInc,groupHandle,'F_lastInc')
elseif (interface_restartInc == 0) then restartRead
F_lastInc = spread(spread(spread(math_I3,3,grid(1)),4,grid(2)),5,grid3) ! initialize to identity
@ -212,10 +212,10 @@ subroutine grid_mechanical_spectral_basic_init
restartRead2: if (interface_restartInc > 0) then
print'(a,i0,a)', ' reading more restart data of increment ', interface_restartInc, ' from file'
call HDF5_read(groupHandle,C_volAvg, 'C_volAvg',.false.)
call HDF5_read(C_volAvg,groupHandle,'C_volAvg',.false.)
call MPI_Bcast(C_volAvg,81,MPI_DOUBLE,0,PETSC_COMM_WORLD,ierr)
if(ierr /=0) error stop 'MPI error'
call HDF5_read(groupHandle,C_volAvgLastInc,'C_volAvgLastInc',.false.)
call HDF5_read(C_volAvgLastInc,groupHandle,'C_volAvgLastInc',.false.)
call MPI_Bcast(C_volAvgLastInc,81,MPI_DOUBLE,0,PETSC_COMM_WORLD,ierr)
if(ierr /=0) error stop 'MPI error'
@ -382,16 +382,16 @@ subroutine grid_mechanical_spectral_basic_restartWrite
fileHandle = HDF5_openFile(getSolverJobName()//'_restart.hdf5','w')
groupHandle = HDF5_addGroup(fileHandle,'solver')
call HDF5_write(groupHandle,P_aim, 'P_aim',.false.)
call HDF5_write(groupHandle,F_aim, 'F_aim',.false.)
call HDF5_write(groupHandle,F_aim_lastInc,'F_aim_lastInc',.false.)
call HDF5_write(groupHandle,F_aimDot, 'F_aimDot',.false.)
call HDF5_write(groupHandle,F, 'F')
call HDF5_write(groupHandle,F_lastInc, 'F_lastInc')
call HDF5_write(P_aim,groupHandle,'P_aim',.false.)
call HDF5_write(F_aim,groupHandle,'F_aim',.false.)
call HDF5_write(F_aim_lastInc,groupHandle,'F_aim_lastInc',.false.)
call HDF5_write(F_aimDot,groupHandle,'F_aimDot',.false.)
call HDF5_write(F,groupHandle,'F')
call HDF5_write(F_lastInc,groupHandle,'F_lastInc')
call HDF5_write(groupHandle,C_volAvg, 'C_volAvg',.false.)
call HDF5_write(groupHandle,C_volAvgLastInc,'C_volAvgLastInc',.false.)
call HDF5_write(groupHandle,C_minMaxAvg, 'C_minMaxAvg',.false.)
call HDF5_write(C_volAvg,groupHandle,'C_volAvg',.false.)
call HDF5_write(C_volAvgLastInc,groupHandle,'C_volAvgLastInc',.false.)
call HDF5_write(C_minMaxAvg,groupHandle,'C_minMaxAvg',.false.)
call HDF5_closeGroup(groupHandle)
call HDF5_closeFile(fileHandle)

View File

@ -205,22 +205,22 @@ subroutine grid_mechanical_spectral_polarisation_init
fileHandle = HDF5_openFile(getSolverJobName()//'_restart.hdf5','r')
groupHandle = HDF5_openGroup(fileHandle,'solver')
call HDF5_read(groupHandle,P_aim, 'P_aim',.false.)
call HDF5_read(P_aim,groupHandle,'P_aim',.false.)
call MPI_Bcast(P_aim,9,MPI_DOUBLE,0,PETSC_COMM_WORLD,ierr)
if(ierr /=0) error stop 'MPI error'
call HDF5_read(groupHandle,F_aim, 'F_aim',.false.)
call HDF5_read(F_aim,groupHandle,'F_aim',.false.)
call MPI_Bcast(F_aim,9,MPI_DOUBLE,0,PETSC_COMM_WORLD,ierr)
if(ierr /=0) error stop 'MPI error'
call HDF5_read(groupHandle,F_aim_lastInc,'F_aim_lastInc',.false.)
call HDF5_read(F_aim_lastInc,groupHandle,'F_aim_lastInc',.false.)
call MPI_Bcast(F_aim_lastInc,9,MPI_DOUBLE,0,PETSC_COMM_WORLD,ierr)
if(ierr /=0) error stop 'MPI error'
call HDF5_read(groupHandle,F_aimDot, 'F_aimDot',.false.)
call HDF5_read(F_aimDot,groupHandle,'F_aimDot',.false.)
call MPI_Bcast(F_aimDot,9,MPI_DOUBLE,0,PETSC_COMM_WORLD,ierr)
if(ierr /=0) error stop 'MPI error'
call HDF5_read(groupHandle,F, 'F')
call HDF5_read(groupHandle,F_lastInc, 'F_lastInc')
call HDF5_read(groupHandle,F_tau, 'F_tau')
call HDF5_read(groupHandle,F_tau_lastInc,'F_tau_lastInc')
call HDF5_read(F,groupHandle,'F')
call HDF5_read(F_lastInc,groupHandle,'F_lastInc')
call HDF5_read(F_tau,groupHandle,'F_tau')
call HDF5_read(F_tau_lastInc,groupHandle,'F_tau_lastInc')
elseif (interface_restartInc == 0) then restartRead
F_lastInc = spread(spread(spread(math_I3,3,grid(1)),4,grid(2)),5,grid3) ! initialize to identity
@ -238,10 +238,10 @@ subroutine grid_mechanical_spectral_polarisation_init
restartRead2: if (interface_restartInc > 0) then
print'(a,i0,a)', ' reading more restart data of increment ', interface_restartInc, ' from file'
call HDF5_read(groupHandle,C_volAvg, 'C_volAvg',.false.)
call HDF5_read(C_volAvg,groupHandle,'C_volAvg',.false.)
call MPI_Bcast(C_volAvg,81,MPI_DOUBLE,0,PETSC_COMM_WORLD,ierr)
if(ierr /=0) error stop 'MPI error'
call HDF5_read(groupHandle,C_volAvgLastInc,'C_volAvgLastInc',.false.)
call HDF5_read(C_volAvgLastInc,groupHandle,'C_volAvgLastInc',.false.)
call MPI_Bcast(C_volAvgLastInc,81,MPI_DOUBLE,0,PETSC_COMM_WORLD,ierr)
if(ierr /=0) error stop 'MPI error'
@ -438,17 +438,17 @@ subroutine grid_mechanical_spectral_polarisation_restartWrite
fileHandle = HDF5_openFile(getSolverJobName()//'_restart.hdf5','w')
groupHandle = HDF5_addGroup(fileHandle,'solver')
call HDF5_write(groupHandle,F_aim, 'P_aim',.false.)
call HDF5_write(groupHandle,F_aim, 'F_aim',.false.)
call HDF5_write(groupHandle,F_aim_lastInc,'F_aim_lastInc',.false.)
call HDF5_write(groupHandle,F_aimDot, 'F_aimDot',.false.)
call HDF5_write(groupHandle,F, 'F')
call HDF5_write(groupHandle,F_lastInc, 'F_lastInc')
call HDF5_write(groupHandle,F_tau, 'F_tau')
call HDF5_write(groupHandle,F_tau_lastInc,'F_tau_lastInc')
call HDF5_write(F_aim,groupHandle,'P_aim',.false.)
call HDF5_write(F_aim,groupHandle,'F_aim',.false.)
call HDF5_write(F_aim_lastInc,groupHandle,'F_aim_lastInc',.false.)
call HDF5_write(F_aimDot,groupHandle,'F_aimDot',.false.)
call HDF5_write(F,groupHandle,'F')
call HDF5_write(F_lastInc,groupHandle,'F_lastInc')
call HDF5_write(F_tau,groupHandle,'F_tau')
call HDF5_write(F_tau_lastInc,groupHandle,'F_tau_lastInc')
call HDF5_write(groupHandle,C_volAvg, 'C_volAvg',.false.)
call HDF5_write(groupHandle,C_volAvgLastInc,'C_volAvgLastInc',.false.)
call HDF5_write(C_volAvg,groupHandle,'C_volAvg',.false.)
call HDF5_write(C_volAvgLastInc,groupHandle,'C_volAvgLastInc',.false.)
call HDF5_closeGroup(groupHandle)
call HDF5_closeFile(fileHandle)

View File

@ -396,7 +396,7 @@ subroutine homogenization_restartWrite(fileHandle)
groupHandle(2) = HDF5_addGroup(groupHandle(1),material_name_homogenization(ho))
call HDF5_write(groupHandle(2),homogState(ho)%state,'omega') ! ToDo: should be done by mech
call HDF5_write(homogState(ho)%state,groupHandle(2),'omega') ! ToDo: should be done by mech
call HDF5_closeGroup(groupHandle(2))
@ -423,7 +423,7 @@ subroutine homogenization_restartRead(fileHandle)
groupHandle(2) = HDF5_openGroup(groupHandle(1),material_name_homogenization(ho))
call HDF5_read(groupHandle(2),homogState(ho)%state0,'omega') ! ToDo: should be done by mech
call HDF5_read(homogState(ho)%state0,groupHandle(2),'omega') ! ToDo: should be done by mech
call HDF5_closeGroup(groupHandle(2))

View File

@ -177,7 +177,7 @@ module subroutine damage_results(ho,group)
outputsLoop: do o = 1,size(prm%output)
select case(prm%output(o))
case ('phi')
call results_writeDataset(group,damagestate_h(ho)%state(1,:),prm%output(o),&
call results_writeDataset(damagestate_h(ho)%state(1,:),group,prm%output(o),&
'damage indicator','-')
end select
enddo outputsLoop

View File

@ -715,16 +715,16 @@ module subroutine RGC_results(ho,group)
outputsLoop: do o = 1,size(prm%output)
select case(trim(prm%output(o)))
case('M')
call results_writeDataset(group,dst%mismatch,trim(prm%output(o)), &
call results_writeDataset(dst%mismatch,group,trim(prm%output(o)), &
'average mismatch tensor','1')
case('Delta_V')
call results_writeDataset(group,dst%volumeDiscrepancy,trim(prm%output(o)), &
call results_writeDataset(dst%volumeDiscrepancy,group,trim(prm%output(o)), &
'volume discrepancy','m³')
case('max_a_dot')
call results_writeDataset(group,dst%relaxationrate_max,trim(prm%output(o)), &
call results_writeDataset(dst%relaxationrate_max,group,trim(prm%output(o)), &
'maximum relaxation rate','m/s')
case('avg_a_dot')
call results_writeDataset(group,dst%relaxationrate_avg,trim(prm%output(o)), &
call results_writeDataset(dst%relaxationrate_avg,group,trim(prm%output(o)), &
'average relaxation rate','m/s')
end select
enddo outputsLoop

View File

@ -187,7 +187,7 @@ module subroutine thermal_results(ho,group)
outputsLoop: do o = 1,size(prm%output)
select case(trim(prm%output(o)))
case('T')
call results_writeDataset(group,current(ho)%T,'T','temperature','K')
call results_writeDataset(current(ho)%T,group,'T','temperature','K')
end select
enddo outputsLoop
end associate

View File

@ -365,25 +365,11 @@ module lattice
1, 1, 1, 1,-2, 1 &
],pReal),shape(BCT_SYSTEMSLIP)) !< bct slip systems for c/a = 0.5456 (Sn), sorted by Bieler 2009 (https://doi.org/10.1007/s11664-009-0909-x)
enum, bind(c); enumerator :: &
lattice_UNDEFINED_ID, &
lattice_FCC_ID, &
lattice_BCC_ID, &
lattice_HEX_ID, &
lattice_BCT_ID
end enum
! SHOULD NOT BE PART OF LATTICE BEGIN
real(pReal), dimension(:), allocatable, public, protected :: &
lattice_mu, lattice_nu, &
lattice_mu_phi, &
lattice_rho, &
lattice_c_p
lattice_mu, lattice_nu
real(pReal), dimension(:,:,:), allocatable, public, protected :: &
lattice_C66
integer(kind(lattice_UNDEFINED_ID)), dimension(:), allocatable, public, protected :: &
lattice_structure
! SHOULD NOT BE PART OF LATTICE END
interface lattice_forestProjection_edge
@ -396,10 +382,6 @@ module lattice
public :: &
lattice_init, &
lattice_FCC_ID, &
lattice_BCC_ID, &
lattice_HEX_ID, &
lattice_BCT_ID, &
lattice_equivalent_nu, &
lattice_equivalent_mu, &
lattice_applyLatticeSymmetry33, &
@ -446,11 +428,9 @@ subroutine lattice_init
phases => config_material%get('phase')
Nphases = phases%length
allocate(lattice_structure(Nphases),source = lattice_UNDEFINED_ID)
allocate(lattice_C66(6,6,Nphases), source=0.0_pReal)
allocate(lattice_C66(6,6,Nphases), source=0.0_pReal)
allocate(lattice_rho, &
lattice_mu, lattice_nu,&
allocate(lattice_mu, lattice_nu,&
source=[(0.0_pReal,i=1,Nphases)])
do ph = 1, phases%length
@ -466,19 +446,6 @@ subroutine lattice_init
lattice_C66(3,3,ph) = elasticity%get_asFloat('C_33',defaultVal=0.0_pReal)
lattice_C66(6,6,ph) = elasticity%get_asFloat('C_66',defaultVal=0.0_pReal)
select case(phase%get_asString('lattice'))
case('cF')
lattice_structure(ph) = lattice_FCC_ID
case('cI')
lattice_structure(ph) = lattice_BCC_ID
case('hP')
lattice_structure(ph) = lattice_HEX_ID
case('tI')
lattice_structure(ph) = lattice_BCT_ID
case default
call IO_error(130,ext_msg='lattice_init: '//phase%get_asString('lattice'))
end select
lattice_C66(1:6,1:6,ph) = applyLatticeSymmetryC66(lattice_C66(1:6,1:6,ph),phase%get_asString('lattice'))
lattice_nu(ph) = lattice_equivalent_nu(lattice_C66(1:6,1:6,ph),'voigt')
@ -489,8 +456,6 @@ subroutine lattice_init
if (abs(lattice_C66(i,i,ph))<tol_math_check) &
call IO_error(135,el=i,ip=ph,ext_msg='matrix diagonal "el"ement of phase "ip"')
enddo
lattice_rho(ph) = phase%get_asFloat('rho', defaultVal=0.0_pReal)
! SHOULD NOT BE PART OF LATTICE END
call selfTest
@ -794,7 +759,7 @@ function lattice_interaction_SlipBySlip(Nslip,interactionValues,structure) resul
9,12,15,16,16,15,12, 9,10, 8,19,19, 21,23,22, 2, 2,23,22,21,24, 1,20,24, 28,26,28,28,26,28,28,28,28,26,28,28,26,28,28,28,28,28,28,26,28,28,28,26, &
16,15,12, 9, 9,12,15,16, 8,10,19,19, 2,22,23,21,21,22,23, 2,24,20, 1,24, 28,28,26,28,28,28,28,26,28,28,26,28,28,28,28,26,26,28,28,28,26,28,28,28, &
15,16, 9,12,15,16, 9,12,19,19, 8,10, 22, 2,21,23,22,21, 2,23,20,24,24, 1, 28,28,28,26,28,28,26,28,28,28,28,26,28,28,26,28,28,26,28,28,28,26,28,28, &
28,25,28,28,28,25,28,28,28,28,28,25, 28,28,26,28,28,26,28,28,26,28,28,28, 1,28,28,28,28,27,28,28,27,28,28,28,28,27,28,28,28,28,27,28,28,28,27,28, &
25,28,28,28,28,28,28,25,28,25,28,28, 28,28,28,26,26,28,28,28,28,26,28,28, 28, 1,28,28,27,28,28,28,28,27,28,28,27,28,28,28,28,28,28,27,28,28,28,27, &
28,28,28,25,25,28,28,28,25,28,28,28, 26,28,28,28,28,28,28,26,28,28,26,28, 28,28, 1,28,28,28,28,27,28,28,27,28,28,28,28,27,27,28,28,28,27,28,28,28, &

View File

@ -19,6 +19,11 @@ module phase
implicit none
private
character(len=2), allocatable, dimension(:) :: phase_lattice
real(pReal), allocatable, dimension(:) :: phase_cOverA
real(pReal), allocatable, dimension(:) :: phase_rho
type(tRotationContainer), dimension(:), allocatable :: &
phase_orientation0, &
phase_orientation
@ -348,7 +353,8 @@ subroutine phase_init
class (tNode), pointer :: &
debug_constitutive, &
materials, &
phases
phases, &
phase
print'(/,a)', ' <<<+- phase init -+>>>'; flush(IO_STDOUT)
@ -365,9 +371,19 @@ subroutine phase_init
materials => config_material%get('material')
phases => config_material%get('phase')
allocate(phase_lattice(phases%length))
allocate(phase_cOverA(phases%length),source=-1.0_pReal)
allocate(phase_rho(phases%length))
allocate(phase_orientation0(phases%length))
do ph = 1,phases%length
phase => phases%get(ph)
phase_lattice(ph) = phase%get_asString('lattice')
if (all(phase_lattice(ph) /= ['cF','cI','hP','tI'])) &
call IO_error(130,ext_msg='phase_init: '//phase%get_asString('lattice'))
if (any(phase_lattice(ph) == ['hP','tI'])) &
phase_cOverA(ph) = phase%get_asFloat('c/a')
phase_rho(ph) = phase%get_asFloat('rho',defaultVal=0.0_pReal)
allocate(phase_orientation0(ph)%data(count(material_phaseID==ph)))
enddo

View File

@ -160,7 +160,7 @@ module subroutine anisobrittle_results(phase,group)
outputsLoop: do o = 1,size(prm%output)
select case(trim(prm%output(o)))
case ('f_phi')
call results_writeDataset(group,stt,trim(prm%output(o)),'driving force','J/m³')
call results_writeDataset(stt,group,trim(prm%output(o)),'driving force','J/m³')
end select
enddo outputsLoop
end associate

View File

@ -129,7 +129,7 @@ module subroutine isobrittle_results(phase,group)
outputsLoop: do o = 1,size(prm%output)
select case(trim(prm%output(o)))
case ('f_phi')
call results_writeDataset(group,stt,trim(prm%output(o)),'driving force','J/m³')
call results_writeDataset(stt,group,trim(prm%output(o)),'driving force','J/m³')
end select
enddo outputsLoop
end associate

View File

@ -117,7 +117,7 @@ module subroutine isoductile_results(phase,group)
outputsLoop: do o = 1,size(prm%output)
select case(trim(prm%output(o)))
case ('f_phi')
call results_writeDataset(group,stt,trim(prm%output(o)),'driving force','J/m³')
call results_writeDataset(stt,group,trim(prm%output(o)),'driving force','J/m³')
end select
enddo outputsLoop
end associate

View File

@ -896,55 +896,46 @@ subroutine crystallite_results(group,ph)
integer :: ou
real(pReal), allocatable, dimension(:,:) :: selected_rotations
character(len=:), allocatable :: structureLabel
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_constituent(ph)%label)
select case (output_constituent(ph)%label(ou))
case('F')
call results_writeDataset(group//'/mechanical/',phase_mechanical_F(ph)%data,'F',&
'deformation gradient','1')
case('F_e')
call results_writeDataset(group//'/mechanical/',phase_mechanical_Fe(ph)%data,'F_e',&
'elastic deformation gradient','1')
case('F_p')
call results_writeDataset(group//'/mechanical/',phase_mechanical_Fp(ph)%data,'F_p', &
'plastic deformation gradient','1')
case('F_i')
call results_writeDataset(group//'/mechanical/',phase_mechanical_Fi(ph)%data,'F_i', &
'inelastic deformation gradient','1')
case('L_p')
call results_writeDataset(group//'/mechanical/',phase_mechanical_Lp(ph)%data,'L_p', &
'plastic velocity gradient','1/s')
case('L_i')
call results_writeDataset(group//'/mechanical/',phase_mechanical_Li(ph)%data,'L_i', &
'inelastic velocity gradient','1/s')
case('P')
call results_writeDataset(group//'/mechanical/',phase_mechanical_P(ph)%data,'P', &
'first Piola-Kirchhoff stress','Pa')
case('S')
call results_writeDataset(group//'/mechanical/',phase_mechanical_S(ph)%data,'S', &
'second Piola-Kirchhoff stress','Pa')
case('O')
select case(lattice_structure(ph))
case(lattice_FCC_ID)
structureLabel = 'cF'
case(lattice_BCC_ID)
structureLabel = 'cI'
case(lattice_HEX_ID)
structureLabel = 'hP'
case(lattice_BCT_ID)
structureLabel = 'tI'
end select
selected_rotations = select_rotations(phase_orientation(ph)%data)
call results_writeDataset(group//'/mechanical',selected_rotations,output_constituent(ph)%label(ou),&
'crystal orientation as quaternion','q_0 (q_1 q_2 q_3)')
call results_addAttribute('lattice',structureLabel,group//'/mechanical/'//output_constituent(ph)%label(ou))
end select
enddo
select case (output_constituent(ph)%label(ou))
case('F')
call results_writeDataset(phase_mechanical_F(ph)%data,group//'/mechanical/','F',&
'deformation gradient','1')
case('F_e')
call results_writeDataset(phase_mechanical_Fe(ph)%data,group//'/mechanical/','F_e',&
'elastic deformation gradient','1')
case('F_p')
call results_writeDataset(phase_mechanical_Fp(ph)%data,group//'/mechanical/','F_p', &
'plastic deformation gradient','1')
case('F_i')
call results_writeDataset(phase_mechanical_Fi(ph)%data,group//'/mechanical/','F_i', &
'inelastic deformation gradient','1')
case('L_p')
call results_writeDataset(phase_mechanical_Lp(ph)%data,group//'/mechanical/','L_p', &
'plastic velocity gradient','1/s')
case('L_i')
call results_writeDataset(phase_mechanical_Li(ph)%data,group//'/mechanical/','L_i', &
'inelastic velocity gradient','1/s')
case('P')
call results_writeDataset(phase_mechanical_P(ph)%data,group//'/mechanical/','P', &
'first Piola-Kirchhoff stress','Pa')
case('S')
call results_writeDataset(phase_mechanical_S(ph)%data,group//'/mechanical/','S', &
'second Piola-Kirchhoff stress','Pa')
case('O')
selected_rotations = select_rotations(phase_orientation(ph)%data)
call results_writeDataset(selected_rotations,group//'/mechanical',output_constituent(ph)%label(ou),&
'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))
if (any(phase_lattice(ph) == ['hP', 'tI'])) &
call results_addAttribute('c/a',phase_cOverA(ph),group//'/mechanical/'//output_constituent(ph)%label(ou))
end select
enddo
contains
@ -1252,13 +1243,13 @@ module subroutine mechanical_restartWrite(groupHandle,ph)
integer, intent(in) :: ph
call HDF5_write(groupHandle,plasticState(ph)%state,'omega')
call HDF5_write(groupHandle,phase_mechanical_Fi(ph)%data,'F_i')
call HDF5_write(groupHandle,phase_mechanical_Li(ph)%data,'L_i')
call HDF5_write(groupHandle,phase_mechanical_Lp(ph)%data,'L_p')
call HDF5_write(groupHandle,phase_mechanical_Fp(ph)%data,'F_p')
call HDF5_write(groupHandle,phase_mechanical_S(ph)%data,'S')
call HDF5_write(groupHandle,phase_mechanical_F(ph)%data,'F')
call HDF5_write(plasticState(ph)%state,groupHandle,'omega')
call HDF5_write(phase_mechanical_Fi(ph)%data,groupHandle,'F_i')
call HDF5_write(phase_mechanical_Li(ph)%data,groupHandle,'L_i')
call HDF5_write(phase_mechanical_Lp(ph)%data,groupHandle,'L_p')
call HDF5_write(phase_mechanical_Fp(ph)%data,groupHandle,'F_p')
call HDF5_write(phase_mechanical_S(ph)%data,groupHandle,'S')
call HDF5_write(phase_mechanical_F(ph)%data,groupHandle,'F')
end subroutine mechanical_restartWrite
@ -1269,13 +1260,13 @@ module subroutine mechanical_restartRead(groupHandle,ph)
integer, intent(in) :: ph
call HDF5_read(groupHandle,plasticState(ph)%state0,'omega')
call HDF5_read(groupHandle,phase_mechanical_Fi0(ph)%data,'F_i')
call HDF5_read(groupHandle,phase_mechanical_Li0(ph)%data,'L_i')
call HDF5_read(groupHandle,phase_mechanical_Lp0(ph)%data,'L_p')
call HDF5_read(groupHandle,phase_mechanical_Fp0(ph)%data,'F_p')
call HDF5_read(groupHandle,phase_mechanical_S0(ph)%data,'S')
call HDF5_read(groupHandle,phase_mechanical_F0(ph)%data,'F')
call HDF5_read(plasticState(ph)%state0,groupHandle,'omega')
call HDF5_read(phase_mechanical_Fi0(ph)%data,groupHandle,'F_i')
call HDF5_read(phase_mechanical_Li0(ph)%data,groupHandle,'L_i')
call HDF5_read(phase_mechanical_Lp0(ph)%data,groupHandle,'L_p')
call HDF5_read(phase_mechanical_Fp0(ph)%data,groupHandle,'F_p')
call HDF5_read(phase_mechanical_S0(ph)%data,groupHandle,'S')
call HDF5_read(phase_mechanical_F0(ph)%data,groupHandle,'F')
end subroutine mechanical_restartRead

View File

@ -4,7 +4,7 @@ submodule(phase:mechanical) elastic
real(pReal), dimension(6,6) :: &
C66 !< Elastic constants in Voig notation
end type tParameters
type(tParameters), allocatable, dimension(:) :: param
contains
@ -21,7 +21,6 @@ module subroutine elastic_init(phases)
phase, &
mech, &
elastic
character(len=:), allocatable :: struct
print'(/,a)', ' <<<+- phase:mechanical:elastic init -+>>>'
@ -30,27 +29,23 @@ module subroutine elastic_init(phases)
print'(a,i0)', ' # phases: ',phases%length; flush(IO_STDOUT)
allocate(param(phases%length))
do ph = 1, phases%length
phase => phases%get(ph)
mech => phase%get('mechanical')
elastic => mech%get('elastic')
if (elastic%get_asString('type') /= 'Hooke') call IO_error(200,ext_msg=elastic%get_asString('type'))
associate(prm => param(ph))
struct = phase%get_asString('lattice')
if (struct /= 'cI' .and. struct /= 'cF' .and. struct /= 'hP' .and. struct /= 'tI') &
call IO_error(137,ext_msg=trim(struct))
associate(prm => param(ph))
prm%C66(1,1) = elastic%get_asFloat('C_11')
prm%C66(1,2) = elastic%get_asFloat('C_12')
prm%C66(4,4) = elastic%get_asFloat('C_44')
if (struct == 'hP' .or. struct == 'tI') then
if (any(phase_lattice(ph) == ['hP','tI'])) then
prm%C66(1,3) = elastic%get_asFloat('C_13')
prm%C66(3,3) = elastic%get_asFloat('C_33')
endif
if (struct == 'tI') prm%C66(6,6) = elastic%get_asFloat('C_66')
if (phase_lattice(ph) == 'tI') prm%C66(6,6) = elastic%get_asFloat('C_66')
end associate
enddo

View File

@ -408,19 +408,19 @@ module subroutine plastic_dislotungsten_results(ph,group)
outputsLoop: do o = 1,size(prm%output)
select case(trim(prm%output(o)))
case('rho_mob')
if(prm%sum_N_sl>0) call results_writeDataset(group,stt%rho_mob,trim(prm%output(o)), &
if(prm%sum_N_sl>0) call results_writeDataset(stt%rho_mob,group,trim(prm%output(o)), &
'mobile dislocation density','1/m²')
case('rho_dip')
if(prm%sum_N_sl>0) call results_writeDataset(group,stt%rho_dip,trim(prm%output(o)), &
if(prm%sum_N_sl>0) call results_writeDataset(stt%rho_dip,group,trim(prm%output(o)), &
'dislocation dipole density','1/m²')
case('gamma_sl')
if(prm%sum_N_sl>0) call results_writeDataset(group,stt%gamma_sl,trim(prm%output(o)), &
if(prm%sum_N_sl>0) call results_writeDataset(stt%gamma_sl,group,trim(prm%output(o)), &
'plastic shear','1')
case('Lambda_sl')
if(prm%sum_N_sl>0) call results_writeDataset(group,dst%Lambda_sl,trim(prm%output(o)), &
if(prm%sum_N_sl>0) call results_writeDataset(dst%Lambda_sl,group,trim(prm%output(o)), &
'mean free path for slip','m')
case('tau_pass')
if(prm%sum_N_sl>0) call results_writeDataset(group,dst%threshold_stress,trim(prm%output(o)), &
if(prm%sum_N_sl>0) call results_writeDataset(dst%threshold_stress,group,trim(prm%output(o)), &
'threshold stress for slip','Pa')
end select
enddo outputsLoop

View File

@ -202,7 +202,7 @@ module function plastic_dislotwin_init() result(myPlasticity)
prm%n0_sl = lattice_slip_normal(N_sl,phase%get_asString('lattice'),&
phase%get_asFloat('c/a',defaultVal=0.0_pReal))
prm%fccTwinTransNucleation = lattice_structure(ph) == lattice_FCC_ID .and. (N_sl(1) == 12)
prm%fccTwinTransNucleation = phase_lattice(ph) == 'cF' .and. (N_sl(1) == 12)
if(prm%fccTwinTransNucleation) prm%fcc_twinNucleationSlipPair = lattice_FCC_TWINNUCLEATIONSLIPPAIR
rho_mob_0 = pl%get_as1dFloat('rho_mob_0', requiredSize=size(N_sl))
@ -231,7 +231,7 @@ module function plastic_dislotwin_init() result(myPlasticity)
! multiplication factor according to crystal structure (nearest neighbors bcc vs fcc/hex)
! details: Argon & Moffat, Acta Metallurgica, Vol. 29, pg 293 to 299, 1981
prm%omega = pl%get_asFloat('omega', defaultVal = 1000.0_pReal) &
* merge(12.0_pReal,8.0_pReal,any(lattice_structure(ph) == [lattice_FCC_ID,lattice_HEX_ID]))
* merge(12.0_pReal,8.0_pReal,any(phase_lattice(ph) == ['cF','hP']))
! expand: family => system
rho_mob_0 = math_expand(rho_mob_0, N_sl)
@ -340,7 +340,7 @@ module function plastic_dislotwin_init() result(myPlasticity)
pl%get_asFloat('a_cI', defaultVal=0.0_pReal), &
pl%get_asFloat('a_cF', defaultVal=0.0_pReal))
if (lattice_structure(ph) /= lattice_FCC_ID) then
if (phase_lattice(ph) /= 'cF') then
prm%dot_N_0_tr = pl%get_as1dFloat('dot_N_0_tr')
prm%dot_N_0_tr = math_expand(prm%dot_N_0_tr,N_tr)
endif
@ -355,7 +355,7 @@ module function plastic_dislotwin_init() result(myPlasticity)
if ( prm%i_tr < 0.0_pReal) extmsg = trim(extmsg)//' i_tr'
if (any(prm%t_tr < 0.0_pReal)) extmsg = trim(extmsg)//' t_tr'
if (any(prm%s < 0.0_pReal)) extmsg = trim(extmsg)//' p_tr'
if (lattice_structure(ph) /= lattice_FCC_ID) then
if (phase_lattice(ph) /= 'cF') then
if (any(prm%dot_N_0_tr < 0.0_pReal)) extmsg = trim(extmsg)//' dot_N_0_tr'
endif
else transActive
@ -815,33 +815,33 @@ module subroutine plastic_dislotwin_results(ph,group)
select case(trim(prm%output(o)))
case('rho_mob')
if(prm%sum_N_sl>0) call results_writeDataset(group,stt%rho_mob,trim(prm%output(o)), &
if(prm%sum_N_sl>0) call results_writeDataset(stt%rho_mob,group,trim(prm%output(o)), &
'mobile dislocation density','1/m²')
case('rho_dip')
if(prm%sum_N_sl>0) call results_writeDataset(group,stt%rho_dip,trim(prm%output(o)), &
if(prm%sum_N_sl>0) call results_writeDataset(stt%rho_dip,group,trim(prm%output(o)), &
'dislocation dipole density','1/m²')
case('gamma_sl')
if(prm%sum_N_sl>0) call results_writeDataset(group,stt%gamma_sl,trim(prm%output(o)), &
if(prm%sum_N_sl>0) call results_writeDataset(stt%gamma_sl,group,trim(prm%output(o)), &
'plastic shear','1')
case('Lambda_sl')
if(prm%sum_N_sl>0) call results_writeDataset(group,dst%Lambda_sl,trim(prm%output(o)), &
if(prm%sum_N_sl>0) call results_writeDataset(dst%Lambda_sl,group,trim(prm%output(o)), &
'mean free path for slip','m')
case('tau_pass')
if(prm%sum_N_sl>0) call results_writeDataset(group,dst%tau_pass,trim(prm%output(o)), &
if(prm%sum_N_sl>0) call results_writeDataset(dst%tau_pass,group,trim(prm%output(o)), &
'passing stress for slip','Pa')
case('f_tw')
if(prm%sum_N_tw>0) call results_writeDataset(group,stt%f_tw,trim(prm%output(o)), &
if(prm%sum_N_tw>0) call results_writeDataset(stt%f_tw,group,trim(prm%output(o)), &
'twinned volume fraction','m³/m³')
case('Lambda_tw')
if(prm%sum_N_tw>0) call results_writeDataset(group,dst%Lambda_tw,trim(prm%output(o)), &
if(prm%sum_N_tw>0) call results_writeDataset(dst%Lambda_tw,group,trim(prm%output(o)), &
'mean free path for twinning','m')
case('tau_hat_tw')
if(prm%sum_N_tw>0) call results_writeDataset(group,dst%tau_hat_tw,trim(prm%output(o)), &
if(prm%sum_N_tw>0) call results_writeDataset(dst%tau_hat_tw,group,trim(prm%output(o)), &
'threshold stress for twinning','Pa')
case('f_tr')
if(prm%sum_N_tr>0) call results_writeDataset(group,stt%f_tr,trim(prm%output(o)), &
if(prm%sum_N_tr>0) call results_writeDataset(stt%f_tr,group,trim(prm%output(o)), &
'martensite volume fraction','m³/m³')
end select

View File

@ -307,7 +307,7 @@ module subroutine plastic_isotropic_results(ph,group)
outputsLoop: do o = 1,size(prm%output)
select case(trim(prm%output(o)))
case ('xi')
call results_writeDataset(group,stt%xi,trim(prm%output(o)), &
call results_writeDataset(stt%xi,group,trim(prm%output(o)), &
'resistance against plastic flow','Pa')
end select
enddo outputsLoop

View File

@ -363,23 +363,23 @@ module subroutine plastic_kinehardening_results(ph,group)
associate(prm => param(ph), stt => state(ph))
outputsLoop: do o = 1,size(prm%output)
select case(trim(prm%output(o)))
case('xi')
if(prm%sum_N_sl>0) call results_writeDataset(group,stt%crss,trim(prm%output(o)), &
case ('xi')
if(prm%sum_N_sl>0) call results_writeDataset(stt%crss,group,trim(prm%output(o)), &
'resistance against plastic slip','Pa')
case('tau_b')
if(prm%sum_N_sl>0) call results_writeDataset(group,stt%crss_back,trim(prm%output(o)), &
case ('tau_b')
if(prm%sum_N_sl>0) call results_writeDataset(stt%crss_back,group,trim(prm%output(o)), &
'back stress against plastic slip','Pa')
case ('sgn(gamma)')
if(prm%sum_N_sl>0) call results_writeDataset(group,stt%sense,trim(prm%output(o)), & ! ToDo: could be int
'tbd','1')
if(prm%sum_N_sl>0) call results_writeDataset(stt%sense,group,trim(prm%output(o)), & ! ToDo: could be int
'sense of shear','1')
case ('chi_0')
if(prm%sum_N_sl>0) call results_writeDataset(group,stt%chi0,trim(prm%output(o)), &
if(prm%sum_N_sl>0) call results_writeDataset(stt%chi0,group,trim(prm%output(o)), &
'tbd','Pa')
case ('gamma_0')
if(prm%sum_N_sl>0) call results_writeDataset(group,stt%gamma0,trim(prm%output(o)), &
if(prm%sum_N_sl>0) call results_writeDataset(stt%gamma0,group,trim(prm%output(o)), &
'tbd','1')
case ('gamma')
if(prm%sum_N_sl>0) call results_writeDataset(group,stt%accshear,trim(prm%output(o)), &
if(prm%sum_N_sl>0) call results_writeDataset(stt%accshear,group,trim(prm%output(o)), &
'plastic shear','1')
end select
enddo outputsLoop

View File

@ -622,7 +622,7 @@ module subroutine nonlocal_dependentState(ph, en, ip, el)
! coefficients are corrected for the line tension effect
! (see Kubin,Devincre,Hoc; 2008; Modeling dislocation storage rates and mean free paths in face-centered cubic crystals)
if (any(lattice_structure(ph) == [LATTICE_bcc_ID,LATTICE_fcc_ID])) then
if (any(phase_lattice(ph) == ['cI','cF'])) then
myInteractionMatrix = prm%h_sl_sl &
* spread(( 1.0_pReal - prm%f_F &
+ prm%f_F &
@ -1055,7 +1055,7 @@ module subroutine nonlocal_dotState(Mp, Temperature,timestep, &
!****************************************************************************
!*** dislocation multiplication
rhoDotMultiplication = 0.0_pReal
isBCC: if (lattice_structure(ph) == LATTICE_bcc_ID) then
isBCC: if (phase_lattice(ph) == 'cI') then
forall (s = 1:ns, sum(abs(v(s,1:4))) > 0.0_pReal)
rhoDotMultiplication(s,1:2) = sum(abs(gdot(s,3:4))) / prm%b_sl(s) & ! assuming double-cross-slip of screws to be decisive for multiplication
* sqrt(stt%rho_forest(s,en)) / prm%i_sl(s) ! & ! mean free path
@ -1111,7 +1111,7 @@ module subroutine nonlocal_dotState(Mp, Temperature,timestep, &
+ rhoDip(:,c) * (abs(gdot(:,2*c-1)) + abs(gdot(:,2*c)))) ! single knocks dipole constituent
! annihilated screw dipoles leave edge jogs behind on the colinear system
if (lattice_structure(ph) == LATTICE_fcc_ID) &
if (phase_lattice(ph) == 'cF') &
forall (s = 1:ns, prm%colinearSystem(s) > 0) &
rhoDotAthermalAnnihilation(prm%colinearSystem(s),1:2) = - rhoDotAthermalAnnihilation(s,10) &
* 0.25_pReal * sqrt(stt%rho_forest(s,en)) * (dUpper(s,2) + dLower(s,2)) * prm%f_ed
@ -1518,55 +1518,55 @@ module subroutine plastic_nonlocal_results(ph,group)
outputsLoop: do o = 1,size(prm%output)
select case(trim(prm%output(o)))
case('rho_u_ed_pos')
if(prm%sum_N_sl>0) call results_writeDataset(group,stt%rho_sgl_mob_edg_pos, trim(prm%output(o)), &
if(prm%sum_N_sl>0) call results_writeDataset(stt%rho_sgl_mob_edg_pos,group,trim(prm%output(o)), &
'positive mobile edge density','1/m²')
case('rho_b_ed_pos')
if(prm%sum_N_sl>0) call results_writeDataset(group,stt%rho_sgl_imm_edg_pos, trim(prm%output(o)), &
if(prm%sum_N_sl>0) call results_writeDataset(stt%rho_sgl_imm_edg_pos,group,trim(prm%output(o)), &
'positive immobile edge density','1/m²')
case('rho_u_ed_neg')
if(prm%sum_N_sl>0) call results_writeDataset(group,stt%rho_sgl_mob_edg_neg, trim(prm%output(o)), &
if(prm%sum_N_sl>0) call results_writeDataset(stt%rho_sgl_mob_edg_neg,group,trim(prm%output(o)), &
'negative mobile edge density','1/m²')
case('rho_b_ed_neg')
if(prm%sum_N_sl>0) call results_writeDataset(group,stt%rho_sgl_imm_edg_neg, trim(prm%output(o)), &
if(prm%sum_N_sl>0) call results_writeDataset(stt%rho_sgl_imm_edg_neg,group,trim(prm%output(o)), &
'negative immobile edge density','1/m²')
case('rho_d_ed')
if(prm%sum_N_sl>0) call results_writeDataset(group,stt%rho_dip_edg, trim(prm%output(o)), &
if(prm%sum_N_sl>0) call results_writeDataset(stt%rho_dip_edg,group,trim(prm%output(o)), &
'edge dipole density','1/m²')
case('rho_u_sc_pos')
if(prm%sum_N_sl>0) call results_writeDataset(group,stt%rho_sgl_mob_scr_pos, trim(prm%output(o)), &
if(prm%sum_N_sl>0) call results_writeDataset(stt%rho_sgl_mob_scr_pos,group,trim(prm%output(o)), &
'positive mobile screw density','1/m²')
case('rho_b_sc_pos')
if(prm%sum_N_sl>0) call results_writeDataset(group,stt%rho_sgl_imm_scr_pos, trim(prm%output(o)), &
if(prm%sum_N_sl>0) call results_writeDataset(stt%rho_sgl_imm_scr_pos,group,trim(prm%output(o)), &
'positive immobile screw density','1/m²')
case('rho_u_sc_neg')
if(prm%sum_N_sl>0) call results_writeDataset(group,stt%rho_sgl_mob_scr_neg, trim(prm%output(o)), &
if(prm%sum_N_sl>0) call results_writeDataset(stt%rho_sgl_mob_scr_neg,group,trim(prm%output(o)), &
'negative mobile screw density','1/m²')
case('rho_b_sc_neg')
if(prm%sum_N_sl>0) call results_writeDataset(group,stt%rho_sgl_imm_scr_neg, trim(prm%output(o)), &
if(prm%sum_N_sl>0) call results_writeDataset(stt%rho_sgl_imm_scr_neg,group,trim(prm%output(o)), &
'negative immobile screw density','1/m²')
case('rho_d_sc')
if(prm%sum_N_sl>0) call results_writeDataset(group,stt%rho_dip_scr, trim(prm%output(o)), &
if(prm%sum_N_sl>0) call results_writeDataset(stt%rho_dip_scr,group,trim(prm%output(o)), &
'screw dipole density','1/m²')
case('rho_f')
if(prm%sum_N_sl>0) call results_writeDataset(group,stt%rho_forest, trim(prm%output(o)), &
if(prm%sum_N_sl>0) call results_writeDataset(stt%rho_forest,group,trim(prm%output(o)), &
'forest density','1/m²')
case('v_ed_pos')
if(prm%sum_N_sl>0) call results_writeDataset(group,stt%v_edg_pos, trim(prm%output(o)), &
if(prm%sum_N_sl>0) call results_writeDataset(stt%v_edg_pos,group,trim(prm%output(o)), &
'positive edge velocity','m/s')
case('v_ed_neg')
if(prm%sum_N_sl>0) call results_writeDataset(group,stt%v_edg_neg, trim(prm%output(o)), &
if(prm%sum_N_sl>0) call results_writeDataset(stt%v_edg_neg,group,trim(prm%output(o)), &
'negative edge velocity','m/s')
case('v_sc_pos')
if(prm%sum_N_sl>0) call results_writeDataset(group,stt%v_scr_pos, trim(prm%output(o)), &
if(prm%sum_N_sl>0) call results_writeDataset(stt%v_scr_pos,group,trim(prm%output(o)), &
'positive srew velocity','m/s')
case('v_sc_neg')
if(prm%sum_N_sl>0) call results_writeDataset(group,stt%v_scr_neg, trim(prm%output(o)), &
if(prm%sum_N_sl>0) call results_writeDataset(stt%v_scr_neg,group,trim(prm%output(o)), &
'negative screw velocity','m/s')
case('gamma')
if(prm%sum_N_sl>0) call results_writeDataset(group,stt%gamma, trim(prm%output(o)), &
if(prm%sum_N_sl>0) call results_writeDataset(stt%gamma,group,trim(prm%output(o)), &
'plastic shear','1')
case('tau_pass')
if(prm%sum_N_sl>0) call results_writeDataset(group,dst%tau_pass, trim(prm%output(o)), &
if(prm%sum_N_sl>0) call results_writeDataset(dst%tau_pass,group,trim(prm%output(o)), &
'passing stress for slip','Pa')
end select
enddo outputsLoop

View File

@ -401,17 +401,17 @@ module subroutine plastic_phenopowerlaw_results(ph,group)
select case(trim(prm%output(o)))
case('xi_sl')
if(prm%sum_N_sl>0) call results_writeDataset(group,stt%xi_slip, trim(prm%output(o)), &
if(prm%sum_N_sl>0) call results_writeDataset(stt%xi_slip,group,trim(prm%output(o)), &
'resistance against plastic slip','Pa')
case('gamma_sl')
if(prm%sum_N_sl>0) call results_writeDataset(group,stt%gamma_slip,trim(prm%output(o)), &
if(prm%sum_N_sl>0) call results_writeDataset(stt%gamma_slip,group,trim(prm%output(o)), &
'plastic shear','1')
case('xi_tw')
if(prm%sum_N_tw>0) call results_writeDataset(group,stt%xi_twin, trim(prm%output(o)), &
if(prm%sum_N_tw>0) call results_writeDataset(stt%xi_twin,group,trim(prm%output(o)), &
'resistance against twinning','Pa')
case('gamma_tw')
if(prm%sum_N_tw>0) call results_writeDataset(group,stt%gamma_twin,trim(prm%output(o)), &
if(prm%sum_N_tw>0) call results_writeDataset(stt%gamma_twin,group,trim(prm%output(o)), &
'twinning shear','1')
end select

View File

@ -196,8 +196,8 @@ module function phase_mu_T(co,ce) result(mu)
real(pReal) :: mu
mu = lattice_rho(material_phaseID(co,ce)) &
* param(material_phaseID(co,ce))%C_p
mu = phase_rho(material_phaseID(co,ce)) &
* param(material_phaseID(co,ce))%C_p
end function phase_mu_T

View File

@ -294,7 +294,7 @@ end subroutine results_removeLink
!--------------------------------------------------------------------------------------------------
!> @brief Store real scalar dataset with associated metadata.
!--------------------------------------------------------------------------------------------------
subroutine results_writeScalarDataset_real(group,dataset,label,description,SIunit)
subroutine results_writeScalarDataset_real(dataset,group,label,description,SIunit)
character(len=*), intent(in) :: label,group,description
character(len=*), intent(in), optional :: SIunit
@ -304,7 +304,7 @@ subroutine results_writeScalarDataset_real(group,dataset,label,description,SIuni
groupHandle = results_openGroup(group)
call HDF5_write(groupHandle,dataset,label)
call HDF5_write(dataset,groupHandle,label)
call executionStamp(group//'/'//label,description,SIunit)
call HDF5_closeGroup(groupHandle)
@ -314,7 +314,7 @@ end subroutine results_writeScalarDataset_real
!--------------------------------------------------------------------------------------------------
!> @brief Store real vector dataset with associated metadata.
!--------------------------------------------------------------------------------------------------
subroutine results_writeVectorDataset_real(group,dataset,label,description,SIunit)
subroutine results_writeVectorDataset_real(dataset,group,label,description,SIunit)
character(len=*), intent(in) :: label,group,description
character(len=*), intent(in), optional :: SIunit
@ -324,7 +324,7 @@ subroutine results_writeVectorDataset_real(group,dataset,label,description,SIuni
groupHandle = results_openGroup(group)
call HDF5_write(groupHandle,dataset,label)
call HDF5_write(dataset,groupHandle,label)
call executionStamp(group//'/'//label,description,SIunit)
call HDF5_closeGroup(groupHandle)
@ -335,7 +335,7 @@ end subroutine results_writeVectorDataset_real
!> @brief Store real tensor dataset with associated metadata.
!> @details Data is transposed to compenstate transposed storage order.
!--------------------------------------------------------------------------------------------------
subroutine results_writeTensorDataset_real(group,dataset,label,description,SIunit,transposed)
subroutine results_writeTensorDataset_real(dataset,group,label,description,SIunit,transposed)
character(len=*), intent(in) :: label,group,description
character(len=*), intent(in), optional :: SIunit
@ -361,9 +361,9 @@ subroutine results_writeTensorDataset_real(group,dataset,label,description,SIuni
do i=1,size(dataset_transposed,3)
dataset_transposed(:,:,i) = transpose(dataset(:,:,i))
enddo
call HDF5_write(groupHandle,dataset_transposed,label)
call HDF5_write(dataset_transposed,groupHandle,label)
else
call HDF5_write(groupHandle,dataset,label)
call HDF5_write(dataset,groupHandle,label)
endif
call executionStamp(group//'/'//label,description,SIunit)
call HDF5_closeGroup(groupHandle)
@ -374,7 +374,7 @@ end subroutine results_writeTensorDataset_real
!--------------------------------------------------------------------------------------------------
!> @brief Store integer vector dataset with associated metadata.
!--------------------------------------------------------------------------------------------------
subroutine results_writeVectorDataset_int(group,dataset,label,description,SIunit)
subroutine results_writeVectorDataset_int(dataset,group,label,description,SIunit)
character(len=*), intent(in) :: label,group,description
character(len=*), intent(in), optional :: SIunit
@ -384,7 +384,7 @@ subroutine results_writeVectorDataset_int(group,dataset,label,description,SIunit
groupHandle = results_openGroup(group)
call HDF5_write(groupHandle,dataset,label)
call HDF5_write(dataset,groupHandle,label)
call executionStamp(group//'/'//label,description,SIunit)
call HDF5_closeGroup(groupHandle)
@ -394,7 +394,7 @@ end subroutine results_writeVectorDataset_int
!--------------------------------------------------------------------------------------------------
!> @brief Store integer tensor dataset with associated metadata.
!--------------------------------------------------------------------------------------------------
subroutine results_writeTensorDataset_int(group,dataset,label,description,SIunit)
subroutine results_writeTensorDataset_int(dataset,group,label,description,SIunit)
character(len=*), intent(in) :: label,group,description
character(len=*), intent(in), optional :: SIunit
@ -404,7 +404,7 @@ subroutine results_writeTensorDataset_int(group,dataset,label,description,SIunit
groupHandle = results_openGroup(group)
call HDF5_write(groupHandle,dataset,label)
call HDF5_write(dataset,groupHandle,label)
call executionStamp(group//'/'//label,description,SIunit)
call HDF5_closeGroup(groupHandle)