From b8c8c4ade69744ffe8564b80f6dee13b563d2369 Mon Sep 17 00:00:00 2001 From: Martin Diehl Date: Fri, 10 May 2019 15:19:00 +0200 Subject: [PATCH] follow numpy naming convention --- src/math.f90 | 10 +++------- src/mesh_abaqus.f90 | 6 +++--- src/mesh_grid.f90 | 6 +++--- src/mesh_marc.f90 | 6 +++--- 4 files changed, 12 insertions(+), 16 deletions(-) diff --git a/src/math.f90 b/src/math.f90 index dcd1aba8f..bc8170a5a 100644 --- a/src/math.f90 +++ b/src/math.f90 @@ -69,15 +69,11 @@ module math !-------------------------------------------------------------------------------------------------- ! Provide deprecated name for compatibility - interface math_crossproduct - module procedure math_cross - end interface math_crossproduct interface math_mul3x3 module procedure math_inner end interface math_mul3x3 public :: & - math_mul3x3, & - math_crossproduct + math_mul3x3 !--------------------------------------------------------------------------------------------------- @@ -1438,7 +1434,7 @@ subroutine math_eigenValuesVectorsSym33(m,values,vectors) vectors(1:3,2) = vectors(1:3, 2) / norm ! Calculate third eigenvector according to v[2] = v[0] x v[1] - vectors(1:3,3) = math_crossproduct(vectors(1:3,1),vectors(1:3,2)) + vectors(1:3,3) = math_cross(vectors(1:3,1),vectors(1:3,2)) end subroutine math_eigenValuesVectorsSym33 @@ -1761,7 +1757,7 @@ real(pReal) pure function math_areaTriangle(v1,v2,v3) real(pReal), dimension (3), intent(in) :: v1,v2,v3 - math_areaTriangle = 0.5_pReal * norm2(math_crossproduct(v1-v2,v1-v3)) + math_areaTriangle = 0.5_pReal * norm2(math_cross(v1-v2,v1-v3)) end function math_areaTriangle diff --git a/src/mesh_abaqus.f90 b/src/mesh_abaqus.f90 index 15369db44..0467d09aa 100644 --- a/src/mesh_abaqus.f90 +++ b/src/mesh_abaqus.f90 @@ -1541,7 +1541,7 @@ pure function mesh_cellCenterCoordinates(ip,el) !-------------------------------------------------------------------------------------------------- subroutine mesh_build_ipAreas use math, only: & - math_crossproduct + math_cross implicit none integer(pInt) :: e,t,g,c,i,f,n,m @@ -1576,7 +1576,7 @@ subroutine mesh_build_ipAreas do f = 1_pInt,FE_NipNeighbors(c) ! loop over cell faces forall(n = 1_pInt:FE_NcellnodesPerCellface(c)) & nodePos(1:3,n) = mesh_cellnode(1:3,mesh_cell(FE_cellface(n,f,c),i,e)) - normal = math_crossproduct(nodePos(1:3,2) - nodePos(1:3,1), & + normal = math_cross(nodePos(1:3,2) - nodePos(1:3,1), & nodePos(1:3,3) - nodePos(1:3,1)) mesh_ipArea(f,i,e) = norm2(normal) mesh_ipAreaNormal(1:3,f,i,e) = normal / norm2(normal) ! ensure unit length of area normal @@ -1595,7 +1595,7 @@ subroutine mesh_build_ipAreas nodePos(1:3,n) = mesh_cellnode(1:3,mesh_cell(FE_cellface(n,f,c),i,e)) forall(n = 1_pInt:FE_NcellnodesPerCellface(c)) & normals(1:3,n) = 0.5_pReal & - * math_crossproduct(nodePos(1:3,1+mod(n ,m)) - nodePos(1:3,n), & + * math_cross(nodePos(1:3,1+mod(n ,m)) - nodePos(1:3,n), & nodePos(1:3,1+mod(n+1,m)) - nodePos(1:3,n)) normal = 0.5_pReal * sum(normals,2) mesh_ipArea(f,i,e) = norm2(normal) diff --git a/src/mesh_grid.f90 b/src/mesh_grid.f90 index 7274582a2..e864c70bc 100644 --- a/src/mesh_grid.f90 +++ b/src/mesh_grid.f90 @@ -900,7 +900,7 @@ end function mesh_cellCenterCoordinates !-------------------------------------------------------------------------------------------------- subroutine mesh_build_ipAreas use math, only: & - math_crossproduct + math_cross implicit none integer(pInt) :: e,t,g,c,i,f,n,m @@ -933,7 +933,7 @@ subroutine mesh_build_ipAreas do f = 1_pInt,FE_NipNeighbors(c) ! loop over cell faces forall(n = 1_pInt:FE_NcellnodesPerCellface(c)) & nodePos(1:3,n) = mesh_cellnode(1:3,mesh_cell(FE_cellface(n,f,c),i,e)) - normal = math_crossproduct(nodePos(1:3,2) - nodePos(1:3,1), & + normal = math_cross(nodePos(1:3,2) - nodePos(1:3,1), & nodePos(1:3,3) - nodePos(1:3,1)) mesh_ipArea(f,i,e) = norm2(normal) mesh_ipAreaNormal(1:3,f,i,e) = normal / norm2(normal) ! ensure unit length of area normal @@ -952,7 +952,7 @@ subroutine mesh_build_ipAreas nodePos(1:3,n) = mesh_cellnode(1:3,mesh_cell(FE_cellface(n,f,c),i,e)) forall(n = 1_pInt:FE_NcellnodesPerCellface(c)) & normals(1:3,n) = 0.5_pReal & - * math_crossproduct(nodePos(1:3,1+mod(n ,m)) - nodePos(1:3,n), & + * math_cross(nodePos(1:3,1+mod(n ,m)) - nodePos(1:3,n), & nodePos(1:3,1+mod(n+1,m)) - nodePos(1:3,n)) normal = 0.5_pReal * sum(normals,2) mesh_ipArea(f,i,e) = norm2(normal) diff --git a/src/mesh_marc.f90 b/src/mesh_marc.f90 index 575792a14..79718c37f 100644 --- a/src/mesh_marc.f90 +++ b/src/mesh_marc.f90 @@ -1230,7 +1230,7 @@ pure function mesh_cellCenterCoordinates(ip,el) !-------------------------------------------------------------------------------------------------- subroutine mesh_build_ipAreas use math, only: & - math_crossproduct + math_cross implicit none integer(pInt) :: e,t,g,c,i,f,n,m @@ -1265,7 +1265,7 @@ subroutine mesh_build_ipAreas do f = 1_pInt,FE_NipNeighbors(c) ! loop over cell faces forall(n = 1_pInt:FE_NcellnodesPerCellface(c)) & nodePos(1:3,n) = mesh_cellnode(1:3,mesh_cell(FE_cellface(n,f,c),i,e)) - normal = math_crossproduct(nodePos(1:3,2) - nodePos(1:3,1), & + normal = math_cross(nodePos(1:3,2) - nodePos(1:3,1), & nodePos(1:3,3) - nodePos(1:3,1)) mesh_ipArea(f,i,e) = norm2(normal) mesh_ipAreaNormal(1:3,f,i,e) = normal / norm2(normal) ! ensure unit length of area normal @@ -1284,7 +1284,7 @@ subroutine mesh_build_ipAreas nodePos(1:3,n) = mesh_cellnode(1:3,mesh_cell(FE_cellface(n,f,c),i,e)) forall(n = 1_pInt:FE_NcellnodesPerCellface(c)) & normals(1:3,n) = 0.5_pReal & - * math_crossproduct(nodePos(1:3,1+mod(n ,m)) - nodePos(1:3,n), & + * math_cross(nodePos(1:3,1+mod(n ,m)) - nodePos(1:3,n), & nodePos(1:3,1+mod(n+1,m)) - nodePos(1:3,n)) normal = 0.5_pReal * sum(normals,2) mesh_ipArea(f,i,e) = norm2(normal)