From 66302fa6da75375a2d3325a41a16b8aec22951a0 Mon Sep 17 00:00:00 2001 From: Martin Diehl Date: Sun, 15 Mar 2020 14:21:11 +0100 Subject: [PATCH] rotational part is always of 3x3 tensor --- src/crystallite.f90 | 2 +- src/math.f90 | 12 ++++++------ 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/crystallite.f90 b/src/crystallite.f90 index 5852f6f38..c3ecd5f42 100644 --- a/src/crystallite.f90 +++ b/src/crystallite.f90 @@ -606,7 +606,7 @@ subroutine crystallite_orientations do e = FEsolving_execElem(1),FEsolving_execElem(2) do i = FEsolving_execIP(1),FEsolving_execIP(2) do c = 1,homogenization_Ngrains(material_homogenizationAt(e)) - call crystallite_orientation(c,i,e)%fromMatrix(transpose(math_rotationalPart33(crystallite_Fe(1:3,1:3,c,i,e)))) + call crystallite_orientation(c,i,e)%fromMatrix(transpose(math_rotationalPart(crystallite_Fe(1:3,1:3,c,i,e)))) enddo; enddo; enddo !$OMP END PARALLEL DO diff --git a/src/math.f90 b/src/math.f90 index 48b87073e..12c92aa32 100644 --- a/src/math.f90 +++ b/src/math.f90 @@ -1022,7 +1022,7 @@ end function math_eigenvectorBasisSym33 !-------------------------------------------------------------------------------------------------- !> @brief rotational part from polar decomposition of 3x3 tensor !-------------------------------------------------------------------------------------------------- -function math_rotationalPart33(m) +function math_rotationalPart(m) real(pReal), intent(in), dimension(3,3) :: m real(pReal), dimension(3,3) :: math_rotationalPart33 @@ -1038,7 +1038,7 @@ function math_rotationalPart33(m) math_rotationalPart33 = matmul(m,Uinv) endif inversionFailed -end function math_rotationalPart33 +end function math_rotationalPart !-------------------------------------------------------------------------------------------------- @@ -1315,10 +1315,10 @@ subroutine unitTest do while(math_det33(t33)<1.0e-2_pReal) ! O(det(F)) = 1 call random_number(t33) enddo - t33_2 = math_rotationalPart33(transpose(t33)) - t33 = math_rotationalPart33(t33) - if(any(dNeq0(matmul(t33_2,t33) - MATH_I3,tol=1.0e-10_pReal))) & - call IO_error(0,ext_msg='math_rotationalPart33') + t33_2 = math_rotationalPart(transpose(t33)) + t33 = math_rotationalPart(t33) + if(any(dNeq0(matmul(t33_2,t33) - math_I3,tol=1.0e-10_pReal))) & + call IO_error(0,ext_msg='math_rotationalPart') call random_number(r) d = int(r*5.0_pReal) + 1