some lines in crystallite.f90 exceeded limit of 132 characters
fixed bug in Lib_VTK_IO.f90 (informed author as well) added zip file containing source of Lib_VTK_IO.f90
This commit is contained in:
parent
755e0e2440
commit
cfac73043d
|
@ -3478,7 +3478,7 @@ function crystallite_postResults(dt, gr, ip, el)
|
||||||
|
|
||||||
crystallite_postResults = 0.0_pReal
|
crystallite_postResults = 0.0_pReal
|
||||||
c = 0_pInt
|
c = 0_pInt
|
||||||
crystallite_postResults(c+1) = real(crystallite_sizePostResults(crystID),pReal) ! size of results from cryst
|
crystallite_postResults(c+1) = real(crystallite_sizePostResults(crystID),pReal) ! size of results from cryst
|
||||||
c = c + 1_pInt
|
c = c + 1_pInt
|
||||||
|
|
||||||
do o = 1_pInt,crystallite_Noutput(crystID)
|
do o = 1_pInt,crystallite_Noutput(crystID)
|
||||||
|
@ -3486,52 +3486,55 @@ function crystallite_postResults(dt, gr, ip, el)
|
||||||
select case(crystallite_output(o,crystID))
|
select case(crystallite_output(o,crystID))
|
||||||
case ('phase')
|
case ('phase')
|
||||||
mySize = 1_pInt
|
mySize = 1_pInt
|
||||||
crystallite_postResults(c+1) = real(material_phase(gr,ip,el),pReal) ! phaseID of grain
|
crystallite_postResults(c+1) = real(material_phase(gr,ip,el),pReal) ! phaseID of grain
|
||||||
case ('texture')
|
case ('texture')
|
||||||
mySize = 1_pInt
|
mySize = 1_pInt
|
||||||
crystallite_postResults(c+1) = real(material_texture(gr,ip,el),pReal) ! textureID of grain
|
crystallite_postResults(c+1) = real(material_texture(gr,ip,el),pReal) ! textureID of grain
|
||||||
case ('volume')
|
case ('volume')
|
||||||
mySize = 1_pInt
|
mySize = 1_pInt
|
||||||
detF = math_det33(crystallite_partionedF(1:3,1:3,gr,ip,el)) ! V_current = det(F) * V_reference
|
detF = math_det33(crystallite_partionedF(1:3,1:3,gr,ip,el)) ! V_current = det(F) * V_reference
|
||||||
crystallite_postResults(c+1) = detF * mesh_ipVolume(ip,el) / homogenization_Ngrains(mesh_element(3,el)) ! grain volume (not fraction but absolute)
|
crystallite_postResults(c+1) = detF * mesh_ipVolume(ip,el) / &
|
||||||
|
homogenization_Ngrains(mesh_element(3,el)) ! grain volume (not fraction but absolute)
|
||||||
case ('orientation')
|
case ('orientation')
|
||||||
mySize = 4_pInt
|
mySize = 4_pInt
|
||||||
crystallite_postResults(c+1:c+mySize) = crystallite_orientation(1:4,gr,ip,el) ! grain orientation as quaternion
|
crystallite_postResults(c+1:c+mySize) = crystallite_orientation(1:4,gr,ip,el) ! grain orientation as quaternion
|
||||||
case ('eulerangles')
|
case ('eulerangles')
|
||||||
mySize = 3_pInt
|
mySize = 3_pInt
|
||||||
crystallite_postResults(c+1:c+mySize) = inDeg * math_qToEuler(crystallite_orientation(1:4,gr,ip,el)) ! grain orientation as Euler angles in degree
|
crystallite_postResults(c+1:c+mySize) = inDeg * &
|
||||||
|
math_qToEuler(crystallite_orientation(1:4,gr,ip,el)) ! grain orientation as Euler angles in degree
|
||||||
case ('grainrotation')
|
case ('grainrotation')
|
||||||
mySize = 4_pInt
|
mySize = 4_pInt
|
||||||
crystallite_postResults(c+1:c+mySize) = math_qToAxisAngle(crystallite_rotation(1:4,gr,ip,el)) ! grain rotation away from initial orientation as axis-angle in crystal reference coordinates
|
crystallite_postResults(c+1:c+mySize) = math_qToAxisAngle(crystallite_rotation(1:4,gr,ip,el))! grain rotation away from initial orientation as axis-angle in crystal reference coordinates
|
||||||
crystallite_postResults(c+4) = inDeg * crystallite_postResults(c+4) ! angle in degree
|
crystallite_postResults(c+4) = inDeg * crystallite_postResults(c+4) ! angle in degree
|
||||||
case ('grainrotationx')
|
case ('grainrotationx')
|
||||||
mySize = 1_pInt
|
mySize = 1_pInt
|
||||||
rotation = math_qToAxisAngle(math_qMul(math_qMul(crystallite_orientation(1:4,gr,ip,el), &
|
rotation = math_qToAxisAngle(math_qMul(math_qMul(crystallite_orientation(1:4,gr,ip,el), &
|
||||||
crystallite_rotation(1:4,gr,ip,el)), &
|
crystallite_rotation(1:4,gr,ip,el)), &
|
||||||
math_qConj(crystallite_orientation(1:4,gr,ip,el)))) ! grain rotation away from initial orientation as axis-angle in sample reference coordinates
|
math_qConj(crystallite_orientation(1:4,gr,ip,el)))) ! grain rotation away from initial orientation as axis-angle in sample reference coordinates
|
||||||
crystallite_postResults(c+1) = inDeg * rotation(1) * rotation(4) ! angle in degree
|
crystallite_postResults(c+1) = inDeg * rotation(1) * rotation(4) ! angle in degree
|
||||||
case ('grainrotationy')
|
case ('grainrotationy')
|
||||||
mySize = 1_pInt
|
mySize = 1_pInt
|
||||||
rotation = math_qToAxisAngle(math_qMul(math_qMul(crystallite_orientation(1:4,gr,ip,el), &
|
rotation = math_qToAxisAngle(math_qMul(math_qMul(crystallite_orientation(1:4,gr,ip,el), &
|
||||||
crystallite_rotation(1:4,gr,ip,el)), &
|
crystallite_rotation(1:4,gr,ip,el)), &
|
||||||
math_qConj(crystallite_orientation(1:4,gr,ip,el)))) ! grain rotation away from initial orientation as axis-angle in sample reference coordinates
|
math_qConj(crystallite_orientation(1:4,gr,ip,el)))) ! grain rotation away from initial orientation as axis-angle in sample reference coordinates
|
||||||
crystallite_postResults(c+1) = inDeg * rotation(2) * rotation(4) ! angle in degree
|
crystallite_postResults(c+1) = inDeg * rotation(2) * rotation(4) ! angle in degree
|
||||||
case ('grainrotationz')
|
case ('grainrotationz')
|
||||||
mySize = 1_pInt
|
mySize = 1_pInt
|
||||||
rotation = math_qToAxisAngle(math_qMul(math_qMul(crystallite_orientation(1:4,gr,ip,el), &
|
rotation = math_qToAxisAngle(math_qMul(math_qMul(crystallite_orientation(1:4,gr,ip,el), &
|
||||||
crystallite_rotation(1:4,gr,ip,el)), &
|
crystallite_rotation(1:4,gr,ip,el)), &
|
||||||
math_qConj(crystallite_orientation(1:4,gr,ip,el)))) ! grain rotation away from initial orientation as axis-angle in sample reference coordinates
|
math_qConj(crystallite_orientation(1:4,gr,ip,el)))) ! grain rotation away from initial orientation as axis-angle in sample reference coordinates
|
||||||
crystallite_postResults(c+1) = inDeg * rotation(3) * rotation(4) ! angle in degree
|
crystallite_postResults(c+1) = inDeg * rotation(3) * rotation(4) ! angle in degree
|
||||||
case ('ipcoords')
|
case ('ipcoords')
|
||||||
mySize = 3_pInt
|
mySize = 3_pInt
|
||||||
crystallite_postResults(c+1:c+mySize) = mesh_ipCoordinates(1:3,ip,el) ! current ip coordinates
|
crystallite_postResults(c+1:c+mySize) = mesh_ipCoordinates(1:3,ip,el) ! current ip coordinates
|
||||||
|
|
||||||
! remark: tensor output is of the form 11,12,13, 21,22,23, 31,32,33
|
! remark: tensor output is of the form 11,12,13, 21,22,23, 31,32,33
|
||||||
! thus row index i is slow, while column index j is fast. reminder: "row is slow"
|
! thus row index i is slow, while column index j is fast. reminder: "row is slow"
|
||||||
|
|
||||||
case ('defgrad','f')
|
case ('defgrad','f')
|
||||||
mySize = 9_pInt
|
mySize = 9_pInt
|
||||||
crystallite_postResults(c+1:c+mySize) = reshape(math_transpose33(crystallite_partionedF(1:3,1:3,gr,ip,el)),[mySize])
|
crystallite_postResults(c+1:c+mySize) = &
|
||||||
|
reshape(math_transpose33(crystallite_partionedF(1:3,1:3,gr,ip,el)),[mySize])
|
||||||
case ('e')
|
case ('e')
|
||||||
mySize = 9_pInt
|
mySize = 9_pInt
|
||||||
crystallite_postResults(c+1:c+mySize) = 0.5_pReal * reshape((math_mul33x33( &
|
crystallite_postResults(c+1:c+mySize) = 0.5_pReal * reshape((math_mul33x33( &
|
||||||
|
@ -3539,23 +3542,29 @@ function crystallite_postResults(dt, gr, ip, el)
|
||||||
crystallite_partionedF(1:3,1:3,gr,ip,el)) - math_I3),[mySize])
|
crystallite_partionedF(1:3,1:3,gr,ip,el)) - math_I3),[mySize])
|
||||||
case ('fe')
|
case ('fe')
|
||||||
mySize = 9_pInt
|
mySize = 9_pInt
|
||||||
crystallite_postResults(c+1:c+mySize) = reshape(math_transpose33(crystallite_Fe(1:3,1:3,gr,ip,el)),[mySize])
|
crystallite_postResults(c+1:c+mySize) = &
|
||||||
|
reshape(math_transpose33(crystallite_Fe(1:3,1:3,gr,ip,el)),[mySize])
|
||||||
case ('ee')
|
case ('ee')
|
||||||
Ee = 0.5_pReal * (math_mul33x33(math_transpose33(crystallite_Fe(1:3,1:3,gr,ip,el)), crystallite_Fe(1:3,1:3,gr,ip,el)) - math_I3)
|
Ee = 0.5_pReal *(math_mul33x33(math_transpose33(crystallite_Fe(1:3,1:3,gr,ip,el)), &
|
||||||
|
crystallite_Fe(1:3,1:3,gr,ip,el)) - math_I3)
|
||||||
mySize = 9_pInt
|
mySize = 9_pInt
|
||||||
crystallite_postResults(c+1:c+mySize) = reshape(Ee,[mySize])
|
crystallite_postResults(c+1:c+mySize) = reshape(Ee,[mySize])
|
||||||
case ('fp')
|
case ('fp')
|
||||||
mySize = 9_pInt
|
mySize = 9_pInt
|
||||||
crystallite_postResults(c+1:c+mySize) = reshape(math_transpose33(crystallite_Fp(1:3,1:3,gr,ip,el)),[mySize])
|
crystallite_postResults(c+1:c+mySize) = &
|
||||||
|
reshape(math_transpose33(crystallite_Fp(1:3,1:3,gr,ip,el)),[mySize])
|
||||||
case ('lp')
|
case ('lp')
|
||||||
mySize = 9_pInt
|
mySize = 9_pInt
|
||||||
crystallite_postResults(c+1:c+mySize) = reshape(math_transpose33(crystallite_Lp(1:3,1:3,gr,ip,el)),[mySize])
|
crystallite_postResults(c+1:c+mySize) = &
|
||||||
|
reshape(math_transpose33(crystallite_Lp(1:3,1:3,gr,ip,el)),[mySize])
|
||||||
case ('p','firstpiola','1stpiola')
|
case ('p','firstpiola','1stpiola')
|
||||||
mySize = 9_pInt
|
mySize = 9_pInt
|
||||||
crystallite_postResults(c+1:c+mySize) = reshape(math_transpose33(crystallite_P(1:3,1:3,gr,ip,el)),[mySize])
|
crystallite_postResults(c+1:c+mySize) = &
|
||||||
|
reshape(math_transpose33(crystallite_P(1:3,1:3,gr,ip,el)),[mySize])
|
||||||
case ('s','tstar','secondpiola','2ndpiola')
|
case ('s','tstar','secondpiola','2ndpiola')
|
||||||
mySize = 9_pInt
|
mySize = 9_pInt
|
||||||
crystallite_postResults(c+1:c+mySize) = reshape(math_Mandel6to33(crystallite_Tstar_v(1:6,gr,ip,el)),[mySize])
|
crystallite_postResults(c+1:c+mySize) = &
|
||||||
|
reshape(math_Mandel6to33(crystallite_Tstar_v(1:6,gr,ip,el)),[mySize])
|
||||||
case ('elasmatrix')
|
case ('elasmatrix')
|
||||||
mySize = 36_pInt
|
mySize = 36_pInt
|
||||||
crystallite_postResults(c+1:c+mySize) = reshape(constitutive_homogenizedC(gr,ip,el),[mySize])
|
crystallite_postResults(c+1:c+mySize) = reshape(constitutive_homogenizedC(gr,ip,el),[mySize])
|
||||||
|
@ -3576,10 +3585,9 @@ function crystallite_postResults(dt, gr, ip, el)
|
||||||
crystallite_postResults(c+1) = real(constitutive_sizePostResults(gr,ip,el),pReal) ! size of constitutive results
|
crystallite_postResults(c+1) = real(constitutive_sizePostResults(gr,ip,el),pReal) ! size of constitutive results
|
||||||
c = c + 1_pInt
|
c = c + 1_pInt
|
||||||
if (constitutive_sizePostResults(gr,ip,el) > 0_pInt) &
|
if (constitutive_sizePostResults(gr,ip,el) > 0_pInt) &
|
||||||
crystallite_postResults(c+1:c+constitutive_sizePostResults(gr,ip,el)) = constitutive_postResults(crystallite_Tstar_v(1:6,gr,ip,el), &
|
crystallite_postResults(c+1:c+constitutive_sizePostResults(gr,ip,el)) = &
|
||||||
crystallite_Fe, &
|
constitutive_postResults(crystallite_Tstar_v(1:6,gr,ip,el), crystallite_Fe, &
|
||||||
crystallite_Temperature(gr,ip,el), &
|
crystallite_Temperature(gr,ip,el), dt, gr, ip, el)
|
||||||
dt, gr, ip, el)
|
|
||||||
c = c + constitutive_sizePostResults(gr,ip,el)
|
c = c + constitutive_sizePostResults(gr,ip,el)
|
||||||
|
|
||||||
end function crystallite_postResults
|
end function crystallite_postResults
|
||||||
|
|
|
@ -5121,9 +5121,9 @@ subroutine mesh_write_cellGeom
|
||||||
filename = trim(getSolverWorkingDirectoryName())//trim(getSolverJobName())//'_ipbased.vtk', &
|
filename = trim(getSolverWorkingDirectoryName())//trim(getSolverJobName())//'_ipbased.vtk', &
|
||||||
mesh_topology = 'UNSTRUCTURED_GRID')
|
mesh_topology = 'UNSTRUCTURED_GRID')
|
||||||
err = VTK_geo(NN = mesh_Ncellnodes, &
|
err = VTK_geo(NN = mesh_Ncellnodes, &
|
||||||
X = mesh_cellnode(1,:), &
|
X = mesh_cellnode(1,1:mesh_Ncellnodes), &
|
||||||
Y = mesh_cellnode(2,:), &
|
Y = mesh_cellnode(2,1:mesh_Ncellnodes), &
|
||||||
Z = mesh_cellnode(3,:))
|
Z = mesh_cellnode(3,1:mesh_Ncellnodes))
|
||||||
err = VTK_con(NC = mesh_Ncells, &
|
err = VTK_con(NC = mesh_Ncells, &
|
||||||
connect = cellconnection(1:j), &
|
connect = cellconnection(1:j), &
|
||||||
cell_type = celltype)
|
cell_type = celltype)
|
||||||
|
@ -5161,18 +5161,18 @@ subroutine mesh_write_elemGeom
|
||||||
i = i + 1_pInt + FE_Nnodes(t)
|
i = i + 1_pInt + FE_Nnodes(t)
|
||||||
enddo
|
enddo
|
||||||
|
|
||||||
err = VTK_ini(output_format = 'ASCII', &
|
err =VTK_ini(output_format = 'ASCII', &
|
||||||
title=trim(getSolverJobName())//' element mesh', &
|
title=trim(getSolverJobName())//' element mesh', &
|
||||||
filename = trim(getSolverWorkingDirectoryName())//trim(getSolverJobName()//'_nodebased.vtk', &
|
filename = trim(getSolverWorkingDirectoryName())//trim(getSolverJobName())//'_nodebased.vtk', &
|
||||||
mesh_topology = 'UNSTRUCTURED_GRID')
|
mesh_topology = 'UNSTRUCTURED_GRID')
|
||||||
err = VTK_geo(NN = mesh_Nnodes, &
|
err =VTK_geo(NN = mesh_Nnodes, &
|
||||||
X = mesh_node0(1,1:mesh_Nnodes), &
|
X = mesh_node0(1,1:mesh_Nnodes), &
|
||||||
Y = mesh_node0(2,1:mesh_Nnodes), &
|
Y = mesh_node0(2,1:mesh_Nnodes), &
|
||||||
Z = mesh_node0(3,1:mesh_Nnodes))
|
Z = mesh_node0(3,1:mesh_Nnodes))
|
||||||
err = VTK_con(NC = mesh_Nelems, &
|
err =VTK_con(NC = mesh_Nelems, &
|
||||||
connect = elementconnection(1:i), &
|
connect = elementconnection(1:i), &
|
||||||
cell_type = elemtype)
|
cell_type = elemtype)
|
||||||
err = VTK_end()
|
err =VTK_end()
|
||||||
|
|
||||||
end subroutine mesh_write_elemGeom
|
end subroutine mesh_write_elemGeom
|
||||||
|
|
||||||
|
|
|
@ -3435,6 +3435,7 @@ contains
|
||||||
!---------------------------------------------------------------------------------------------------------------------------------
|
!---------------------------------------------------------------------------------------------------------------------------------
|
||||||
|
|
||||||
!---------------------------------------------------------------------------------------------------------------------------------
|
!---------------------------------------------------------------------------------------------------------------------------------
|
||||||
|
rf = 1
|
||||||
if (present(cf)) rf = cf
|
if (present(cf)) rf = cf
|
||||||
close(unit=vtk(rf)%u,iostat=E_IO)
|
close(unit=vtk(rf)%u,iostat=E_IO)
|
||||||
call vtk_update(act='remove',cf=rf,Nvtk=Nvtk,vtk=vtk)
|
call vtk_update(act='remove',cf=rf,Nvtk=Nvtk,vtk=vtk)
|
||||||
|
|
Loading…
Reference in New Issue