From 9f7288d7e94562ae4eff71a553c3931ac8b9fc83 Mon Sep 17 00:00:00 2001 From: Leon Kos Date: Wed, 20 Dec 2023 17:25:51 +0100 Subject: [PATCH] Add missing patch --- .../e/Elmer/Elmer-9.0-DCRComplexSolve.patch | 427 ++++++++++++++++++ 1 file changed, 427 insertions(+) create mode 100644 easybuild/easyconfigs/e/Elmer/Elmer-9.0-DCRComplexSolve.patch diff --git a/easybuild/easyconfigs/e/Elmer/Elmer-9.0-DCRComplexSolve.patch b/easybuild/easyconfigs/e/Elmer/Elmer-9.0-DCRComplexSolve.patch new file mode 100644 index 00000000000..0c9cb3682f5 --- /dev/null +++ b/easybuild/easyconfigs/e/Elmer/Elmer-9.0-DCRComplexSolve.patch @@ -0,0 +1,427 @@ +--- fem/src/modules/DCRComplexSolve.F90.orig 2023-12-15 10:28:53.729618181 +0100 ++++ fem/src/modules/DCRComplexSolve.F90 2023-12-15 10:28:58.846691361 +0100 +@@ -205,7 +205,7 @@ + CALL Info( 'DCRComplexSolve', Message, Level=4 ) + CALL Info( 'DCRComplexSolve', '-------------------------------------', Level=4 ) + CALL Info( 'DCRComplexSolve', ' ', Level=4 ) +- CALL Info( 'DCRComplexSolve', 'Starting Assmebly', Level=4 ) ++ CALL Info( 'DCRComplexSolve', 'Starting Assembly', Level=4 ) + + CALL InitializeToZero( StiffMatrix, ForceVector ) + ! +@@ -426,14 +426,14 @@ + SUBROUTINE InputTensor( Tensor, IsScalar, Name, Material, n, NodeIndexes ) + !------------------------------------------------------------------------------ + REAL(KIND=dp) :: Tensor(:,:,:) +- INTEGER :: n, NodeIndexes(:) ++ INTEGER :: i, n, NodeIndexes(:) + LOGICAL :: IsScalar + CHARACTER(LEN=*) :: Name + TYPE(ValueList_t), POINTER :: Material + !------------------------------------------------------------------------------ + LOGICAL :: FirstTime = .TRUE., stat + REAL(KIND=dp), POINTER :: Hwrk(:,:,:) +- ++ INTEGER :: n1,n2,t1 + SAVE FirstTime, Hwrk + !------------------------------------------------------------------------------ + IF ( FirstTime ) THEN +@@ -444,30 +444,33 @@ + Tensor = 0.0d0 + + CALL ListGetRealArray( Material, Name, Hwrk, n, NodeIndexes, stat ) +- IsScalar = SIZE(HWrk,1) == 1 .AND. SIZE(HWrk,2) == 1 ++ n1 = MIN(SIZE(HWrk,1),3) ++ n2 = MIN(SIZE(Hwrk,2),3) ++ IsScalar = (n1==1 .AND. n2==1) + + IF ( .NOT. stat ) RETURN + +- IF ( SIZE(Hwrk,1) == 1 ) THEN +- +- DO i=1,MIN(3,SIZE(Hwrk,2)) +- Tensor( i,i,1:n ) = Hwrk( 1,1,1:n ) +- END DO +- +- ELSE IF ( SIZE(Hwrk,2) == 1 ) THEN +- +- DO i=1,MIN(3,SIZE(Hwrk,1)) +- Tensor(i,i,1:n) = Hwrk(i,1,1:n) +- END DO +- ++ IF ( IsScalar ) THEN ++ t1 = SIZE(Tensor,1) ++ DO i=1,t1 ++ Tensor(i,i,1:n) = Hwrk(1,1,1:n) ++ END DO + ELSE +- +- DO i=1,MIN(3,SIZE(Hwrk,1)) +- DO j=1,MIN(3,SIZE(Hwrk,2)) ++ IF ( n1 == 1 ) THEN ++ DO i=1,n2 ++ Tensor( i,i,1:n ) = Hwrk( 1,i,1:n ) ++ END DO ++ ELSE IF ( n2 == 1 ) THEN ++ DO i=1,n1 ++ Tensor(i,i,1:n) = Hwrk(i,1,1:n) ++ END DO ++ ELSE ++ DO i=1,n1 ++ DO j=1,n2 + Tensor( i,j,1:n ) = Hwrk(i,j,1:n) +- END DO +- END DO +- ++ END DO ++ END DO ++ END IF + END IF + !------------------------------------------------------------------------------ + END SUBROUTINE InputTensor +@@ -485,7 +488,8 @@ + !------------------------------------------------------------------------------ + LOGICAL :: FirstTime = .TRUE., stat + REAL(KIND=dp), POINTER :: Hwrk(:,:,:) +- ++ INTEGER :: i ++ INTEGER :: n1,n2 + SAVE FirstTime, Hwrk + !------------------------------------------------------------------------------ + IF ( FirstTime ) THEN +@@ -496,22 +500,20 @@ + Tensor = 0.0d0 + + CALL ListGetRealArray( Material, Name, Hwrk, n, NodeIndexes, stat ) +- IsScalar = SIZE(HWrk,1) == 1 .AND. SIZE(HWrk,2) == 1 ++ n1 = MIN(SIZE(HWrk,1),3) ++ n2 = MIN(SIZE(HWrk,2),3) ++ IsScalar = (n1==1 .AND. n2==1) + + IF ( .NOT. stat ) RETURN +- +- IF ( SIZE(Hwrk,1) == 1 ) THEN +- +- DO i=1,MIN(3,SIZE(Hwrk,2)) +- Tensor( i,1:n ) = Hwrk( 1,1,1:n ) ++ ++ IF ( n1 == 1 ) THEN ++ DO i=1,n2 ++ Tensor( i,1:n ) = Hwrk( 1,i,1:n ) + END DO +- + ELSE +- +- DO i=1,MIN(3,SIZE(Hwrk,1)) ++ DO i=1,n1 + Tensor( i,1:n ) = Hwrk( i,1,1:n ) + END DO +- + END IF + !------------------------------------------------------------------------------ + END SUBROUTINE InputVector +@@ -1061,20 +1063,20 @@ + + !------------------------------------------------------------------------------ + +-contains ++ CONTAINS + + !------------------------------------------------------------------------------ + SUBROUTINE InputVector( Tensor, IsScalar, Name, Material, n, NodeIndexes ) + !------------------------------------------------------------------------------ + REAL(KIND=dp) :: Tensor(:,:) +- INTEGER :: n, NodeIndexes(:) ++ INTEGER :: i, n, NodeIndexes(:) + LOGICAL :: IsScalar + CHARACTER(LEN=*) :: Name + TYPE(ValueList_t), POINTER :: Material + !------------------------------------------------------------------------------ + LOGICAL :: FirstTime = .TRUE., stat + REAL(KIND=dp), POINTER :: Hwrk(:,:,:) +- ++ INTEGER :: n1,n2 + SAVE FirstTime, Hwrk + !------------------------------------------------------------------------------ + IF ( FirstTime ) THEN +@@ -1085,22 +1087,20 @@ + Tensor = 0.0d0 + + CALL ListGetRealArray( Material, Name, Hwrk, n, NodeIndexes, stat ) +- IsScalar = SIZE(HWrk,1) == 1 .AND. SIZE(HWrk,2) == 1 ++ n1 = MIN(SIZE(HWrk,1),3) ++ n2 = MIN(SIZE(HWrk,2),3) ++ IsScalar = (n1==1 .AND. n2==1) + + IF ( .NOT. stat ) RETURN + +- IF ( SIZE(Hwrk,1) == 1 ) THEN +- +- DO i=1,MIN(3,SIZE(Hwrk,2)) ++ IF ( n1==1 ) THEN ++ DO i=1,n2 + Tensor( i,1:n ) = Hwrk( 1,1,1:n ) + END DO +- + ELSE +- +- DO i=1,MIN(3,SIZE(Hwrk,1)) ++ DO i=1,n1 + Tensor( i,1:n ) = Hwrk( i,1,1:n ) + END DO +- + END IF + !------------------------------------------------------------------------------ + END SUBROUTINE InputVector +@@ -1127,7 +1127,6 @@ + + INTEGER :: i,j,k,l,n,t,DIM,En,Pn + LOGICAL :: stat, GotIt +-! REAL(KIND=dp), POINTER :: Hwrk(:,:,:) + + REAL(KIND=dp) :: Grad(3,3), Normal(3), EdgeLength, Jump, JumpReal, JumpImag, & + GradReal(3,3),GradImag(3,3) +@@ -1148,17 +1147,6 @@ + + TYPE(GaussIntegrationPoints_t), TARGET :: IntegStuff + +-! LOGICAL :: First = .TRUE. +-! SAVE Hwrk, First +-!------------------------------------------------------------------------------ +- +-! Initialize: +-! ----------- +- +-! IF ( First ) THEN +-! First = .FALSE. +-! NULLIFY( Hwrk ) +-! END IF + + SELECT CASE( CurrentCoordinateSystem() ) + CASE( AxisSymmetric, CylindricSymmetric ) +@@ -1361,20 +1349,20 @@ + Temperature, Pressure ) + !------------------------------------------------------------------------------ + +-contains ++ CONTAINS + + !------------------------------------------------------------------------------ + SUBROUTINE InputTensor( Tensor, IsScalar, Name, Material, n, NodeIndexes ) + !------------------------------------------------------------------------------ + REAL(KIND=dp) :: Tensor(:,:,:) +- INTEGER :: n, NodeIndexes(:) ++ INTEGER :: i, n, NodeIndexes(:) + LOGICAL :: IsScalar + CHARACTER(LEN=*) :: Name + TYPE(ValueList_t), POINTER :: Material + !------------------------------------------------------------------------------ + LOGICAL :: FirstTime = .TRUE., stat + REAL(KIND=dp), POINTER :: Hwrk(:,:,:) +- ++ INTEGER :: n1,n2 + SAVE FirstTime, Hwrk + !------------------------------------------------------------------------------ + IF ( FirstTime ) THEN +@@ -1385,30 +1373,27 @@ + Tensor = 0.0d0 + + CALL ListGetRealArray( Material, Name, Hwrk, n, NodeIndexes, stat ) +- IsScalar = SIZE(HWrk,1) == 1 .AND. SIZE(HWrk,2) == 1 + +- IF ( .NOT. stat ) RETURN ++ n1 = MIN(SIZE(HWrk,1),3) ++ n2 = MIN(SIZE(Hwrk,2),3) ++ IsScalar = (n1==1 .AND. n2==1) + +- IF ( SIZE(Hwrk,1) == 1 ) THEN ++ IF ( .NOT. stat ) RETURN + +- DO i=1,MIN(3,SIZE(Hwrk,2)) ++ IF ( n1 == 1 ) THEN ++ DO i=1,n2 + Tensor( i,i,1:n ) = Hwrk( 1,1,1:n ) + END DO +- +- ELSE IF ( SIZE(Hwrk,2) == 1 ) THEN +- +- DO i=1,MIN(3,SIZE(Hwrk,1)) ++ ELSE IF ( n2 == 1 ) THEN ++ DO i=1,n1 + Tensor(i,i,1:n) = Hwrk(i,1,1:n) + END DO +- + ELSE +- +- DO i=1,MIN(3,SIZE(Hwrk,1)) +- DO j=1,MIN(3,SIZE(Hwrk,2)) ++ DO i=1,n1 ++ DO j=1,n2 + Tensor( i,j,1:n ) = Hwrk(i,j,1:n) + END DO + END DO +- + END IF + !------------------------------------------------------------------------------ + END SUBROUTINE InputTensor +@@ -1419,14 +1404,14 @@ + SUBROUTINE InputVector( Tensor, IsScalar, Name, Material, n, NodeIndexes ) + !------------------------------------------------------------------------------ + REAL(KIND=dp) :: Tensor(:,:) +- INTEGER :: n, NodeIndexes(:) ++ INTEGER :: i, n, NodeIndexes(:) + LOGICAL :: IsScalar + CHARACTER(LEN=*) :: Name + TYPE(ValueList_t), POINTER :: Material + !------------------------------------------------------------------------------ + LOGICAL :: FirstTime = .TRUE., stat + REAL(KIND=dp), POINTER :: Hwrk(:,:,:) +- ++ INTEGER :: n1,n2 + SAVE FirstTime, Hwrk + !------------------------------------------------------------------------------ + IF ( FirstTime ) THEN +@@ -1437,22 +1422,20 @@ + Tensor = 0.0d0 + + CALL ListGetRealArray( Material, Name, Hwrk, n, NodeIndexes, stat ) +- IsScalar = SIZE(HWrk,1) == 1 .AND. SIZE(HWrk,2) == 1 ++ n1 = MIN(SIZE(HWrk,1),3) ++ n2 = MIN(SIZE(Hwrk,2),3) + ++ IsScalar = (n1==1 .AND. n2==1) + IF ( .NOT. stat ) RETURN + +- IF ( SIZE(Hwrk,1) == 1 ) THEN +- +- DO i=1,MIN(3,SIZE(Hwrk,2)) ++ IF ( n1 == 1 ) THEN ++ DO i=1,n2 + Tensor( i,1:n ) = Hwrk( 1,1,1:n ) + END DO +- + ELSE +- +- DO i=1,MIN(3,SIZE(Hwrk,1)) ++ DO i=1,n1 + Tensor( i,1:n ) = Hwrk( i,1,1:n ) + END DO +- + END IF + !------------------------------------------------------------------------------ + END SUBROUTINE InputVector +@@ -1497,9 +1480,6 @@ + LOGICAL :: notScalar = .TRUE. + TYPE( ValueList_t ), POINTER :: Material + TYPE(GaussIntegrationPoints_t), TARGET :: IntegStuff +- +-! LOGICAL :: First = .TRUE. +-! SAVE Hwrk, First + !------------------------------------------------------------------------------ + + ! Initialize: +@@ -1720,14 +1700,14 @@ + SUBROUTINE InputTensor( Tensor, IsScalar, Name, Material, n, NodeIndexes ) + !------------------------------------------------------------------------------ + REAL(KIND=dp) :: Tensor(:,:,:) +- INTEGER :: n, NodeIndexes(:) ++ INTEGER :: i, n, NodeIndexes(:) + LOGICAL :: IsScalar + CHARACTER(LEN=*) :: Name + TYPE(ValueList_t), POINTER :: Material + !------------------------------------------------------------------------------ + LOGICAL :: FirstTime = .TRUE., stat + REAL(KIND=dp), POINTER :: Hwrk(:,:,:) +- ++ INTEGER :: n1,n2 + SAVE FirstTime, Hwrk + !------------------------------------------------------------------------------ + IF ( FirstTime ) THEN +@@ -1738,30 +1718,27 @@ + Tensor = 0.0d0 + + CALL ListGetRealArray( Material, Name, Hwrk, n, NodeIndexes, stat ) +- IsScalar = SIZE(HWrk,1) == 1 .AND. SIZE(HWrk,2) == 1 +- +- IF ( .NOT. stat ) RETURN + +- IF ( SIZE(Hwrk,1) == 1 ) THEN ++ n1 = MIN(SIZE(HWrk,1),3) ++ n2 = MIN(SIZE(HWrk,2),3) ++ IsScalar = (n1==1 .AND. n2==1) + +- DO i=1,MIN(3,SIZE(Hwrk,2)) ++ IF ( .NOT. stat ) RETURN ++ ++ IF ( n1 == 1 ) THEN ++ DO i=1,n2 + Tensor( i,i,1:n ) = Hwrk( 1,1,1:n ) + END DO +- +- ELSE IF ( SIZE(Hwrk,2) == 1 ) THEN +- +- DO i=1,MIN(3,SIZE(Hwrk,1)) ++ ELSE IF ( n2 == 1 ) THEN ++ DO i=1,n1 + Tensor(i,i,1:n) = Hwrk(i,1,1:n) + END DO +- + ELSE +- +- DO i=1,MIN(3,SIZE(Hwrk,1)) +- DO j=1,MIN(3,SIZE(Hwrk,2)) ++ DO i=1,n1 ++ DO j=1,n2 + Tensor( i,j,1:n ) = Hwrk(i,j,1:n) + END DO + END DO +- + END IF + !------------------------------------------------------------------------------ + END SUBROUTINE InputTensor +@@ -1772,14 +1749,14 @@ + SUBROUTINE InputVector( Tensor, IsScalar, Name, Material, n, NodeIndexes ) + !------------------------------------------------------------------------------ + REAL(KIND=dp) :: Tensor(:,:) +- INTEGER :: n, NodeIndexes(:) ++ INTEGER :: i, n, NodeIndexes(:) + LOGICAL :: IsScalar + CHARACTER(LEN=*) :: Name + TYPE(ValueList_t), POINTER :: Material + !------------------------------------------------------------------------------ + LOGICAL :: FirstTime = .TRUE., stat + REAL(KIND=dp), POINTER :: Hwrk(:,:,:) +- ++ INTEGER :: n1, n2 + SAVE FirstTime, Hwrk + !------------------------------------------------------------------------------ + IF ( FirstTime ) THEN +@@ -1790,22 +1767,20 @@ + Tensor = 0.0d0 + + CALL ListGetRealArray( Material, Name, Hwrk, n, NodeIndexes, stat ) +- IsScalar = SIZE(HWrk,1) == 1 .AND. SIZE(HWrk,2) == 1 ++ n1 = MIN(SIZE(HWrk,1),3) ++ n2 = MIN(SIZE(HWrk,2),3) + ++ IsScalar = (n1 == 1 .AND. n2 == 1 ) + IF ( .NOT. stat ) RETURN + +- IF ( SIZE(Hwrk,1) == 1 ) THEN +- +- DO i=1,MIN(3,SIZE(Hwrk,2)) ++ IF ( n1 == 1 ) THEN ++ DO i=1,n2 + Tensor( i,1:n ) = Hwrk( 1,1,1:n ) + END DO +- + ELSE +- +- DO i=1,MIN(3,SIZE(Hwrk,1)) ++ DO i=1,n1 + Tensor( i,1:n ) = Hwrk( i,1,1:n ) + END DO +- + END IF + !------------------------------------------------------------------------------ + END SUBROUTINE InputVector