From a7490609598b5c512acc31cb1127f54560dc4277 Mon Sep 17 00:00:00 2001 From: shion <106575883+shishiousan@users.noreply.github.com> Date: Wed, 10 Jan 2024 17:04:10 +0900 Subject: [PATCH 01/10] Updates in ReferenceElement_Method - fixing the issue #276 --- .../ReferenceElement_Method@FacetElementMethods.F90 | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/src/submodules/Geometry/src/ReferenceElement_Method@FacetElementMethods.F90 b/src/submodules/Geometry/src/ReferenceElement_Method@FacetElementMethods.F90 index 0dac0c05..cbc1c5da 100644 --- a/src/submodules/Geometry/src/ReferenceElement_Method@FacetElementMethods.F90 +++ b/src/submodules/Geometry/src/ReferenceElement_Method@FacetElementMethods.F90 @@ -106,10 +106,13 @@ !---------------------------------------------------------------------------- MODULE PROCEDURE refelem_FacetElements_Line -INTEGER(I4B) :: ii +INTEGER(I4B) :: ii, tFacet, xiCell, INTEGER(I4B) :: nptrs(1) -DO ii = 1, 2 +xiCell = refelem%xiDimension +tFacet = refelem%entityCounts(xicell) + +DO ii = 1, tFacet nptrs = refelem%topology(ii)%nptrs ans(ii)%xij = refelem%xij(:, nptrs) ans(ii)%entityCounts = [1, 0, 0, 0] @@ -131,7 +134,7 @@ MODULE PROCEDURE refelem_FacetElements_Surface INTEGER(I4B) :: tFacet, ii, xiCell, T(4), istart, iend, tsize, jj -INTEGER(I4B) :: nptrs(2) +INTEGER(I4B), ALLOCATABLE :: nptrs(:) TYPE(Referencetopology_) :: topo xiCell = refelem%xiDimension @@ -159,7 +162,7 @@ ans(ii)%Order = ElementOrder(elemType=topo%name) ans(ii)%NSD = refelem%nsd - ans(ii)%entityCounts = [2, 1, 0, 0] + ans(ii)%entityCounts = [SIZE(nptrs), 1, 0, 0] tsize = SIZE(nptrs) + 1 ALLOCATE (ans(ii)%topology(tsize)) @@ -170,6 +173,7 @@ ans(ii)%topology(tsize) = Referencetopology(nptrs=nptrs, name=ans(ii)%name) + DEALLOCATE (nptrs) END DO END PROCEDURE refelem_FacetElements_Surface From 702b5858c58b732b8faa54784aff454d482799b9 Mon Sep 17 00:00:00 2001 From: shion <106575883+shishiousan@users.noreply.github.com> Date: Wed, 10 Jan 2024 20:13:28 +0900 Subject: [PATCH 02/10] Updates in ReferenceElement_Method - minor change --- .../src/ReferenceElement_Method@FacetElementMethods.F90 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/submodules/Geometry/src/ReferenceElement_Method@FacetElementMethods.F90 b/src/submodules/Geometry/src/ReferenceElement_Method@FacetElementMethods.F90 index cbc1c5da..331c4ba1 100644 --- a/src/submodules/Geometry/src/ReferenceElement_Method@FacetElementMethods.F90 +++ b/src/submodules/Geometry/src/ReferenceElement_Method@FacetElementMethods.F90 @@ -106,7 +106,7 @@ !---------------------------------------------------------------------------- MODULE PROCEDURE refelem_FacetElements_Line -INTEGER(I4B) :: ii, tFacet, xiCell, +INTEGER(I4B) :: ii, tFacet, xiCell INTEGER(I4B) :: nptrs(1) xiCell = refelem%xiDimension From d0657451afb61789d7b1970b3892d0166c8df266 Mon Sep 17 00:00:00 2001 From: Vikas Sharma Date: Mon, 15 Jan 2024 16:23:36 +0900 Subject: [PATCH 03/10] Update ElemshapeData_ConstructorMethods@Methods.F90 --- .../src/ElemshapeData_ConstructorMethods@Methods.F90 | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/submodules/ElemshapeData/src/ElemshapeData_ConstructorMethods@Methods.F90 b/src/submodules/ElemshapeData/src/ElemshapeData_ConstructorMethods@Methods.F90 index f4cd4606..6c88af6d 100755 --- a/src/submodules/ElemshapeData/src/ElemshapeData_ConstructorMethods@Methods.F90 +++ b/src/submodules/ElemshapeData/src/ElemshapeData_ConstructorMethods@Methods.F90 @@ -307,8 +307,15 @@ MODULE PROCEDURE stsd_initiate INTEGER(I4B) :: tip, ip REAL(DFP) :: x(3) + tip = SIZE(elemsd%N, 2) -IF (ALLOCATED(obj)) DEALLOCATE (obj) +IF (ALLOCATED(obj)) THEN + DO ip = 1, SIZE(obj) + CALL DEALLOCATE (obj(ip)) + END DO + DEALLOCATE (obj) +END IF + ALLOCATE (obj(tip)) DO ip = 1, tip obj(ip)%T = elemsd%N(:, ip) From e5534703ba62a4da0ae96a7c37f01ea65193439d Mon Sep 17 00:00:00 2001 From: Vikas Sharma Date: Mon, 15 Jan 2024 16:23:39 +0900 Subject: [PATCH 04/10] Update ElemshapeData_H1Methods@LagrangeMethods.F90 --- .../src/H1/ElemshapeData_H1Methods@LagrangeMethods.F90 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/submodules/ElemshapeData/src/H1/ElemshapeData_H1Methods@LagrangeMethods.F90 b/src/submodules/ElemshapeData/src/H1/ElemshapeData_H1Methods@LagrangeMethods.F90 index aa1f4a86..39cc8ade 100644 --- a/src/submodules/ElemshapeData/src/H1/ElemshapeData_H1Methods@LagrangeMethods.F90 +++ b/src/submodules/ElemshapeData/src/H1/ElemshapeData_H1Methods@LagrangeMethods.F90 @@ -32,7 +32,7 @@ ipType0 = Input(default=Equidistance, option=ipType) basisType0 = Input(default=Monomial, option=basisType) -CALL DEALLOCATE (obj) +! CALL DEALLOCATE (obj) CALL Initiate(obj%refelem, refelem) nsd = refelem%nsd xidim = refelem%xiDimension From b6aecb43edd9dd394397fad4e047b7d4ba7741a1 Mon Sep 17 00:00:00 2001 From: Vikas Sharma Date: Mon, 15 Jan 2024 16:23:41 +0900 Subject: [PATCH 05/10] Update STMassMatrix_Method@Methods.F90 --- .../src/STMassMatrix_Method@Methods.F90 | 1861 ++++++++--------- 1 file changed, 921 insertions(+), 940 deletions(-) diff --git a/src/submodules/STMassMatrix/src/STMassMatrix_Method@Methods.F90 b/src/submodules/STMassMatrix/src/STMassMatrix_Method@Methods.F90 index dfa4c83a..78aa30ae 100644 --- a/src/submodules/STMassMatrix/src/STMassMatrix_Method@Methods.F90 +++ b/src/submodules/STMassMatrix/src/STMassMatrix_Method@Methods.F90 @@ -46,8 +46,8 @@ PURE SUBROUTINE STMM_1(ans, test, trial, term1, term2, opt) & trial(ipt)%wt * trial(ipt)%jt DO ips = 1, SIZE(realval) IaJb = IaJb + realval(ips) * OUTERPROD( & - & OUTERPROD(test(ipt)%N(:,ips), test(ipt)%T), & - & OUTERPROD(trial(ipt)%N(:,ips), trial(ipt)%T)) + & OUTERPROD(test(ipt)%N(:, ips), test(ipt)%T), & + & OUTERPROD(trial(ipt)%N(:, ips), trial(ipt)%T)) END DO END DO CALL SWAP(a=ans, b=IaJb, i1=1, i2=3, i3=2, i4=4) @@ -82,8 +82,8 @@ PURE SUBROUTINE STMM_2(ans, test, trial, term1, term2, opt) & trial(ipt)%wt * trial(ipt)%jt DO ips = 1, SIZE(realval) iajb = iajb + realval(ips) * OUTERPROD( & - & test(ipt)%dNTdt(:,:,ips), & - & OUTERPROD(trial(ipt)%N(:,ips), trial(ipt)%T)) + & test(ipt)%dNTdt(:, :, ips), & + & OUTERPROD(trial(ipt)%N(:, ips), trial(ipt)%T)) END DO END DO CALL SWAP(a=ans, b=iajb, i1=1, i2=3, i3=2, i4=4) @@ -92,7 +92,6 @@ PURE SUBROUTINE STMM_2(ans, test, trial, term1, term2, opt) END SUBROUTINE STMM_2 - !---------------------------------------------------------------------------- ! !---------------------------------------------------------------------------- @@ -120,8 +119,8 @@ PURE SUBROUTINE STMM_3(ans, test, trial, term1, term2, opt) & trial(ipt)%wt * trial(ipt)%jt DO ips = 1, SIZE(realval) iajb = iajb + realval(ips) * OUTERPROD( & - & OUTERPROD(test(ipt)%N(:,ips), test(ipt)%T), & - & trial(ipt)%dNTdt(:,:,ips)) + & OUTERPROD(test(ipt)%N(:, ips), test(ipt)%T), & + & trial(ipt)%dNTdt(:, :, ips)) END DO END DO @@ -133,7 +132,6 @@ PURE SUBROUTINE STMM_3(ans, test, trial, term1, term2, opt) END SUBROUTINE STMM_3 - !---------------------------------------------------------------------------- ! !---------------------------------------------------------------------------- @@ -1189,7 +1187,6 @@ END SUBROUTINE STMM_11d ! !---------------------------------------------------------------------------- - !---------------------------------------------------------------------------- ! !---------------------------------------------------------------------------- @@ -1199,60 +1196,60 @@ END SUBROUTINE STMM_11d #define _DIM2_ 1 PURE SUBROUTINE STMM_12a(ans, test, trial, term1, term2, rho) -REAL(DFP), ALLOCATABLE, INTENT(INOUT) :: ans(:, :, :, :) -CLASS(STElemshapeData_), INTENT(IN) :: test(:) -CLASS(STElemshapeData_), INTENT(IN) :: trial(:) -INTEGER(I4B), INTENT(IN) :: term1 + REAL(DFP), ALLOCATABLE, INTENT(INOUT) :: ans(:, :, :, :) + CLASS(STElemshapeData_), INTENT(IN) :: test(:) + CLASS(STElemshapeData_), INTENT(IN) :: trial(:) + INTEGER(I4B), INTENT(IN) :: term1 !! del_t -INTEGER(I4B), INTENT(IN) :: term2 + INTEGER(I4B), INTENT(IN) :: term2 !! del_t -CLASS(FEVariable_), INTENT(IN) :: rho + CLASS(FEVariable_), INTENT(IN) :: rho !! vector !! !! Internal variable -REAL(DFP), ALLOCATABLE :: m6(:, :, :, :, :, :) -REAL(DFP), ALLOCATABLE :: vbar(:, :, :) -REAL(DFP), ALLOCATABLE :: ij(:, :) -REAL(DFP), ALLOCATABLE :: realval(:) -INTEGER(I4B) :: ipt, ips, a, b + REAL(DFP), ALLOCATABLE :: m6(:, :, :, :, :, :) + REAL(DFP), ALLOCATABLE :: vbar(:, :, :) + REAL(DFP), ALLOCATABLE :: ij(:, :) + REAL(DFP), ALLOCATABLE :: realval(:) + INTEGER(I4B) :: ipt, ips, a, b !! !! main !! -CALL getInterpolation(obj=trial, interpol=vbar, val=rho) + CALL getInterpolation(obj=trial, interpol=vbar, val=rho) !! -CALL Reallocate(m6, & - & SIZE(test(1)%N, 1), & - & SIZE(trial(1)%N, 1), & - & _DIM1_, _DIM2_, & - & SIZE(test(1)%T), & - & SIZE(trial(1)%T)) + CALL Reallocate(m6, & + & SIZE(test(1)%N, 1), & + & SIZE(trial(1)%N, 1), & + & _DIM1_, _DIM2_, & + & SIZE(test(1)%T), & + & SIZE(trial(1)%T)) !! -DO ipt = 1, SIZE(trial) + DO ipt = 1, SIZE(trial) !! - realval = trial(ipt)%js * trial(ipt)%ws * trial(ipt)%thickness * & - & trial(ipt)%wt * trial(ipt)%jt + realval = trial(ipt)%js * trial(ipt)%ws * trial(ipt)%thickness * & + & trial(ipt)%wt * trial(ipt)%jt !! - DO ips = 1, SIZE(realval) + DO ips = 1, SIZE(realval) !! - ij = _KIJ_ + ij = _KIJ_ !! - DO b = 1, SIZE(m6, 6) - DO a = 1, SIZE(m6, 5) - m6(:, :, :, :, a, b) = m6(:, :, :, :, a, b) & - & + realval(ips) & - & * outerprod( & - & test(ipt)%dNTdt(:,a, ips), & - & trial(ipt)%dNTdt(:,b, ips), & - & ij ) + DO b = 1, SIZE(m6, 6) + DO a = 1, SIZE(m6, 5) + m6(:, :, :, :, a, b) = m6(:, :, :, :, a, b) & + & + realval(ips) & + & * outerprod( & + & test(ipt)%dNTdt(:, a, ips), & + & trial(ipt)%dNTdt(:, b, ips), & + & ij) + END DO END DO - END DO !! + END DO END DO -END DO !! -CALL Convert(from=m6, to=ans) -DEALLOCATE (m6, ij, vbar, realval) + CALL Convert(from=m6, to=ans) + DEALLOCATE (m6, ij, vbar, realval) END SUBROUTINE STMM_12a #undef _DIM1_ @@ -1268,67 +1265,66 @@ END SUBROUTINE STMM_12a #define _DIM2_ SIZE(vbar, 1) PURE SUBROUTINE STMM_12b(ans, test, trial, term1, term2, rho) -REAL(DFP), ALLOCATABLE, INTENT(INOUT) :: ans(:, :, :, :) -CLASS(STElemshapeData_), INTENT(IN) :: test(:) -CLASS(STElemshapeData_), INTENT(IN) :: trial(:) -INTEGER(I4B), INTENT(IN) :: term1 + REAL(DFP), ALLOCATABLE, INTENT(INOUT) :: ans(:, :, :, :) + CLASS(STElemshapeData_), INTENT(IN) :: test(:) + CLASS(STElemshapeData_), INTENT(IN) :: trial(:) + INTEGER(I4B), INTENT(IN) :: term1 !! del_t -INTEGER(I4B), INTENT(IN) :: term2 + INTEGER(I4B), INTENT(IN) :: term2 !! del_t -CLASS(FEVariable_), INTENT(IN) :: rho + CLASS(FEVariable_), INTENT(IN) :: rho !! vector !! !! Internal variable -REAL(DFP), ALLOCATABLE :: m6(:, :, :, :, :, :) -REAL(DFP), ALLOCATABLE :: vbar(:, :, :) -REAL(DFP), ALLOCATABLE :: ij(:, :) -REAL(DFP), ALLOCATABLE :: realval(:) -INTEGER(I4B) :: ipt, ips, a, b + REAL(DFP), ALLOCATABLE :: m6(:, :, :, :, :, :) + REAL(DFP), ALLOCATABLE :: vbar(:, :, :) + REAL(DFP), ALLOCATABLE :: ij(:, :) + REAL(DFP), ALLOCATABLE :: realval(:) + INTEGER(I4B) :: ipt, ips, a, b !! !! main !! -CALL getInterpolation(obj=trial, interpol=vbar, val=rho) + CALL getInterpolation(obj=trial, interpol=vbar, val=rho) !! -CALL Reallocate(m6, & - & SIZE(test(1)%N, 1), & - & SIZE(trial(1)%N, 1), & - & _DIM1_, _DIM2_, & - & SIZE(test(1)%T), & - & SIZE(trial(1)%T)) + CALL Reallocate(m6, & + & SIZE(test(1)%N, 1), & + & SIZE(trial(1)%N, 1), & + & _DIM1_, _DIM2_, & + & SIZE(test(1)%T), & + & SIZE(trial(1)%T)) !! -DO ipt = 1, SIZE(trial) + DO ipt = 1, SIZE(trial) !! - realval = trial(ipt)%js * trial(ipt)%ws * trial(ipt)%thickness * & - & trial(ipt)%wt * trial(ipt)%jt + realval = trial(ipt)%js * trial(ipt)%ws * trial(ipt)%thickness * & + & trial(ipt)%wt * trial(ipt)%jt !! - DO ips = 1, SIZE(realval) + DO ips = 1, SIZE(realval) !! - ij = _KIJ_ + ij = _KIJ_ !! - DO b = 1, SIZE(m6, 6) - DO a = 1, SIZE(m6, 5) - m6(:, :, :, :, a, b) = m6(:, :, :, :, a, b) & - & + realval(ips) & - & * outerprod( & - & test(ipt)%dNTdt(:,a, ips), & - & trial(ipt)%dNTdt(:,b, ips), & - & ij ) + DO b = 1, SIZE(m6, 6) + DO a = 1, SIZE(m6, 5) + m6(:, :, :, :, a, b) = m6(:, :, :, :, a, b) & + & + realval(ips) & + & * outerprod( & + & test(ipt)%dNTdt(:, a, ips), & + & trial(ipt)%dNTdt(:, b, ips), & + & ij) + END DO END DO - END DO !! + END DO END DO -END DO !! -CALL Convert(from=m6, to=ans) -DEALLOCATE (m6, ij, vbar, realval) + CALL Convert(from=m6, to=ans) + DEALLOCATE (m6, ij, vbar, realval) END SUBROUTINE STMM_12b #undef _DIM1_ #undef _DIM2_ #undef _KIJ_ - !---------------------------------------------------------------------------- ! !---------------------------------------------------------------------------- @@ -1338,60 +1334,60 @@ END SUBROUTINE STMM_12b #define _DIM2_ SIZE(vbar, 1) PURE SUBROUTINE STMM_12c(ans, test, trial, term1, term2, rho) -REAL(DFP), ALLOCATABLE, INTENT(INOUT) :: ans(:, :, :, :) -CLASS(STElemshapeData_), INTENT(IN) :: test(:) -CLASS(STElemshapeData_), INTENT(IN) :: trial(:) -INTEGER(I4B), INTENT(IN) :: term1 + REAL(DFP), ALLOCATABLE, INTENT(INOUT) :: ans(:, :, :, :) + CLASS(STElemshapeData_), INTENT(IN) :: test(:) + CLASS(STElemshapeData_), INTENT(IN) :: trial(:) + INTEGER(I4B), INTENT(IN) :: term1 !! del_t -INTEGER(I4B), INTENT(IN) :: term2 + INTEGER(I4B), INTENT(IN) :: term2 !! del_t -CLASS(FEVariable_), INTENT(IN) :: rho + CLASS(FEVariable_), INTENT(IN) :: rho !! vector !! !! Internal variable -REAL(DFP), ALLOCATABLE :: m6(:, :, :, :, :, :) -REAL(DFP), ALLOCATABLE :: vbar(:, :, :) -REAL(DFP), ALLOCATABLE :: ij(:, :) -REAL(DFP), ALLOCATABLE :: realval(:) -INTEGER(I4B) :: ipt, ips, a, b + REAL(DFP), ALLOCATABLE :: m6(:, :, :, :, :, :) + REAL(DFP), ALLOCATABLE :: vbar(:, :, :) + REAL(DFP), ALLOCATABLE :: ij(:, :) + REAL(DFP), ALLOCATABLE :: realval(:) + INTEGER(I4B) :: ipt, ips, a, b !! !! main !! -CALL getInterpolation(obj=trial, interpol=vbar, val=rho) + CALL getInterpolation(obj=trial, interpol=vbar, val=rho) !! -CALL Reallocate(m6, & - & SIZE(test(1)%N, 1), & - & SIZE(trial(1)%N, 1), & - & _DIM1_, _DIM2_, & - & SIZE(test(1)%T), & - & SIZE(trial(1)%T)) + CALL Reallocate(m6, & + & SIZE(test(1)%N, 1), & + & SIZE(trial(1)%N, 1), & + & _DIM1_, _DIM2_, & + & SIZE(test(1)%T), & + & SIZE(trial(1)%T)) !! -DO ipt = 1, SIZE(trial) + DO ipt = 1, SIZE(trial) !! - realval = trial(ipt)%js * trial(ipt)%ws * trial(ipt)%thickness * & - & trial(ipt)%wt * trial(ipt)%jt + realval = trial(ipt)%js * trial(ipt)%ws * trial(ipt)%thickness * & + & trial(ipt)%wt * trial(ipt)%jt !! - DO ips = 1, SIZE(realval) + DO ips = 1, SIZE(realval) !! - ij = _KIJ_ + ij = _KIJ_ !! - DO b = 1, SIZE(m6, 6) - DO a = 1, SIZE(m6, 5) - m6(:, :, :, :, a, b) = m6(:, :, :, :, a, b) & - & + realval(ips) & - & * outerprod( & - & test(ipt)%dNTdt(:,a, ips), & - & trial(ipt)%dNTdt(:,b, ips), & - & ij ) + DO b = 1, SIZE(m6, 6) + DO a = 1, SIZE(m6, 5) + m6(:, :, :, :, a, b) = m6(:, :, :, :, a, b) & + & + realval(ips) & + & * outerprod( & + & test(ipt)%dNTdt(:, a, ips), & + & trial(ipt)%dNTdt(:, b, ips), & + & ij) + END DO END DO - END DO !! + END DO END DO -END DO !! -CALL Convert(from=m6, to=ans) -DEALLOCATE (m6, ij, vbar, realval) + CALL Convert(from=m6, to=ans) + DEALLOCATE (m6, ij, vbar, realval) END SUBROUTINE STMM_12c #undef _DIM1_ @@ -1407,187 +1403,182 @@ END SUBROUTINE STMM_12c #define _DIM2_ SIZE(vbar, 1) PURE SUBROUTINE STMM_12d(ans, test, trial, term1, term2, rho) -REAL(DFP), ALLOCATABLE, INTENT(INOUT) :: ans(:, :, :, :) -CLASS(STElemshapeData_), INTENT(IN) :: test(:) -CLASS(STElemshapeData_), INTENT(IN) :: trial(:) -INTEGER(I4B), INTENT(IN) :: term1 + REAL(DFP), ALLOCATABLE, INTENT(INOUT) :: ans(:, :, :, :) + CLASS(STElemshapeData_), INTENT(IN) :: test(:) + CLASS(STElemshapeData_), INTENT(IN) :: trial(:) + INTEGER(I4B), INTENT(IN) :: term1 !! del_t -INTEGER(I4B), INTENT(IN) :: term2 + INTEGER(I4B), INTENT(IN) :: term2 !! del_t -CLASS(FEVariable_), INTENT(IN) :: rho + CLASS(FEVariable_), INTENT(IN) :: rho !! vector !! !! Internal variable -REAL(DFP), ALLOCATABLE :: m6(:, :, :, :, :, :) -REAL(DFP), ALLOCATABLE :: vbar(:, :, :) -REAL(DFP), ALLOCATABLE :: ij(:, :) -REAL(DFP), ALLOCATABLE :: realval(:) -INTEGER(I4B) :: ipt, ips, a, b + REAL(DFP), ALLOCATABLE :: m6(:, :, :, :, :, :) + REAL(DFP), ALLOCATABLE :: vbar(:, :, :) + REAL(DFP), ALLOCATABLE :: ij(:, :) + REAL(DFP), ALLOCATABLE :: realval(:) + INTEGER(I4B) :: ipt, ips, a, b !! !! main !! -CALL getInterpolation(obj=trial, interpol=vbar, val=rho) + CALL getInterpolation(obj=trial, interpol=vbar, val=rho) !! -CALL Reallocate(m6, & - & SIZE(test(1)%N, 1), & - & SIZE(trial(1)%N, 1), & - & _DIM1_, _DIM2_, & - & SIZE(test(1)%T), & - & SIZE(trial(1)%T)) + CALL Reallocate(m6, & + & SIZE(test(1)%N, 1), & + & SIZE(trial(1)%N, 1), & + & _DIM1_, _DIM2_, & + & SIZE(test(1)%T), & + & SIZE(trial(1)%T)) !! -DO ipt = 1, SIZE(trial) + DO ipt = 1, SIZE(trial) !! - realval = trial(ipt)%js * trial(ipt)%ws * trial(ipt)%thickness * & - & trial(ipt)%wt * trial(ipt)%jt + realval = trial(ipt)%js * trial(ipt)%ws * trial(ipt)%thickness * & + & trial(ipt)%wt * trial(ipt)%jt !! - DO ips = 1, SIZE(realval) + DO ips = 1, SIZE(realval) !! - ij = _KIJ_ + ij = _KIJ_ !! - DO b = 1, SIZE(m6, 6) - DO a = 1, SIZE(m6, 5) - m6(:, :, :, :, a, b) = m6(:, :, :, :, a, b) & - & + realval(ips) & - & * outerprod( & - & test(ipt)%dNTdt(:,a, ips), & - & trial(ipt)%dNTdt(:,b, ips), & - & ij ) + DO b = 1, SIZE(m6, 6) + DO a = 1, SIZE(m6, 5) + m6(:, :, :, :, a, b) = m6(:, :, :, :, a, b) & + & + realval(ips) & + & * outerprod( & + & test(ipt)%dNTdt(:, a, ips), & + & trial(ipt)%dNTdt(:, b, ips), & + & ij) + END DO END DO - END DO !! + END DO END DO -END DO !! -CALL Convert(from=m6, to=ans) -DEALLOCATE (m6, ij, vbar, realval) + CALL Convert(from=m6, to=ans) + DEALLOCATE (m6, ij, vbar, realval) END SUBROUTINE STMM_12d #undef _DIM1_ #undef _DIM2_ #undef _KIJ_ - !---------------------------------------------------------------------------- ! !---------------------------------------------------------------------------- PURE SUBROUTINE STMM_13(ans, test, trial, term1, term2, rho) -REAL(DFP), ALLOCATABLE, INTENT(INOUT) :: ans(:, :, :, :) -CLASS(STElemshapeData_), INTENT(IN) :: test(:) -CLASS(STElemshapeData_), INTENT(IN) :: trial(:) -INTEGER(I4B), INTENT(IN) :: term1 + REAL(DFP), ALLOCATABLE, INTENT(INOUT) :: ans(:, :, :, :) + CLASS(STElemshapeData_), INTENT(IN) :: test(:) + CLASS(STElemshapeData_), INTENT(IN) :: trial(:) + INTEGER(I4B), INTENT(IN) :: term1 !! del_none -INTEGER(I4B), INTENT(IN) :: term2 + INTEGER(I4B), INTENT(IN) :: term2 !! del_none -CLASS(FEVariable_), INTENT(IN) :: rho + CLASS(FEVariable_), INTENT(IN) :: rho !! matrix !! !! Internal variable -REAL(DFP), ALLOCATABLE :: m6(:, :, :, :, :, :) -REAL(DFP), ALLOCATABLE :: kbar(:, :, :, :) -REAL(DFP), ALLOCATABLE :: realval(:) -INTEGER(I4B) :: ipt, ips, a, b + REAL(DFP), ALLOCATABLE :: m6(:, :, :, :, :, :) + REAL(DFP), ALLOCATABLE :: kbar(:, :, :, :) + REAL(DFP), ALLOCATABLE :: realval(:) + INTEGER(I4B) :: ipt, ips, a, b !! !! main !! -CALL getInterpolation(obj=trial, interpol=kbar, val=rho) + CALL getInterpolation(obj=trial, interpol=kbar, val=rho) !! -CALL Reallocate(m6, & - & SIZE(test(1)%N, 1), & - & SIZE(trial(1)%N, 1), & - & SIZE(kbar,1), SIZE(kbar,2), & - & SIZE(test(1)%T), & - & SIZE(trial(1)%T)) + CALL Reallocate(m6, & + & SIZE(test(1)%N, 1), & + & SIZE(trial(1)%N, 1), & + & SIZE(kbar, 1), SIZE(kbar, 2), & + & SIZE(test(1)%T), & + & SIZE(trial(1)%T)) !! -DO ipt = 1, SIZE(trial) + DO ipt = 1, SIZE(trial) !! - realval = trial(ipt)%js * trial(ipt)%ws * trial(ipt)%thickness * & - & trial(ipt)%wt * trial(ipt)%jt + realval = trial(ipt)%js * trial(ipt)%ws * trial(ipt)%thickness * & + & trial(ipt)%wt * trial(ipt)%jt !! - DO ips = 1, SIZE(realval) + DO ips = 1, SIZE(realval) !! - m6 = m6 + realval( ips ) * outerprod( & - & outerprod(test(ipt)%N(:, ips), & - & trial(ipt)%N(:, ips)), & - & kbar(:,:,ips, ipt) , & - & test(ipt)%T, & - & trial(ipt)%T) + m6 = m6 + realval(ips) * outerprod( & + & outerprod(test(ipt)%N(:, ips), & + & trial(ipt)%N(:, ips)), & + & kbar(:, :, ips, ipt), & + & test(ipt)%T, & + & trial(ipt)%T) + END DO END DO -END DO !! -CALL Convert(from=m6, to=ans) -DEALLOCATE (m6, kbar, realval) + CALL Convert(from=m6, to=ans) + DEALLOCATE (m6, kbar, realval) !! END SUBROUTINE STMM_13 - - !---------------------------------------------------------------------------- ! !---------------------------------------------------------------------------- PURE SUBROUTINE STMM_14(ans, test, trial, term1, term2, rho) -REAL(DFP), ALLOCATABLE, INTENT(INOUT) :: ans(:, :, :, :) -CLASS(STElemshapeData_), INTENT(IN) :: test(:) -CLASS(STElemshapeData_), INTENT(IN) :: trial(:) -INTEGER(I4B), INTENT(IN) :: term1 + REAL(DFP), ALLOCATABLE, INTENT(INOUT) :: ans(:, :, :, :) + CLASS(STElemshapeData_), INTENT(IN) :: test(:) + CLASS(STElemshapeData_), INTENT(IN) :: trial(:) + INTEGER(I4B), INTENT(IN) :: term1 !! del_t -INTEGER(I4B), INTENT(IN) :: term2 + INTEGER(I4B), INTENT(IN) :: term2 !! del_none -CLASS(FEVariable_), INTENT(IN) :: rho + CLASS(FEVariable_), INTENT(IN) :: rho !! matrix !! !! Internal variable -REAL(DFP), ALLOCATABLE :: m6(:, :, :, :, :, :) -REAL(DFP), ALLOCATABLE :: IJija(:, :, :, :, :) -REAL(DFP), ALLOCATABLE :: kbar(:, :, :, :) -REAL(DFP), ALLOCATABLE :: Jij(:, :, :) -REAL(DFP), ALLOCATABLE :: realval(:) -INTEGER(I4B) :: ipt, ips, a, b + REAL(DFP), ALLOCATABLE :: m6(:, :, :, :, :, :) + REAL(DFP), ALLOCATABLE :: IJija(:, :, :, :, :) + REAL(DFP), ALLOCATABLE :: kbar(:, :, :, :) + REAL(DFP), ALLOCATABLE :: Jij(:, :, :) + REAL(DFP), ALLOCATABLE :: realval(:) + INTEGER(I4B) :: ipt, ips, a, b !! !! main !! -CALL getInterpolation(obj=trial, interpol=kbar, val=rho) + CALL getInterpolation(obj=trial, interpol=kbar, val=rho) !! -CALL Reallocate(m6, & - & SIZE(test(1)%N, 1), & - & SIZE(trial(1)%N, 1), & - & SIZE(kbar,1), SIZE(kbar,2), & - & SIZE(test(1)%T), & - & SIZE(trial(1)%T)) + CALL Reallocate(m6, & + & SIZE(test(1)%N, 1), & + & SIZE(trial(1)%N, 1), & + & SIZE(kbar, 1), SIZE(kbar, 2), & + & SIZE(test(1)%T), & + & SIZE(trial(1)%T)) !! -CALL Reallocate(IJija, & - & SIZE(test(1)%N, 1), & - & SIZE(trial(1)%N, 1), & - & SIZE(m6,3), SIZE(m6,4), & - & SIZE(test(1)%T)) + CALL Reallocate(IJija, & + & SIZE(test(1)%N, 1), & + & SIZE(trial(1)%N, 1), & + & SIZE(m6, 3), SIZE(m6, 4), & + & SIZE(test(1)%T)) !! -DO ipt = 1, SIZE(trial) + DO ipt = 1, SIZE(trial) !! - realval = trial(ipt)%js * trial(ipt)%ws * trial(ipt)%thickness * & - & trial(ipt)%wt * trial(ipt)%jt + realval = trial(ipt)%js * trial(ipt)%ws * trial(ipt)%thickness * & + & trial(ipt)%wt * trial(ipt)%jt !! - DO ips = 1, SIZE(realval) + DO ips = 1, SIZE(realval) !! - Jij = OUTERPROD( trial(ipt)%N(:, ips), kbar(:,:,ips,ipt) ) + Jij = OUTERPROD(trial(ipt)%N(:, ips), kbar(:, :, ips, ipt)) !! - DO a = 1, SIZE(m6, 5) - IJija(:, :, :, :, a) = outerprod(test(ipt)%dNTdt(:, a, ips), Jij) - END DO + DO a = 1, SIZE(m6, 5) + IJija(:, :, :, :, a) = outerprod(test(ipt)%dNTdt(:, a, ips), Jij) + END DO !! - m6 = m6 + realval(ips) * outerprod(IJija, trial(ipt)%T) + m6 = m6 + realval(ips) * outerprod(IJija, trial(ipt)%T) !! + END DO END DO -END DO !! -CALL Convert(from=m6, to=ans) + CALL Convert(from=m6, to=ans) !! -DEALLOCATE (m6, IJija, kbar, Jij, realval) + DEALLOCATE (m6, IJija, kbar, Jij, realval) !! END SUBROUTINE STMM_14 - - !---------------------------------------------------------------------------- ! !---------------------------------------------------------------------------- @@ -1616,7 +1607,7 @@ PURE SUBROUTINE STMM_15(ans, test, trial, term1, term2, rho) CALL Reallocate(m6, & & SIZE(test(1)%N, 1), & & SIZE(trial(1)%N, 1), & - & SIZE(kbar,1), SIZE(kbar,2), & + & SIZE(kbar, 1), SIZE(kbar, 2), & & SIZE(test(1)%T), & & SIZE(trial(1)%T)) !! @@ -1627,13 +1618,13 @@ PURE SUBROUTINE STMM_15(ans, test, trial, term1, term2, rho) !! DO ips = 1, SIZE(realval) !! - DO b = 1, SIZE(m6,6) + DO b = 1, SIZE(m6, 6) m6(:, :, :, :, :, b) = m6(:, :, :, :, :, b) & & + realval(ips) & & * outerprod( & - & test(ipt)%N(:,ips), & - & trial(ipt)%dNTdt(:,b,ips), & - & kbar(:,:,ips, ipt), test(ipt)%T) + & test(ipt)%N(:, ips), & + & trial(ipt)%dNTdt(:, b, ips), & + & kbar(:, :, ips, ipt), test(ipt)%T) END DO END DO END DO @@ -1649,57 +1640,57 @@ END SUBROUTINE STMM_15 !---------------------------------------------------------------------------- PURE SUBROUTINE STMM_16(ans, test, trial, term1, term2, rho) -REAL(DFP), ALLOCATABLE, INTENT(INOUT) :: ans(:, :, :, :) -CLASS(STElemshapeData_), INTENT(IN) :: test(:) -CLASS(STElemshapeData_), INTENT(IN) :: trial(:) -INTEGER(I4B), INTENT(IN) :: term1 + REAL(DFP), ALLOCATABLE, INTENT(INOUT) :: ans(:, :, :, :) + CLASS(STElemshapeData_), INTENT(IN) :: test(:) + CLASS(STElemshapeData_), INTENT(IN) :: trial(:) + INTEGER(I4B), INTENT(IN) :: term1 !! del_t -INTEGER(I4B), INTENT(IN) :: term2 + INTEGER(I4B), INTENT(IN) :: term2 !! del_t -CLASS(FEVariable_), INTENT(IN) :: rho + CLASS(FEVariable_), INTENT(IN) :: rho !! matrix !! !! Internal variable -REAL(DFP), ALLOCATABLE :: m6(:, :, :, :, :, :) -REAL(DFP), ALLOCATABLE :: kbar(:, :, :, :) -REAL(DFP), ALLOCATABLE :: realval(:) -INTEGER(I4B) :: ipt, ips, a, b + REAL(DFP), ALLOCATABLE :: m6(:, :, :, :, :, :) + REAL(DFP), ALLOCATABLE :: kbar(:, :, :, :) + REAL(DFP), ALLOCATABLE :: realval(:) + INTEGER(I4B) :: ipt, ips, a, b !! !! main !! -CALL getInterpolation(obj=trial, interpol=kbar, val=rho) + CALL getInterpolation(obj=trial, interpol=kbar, val=rho) !! -CALL Reallocate(m6, & - & SIZE(test(1)%N, 1), & - & SIZE(trial(1)%N, 1), & - & SIZE(kbar,1), size(kbar,2), & - & SIZE(test(1)%T), & - & SIZE(trial(1)%T)) + CALL Reallocate(m6, & + & SIZE(test(1)%N, 1), & + & SIZE(trial(1)%N, 1), & + & SIZE(kbar, 1), SIZE(kbar, 2), & + & SIZE(test(1)%T), & + & SIZE(trial(1)%T)) !! -DO ipt = 1, SIZE(trial) + DO ipt = 1, SIZE(trial) !! - realval = trial(ipt)%js * trial(ipt)%ws * trial(ipt)%thickness * & - & trial(ipt)%wt * trial(ipt)%jt + realval = trial(ipt)%js * trial(ipt)%ws * trial(ipt)%thickness * & + & trial(ipt)%wt * trial(ipt)%jt !! - DO ips = 1, SIZE(realval) + DO ips = 1, SIZE(realval) !! - DO b = 1, SIZE(m6, 6) - DO a = 1, SIZE(m6, 5) - m6(:, :, :, :, a, b) = m6(:, :, :, :, a, b) & - & + realval(ips) & - & * outerprod( & - & test(ipt)%dNTdt(:,a, ips), & - & trial(ipt)%dNTdt(:,b, ips), & - & kbar(:,:,ips, ipt) ) + DO b = 1, SIZE(m6, 6) + DO a = 1, SIZE(m6, 5) + m6(:, :, :, :, a, b) = m6(:, :, :, :, a, b) & + & + realval(ips) & + & * outerprod( & + & test(ipt)%dNTdt(:, a, ips), & + & trial(ipt)%dNTdt(:, b, ips), & + & kbar(:, :, ips, ipt)) + END DO END DO - END DO !! + END DO END DO -END DO !! -CALL Convert(from=m6, to=ans) -DEALLOCATE (m6, kbar, realval) + CALL Convert(from=m6, to=ans) + DEALLOCATE (m6, kbar, realval) !! END SUBROUTINE STMM_16 @@ -1711,54 +1702,54 @@ END SUBROUTINE STMM_16 #define _NT2_ OUTERPROD(trial(ipt)%N(:,ips), trial(ipt)%T) PURE SUBROUTINE STMM_17(ans, test, trial, term1, term2, c1, c2, opt) -REAL(DFP), ALLOCATABLE, INTENT(INOUT) :: ans(:, :, :, :) -CLASS(STElemshapeData_), INTENT(IN) :: test(:) -CLASS(STElemshapeData_), INTENT(IN) :: trial(:) -INTEGER(I4B), INTENT(IN) :: term1 + REAL(DFP), ALLOCATABLE, INTENT(INOUT) :: ans(:, :, :, :) + CLASS(STElemshapeData_), INTENT(IN) :: test(:) + CLASS(STElemshapeData_), INTENT(IN) :: trial(:) + INTEGER(I4B), INTENT(IN) :: term1 !! del_none -INTEGER(I4B), INTENT(IN) :: term2 + INTEGER(I4B), INTENT(IN) :: term2 !! del_none -CLASS(FEVariable_), INTENT(IN) :: c1 + CLASS(FEVariable_), INTENT(IN) :: c1 !! scalar -CLASS(FEVariable_), INTENT(IN) :: c2 + CLASS(FEVariable_), INTENT(IN) :: c2 !! scalar -INTEGER( I4B ), OPTIONAL, INTENT( IN ) :: opt + INTEGER(I4B), OPTIONAL, INTENT(IN) :: opt !! !! Internal variable -REAL(DFP), ALLOCATABLE :: IaJb(:, :, :, :) -REAL(DFP), ALLOCATABLE :: m2(:, :) -REAL(DFP), ALLOCATABLE :: m2b(:, :) -REAL(DFP), ALLOCATABLE :: realval(:) -INTEGER(I4B) :: ipt, ips + REAL(DFP), ALLOCATABLE :: IaJb(:, :, :, :) + REAL(DFP), ALLOCATABLE :: m2(:, :) + REAL(DFP), ALLOCATABLE :: m2b(:, :) + REAL(DFP), ALLOCATABLE :: realval(:) + INTEGER(I4B) :: ipt, ips !! !! main !! -CALL Reallocate(IaJb, & - & SIZE(test(1)%N, 1), & - & SIZE(test(1)%T), & - & SIZE(trial(1)%N, 1), & - & SIZE(trial(1)%T)) + CALL Reallocate(IaJb, & + & SIZE(test(1)%N, 1), & + & SIZE(test(1)%T), & + & SIZE(trial(1)%N, 1), & + & SIZE(trial(1)%T)) !! -CALL GetInterpolation(obj=trial, interpol=m2, val=c1) -CALL GetInterpolation(obj=trial, interpol=m2b, val=c2) + CALL GetInterpolation(obj=trial, interpol=m2, val=c1) + CALL GetInterpolation(obj=trial, interpol=m2b, val=c2) !! -DO ipt = 1, SIZE(trial) + DO ipt = 1, SIZE(trial) !! - realval = trial(ipt)%js * trial(ipt)%ws * & - & trial(ipt)%thickness * trial(ipt)%wt * & - & trial(ipt)%jt * m2(:, ipt) * m2b(:,ipt) + realval = trial(ipt)%js * trial(ipt)%ws * & + & trial(ipt)%thickness * trial(ipt)%wt * & + & trial(ipt)%jt * m2(:, ipt) * m2b(:, ipt) !! - DO ips = 1, SIZE(realval) - IaJb = IaJb + realval(ips) * OUTERPROD( _NT1_, _NT2_ ) - END DO + DO ips = 1, SIZE(realval) + IaJb = IaJb + realval(ips) * OUTERPROD(_NT1_, _NT2_) + END DO !! -END DO + END DO !! -CALL SWAP(a=ans, b=IaJb, i1=1, i2=3, i3=2, i4=4) + CALL SWAP(a=ans, b=IaJb, i1=1, i2=3, i3=2, i4=4) !! -IF(PRESENT(opt)) CALL MakeDiagonalCopiesIJab(ans, opt) + IF (PRESENT(opt)) CALL MakeDiagonalCopiesIJab(ans, opt) !! -DEALLOCATE (IaJb, m2, m2b, realval) + DEALLOCATE (IaJb, m2, m2b, realval) END SUBROUTINE STMM_17 #undef _NT1_ #undef _NT2_ @@ -1771,54 +1762,54 @@ END SUBROUTINE STMM_17 #define _NT2_ OUTERPROD(trial(ipt)%N(:,ips), trial(ipt)%T) PURE SUBROUTINE STMM_18(ans, test, trial, term1, term2, c1, c2, opt) -REAL(DFP), ALLOCATABLE, INTENT(INOUT) :: ans(:, :, :, :) -CLASS(STElemshapeData_), INTENT(IN) :: test(:) -CLASS(STElemshapeData_), INTENT(IN) :: trial(:) -INTEGER(I4B), INTENT(IN) :: term1 + REAL(DFP), ALLOCATABLE, INTENT(INOUT) :: ans(:, :, :, :) + CLASS(STElemshapeData_), INTENT(IN) :: test(:) + CLASS(STElemshapeData_), INTENT(IN) :: trial(:) + INTEGER(I4B), INTENT(IN) :: term1 !! del_none -INTEGER(I4B), INTENT(IN) :: term2 + INTEGER(I4B), INTENT(IN) :: term2 !! del_none -CLASS(FEVariable_), INTENT(IN) :: c1 + CLASS(FEVariable_), INTENT(IN) :: c1 !! scalar -CLASS(FEVariable_), INTENT(IN) :: c2 + CLASS(FEVariable_), INTENT(IN) :: c2 !! scalar -INTEGER( I4B ), OPTIONAL, INTENT( IN ) :: opt + INTEGER(I4B), OPTIONAL, INTENT(IN) :: opt !! !! Internal variable -REAL(DFP), ALLOCATABLE :: IaJb(:, :, :, :) -REAL(DFP), ALLOCATABLE :: m2(:, :) -REAL(DFP), ALLOCATABLE :: m2b(:, :) -REAL(DFP), ALLOCATABLE :: realval(:) -INTEGER(I4B) :: ipt, ips -!! + REAL(DFP), ALLOCATABLE :: IaJb(:, :, :, :) + REAL(DFP), ALLOCATABLE :: m2(:, :) + REAL(DFP), ALLOCATABLE :: m2b(:, :) + REAL(DFP), ALLOCATABLE :: realval(:) + INTEGER(I4B) :: ipt, ips +!! !! main !! -CALL Reallocate(IaJb, & - & SIZE(test(1)%N, 1), & - & SIZE(test(1)%T), & - & SIZE(trial(1)%N, 1), & - & SIZE(trial(1)%T)) + CALL Reallocate(IaJb, & + & SIZE(test(1)%N, 1), & + & SIZE(test(1)%T), & + & SIZE(trial(1)%N, 1), & + & SIZE(trial(1)%T)) !! -CALL GetInterpolation(obj=trial, interpol=m2, val=c1) -CALL GetInterpolation(obj=trial, interpol=m2b, val=c2) + CALL GetInterpolation(obj=trial, interpol=m2, val=c1) + CALL GetInterpolation(obj=trial, interpol=m2b, val=c2) !! -DO ipt = 1, SIZE(trial) + DO ipt = 1, SIZE(trial) !! - realval = trial(ipt)%js * trial(ipt)%ws * & - & trial(ipt)%thickness * trial(ipt)%wt * & - & trial(ipt)%jt * m2(:, ipt) * m2b(:,ipt) + realval = trial(ipt)%js * trial(ipt)%ws * & + & trial(ipt)%thickness * trial(ipt)%wt * & + & trial(ipt)%jt * m2(:, ipt) * m2b(:, ipt) !! - DO ips = 1, SIZE(realval) - IaJb = IaJb + realval(ips) * OUTERPROD( _NT1_, _NT2_ ) - END DO + DO ips = 1, SIZE(realval) + IaJb = IaJb + realval(ips) * OUTERPROD(_NT1_, _NT2_) + END DO !! -END DO + END DO !! -CALL SWAP(a=ans, b=IaJb, i1=1, i2=3, i3=2, i4=4) + CALL SWAP(a=ans, b=IaJb, i1=1, i2=3, i3=2, i4=4) !! -IF(PRESENT(opt)) CALL MakeDiagonalCopiesIJab(ans, opt) + IF (PRESENT(opt)) CALL MakeDiagonalCopiesIJab(ans, opt) !! -DEALLOCATE (IaJb, m2, m2b, realval) + DEALLOCATE (IaJb, m2, m2b, realval) END SUBROUTINE STMM_18 #undef _NT1_ #undef _NT2_ @@ -1831,54 +1822,54 @@ END SUBROUTINE STMM_18 #define _NT2_ trial(ipt)%dNTdt(:,:,ips) PURE SUBROUTINE STMM_19(ans, test, trial, term1, term2, c1, c2, opt) -REAL(DFP), ALLOCATABLE, INTENT(INOUT) :: ans(:, :, :, :) -CLASS(STElemshapeData_), INTENT(IN) :: test(:) -CLASS(STElemshapeData_), INTENT(IN) :: trial(:) -INTEGER(I4B), INTENT(IN) :: term1 + REAL(DFP), ALLOCATABLE, INTENT(INOUT) :: ans(:, :, :, :) + CLASS(STElemshapeData_), INTENT(IN) :: test(:) + CLASS(STElemshapeData_), INTENT(IN) :: trial(:) + INTEGER(I4B), INTENT(IN) :: term1 !! del_none -INTEGER(I4B), INTENT(IN) :: term2 + INTEGER(I4B), INTENT(IN) :: term2 !! del_none -CLASS(FEVariable_), INTENT(IN) :: c1 + CLASS(FEVariable_), INTENT(IN) :: c1 !! scalar -CLASS(FEVariable_), INTENT(IN) :: c2 + CLASS(FEVariable_), INTENT(IN) :: c2 !! scalar -INTEGER( I4B ), OPTIONAL, INTENT( IN ) :: opt + INTEGER(I4B), OPTIONAL, INTENT(IN) :: opt !! !! Internal variable -REAL(DFP), ALLOCATABLE :: IaJb(:, :, :, :) -REAL(DFP), ALLOCATABLE :: m2(:, :) -REAL(DFP), ALLOCATABLE :: m2b(:, :) -REAL(DFP), ALLOCATABLE :: realval(:) -INTEGER(I4B) :: ipt, ips + REAL(DFP), ALLOCATABLE :: IaJb(:, :, :, :) + REAL(DFP), ALLOCATABLE :: m2(:, :) + REAL(DFP), ALLOCATABLE :: m2b(:, :) + REAL(DFP), ALLOCATABLE :: realval(:) + INTEGER(I4B) :: ipt, ips !! !! main !! -CALL Reallocate(IaJb, & - & SIZE(test(1)%N, 1), & - & SIZE(test(1)%T), & - & SIZE(trial(1)%N, 1), & - & SIZE(trial(1)%T)) + CALL Reallocate(IaJb, & + & SIZE(test(1)%N, 1), & + & SIZE(test(1)%T), & + & SIZE(trial(1)%N, 1), & + & SIZE(trial(1)%T)) !! -CALL GetInterpolation(obj=trial, interpol=m2, val=c1) -CALL GetInterpolation(obj=trial, interpol=m2b, val=c2) + CALL GetInterpolation(obj=trial, interpol=m2, val=c1) + CALL GetInterpolation(obj=trial, interpol=m2b, val=c2) !! -DO ipt = 1, SIZE(trial) + DO ipt = 1, SIZE(trial) !! - realval = trial(ipt)%js * trial(ipt)%ws * & - & trial(ipt)%thickness * trial(ipt)%wt * & - & trial(ipt)%jt * m2(:, ipt) * m2b(:,ipt) + realval = trial(ipt)%js * trial(ipt)%ws * & + & trial(ipt)%thickness * trial(ipt)%wt * & + & trial(ipt)%jt * m2(:, ipt) * m2b(:, ipt) !! - DO ips = 1, SIZE(realval) - IaJb = IaJb + realval(ips) * OUTERPROD( _NT1_, _NT2_ ) - END DO + DO ips = 1, SIZE(realval) + IaJb = IaJb + realval(ips) * OUTERPROD(_NT1_, _NT2_) + END DO !! -END DO + END DO !! -CALL SWAP(a=ans, b=IaJb, i1=1, i2=3, i3=2, i4=4) + CALL SWAP(a=ans, b=IaJb, i1=1, i2=3, i3=2, i4=4) !! -IF(PRESENT(opt)) CALL MakeDiagonalCopiesIJab(ans, opt) + IF (PRESENT(opt)) CALL MakeDiagonalCopiesIJab(ans, opt) !! -DEALLOCATE (IaJb, m2, m2b, realval) + DEALLOCATE (IaJb, m2, m2b, realval) END SUBROUTINE STMM_19 #undef _NT1_ #undef _NT2_ @@ -1891,54 +1882,54 @@ END SUBROUTINE STMM_19 #define _NT2_ trial(ipt)%dNTdt(:,:,ips) PURE SUBROUTINE STMM_20(ans, test, trial, term1, term2, c1, c2, opt) -REAL(DFP), ALLOCATABLE, INTENT(INOUT) :: ans(:, :, :, :) -CLASS(STElemshapeData_), INTENT(IN) :: test(:) -CLASS(STElemshapeData_), INTENT(IN) :: trial(:) -INTEGER(I4B), INTENT(IN) :: term1 + REAL(DFP), ALLOCATABLE, INTENT(INOUT) :: ans(:, :, :, :) + CLASS(STElemshapeData_), INTENT(IN) :: test(:) + CLASS(STElemshapeData_), INTENT(IN) :: trial(:) + INTEGER(I4B), INTENT(IN) :: term1 !! del_none -INTEGER(I4B), INTENT(IN) :: term2 + INTEGER(I4B), INTENT(IN) :: term2 !! del_none -CLASS(FEVariable_), INTENT(IN) :: c1 + CLASS(FEVariable_), INTENT(IN) :: c1 !! scalar -CLASS(FEVariable_), INTENT(IN) :: c2 + CLASS(FEVariable_), INTENT(IN) :: c2 !! scalar -INTEGER( I4B ), OPTIONAL, INTENT( IN ) :: opt + INTEGER(I4B), OPTIONAL, INTENT(IN) :: opt !! !! Internal variable -REAL(DFP), ALLOCATABLE :: IaJb(:, :, :, :) -REAL(DFP), ALLOCATABLE :: m2(:, :) -REAL(DFP), ALLOCATABLE :: m2b(:, :) -REAL(DFP), ALLOCATABLE :: realval(:) -INTEGER(I4B) :: ipt, ips + REAL(DFP), ALLOCATABLE :: IaJb(:, :, :, :) + REAL(DFP), ALLOCATABLE :: m2(:, :) + REAL(DFP), ALLOCATABLE :: m2b(:, :) + REAL(DFP), ALLOCATABLE :: realval(:) + INTEGER(I4B) :: ipt, ips !! !! main !! -CALL Reallocate(IaJb, & - & SIZE(test(1)%N, 1), & - & SIZE(test(1)%T), & - & SIZE(trial(1)%N, 1), & - & SIZE(trial(1)%T)) + CALL Reallocate(IaJb, & + & SIZE(test(1)%N, 1), & + & SIZE(test(1)%T), & + & SIZE(trial(1)%N, 1), & + & SIZE(trial(1)%T)) !! -CALL GetInterpolation(obj=trial, interpol=m2, val=c1) -CALL GetInterpolation(obj=trial, interpol=m2b, val=c2) + CALL GetInterpolation(obj=trial, interpol=m2, val=c1) + CALL GetInterpolation(obj=trial, interpol=m2b, val=c2) !! -DO ipt = 1, SIZE(trial) + DO ipt = 1, SIZE(trial) !! - realval = trial(ipt)%js * trial(ipt)%ws * & - & trial(ipt)%thickness * trial(ipt)%wt * & - & trial(ipt)%jt * m2(:, ipt) * m2b(:,ipt) + realval = trial(ipt)%js * trial(ipt)%ws * & + & trial(ipt)%thickness * trial(ipt)%wt * & + & trial(ipt)%jt * m2(:, ipt) * m2b(:, ipt) !! - DO ips = 1, SIZE(realval) - IaJb = IaJb + realval(ips) * OUTERPROD( _NT1_, _NT2_ ) - END DO + DO ips = 1, SIZE(realval) + IaJb = IaJb + realval(ips) * OUTERPROD(_NT1_, _NT2_) + END DO !! -END DO + END DO !! -CALL SWAP(a=ans, b=IaJb, i1=1, i2=3, i3=2, i4=4) + CALL SWAP(a=ans, b=IaJb, i1=1, i2=3, i3=2, i4=4) !! -IF(PRESENT(opt)) CALL MakeDiagonalCopiesIJab(ans, opt) + IF (PRESENT(opt)) CALL MakeDiagonalCopiesIJab(ans, opt) !! -DEALLOCATE (IaJb, m2, m2b, realval) + DEALLOCATE (IaJb, m2, m2b, realval) END SUBROUTINE STMM_20 #undef _NT1_ #undef _NT2_ @@ -1952,62 +1943,61 @@ END SUBROUTINE STMM_20 #define _DIM2_ 1 PURE SUBROUTINE STMM_21a(ans, test, trial, term1, term2, c1, c2) -REAL(DFP), ALLOCATABLE, INTENT(INOUT) :: ans(:, :, :, :) -CLASS(STElemshapeData_), INTENT(IN) :: test(:) -CLASS(STElemshapeData_), INTENT(IN) :: trial(:) -INTEGER(I4B), INTENT(IN) :: term1 + REAL(DFP), ALLOCATABLE, INTENT(INOUT) :: ans(:, :, :, :) + CLASS(STElemshapeData_), INTENT(IN) :: test(:) + CLASS(STElemshapeData_), INTENT(IN) :: trial(:) + INTEGER(I4B), INTENT(IN) :: term1 !! del_none -INTEGER(I4B), INTENT(IN) :: term2 + INTEGER(I4B), INTENT(IN) :: term2 !! del_none -CLASS(FEVariable_), INTENT(IN) :: c1 + CLASS(FEVariable_), INTENT(IN) :: c1 !! scalar -CLASS(FEVariable_), INTENT(IN) :: c2 + CLASS(FEVariable_), INTENT(IN) :: c2 !! vector !! !! Internal variable -REAL(DFP), ALLOCATABLE :: m6(:, :, :, :, :, :) -REAL(DFP), ALLOCATABLE :: vbar(:, :, :) -REAL(DFP), ALLOCATABLE :: c1bar(:, :) -REAL(DFP), ALLOCATABLE :: realval(:) -INTEGER(I4B) :: ipt, ips, a, b + REAL(DFP), ALLOCATABLE :: m6(:, :, :, :, :, :) + REAL(DFP), ALLOCATABLE :: vbar(:, :, :) + REAL(DFP), ALLOCATABLE :: c1bar(:, :) + REAL(DFP), ALLOCATABLE :: realval(:) + INTEGER(I4B) :: ipt, ips, a, b !! !! main !! -CALL getInterpolation(obj=trial, interpol=c1bar, val=c1) -CALL getInterpolation(obj=trial, interpol=vbar, val=c2) + CALL getInterpolation(obj=trial, interpol=c1bar, val=c1) + CALL getInterpolation(obj=trial, interpol=vbar, val=c2) !! -CALL Reallocate(m6, & - & SIZE(test(1)%N, 1), & - & SIZE(trial(1)%N, 1), & - & _DIM1_, _DIM2_, & - & SIZE(test(1)%T), & - & SIZE(trial(1)%T)) + CALL Reallocate(m6, & + & SIZE(test(1)%N, 1), & + & SIZE(trial(1)%N, 1), & + & _DIM1_, _DIM2_, & + & SIZE(test(1)%T), & + & SIZE(trial(1)%T)) !! -DO ipt = 1, SIZE(trial) + DO ipt = 1, SIZE(trial) !! - realval = trial(ipt)%js * trial(ipt)%ws * trial(ipt)%thickness * & - & trial(ipt)%wt * trial(ipt)%jt * c1bar(:, ipt) + realval = trial(ipt)%js * trial(ipt)%ws * trial(ipt)%thickness * & + & trial(ipt)%wt * trial(ipt)%jt * c1bar(:, ipt) !! - DO ips = 1, SIZE(realval) + DO ips = 1, SIZE(realval) !! - m6 = m6 + realval( ips ) * outerprod( & - & outerprod(test(ipt)%N(:, ips), & - & trial(ipt)%N(:, ips)), & - & _KIJ_, & - & test(ipt)%T, & - & trial(ipt)%T) + m6 = m6 + realval(ips) * outerprod( & + & outerprod(test(ipt)%N(:, ips), & + & trial(ipt)%N(:, ips)), & + & _KIJ_, & + & test(ipt)%T, & + & trial(ipt)%T) + END DO END DO -END DO !! -CALL Convert(from=m6, to=ans) -DEALLOCATE (m6, vbar, c1bar, realval) + CALL Convert(from=m6, to=ans) + DEALLOCATE (m6, vbar, c1bar, realval) END SUBROUTINE STMM_21a #undef _DIM1_ #undef _DIM2_ #undef _KIJ_ - !---------------------------------------------------------------------------- ! !---------------------------------------------------------------------------- @@ -2017,55 +2007,55 @@ END SUBROUTINE STMM_21a #define _DIM2_ SIZE(vbar, 1) PURE SUBROUTINE STMM_21b(ans, test, trial, term1, term2, c1, c2) -REAL(DFP), ALLOCATABLE, INTENT(INOUT) :: ans(:, :, :, :) -CLASS(STElemshapeData_), INTENT(IN) :: test(:) -CLASS(STElemshapeData_), INTENT(IN) :: trial(:) -INTEGER(I4B), INTENT(IN) :: term1 + REAL(DFP), ALLOCATABLE, INTENT(INOUT) :: ans(:, :, :, :) + CLASS(STElemshapeData_), INTENT(IN) :: test(:) + CLASS(STElemshapeData_), INTENT(IN) :: trial(:) + INTEGER(I4B), INTENT(IN) :: term1 !! del_none -INTEGER(I4B), INTENT(IN) :: term2 + INTEGER(I4B), INTENT(IN) :: term2 !! del_none -CLASS(FEVariable_), INTENT(IN) :: c1 + CLASS(FEVariable_), INTENT(IN) :: c1 !! scalar -CLASS(FEVariable_), INTENT(IN) :: c2 + CLASS(FEVariable_), INTENT(IN) :: c2 !! vector !! !! Internal variable -REAL(DFP), ALLOCATABLE :: m6(:, :, :, :, :, :) -REAL(DFP), ALLOCATABLE :: vbar(:, :, :) -REAL(DFP), ALLOCATABLE :: c1bar(:, :) -REAL(DFP), ALLOCATABLE :: realval(:) -INTEGER(I4B) :: ipt, ips, a, b + REAL(DFP), ALLOCATABLE :: m6(:, :, :, :, :, :) + REAL(DFP), ALLOCATABLE :: vbar(:, :, :) + REAL(DFP), ALLOCATABLE :: c1bar(:, :) + REAL(DFP), ALLOCATABLE :: realval(:) + INTEGER(I4B) :: ipt, ips, a, b !! !! main !! -CALL getInterpolation(obj=trial, interpol=c1bar, val=c1) -CALL getInterpolation(obj=trial, interpol=vbar, val=c2) + CALL getInterpolation(obj=trial, interpol=c1bar, val=c1) + CALL getInterpolation(obj=trial, interpol=vbar, val=c2) !! -CALL Reallocate(m6, & - & SIZE(test(1)%N, 1), & - & SIZE(trial(1)%N, 1), & - & _DIM1_, _DIM2_, & - & SIZE(test(1)%T), & - & SIZE(trial(1)%T)) + CALL Reallocate(m6, & + & SIZE(test(1)%N, 1), & + & SIZE(trial(1)%N, 1), & + & _DIM1_, _DIM2_, & + & SIZE(test(1)%T), & + & SIZE(trial(1)%T)) !! -DO ipt = 1, SIZE(trial) + DO ipt = 1, SIZE(trial) !! - realval = trial(ipt)%js * trial(ipt)%ws * trial(ipt)%thickness * & - & trial(ipt)%wt * trial(ipt)%jt * c1bar(:, ipt) + realval = trial(ipt)%js * trial(ipt)%ws * trial(ipt)%thickness * & + & trial(ipt)%wt * trial(ipt)%jt * c1bar(:, ipt) !! - DO ips = 1, SIZE(realval) + DO ips = 1, SIZE(realval) !! - m6 = m6 + realval( ips ) * outerprod( & - & outerprod(test(ipt)%N(:, ips), & - & trial(ipt)%N(:, ips)), & - & _KIJ_, & - & test(ipt)%T, & - & trial(ipt)%T) + m6 = m6 + realval(ips) * outerprod( & + & outerprod(test(ipt)%N(:, ips), & + & trial(ipt)%N(:, ips)), & + & _KIJ_, & + & test(ipt)%T, & + & trial(ipt)%T) + END DO END DO -END DO !! -CALL Convert(from=m6, to=ans) -DEALLOCATE (m6, vbar, c1bar, realval) + CALL Convert(from=m6, to=ans) + DEALLOCATE (m6, vbar, c1bar, realval) END SUBROUTINE STMM_21b #undef _DIM1_ @@ -2081,55 +2071,55 @@ END SUBROUTINE STMM_21b #define _DIM2_ SIZE(vbar, 1) PURE SUBROUTINE STMM_21c(ans, test, trial, term1, term2, c1, c2) -REAL(DFP), ALLOCATABLE, INTENT(INOUT) :: ans(:, :, :, :) -CLASS(STElemshapeData_), INTENT(IN) :: test(:) -CLASS(STElemshapeData_), INTENT(IN) :: trial(:) -INTEGER(I4B), INTENT(IN) :: term1 + REAL(DFP), ALLOCATABLE, INTENT(INOUT) :: ans(:, :, :, :) + CLASS(STElemshapeData_), INTENT(IN) :: test(:) + CLASS(STElemshapeData_), INTENT(IN) :: trial(:) + INTEGER(I4B), INTENT(IN) :: term1 !! del_none -INTEGER(I4B), INTENT(IN) :: term2 + INTEGER(I4B), INTENT(IN) :: term2 !! del_none -CLASS(FEVariable_), INTENT(IN) :: c1 + CLASS(FEVariable_), INTENT(IN) :: c1 !! scalar -CLASS(FEVariable_), INTENT(IN) :: c2 + CLASS(FEVariable_), INTENT(IN) :: c2 !! vector !! !! Internal variable -REAL(DFP), ALLOCATABLE :: m6(:, :, :, :, :, :) -REAL(DFP), ALLOCATABLE :: vbar(:, :, :) -REAL(DFP), ALLOCATABLE :: c1bar(:, :) -REAL(DFP), ALLOCATABLE :: realval(:) -INTEGER(I4B) :: ipt, ips, a, b + REAL(DFP), ALLOCATABLE :: m6(:, :, :, :, :, :) + REAL(DFP), ALLOCATABLE :: vbar(:, :, :) + REAL(DFP), ALLOCATABLE :: c1bar(:, :) + REAL(DFP), ALLOCATABLE :: realval(:) + INTEGER(I4B) :: ipt, ips, a, b !! !! main !! -CALL getInterpolation(obj=trial, interpol=c1bar, val=c1) -CALL getInterpolation(obj=trial, interpol=vbar, val=c2) + CALL getInterpolation(obj=trial, interpol=c1bar, val=c1) + CALL getInterpolation(obj=trial, interpol=vbar, val=c2) !! -CALL Reallocate(m6, & - & SIZE(test(1)%N, 1), & - & SIZE(trial(1)%N, 1), & - & _DIM1_, _DIM2_, & - & SIZE(test(1)%T), & - & SIZE(trial(1)%T)) + CALL Reallocate(m6, & + & SIZE(test(1)%N, 1), & + & SIZE(trial(1)%N, 1), & + & _DIM1_, _DIM2_, & + & SIZE(test(1)%T), & + & SIZE(trial(1)%T)) !! -DO ipt = 1, SIZE(trial) + DO ipt = 1, SIZE(trial) !! - realval = trial(ipt)%js * trial(ipt)%ws * trial(ipt)%thickness * & - & trial(ipt)%wt * trial(ipt)%jt * c1bar(:, ipt) + realval = trial(ipt)%js * trial(ipt)%ws * trial(ipt)%thickness * & + & trial(ipt)%wt * trial(ipt)%jt * c1bar(:, ipt) !! - DO ips = 1, SIZE(realval) + DO ips = 1, SIZE(realval) !! - m6 = m6 + realval( ips ) * outerprod( & - & outerprod(test(ipt)%N(:, ips), & - & trial(ipt)%N(:, ips)), & - & _KIJ_, & - & test(ipt)%T, & - & trial(ipt)%T) + m6 = m6 + realval(ips) * outerprod( & + & outerprod(test(ipt)%N(:, ips), & + & trial(ipt)%N(:, ips)), & + & _KIJ_, & + & test(ipt)%T, & + & trial(ipt)%T) + END DO END DO -END DO !! -CALL Convert(from=m6, to=ans) -DEALLOCATE (m6, vbar, c1bar, realval) + CALL Convert(from=m6, to=ans) + DEALLOCATE (m6, vbar, c1bar, realval) END SUBROUTINE STMM_21c #undef _DIM1_ @@ -2145,62 +2135,61 @@ END SUBROUTINE STMM_21c #define _DIM2_ SIZE(vbar, 1) PURE SUBROUTINE STMM_21d(ans, test, trial, term1, term2, c1, c2) -REAL(DFP), ALLOCATABLE, INTENT(INOUT) :: ans(:, :, :, :) -CLASS(STElemshapeData_), INTENT(IN) :: test(:) -CLASS(STElemshapeData_), INTENT(IN) :: trial(:) -INTEGER(I4B), INTENT(IN) :: term1 + REAL(DFP), ALLOCATABLE, INTENT(INOUT) :: ans(:, :, :, :) + CLASS(STElemshapeData_), INTENT(IN) :: test(:) + CLASS(STElemshapeData_), INTENT(IN) :: trial(:) + INTEGER(I4B), INTENT(IN) :: term1 !! del_none -INTEGER(I4B), INTENT(IN) :: term2 + INTEGER(I4B), INTENT(IN) :: term2 !! del_none -CLASS(FEVariable_), INTENT(IN) :: c1 + CLASS(FEVariable_), INTENT(IN) :: c1 !! scalar -CLASS(FEVariable_), INTENT(IN) :: c2 + CLASS(FEVariable_), INTENT(IN) :: c2 !! vector !! !! Internal variable -REAL(DFP), ALLOCATABLE :: m6(:, :, :, :, :, :) -REAL(DFP), ALLOCATABLE :: vbar(:, :, :) -REAL(DFP), ALLOCATABLE :: c1bar(:, :) -REAL(DFP), ALLOCATABLE :: realval(:) -INTEGER(I4B) :: ipt, ips, a, b + REAL(DFP), ALLOCATABLE :: m6(:, :, :, :, :, :) + REAL(DFP), ALLOCATABLE :: vbar(:, :, :) + REAL(DFP), ALLOCATABLE :: c1bar(:, :) + REAL(DFP), ALLOCATABLE :: realval(:) + INTEGER(I4B) :: ipt, ips, a, b !! !! main !! -CALL getInterpolation(obj=trial, interpol=c1bar, val=c1) -CALL getInterpolation(obj=trial, interpol=vbar, val=c2) + CALL getInterpolation(obj=trial, interpol=c1bar, val=c1) + CALL getInterpolation(obj=trial, interpol=vbar, val=c2) !! -CALL Reallocate(m6, & - & SIZE(test(1)%N, 1), & - & SIZE(trial(1)%N, 1), & - & _DIM1_, _DIM2_, & - & SIZE(test(1)%T), & - & SIZE(trial(1)%T)) + CALL Reallocate(m6, & + & SIZE(test(1)%N, 1), & + & SIZE(trial(1)%N, 1), & + & _DIM1_, _DIM2_, & + & SIZE(test(1)%T), & + & SIZE(trial(1)%T)) !! -DO ipt = 1, SIZE(trial) + DO ipt = 1, SIZE(trial) !! - realval = trial(ipt)%js * trial(ipt)%ws * trial(ipt)%thickness * & - & trial(ipt)%wt * trial(ipt)%jt * c1bar(:, ipt) + realval = trial(ipt)%js * trial(ipt)%ws * trial(ipt)%thickness * & + & trial(ipt)%wt * trial(ipt)%jt * c1bar(:, ipt) !! - DO ips = 1, SIZE(realval) + DO ips = 1, SIZE(realval) !! - m6 = m6 + realval( ips ) * outerprod( & - & outerprod(test(ipt)%N(:, ips), & - & trial(ipt)%N(:, ips)), & - & _KIJ_, & - & test(ipt)%T, & - & trial(ipt)%T) + m6 = m6 + realval(ips) * outerprod( & + & outerprod(test(ipt)%N(:, ips), & + & trial(ipt)%N(:, ips)), & + & _KIJ_, & + & test(ipt)%T, & + & trial(ipt)%T) + END DO END DO -END DO !! -CALL Convert(from=m6, to=ans) -DEALLOCATE (m6, vbar, c1bar, realval) + CALL Convert(from=m6, to=ans) + DEALLOCATE (m6, vbar, c1bar, realval) END SUBROUTINE STMM_21d #undef _DIM1_ #undef _DIM2_ #undef _KIJ_ - !---------------------------------------------------------------------------- ! !---------------------------------------------------------------------------- @@ -2210,73 +2199,72 @@ END SUBROUTINE STMM_21d #define _DIM2_ 1 PURE SUBROUTINE STMM_22a(ans, test, trial, term1, term2, c1, c2) -REAL(DFP), ALLOCATABLE, INTENT(INOUT) :: ans(:, :, :, :) -CLASS(STElemshapeData_), INTENT(IN) :: test(:) -CLASS(STElemshapeData_), INTENT(IN) :: trial(:) -INTEGER(I4B), INTENT(IN) :: term1 + REAL(DFP), ALLOCATABLE, INTENT(INOUT) :: ans(:, :, :, :) + CLASS(STElemshapeData_), INTENT(IN) :: test(:) + CLASS(STElemshapeData_), INTENT(IN) :: trial(:) + INTEGER(I4B), INTENT(IN) :: term1 !! del_t -INTEGER(I4B), INTENT(IN) :: term2 + INTEGER(I4B), INTENT(IN) :: term2 !! del_none -CLASS(FEVariable_), INTENT(IN) :: c1 + CLASS(FEVariable_), INTENT(IN) :: c1 !! scalar -CLASS(FEVariable_), INTENT(IN) :: c2 + CLASS(FEVariable_), INTENT(IN) :: c2 !! vector !! !! Internal variable -REAL(DFP), ALLOCATABLE :: m6(:, :, :, :, :, :) -REAL(DFP), ALLOCATABLE :: IJija(:, :, :, :, :) -REAL(DFP), ALLOCATABLE :: c1bar(:, :) -REAL(DFP), ALLOCATABLE :: vbar(:, :, :) -REAL(DFP), ALLOCATABLE :: Jij(:, :, :) -REAL(DFP), ALLOCATABLE :: realval(:) -INTEGER(I4B) :: ipt, ips, a, b + REAL(DFP), ALLOCATABLE :: m6(:, :, :, :, :, :) + REAL(DFP), ALLOCATABLE :: IJija(:, :, :, :, :) + REAL(DFP), ALLOCATABLE :: c1bar(:, :) + REAL(DFP), ALLOCATABLE :: vbar(:, :, :) + REAL(DFP), ALLOCATABLE :: Jij(:, :, :) + REAL(DFP), ALLOCATABLE :: realval(:) + INTEGER(I4B) :: ipt, ips, a, b !! !! main !! -CALL getInterpolation(obj=trial, interpol=c1bar, val=c1) -CALL getInterpolation(obj=trial, interpol=vbar, val=c2) + CALL getInterpolation(obj=trial, interpol=c1bar, val=c1) + CALL getInterpolation(obj=trial, interpol=vbar, val=c2) !! -CALL Reallocate(m6, & - & SIZE(test(1)%N, 1), & - & SIZE(trial(1)%N, 1), & - & _DIM1_, _DIM2_, & - & SIZE(test(1)%T), & - & SIZE(trial(1)%T)) + CALL Reallocate(m6, & + & SIZE(test(1)%N, 1), & + & SIZE(trial(1)%N, 1), & + & _DIM1_, _DIM2_, & + & SIZE(test(1)%T), & + & SIZE(trial(1)%T)) !! -CALL Reallocate(IJija, & - & SIZE(test(1)%N, 1), & - & SIZE(trial(1)%N, 1), & - & SIZE(m6,3), SIZE(m6,4), & - & SIZE(test(1)%T)) + CALL Reallocate(IJija, & + & SIZE(test(1)%N, 1), & + & SIZE(trial(1)%N, 1), & + & SIZE(m6, 3), SIZE(m6, 4), & + & SIZE(test(1)%T)) !! -DO ipt = 1, SIZE(trial) + DO ipt = 1, SIZE(trial) !! - realval = trial(ipt)%js * trial(ipt)%ws * trial(ipt)%thickness * & - & trial(ipt)%wt * trial(ipt)%jt * c1bar(:, ipt) + realval = trial(ipt)%js * trial(ipt)%ws * trial(ipt)%thickness * & + & trial(ipt)%wt * trial(ipt)%jt * c1bar(:, ipt) !! - DO ips = 1, SIZE(realval) + DO ips = 1, SIZE(realval) !! - Jij = OUTERPROD( trial(ipt)%N(:, ips), _KIJ_) + Jij = OUTERPROD(trial(ipt)%N(:, ips), _KIJ_) !! - DO a = 1, SIZE(m6, 5) - IJija(:, :, :, :, a) = outerprod(test(ipt)%dNTdt(:, a, ips), Jij) - END DO + DO a = 1, SIZE(m6, 5) + IJija(:, :, :, :, a) = outerprod(test(ipt)%dNTdt(:, a, ips), Jij) + END DO !! - m6 = m6 + realval(ips) * outerprod(IJija, trial(ipt)%T) + m6 = m6 + realval(ips) * outerprod(IJija, trial(ipt)%T) !! + END DO END DO -END DO !! -CALL Convert(from=m6, to=ans) + CALL Convert(from=m6, to=ans) !! -DEALLOCATE (m6, IJija, vbar, Jij, realval) + DEALLOCATE (m6, IJija, vbar, Jij, realval) END SUBROUTINE STMM_22a #undef _DIM1_ #undef _DIM2_ #undef _KIJ_ - !---------------------------------------------------------------------------- ! !---------------------------------------------------------------------------- @@ -2286,73 +2274,72 @@ END SUBROUTINE STMM_22a #define _DIM2_ SIZE(vbar, 1) PURE SUBROUTINE STMM_22b(ans, test, trial, term1, term2, c1, c2) -REAL(DFP), ALLOCATABLE, INTENT(INOUT) :: ans(:, :, :, :) -CLASS(STElemshapeData_), INTENT(IN) :: test(:) -CLASS(STElemshapeData_), INTENT(IN) :: trial(:) -INTEGER(I4B), INTENT(IN) :: term1 + REAL(DFP), ALLOCATABLE, INTENT(INOUT) :: ans(:, :, :, :) + CLASS(STElemshapeData_), INTENT(IN) :: test(:) + CLASS(STElemshapeData_), INTENT(IN) :: trial(:) + INTEGER(I4B), INTENT(IN) :: term1 !! del_t -INTEGER(I4B), INTENT(IN) :: term2 + INTEGER(I4B), INTENT(IN) :: term2 !! del_none -CLASS(FEVariable_), INTENT(IN) :: c1 + CLASS(FEVariable_), INTENT(IN) :: c1 !! scalar -CLASS(FEVariable_), INTENT(IN) :: c2 + CLASS(FEVariable_), INTENT(IN) :: c2 !! vector !! !! Internal variable -REAL(DFP), ALLOCATABLE :: m6(:, :, :, :, :, :) -REAL(DFP), ALLOCATABLE :: IJija(:, :, :, :, :) -REAL(DFP), ALLOCATABLE :: c1bar(:, :) -REAL(DFP), ALLOCATABLE :: vbar(:, :, :) -REAL(DFP), ALLOCATABLE :: Jij(:, :, :) -REAL(DFP), ALLOCATABLE :: realval(:) -INTEGER(I4B) :: ipt, ips, a, b + REAL(DFP), ALLOCATABLE :: m6(:, :, :, :, :, :) + REAL(DFP), ALLOCATABLE :: IJija(:, :, :, :, :) + REAL(DFP), ALLOCATABLE :: c1bar(:, :) + REAL(DFP), ALLOCATABLE :: vbar(:, :, :) + REAL(DFP), ALLOCATABLE :: Jij(:, :, :) + REAL(DFP), ALLOCATABLE :: realval(:) + INTEGER(I4B) :: ipt, ips, a, b !! !! main !! -CALL getInterpolation(obj=trial, interpol=c1bar, val=c1) -CALL getInterpolation(obj=trial, interpol=vbar, val=c2) + CALL getInterpolation(obj=trial, interpol=c1bar, val=c1) + CALL getInterpolation(obj=trial, interpol=vbar, val=c2) !! -CALL Reallocate(m6, & - & SIZE(test(1)%N, 1), & - & SIZE(trial(1)%N, 1), & - & _DIM1_, _DIM2_, & - & SIZE(test(1)%T), & - & SIZE(trial(1)%T)) + CALL Reallocate(m6, & + & SIZE(test(1)%N, 1), & + & SIZE(trial(1)%N, 1), & + & _DIM1_, _DIM2_, & + & SIZE(test(1)%T), & + & SIZE(trial(1)%T)) !! -CALL Reallocate(IJija, & - & SIZE(test(1)%N, 1), & - & SIZE(trial(1)%N, 1), & - & SIZE(m6,3), SIZE(m6,4), & - & SIZE(test(1)%T)) + CALL Reallocate(IJija, & + & SIZE(test(1)%N, 1), & + & SIZE(trial(1)%N, 1), & + & SIZE(m6, 3), SIZE(m6, 4), & + & SIZE(test(1)%T)) !! -DO ipt = 1, SIZE(trial) + DO ipt = 1, SIZE(trial) !! - realval = trial(ipt)%js * trial(ipt)%ws * trial(ipt)%thickness * & - & trial(ipt)%wt * trial(ipt)%jt * c1bar(:, ipt) + realval = trial(ipt)%js * trial(ipt)%ws * trial(ipt)%thickness * & + & trial(ipt)%wt * trial(ipt)%jt * c1bar(:, ipt) !! - DO ips = 1, SIZE(realval) + DO ips = 1, SIZE(realval) !! - Jij = OUTERPROD( trial(ipt)%N(:, ips), _KIJ_) + Jij = OUTERPROD(trial(ipt)%N(:, ips), _KIJ_) !! - DO a = 1, SIZE(m6, 5) - IJija(:, :, :, :, a) = outerprod(test(ipt)%dNTdt(:, a, ips), Jij) - END DO + DO a = 1, SIZE(m6, 5) + IJija(:, :, :, :, a) = outerprod(test(ipt)%dNTdt(:, a, ips), Jij) + END DO !! - m6 = m6 + realval(ips) * outerprod(IJija, trial(ipt)%T) + m6 = m6 + realval(ips) * outerprod(IJija, trial(ipt)%T) !! + END DO END DO -END DO !! -CALL Convert(from=m6, to=ans) + CALL Convert(from=m6, to=ans) !! -DEALLOCATE (m6, IJija, vbar, Jij, realval) + DEALLOCATE (m6, IJija, vbar, Jij, realval) END SUBROUTINE STMM_22b #undef _DIM1_ #undef _DIM2_ #undef _KIJ_ - !---------------------------------------------------------------------------- ! !---------------------------------------------------------------------------- @@ -2362,73 +2349,72 @@ END SUBROUTINE STMM_22b #define _DIM2_ SIZE(vbar, 1) PURE SUBROUTINE STMM_22c(ans, test, trial, term1, term2, c1, c2) -REAL(DFP), ALLOCATABLE, INTENT(INOUT) :: ans(:, :, :, :) -CLASS(STElemshapeData_), INTENT(IN) :: test(:) -CLASS(STElemshapeData_), INTENT(IN) :: trial(:) -INTEGER(I4B), INTENT(IN) :: term1 + REAL(DFP), ALLOCATABLE, INTENT(INOUT) :: ans(:, :, :, :) + CLASS(STElemshapeData_), INTENT(IN) :: test(:) + CLASS(STElemshapeData_), INTENT(IN) :: trial(:) + INTEGER(I4B), INTENT(IN) :: term1 !! del_t -INTEGER(I4B), INTENT(IN) :: term2 + INTEGER(I4B), INTENT(IN) :: term2 !! del_none -CLASS(FEVariable_), INTENT(IN) :: c1 + CLASS(FEVariable_), INTENT(IN) :: c1 !! scalar -CLASS(FEVariable_), INTENT(IN) :: c2 + CLASS(FEVariable_), INTENT(IN) :: c2 !! vector !! !! Internal variable -REAL(DFP), ALLOCATABLE :: m6(:, :, :, :, :, :) -REAL(DFP), ALLOCATABLE :: IJija(:, :, :, :, :) -REAL(DFP), ALLOCATABLE :: c1bar(:, :) -REAL(DFP), ALLOCATABLE :: vbar(:, :, :) -REAL(DFP), ALLOCATABLE :: Jij(:, :, :) -REAL(DFP), ALLOCATABLE :: realval(:) -INTEGER(I4B) :: ipt, ips, a, b + REAL(DFP), ALLOCATABLE :: m6(:, :, :, :, :, :) + REAL(DFP), ALLOCATABLE :: IJija(:, :, :, :, :) + REAL(DFP), ALLOCATABLE :: c1bar(:, :) + REAL(DFP), ALLOCATABLE :: vbar(:, :, :) + REAL(DFP), ALLOCATABLE :: Jij(:, :, :) + REAL(DFP), ALLOCATABLE :: realval(:) + INTEGER(I4B) :: ipt, ips, a, b !! !! main !! -CALL getInterpolation(obj=trial, interpol=c1bar, val=c1) -CALL getInterpolation(obj=trial, interpol=vbar, val=c2) + CALL getInterpolation(obj=trial, interpol=c1bar, val=c1) + CALL getInterpolation(obj=trial, interpol=vbar, val=c2) !! -CALL Reallocate(m6, & - & SIZE(test(1)%N, 1), & - & SIZE(trial(1)%N, 1), & - & _DIM1_, _DIM2_, & - & SIZE(test(1)%T), & - & SIZE(trial(1)%T)) + CALL Reallocate(m6, & + & SIZE(test(1)%N, 1), & + & SIZE(trial(1)%N, 1), & + & _DIM1_, _DIM2_, & + & SIZE(test(1)%T), & + & SIZE(trial(1)%T)) !! -CALL Reallocate(IJija, & - & SIZE(test(1)%N, 1), & - & SIZE(trial(1)%N, 1), & - & SIZE(m6,3), SIZE(m6,4), & - & SIZE(test(1)%T)) + CALL Reallocate(IJija, & + & SIZE(test(1)%N, 1), & + & SIZE(trial(1)%N, 1), & + & SIZE(m6, 3), SIZE(m6, 4), & + & SIZE(test(1)%T)) !! -DO ipt = 1, SIZE(trial) + DO ipt = 1, SIZE(trial) !! - realval = trial(ipt)%js * trial(ipt)%ws * trial(ipt)%thickness * & - & trial(ipt)%wt * trial(ipt)%jt * c1bar(:, ipt) + realval = trial(ipt)%js * trial(ipt)%ws * trial(ipt)%thickness * & + & trial(ipt)%wt * trial(ipt)%jt * c1bar(:, ipt) !! - DO ips = 1, SIZE(realval) + DO ips = 1, SIZE(realval) !! - Jij = OUTERPROD( trial(ipt)%N(:, ips), _KIJ_) + Jij = OUTERPROD(trial(ipt)%N(:, ips), _KIJ_) !! - DO a = 1, SIZE(m6, 5) - IJija(:, :, :, :, a) = outerprod(test(ipt)%dNTdt(:, a, ips), Jij) - END DO + DO a = 1, SIZE(m6, 5) + IJija(:, :, :, :, a) = outerprod(test(ipt)%dNTdt(:, a, ips), Jij) + END DO !! - m6 = m6 + realval(ips) * outerprod(IJija, trial(ipt)%T) + m6 = m6 + realval(ips) * outerprod(IJija, trial(ipt)%T) !! + END DO END DO -END DO !! -CALL Convert(from=m6, to=ans) + CALL Convert(from=m6, to=ans) !! -DEALLOCATE (m6, IJija, vbar, Jij, realval) + DEALLOCATE (m6, IJija, vbar, Jij, realval) END SUBROUTINE STMM_22c #undef _DIM1_ #undef _DIM2_ #undef _KIJ_ - !---------------------------------------------------------------------------- ! !---------------------------------------------------------------------------- @@ -2438,66 +2424,66 @@ END SUBROUTINE STMM_22c #define _DIM2_ SIZE(vbar, 1) PURE SUBROUTINE STMM_22d(ans, test, trial, term1, term2, c1, c2) -REAL(DFP), ALLOCATABLE, INTENT(INOUT) :: ans(:, :, :, :) -CLASS(STElemshapeData_), INTENT(IN) :: test(:) -CLASS(STElemshapeData_), INTENT(IN) :: trial(:) -INTEGER(I4B), INTENT(IN) :: term1 + REAL(DFP), ALLOCATABLE, INTENT(INOUT) :: ans(:, :, :, :) + CLASS(STElemshapeData_), INTENT(IN) :: test(:) + CLASS(STElemshapeData_), INTENT(IN) :: trial(:) + INTEGER(I4B), INTENT(IN) :: term1 !! del_t -INTEGER(I4B), INTENT(IN) :: term2 + INTEGER(I4B), INTENT(IN) :: term2 !! del_none -CLASS(FEVariable_), INTENT(IN) :: c1 + CLASS(FEVariable_), INTENT(IN) :: c1 !! scalar -CLASS(FEVariable_), INTENT(IN) :: c2 + CLASS(FEVariable_), INTENT(IN) :: c2 !! vector !! !! Internal variable -REAL(DFP), ALLOCATABLE :: m6(:, :, :, :, :, :) -REAL(DFP), ALLOCATABLE :: IJija(:, :, :, :, :) -REAL(DFP), ALLOCATABLE :: c1bar(:, :) -REAL(DFP), ALLOCATABLE :: vbar(:, :, :) -REAL(DFP), ALLOCATABLE :: Jij(:, :, :) -REAL(DFP), ALLOCATABLE :: realval(:) -INTEGER(I4B) :: ipt, ips, a, b + REAL(DFP), ALLOCATABLE :: m6(:, :, :, :, :, :) + REAL(DFP), ALLOCATABLE :: IJija(:, :, :, :, :) + REAL(DFP), ALLOCATABLE :: c1bar(:, :) + REAL(DFP), ALLOCATABLE :: vbar(:, :, :) + REAL(DFP), ALLOCATABLE :: Jij(:, :, :) + REAL(DFP), ALLOCATABLE :: realval(:) + INTEGER(I4B) :: ipt, ips, a, b !! !! main !! -CALL getInterpolation(obj=trial, interpol=c1bar, val=c1) -CALL getInterpolation(obj=trial, interpol=vbar, val=c2) + CALL getInterpolation(obj=trial, interpol=c1bar, val=c1) + CALL getInterpolation(obj=trial, interpol=vbar, val=c2) !! -CALL Reallocate(m6, & - & SIZE(test(1)%N, 1), & - & SIZE(trial(1)%N, 1), & - & _DIM1_, _DIM2_, & - & SIZE(test(1)%T), & - & SIZE(trial(1)%T)) + CALL Reallocate(m6, & + & SIZE(test(1)%N, 1), & + & SIZE(trial(1)%N, 1), & + & _DIM1_, _DIM2_, & + & SIZE(test(1)%T), & + & SIZE(trial(1)%T)) !! -CALL Reallocate(IJija, & - & SIZE(test(1)%N, 1), & - & SIZE(trial(1)%N, 1), & - & SIZE(m6,3), SIZE(m6,4), & - & SIZE(test(1)%T)) + CALL Reallocate(IJija, & + & SIZE(test(1)%N, 1), & + & SIZE(trial(1)%N, 1), & + & SIZE(m6, 3), SIZE(m6, 4), & + & SIZE(test(1)%T)) !! -DO ipt = 1, SIZE(trial) + DO ipt = 1, SIZE(trial) !! - realval = trial(ipt)%js * trial(ipt)%ws * trial(ipt)%thickness * & - & trial(ipt)%wt * trial(ipt)%jt * c1bar(:, ipt) + realval = trial(ipt)%js * trial(ipt)%ws * trial(ipt)%thickness * & + & trial(ipt)%wt * trial(ipt)%jt * c1bar(:, ipt) !! - DO ips = 1, SIZE(realval) + DO ips = 1, SIZE(realval) !! - Jij = OUTERPROD( trial(ipt)%N(:, ips), _KIJ_) + Jij = OUTERPROD(trial(ipt)%N(:, ips), _KIJ_) !! - DO a = 1, SIZE(m6, 5) - IJija(:, :, :, :, a) = outerprod(test(ipt)%dNTdt(:, a, ips), Jij) - END DO + DO a = 1, SIZE(m6, 5) + IJija(:, :, :, :, a) = outerprod(test(ipt)%dNTdt(:, a, ips), Jij) + END DO !! - m6 = m6 + realval(ips) * outerprod(IJija, trial(ipt)%T) + m6 = m6 + realval(ips) * outerprod(IJija, trial(ipt)%T) !! + END DO END DO -END DO !! -CALL Convert(from=m6, to=ans) + CALL Convert(from=m6, to=ans) !! -DEALLOCATE (m6, IJija, vbar, Jij, realval) + DEALLOCATE (m6, IJija, vbar, Jij, realval) END SUBROUTINE STMM_22d #undef _DIM1_ @@ -2513,61 +2499,61 @@ END SUBROUTINE STMM_22d #define _DIM2_ 1 PURE SUBROUTINE STMM_23a(ans, test, trial, term1, term2, c1, c2) -REAL(DFP), ALLOCATABLE, INTENT(INOUT) :: ans(:, :, :, :) -CLASS(STElemshapeData_), INTENT(IN) :: test(:) -CLASS(STElemshapeData_), INTENT(IN) :: trial(:) -INTEGER(I4B), INTENT(IN) :: term1 + REAL(DFP), ALLOCATABLE, INTENT(INOUT) :: ans(:, :, :, :) + CLASS(STElemshapeData_), INTENT(IN) :: test(:) + CLASS(STElemshapeData_), INTENT(IN) :: trial(:) + INTEGER(I4B), INTENT(IN) :: term1 !! del_none -INTEGER(I4B), INTENT(IN) :: term2 + INTEGER(I4B), INTENT(IN) :: term2 !! del_t -CLASS(FEVariable_), INTENT(IN) :: c1 + CLASS(FEVariable_), INTENT(IN) :: c1 !! scalar -CLASS(FEVariable_), INTENT(IN) :: c2 + CLASS(FEVariable_), INTENT(IN) :: c2 !! vector !! !! Internal variable -REAL(DFP), ALLOCATABLE :: m6(:, :, :, :, :, :) -REAL(DFP), ALLOCATABLE :: c1bar(:, :) -REAL(DFP), ALLOCATABLE :: vbar(:, :, :) -REAL(DFP), ALLOCATABLE :: ij(:, :) -REAL(DFP), ALLOCATABLE :: realval(:) -INTEGER(I4B) :: ipt, ips, a, b + REAL(DFP), ALLOCATABLE :: m6(:, :, :, :, :, :) + REAL(DFP), ALLOCATABLE :: c1bar(:, :) + REAL(DFP), ALLOCATABLE :: vbar(:, :, :) + REAL(DFP), ALLOCATABLE :: ij(:, :) + REAL(DFP), ALLOCATABLE :: realval(:) + INTEGER(I4B) :: ipt, ips, a, b !! !! main !! -CALL getInterpolation(obj=trial, interpol=c1bar, val=c1) -CALL getInterpolation(obj=trial, interpol=vbar, val=c2) + CALL getInterpolation(obj=trial, interpol=c1bar, val=c1) + CALL getInterpolation(obj=trial, interpol=vbar, val=c2) !! -CALL Reallocate(m6, & - & SIZE(test(1)%N, 1), & - & SIZE(trial(1)%N, 1), & - & _DIM1_, _DIM2_, & - & SIZE(test(1)%T), & - & SIZE(trial(1)%T)) + CALL Reallocate(m6, & + & SIZE(test(1)%N, 1), & + & SIZE(trial(1)%N, 1), & + & _DIM1_, _DIM2_, & + & SIZE(test(1)%T), & + & SIZE(trial(1)%T)) !! -DO ipt = 1, SIZE(trial) + DO ipt = 1, SIZE(trial) !! - realval = trial(ipt)%js * trial(ipt)%ws * trial(ipt)%thickness * & - & trial(ipt)%wt * trial(ipt)%jt * c1bar(:, ipt) + realval = trial(ipt)%js * trial(ipt)%ws * trial(ipt)%thickness * & + & trial(ipt)%wt * trial(ipt)%jt * c1bar(:, ipt) !! - DO ips = 1, SIZE(realval) + DO ips = 1, SIZE(realval) !! - ij = _KIJ_ + ij = _KIJ_ !! - DO b = 1, SIZE(trial(1)%T) - m6(:, :, :, :, :, b) = m6(:, :, :, :, :, b) & - & + realval(ips) & - & * outerprod( & - & test(ipt)%N(:, ips), & - & trial(ipt)%dNTdt(:, b, ips), & - & ij, test(ipt)%T) + DO b = 1, SIZE(trial(1)%T) + m6(:, :, :, :, :, b) = m6(:, :, :, :, :, b) & + & + realval(ips) & + & * outerprod( & + & test(ipt)%N(:, ips), & + & trial(ipt)%dNTdt(:, b, ips), & + & ij, test(ipt)%T) + END DO END DO END DO -END DO !! -CALL Convert(from=m6, to=ans) + CALL Convert(from=m6, to=ans) !! -DEALLOCATE (m6, ij, c1bar, vbar, realval) + DEALLOCATE (m6, ij, c1bar, vbar, realval) END SUBROUTINE STMM_23a #undef _DIM1_ @@ -2583,68 +2569,67 @@ END SUBROUTINE STMM_23a #define _DIM2_ SIZE(vbar, 1) PURE SUBROUTINE STMM_23b(ans, test, trial, term1, term2, c1, c2) -REAL(DFP), ALLOCATABLE, INTENT(INOUT) :: ans(:, :, :, :) -CLASS(STElemshapeData_), INTENT(IN) :: test(:) -CLASS(STElemshapeData_), INTENT(IN) :: trial(:) -INTEGER(I4B), INTENT(IN) :: term1 + REAL(DFP), ALLOCATABLE, INTENT(INOUT) :: ans(:, :, :, :) + CLASS(STElemshapeData_), INTENT(IN) :: test(:) + CLASS(STElemshapeData_), INTENT(IN) :: trial(:) + INTEGER(I4B), INTENT(IN) :: term1 !! del_none -INTEGER(I4B), INTENT(IN) :: term2 + INTEGER(I4B), INTENT(IN) :: term2 !! del_t -CLASS(FEVariable_), INTENT(IN) :: c1 + CLASS(FEVariable_), INTENT(IN) :: c1 !! scalar -CLASS(FEVariable_), INTENT(IN) :: c2 + CLASS(FEVariable_), INTENT(IN) :: c2 !! vector !! !! Internal variable -REAL(DFP), ALLOCATABLE :: m6(:, :, :, :, :, :) -REAL(DFP), ALLOCATABLE :: c1bar(:, :) -REAL(DFP), ALLOCATABLE :: vbar(:, :, :) -REAL(DFP), ALLOCATABLE :: ij(:, :) -REAL(DFP), ALLOCATABLE :: realval(:) -INTEGER(I4B) :: ipt, ips, a, b + REAL(DFP), ALLOCATABLE :: m6(:, :, :, :, :, :) + REAL(DFP), ALLOCATABLE :: c1bar(:, :) + REAL(DFP), ALLOCATABLE :: vbar(:, :, :) + REAL(DFP), ALLOCATABLE :: ij(:, :) + REAL(DFP), ALLOCATABLE :: realval(:) + INTEGER(I4B) :: ipt, ips, a, b !! !! main !! -CALL getInterpolation(obj=trial, interpol=c1bar, val=c1) -CALL getInterpolation(obj=trial, interpol=vbar, val=c2) + CALL getInterpolation(obj=trial, interpol=c1bar, val=c1) + CALL getInterpolation(obj=trial, interpol=vbar, val=c2) !! -CALL Reallocate(m6, & - & SIZE(test(1)%N, 1), & - & SIZE(trial(1)%N, 1), & - & _DIM1_, _DIM2_, & - & SIZE(test(1)%T), & - & SIZE(trial(1)%T)) + CALL Reallocate(m6, & + & SIZE(test(1)%N, 1), & + & SIZE(trial(1)%N, 1), & + & _DIM1_, _DIM2_, & + & SIZE(test(1)%T), & + & SIZE(trial(1)%T)) !! -DO ipt = 1, SIZE(trial) + DO ipt = 1, SIZE(trial) !! - realval = trial(ipt)%js * trial(ipt)%ws * trial(ipt)%thickness * & - & trial(ipt)%wt * trial(ipt)%jt * c1bar(:, ipt) + realval = trial(ipt)%js * trial(ipt)%ws * trial(ipt)%thickness * & + & trial(ipt)%wt * trial(ipt)%jt * c1bar(:, ipt) !! - DO ips = 1, SIZE(realval) + DO ips = 1, SIZE(realval) !! - ij = _KIJ_ + ij = _KIJ_ !! - DO b = 1, SIZE(trial(1)%T) - m6(:, :, :, :, :, b) = m6(:, :, :, :, :, b) & - & + realval(ips) & - & * outerprod( & - & test(ipt)%N(:, ips), & - & trial(ipt)%dNTdt(:, b, ips), & - & ij, test(ipt)%T) + DO b = 1, SIZE(trial(1)%T) + m6(:, :, :, :, :, b) = m6(:, :, :, :, :, b) & + & + realval(ips) & + & * outerprod( & + & test(ipt)%N(:, ips), & + & trial(ipt)%dNTdt(:, b, ips), & + & ij, test(ipt)%T) + END DO END DO END DO -END DO !! -CALL Convert(from=m6, to=ans) + CALL Convert(from=m6, to=ans) !! -DEALLOCATE (m6, ij, c1bar, vbar, realval) + DEALLOCATE (m6, ij, c1bar, vbar, realval) END SUBROUTINE STMM_23b #undef _DIM1_ #undef _DIM2_ #undef _KIJ_ - !---------------------------------------------------------------------------- ! !---------------------------------------------------------------------------- @@ -2654,61 +2639,61 @@ END SUBROUTINE STMM_23b #define _DIM2_ SIZE(vbar, 1) PURE SUBROUTINE STMM_23c(ans, test, trial, term1, term2, c1, c2) -REAL(DFP), ALLOCATABLE, INTENT(INOUT) :: ans(:, :, :, :) -CLASS(STElemshapeData_), INTENT(IN) :: test(:) -CLASS(STElemshapeData_), INTENT(IN) :: trial(:) -INTEGER(I4B), INTENT(IN) :: term1 + REAL(DFP), ALLOCATABLE, INTENT(INOUT) :: ans(:, :, :, :) + CLASS(STElemshapeData_), INTENT(IN) :: test(:) + CLASS(STElemshapeData_), INTENT(IN) :: trial(:) + INTEGER(I4B), INTENT(IN) :: term1 !! del_none -INTEGER(I4B), INTENT(IN) :: term2 + INTEGER(I4B), INTENT(IN) :: term2 !! del_t -CLASS(FEVariable_), INTENT(IN) :: c1 + CLASS(FEVariable_), INTENT(IN) :: c1 !! scalar -CLASS(FEVariable_), INTENT(IN) :: c2 + CLASS(FEVariable_), INTENT(IN) :: c2 !! vector !! !! Internal variable -REAL(DFP), ALLOCATABLE :: m6(:, :, :, :, :, :) -REAL(DFP), ALLOCATABLE :: c1bar(:, :) -REAL(DFP), ALLOCATABLE :: vbar(:, :, :) -REAL(DFP), ALLOCATABLE :: ij(:, :) -REAL(DFP), ALLOCATABLE :: realval(:) -INTEGER(I4B) :: ipt, ips, a, b + REAL(DFP), ALLOCATABLE :: m6(:, :, :, :, :, :) + REAL(DFP), ALLOCATABLE :: c1bar(:, :) + REAL(DFP), ALLOCATABLE :: vbar(:, :, :) + REAL(DFP), ALLOCATABLE :: ij(:, :) + REAL(DFP), ALLOCATABLE :: realval(:) + INTEGER(I4B) :: ipt, ips, a, b !! !! main !! -CALL getInterpolation(obj=trial, interpol=c1bar, val=c1) -CALL getInterpolation(obj=trial, interpol=vbar, val=c2) + CALL getInterpolation(obj=trial, interpol=c1bar, val=c1) + CALL getInterpolation(obj=trial, interpol=vbar, val=c2) !! -CALL Reallocate(m6, & - & SIZE(test(1)%N, 1), & - & SIZE(trial(1)%N, 1), & - & _DIM1_, _DIM2_, & - & SIZE(test(1)%T), & - & SIZE(trial(1)%T)) + CALL Reallocate(m6, & + & SIZE(test(1)%N, 1), & + & SIZE(trial(1)%N, 1), & + & _DIM1_, _DIM2_, & + & SIZE(test(1)%T), & + & SIZE(trial(1)%T)) !! -DO ipt = 1, SIZE(trial) + DO ipt = 1, SIZE(trial) !! - realval = trial(ipt)%js * trial(ipt)%ws * trial(ipt)%thickness * & - & trial(ipt)%wt * trial(ipt)%jt * c1bar(:, ipt) + realval = trial(ipt)%js * trial(ipt)%ws * trial(ipt)%thickness * & + & trial(ipt)%wt * trial(ipt)%jt * c1bar(:, ipt) !! - DO ips = 1, SIZE(realval) + DO ips = 1, SIZE(realval) !! - ij = _KIJ_ + ij = _KIJ_ !! - DO b = 1, SIZE(trial(1)%T) - m6(:, :, :, :, :, b) = m6(:, :, :, :, :, b) & - & + realval(ips) & - & * outerprod( & - & test(ipt)%N(:, ips), & - & trial(ipt)%dNTdt(:, b, ips), & - & ij, test(ipt)%T) + DO b = 1, SIZE(trial(1)%T) + m6(:, :, :, :, :, b) = m6(:, :, :, :, :, b) & + & + realval(ips) & + & * outerprod( & + & test(ipt)%N(:, ips), & + & trial(ipt)%dNTdt(:, b, ips), & + & ij, test(ipt)%T) + END DO END DO END DO -END DO !! -CALL Convert(from=m6, to=ans) + CALL Convert(from=m6, to=ans) !! -DEALLOCATE (m6, ij, c1bar, vbar, realval) + DEALLOCATE (m6, ij, c1bar, vbar, realval) END SUBROUTINE STMM_23c #undef _DIM1_ @@ -2724,61 +2709,61 @@ END SUBROUTINE STMM_23c #define _DIM2_ SIZE(vbar, 1) PURE SUBROUTINE STMM_23d(ans, test, trial, term1, term2, c1, c2) -REAL(DFP), ALLOCATABLE, INTENT(INOUT) :: ans(:, :, :, :) -CLASS(STElemshapeData_), INTENT(IN) :: test(:) -CLASS(STElemshapeData_), INTENT(IN) :: trial(:) -INTEGER(I4B), INTENT(IN) :: term1 + REAL(DFP), ALLOCATABLE, INTENT(INOUT) :: ans(:, :, :, :) + CLASS(STElemshapeData_), INTENT(IN) :: test(:) + CLASS(STElemshapeData_), INTENT(IN) :: trial(:) + INTEGER(I4B), INTENT(IN) :: term1 !! del_none -INTEGER(I4B), INTENT(IN) :: term2 + INTEGER(I4B), INTENT(IN) :: term2 !! del_t -CLASS(FEVariable_), INTENT(IN) :: c1 + CLASS(FEVariable_), INTENT(IN) :: c1 !! scalar -CLASS(FEVariable_), INTENT(IN) :: c2 + CLASS(FEVariable_), INTENT(IN) :: c2 !! vector !! !! Internal variable -REAL(DFP), ALLOCATABLE :: m6(:, :, :, :, :, :) -REAL(DFP), ALLOCATABLE :: c1bar(:, :) -REAL(DFP), ALLOCATABLE :: vbar(:, :, :) -REAL(DFP), ALLOCATABLE :: ij(:, :) -REAL(DFP), ALLOCATABLE :: realval(:) -INTEGER(I4B) :: ipt, ips, a, b + REAL(DFP), ALLOCATABLE :: m6(:, :, :, :, :, :) + REAL(DFP), ALLOCATABLE :: c1bar(:, :) + REAL(DFP), ALLOCATABLE :: vbar(:, :, :) + REAL(DFP), ALLOCATABLE :: ij(:, :) + REAL(DFP), ALLOCATABLE :: realval(:) + INTEGER(I4B) :: ipt, ips, a, b !! !! main !! -CALL getInterpolation(obj=trial, interpol=c1bar, val=c1) -CALL getInterpolation(obj=trial, interpol=vbar, val=c2) + CALL getInterpolation(obj=trial, interpol=c1bar, val=c1) + CALL getInterpolation(obj=trial, interpol=vbar, val=c2) !! -CALL Reallocate(m6, & - & SIZE(test(1)%N, 1), & - & SIZE(trial(1)%N, 1), & - & _DIM1_, _DIM2_, & - & SIZE(test(1)%T), & - & SIZE(trial(1)%T)) + CALL Reallocate(m6, & + & SIZE(test(1)%N, 1), & + & SIZE(trial(1)%N, 1), & + & _DIM1_, _DIM2_, & + & SIZE(test(1)%T), & + & SIZE(trial(1)%T)) !! -DO ipt = 1, SIZE(trial) + DO ipt = 1, SIZE(trial) !! - realval = trial(ipt)%js * trial(ipt)%ws * trial(ipt)%thickness * & - & trial(ipt)%wt * trial(ipt)%jt * c1bar(:, ipt) + realval = trial(ipt)%js * trial(ipt)%ws * trial(ipt)%thickness * & + & trial(ipt)%wt * trial(ipt)%jt * c1bar(:, ipt) !! - DO ips = 1, SIZE(realval) + DO ips = 1, SIZE(realval) !! - ij = _KIJ_ + ij = _KIJ_ !! - DO b = 1, SIZE(trial(1)%T) - m6(:, :, :, :, :, b) = m6(:, :, :, :, :, b) & - & + realval(ips) & - & * outerprod( & - & test(ipt)%N(:, ips), & - & trial(ipt)%dNTdt(:, b, ips), & - & ij, test(ipt)%T) + DO b = 1, SIZE(trial(1)%T) + m6(:, :, :, :, :, b) = m6(:, :, :, :, :, b) & + & + realval(ips) & + & * outerprod( & + & test(ipt)%N(:, ips), & + & trial(ipt)%dNTdt(:, b, ips), & + & ij, test(ipt)%T) + END DO END DO END DO -END DO !! -CALL Convert(from=m6, to=ans) + CALL Convert(from=m6, to=ans) !! -DEALLOCATE (m6, ij, c1bar, vbar, realval) + DEALLOCATE (m6, ij, c1bar, vbar, realval) END SUBROUTINE STMM_23d #undef _DIM1_ @@ -2801,7 +2786,6 @@ END SUBROUTINE STMM_24a #undef _DIM2_ #undef _KIJ_ - !---------------------------------------------------------------------------- ! !---------------------------------------------------------------------------- @@ -2818,7 +2802,6 @@ END SUBROUTINE STMM_24b #undef _DIM2_ #undef _KIJ_ - !---------------------------------------------------------------------------- ! !---------------------------------------------------------------------------- @@ -2835,7 +2818,6 @@ END SUBROUTINE STMM_24c #undef _DIM2_ #undef _KIJ_ - !---------------------------------------------------------------------------- ! !---------------------------------------------------------------------------- @@ -2861,55 +2843,55 @@ END SUBROUTINE STMM_24d !---------------------------------------------------------------------------- PURE SUBROUTINE STMM_25(ans, test, trial, term1, term2, c1, c2) -REAL(DFP), ALLOCATABLE, INTENT(INOUT) :: ans(:, :, :, :) -CLASS(STElemshapeData_), INTENT(IN) :: test(:) -CLASS(STElemshapeData_), INTENT(IN) :: trial(:) -INTEGER(I4B), INTENT(IN) :: term1 + REAL(DFP), ALLOCATABLE, INTENT(INOUT) :: ans(:, :, :, :) + CLASS(STElemshapeData_), INTENT(IN) :: test(:) + CLASS(STElemshapeData_), INTENT(IN) :: trial(:) + INTEGER(I4B), INTENT(IN) :: term1 !! del_none -INTEGER(I4B), INTENT(IN) :: term2 + INTEGER(I4B), INTENT(IN) :: term2 !! del_none -CLASS(FEVariable_), INTENT(IN) :: c1 + CLASS(FEVariable_), INTENT(IN) :: c1 !! scalar -CLASS(FEVariable_), INTENT(IN) :: c2 + CLASS(FEVariable_), INTENT(IN) :: c2 !! matrix !! !! Internal variable -REAL(DFP), ALLOCATABLE :: m6(:, :, :, :, :, :) -REAL(DFP), ALLOCATABLE :: c1bar(:, :) -REAL(DFP), ALLOCATABLE :: kbar(:, :, :, :) -REAL(DFP), ALLOCATABLE :: realval(:) -INTEGER(I4B) :: ipt, ips, a, b + REAL(DFP), ALLOCATABLE :: m6(:, :, :, :, :, :) + REAL(DFP), ALLOCATABLE :: c1bar(:, :) + REAL(DFP), ALLOCATABLE :: kbar(:, :, :, :) + REAL(DFP), ALLOCATABLE :: realval(:) + INTEGER(I4B) :: ipt, ips, a, b !! !! main !! -CALL getInterpolation(obj=trial, interpol=c1bar, val=c1) -CALL getInterpolation(obj=trial, interpol=kbar, val=c2) + CALL getInterpolation(obj=trial, interpol=c1bar, val=c1) + CALL getInterpolation(obj=trial, interpol=kbar, val=c2) !! -CALL Reallocate(m6, & - & SIZE(test(1)%N, 1), & - & SIZE(trial(1)%N, 1), & - & SIZE(kbar,1), SIZE(kbar,2), & - & SIZE(test(1)%T), & - & SIZE(trial(1)%T)) + CALL Reallocate(m6, & + & SIZE(test(1)%N, 1), & + & SIZE(trial(1)%N, 1), & + & SIZE(kbar, 1), SIZE(kbar, 2), & + & SIZE(test(1)%T), & + & SIZE(trial(1)%T)) !! -DO ipt = 1, SIZE(trial) + DO ipt = 1, SIZE(trial) !! - realval = trial(ipt)%js * trial(ipt)%ws * trial(ipt)%thickness * & - & trial(ipt)%wt * trial(ipt)%jt * c1bar( :, ipt ) + realval = trial(ipt)%js * trial(ipt)%ws * trial(ipt)%thickness * & + & trial(ipt)%wt * trial(ipt)%jt * c1bar(:, ipt) !! - DO ips = 1, SIZE(realval) + DO ips = 1, SIZE(realval) !! - m6 = m6 + realval( ips ) * outerprod( & - & outerprod(test(ipt)%N(:, ips), & - & trial(ipt)%N(:, ips)), & - & kbar(:,:,ips, ipt) , & - & test(ipt)%T, & - & trial(ipt)%T) + m6 = m6 + realval(ips) * outerprod( & + & outerprod(test(ipt)%N(:, ips), & + & trial(ipt)%N(:, ips)), & + & kbar(:, :, ips, ipt), & + & test(ipt)%T, & + & trial(ipt)%T) + END DO END DO -END DO !! -CALL Convert(from=m6, to=ans) -DEALLOCATE (m6, kbar, c1bar, realval) + CALL Convert(from=m6, to=ans) + DEALLOCATE (m6, kbar, c1bar, realval) !! END SUBROUTINE STMM_25 @@ -2918,66 +2900,66 @@ END SUBROUTINE STMM_25 !---------------------------------------------------------------------------- PURE SUBROUTINE STMM_26(ans, test, trial, term1, term2, c1, c2) -REAL(DFP), ALLOCATABLE, INTENT(INOUT) :: ans(:, :, :, :) -CLASS(STElemshapeData_), INTENT(IN) :: test(:) -CLASS(STElemshapeData_), INTENT(IN) :: trial(:) -INTEGER(I4B), INTENT(IN) :: term1 + REAL(DFP), ALLOCATABLE, INTENT(INOUT) :: ans(:, :, :, :) + CLASS(STElemshapeData_), INTENT(IN) :: test(:) + CLASS(STElemshapeData_), INTENT(IN) :: trial(:) + INTEGER(I4B), INTENT(IN) :: term1 !! del_t -INTEGER(I4B), INTENT(IN) :: term2 + INTEGER(I4B), INTENT(IN) :: term2 !! del_none -CLASS(FEVariable_), INTENT(IN) :: c1 + CLASS(FEVariable_), INTENT(IN) :: c1 !! scalar -CLASS(FEVariable_), INTENT(IN) :: c2 + CLASS(FEVariable_), INTENT(IN) :: c2 !! matrix !! !! Internal variable -REAL(DFP), ALLOCATABLE :: m6(:, :, :, :, :, :) -REAL(DFP), ALLOCATABLE :: c1bar(:, :) -REAL(DFP), ALLOCATABLE :: IJija(:, :, :, :, :) -REAL(DFP), ALLOCATABLE :: kbar(:, :, :, :) -REAL(DFP), ALLOCATABLE :: Jij(:, :, :) -REAL(DFP), ALLOCATABLE :: realval(:) -INTEGER(I4B) :: ipt, ips, a, b + REAL(DFP), ALLOCATABLE :: m6(:, :, :, :, :, :) + REAL(DFP), ALLOCATABLE :: c1bar(:, :) + REAL(DFP), ALLOCATABLE :: IJija(:, :, :, :, :) + REAL(DFP), ALLOCATABLE :: kbar(:, :, :, :) + REAL(DFP), ALLOCATABLE :: Jij(:, :, :) + REAL(DFP), ALLOCATABLE :: realval(:) + INTEGER(I4B) :: ipt, ips, a, b !! !! main !! -CALL getInterpolation(obj=trial, interpol=c1bar, val=c1) -CALL getInterpolation(obj=trial, interpol=kbar, val=c2) + CALL getInterpolation(obj=trial, interpol=c1bar, val=c1) + CALL getInterpolation(obj=trial, interpol=kbar, val=c2) !! -CALL Reallocate(m6, & - & SIZE(test(1)%N, 1), & - & SIZE(trial(1)%N, 1), & - & SIZE(kbar,1), SIZE(kbar,2), & - & SIZE(test(1)%T), & - & SIZE(trial(1)%T)) + CALL Reallocate(m6, & + & SIZE(test(1)%N, 1), & + & SIZE(trial(1)%N, 1), & + & SIZE(kbar, 1), SIZE(kbar, 2), & + & SIZE(test(1)%T), & + & SIZE(trial(1)%T)) !! -CALL Reallocate(IJija, & - & SIZE(test(1)%N, 1), & - & SIZE(trial(1)%N, 1), & - & SIZE(m6,3), SIZE(m6,4), & - & SIZE(test(1)%T)) + CALL Reallocate(IJija, & + & SIZE(test(1)%N, 1), & + & SIZE(trial(1)%N, 1), & + & SIZE(m6, 3), SIZE(m6, 4), & + & SIZE(test(1)%T)) !! -DO ipt = 1, SIZE(trial) + DO ipt = 1, SIZE(trial) !! - realval = trial(ipt)%js * trial(ipt)%ws * trial(ipt)%thickness * & - & trial(ipt)%wt * trial(ipt)%jt * c1bar(:, ipt) + realval = trial(ipt)%js * trial(ipt)%ws * trial(ipt)%thickness * & + & trial(ipt)%wt * trial(ipt)%jt * c1bar(:, ipt) !! - DO ips = 1, SIZE(realval) + DO ips = 1, SIZE(realval) !! - Jij = OUTERPROD( trial(ipt)%N(:, ips), kbar(:,:,ips,ipt) ) + Jij = OUTERPROD(trial(ipt)%N(:, ips), kbar(:, :, ips, ipt)) !! - DO a = 1, SIZE(m6, 5) - IJija(:, :, :, :, a) = outerprod(test(ipt)%dNTdt(:, a, ips), Jij) - END DO + DO a = 1, SIZE(m6, 5) + IJija(:, :, :, :, a) = outerprod(test(ipt)%dNTdt(:, a, ips), Jij) + END DO !! - m6 = m6 + realval(ips) * outerprod(IJija, trial(ipt)%T) + m6 = m6 + realval(ips) * outerprod(IJija, trial(ipt)%T) !! + END DO END DO -END DO !! -CALL Convert(from=m6, to=ans) + CALL Convert(from=m6, to=ans) !! -DEALLOCATE (m6, IJija, kbar, Jij, realval) + DEALLOCATE (m6, IJija, kbar, Jij, realval) !! END SUBROUTINE STMM_26 @@ -3013,24 +2995,24 @@ PURE SUBROUTINE STMM_27(ans, test, trial, term1, term2, c1, c2) CALL Reallocate(m6, & & SIZE(test(1)%N, 1), & & SIZE(trial(1)%N, 1), & - & SIZE(kbar,1), SIZE(kbar,2), & + & SIZE(kbar, 1), SIZE(kbar, 2), & & SIZE(test(1)%T), & & SIZE(trial(1)%T)) !! DO ipt = 1, SIZE(trial) !! realval = trial(ipt)%js * trial(ipt)%ws * trial(ipt)%thickness * & - & trial(ipt)%wt * trial(ipt)%jt * c1bar(:,ipt) + & trial(ipt)%wt * trial(ipt)%jt * c1bar(:, ipt) !! DO ips = 1, SIZE(realval) !! - DO b = 1, SIZE(m6,6) + DO b = 1, SIZE(m6, 6) m6(:, :, :, :, :, b) = m6(:, :, :, :, :, b) & & + realval(ips) & & * outerprod( & - & test(ipt)%N(:,ips), & - & trial(ipt)%dNTdt(:,b,ips), & - & kbar(:,:,ips, ipt), test(ipt)%T) + & test(ipt)%N(:, ips), & + & trial(ipt)%dNTdt(:, b, ips), & + & kbar(:, :, ips, ipt), test(ipt)%T) END DO END DO END DO @@ -3041,66 +3023,65 @@ PURE SUBROUTINE STMM_27(ans, test, trial, term1, term2, c1, c2) !! END SUBROUTINE STMM_27 - !---------------------------------------------------------------------------- ! !---------------------------------------------------------------------------- PURE SUBROUTINE STMM_28(ans, test, trial, term1, term2, c1, c2) -REAL(DFP), ALLOCATABLE, INTENT(INOUT) :: ans(:, :, :, :) -CLASS(STElemshapeData_), INTENT(IN) :: test(:) -CLASS(STElemshapeData_), INTENT(IN) :: trial(:) -INTEGER(I4B), INTENT(IN) :: term1 + REAL(DFP), ALLOCATABLE, INTENT(INOUT) :: ans(:, :, :, :) + CLASS(STElemshapeData_), INTENT(IN) :: test(:) + CLASS(STElemshapeData_), INTENT(IN) :: trial(:) + INTEGER(I4B), INTENT(IN) :: term1 !! del_t -INTEGER(I4B), INTENT(IN) :: term2 + INTEGER(I4B), INTENT(IN) :: term2 !! del_t -CLASS(FEVariable_), INTENT(IN) :: c1 + CLASS(FEVariable_), INTENT(IN) :: c1 !! scalar -CLASS(FEVariable_), INTENT(IN) :: c2 + CLASS(FEVariable_), INTENT(IN) :: c2 !! matrix !! !! Internal variable -REAL(DFP), ALLOCATABLE :: m6(:, :, :, :, :, :) -REAL(DFP), ALLOCATABLE :: c1bar(:, :) -REAL(DFP), ALLOCATABLE :: kbar(:, :, :, :) -REAL(DFP), ALLOCATABLE :: realval(:) -INTEGER(I4B) :: ipt, ips, a, b + REAL(DFP), ALLOCATABLE :: m6(:, :, :, :, :, :) + REAL(DFP), ALLOCATABLE :: c1bar(:, :) + REAL(DFP), ALLOCATABLE :: kbar(:, :, :, :) + REAL(DFP), ALLOCATABLE :: realval(:) + INTEGER(I4B) :: ipt, ips, a, b !! !! main !! -CALL getInterpolation(obj=trial, interpol=c1bar, val=c1) -CALL getInterpolation(obj=trial, interpol=kbar, val=c2) + CALL getInterpolation(obj=trial, interpol=c1bar, val=c1) + CALL getInterpolation(obj=trial, interpol=kbar, val=c2) !! -CALL Reallocate(m6, & - & SIZE(test(1)%N, 1), & - & SIZE(trial(1)%N, 1), & - & SIZE(kbar,1), size(kbar,2), & - & SIZE(test(1)%T), & - & SIZE(trial(1)%T)) + CALL Reallocate(m6, & + & SIZE(test(1)%N, 1), & + & SIZE(trial(1)%N, 1), & + & SIZE(kbar, 1), SIZE(kbar, 2), & + & SIZE(test(1)%T), & + & SIZE(trial(1)%T)) !! -DO ipt = 1, SIZE(trial) + DO ipt = 1, SIZE(trial) !! - realval = trial(ipt)%js * trial(ipt)%ws * trial(ipt)%thickness * & - & trial(ipt)%wt * trial(ipt)%jt * c1bar(:,ipt) + realval = trial(ipt)%js * trial(ipt)%ws * trial(ipt)%thickness * & + & trial(ipt)%wt * trial(ipt)%jt * c1bar(:, ipt) !! - DO ips = 1, SIZE(realval) + DO ips = 1, SIZE(realval) !! - DO b = 1, SIZE(m6, 6) - DO a = 1, SIZE(m6, 5) - m6(:, :, :, :, a, b) = m6(:, :, :, :, a, b) & - & + realval(ips) & - & * outerprod( & - & test(ipt)%dNTdt(:,a, ips), & - & trial(ipt)%dNTdt(:,b, ips), & - & kbar(:,:,ips, ipt) ) + DO b = 1, SIZE(m6, 6) + DO a = 1, SIZE(m6, 5) + m6(:, :, :, :, a, b) = m6(:, :, :, :, a, b) & + & + realval(ips) & + & * outerprod( & + & test(ipt)%dNTdt(:, a, ips), & + & trial(ipt)%dNTdt(:, b, ips), & + & kbar(:, :, ips, ipt)) + END DO END DO - END DO !! + END DO END DO -END DO !! -CALL Convert(from=m6, to=ans) -DEALLOCATE (m6, kbar, c1bar, realval) + CALL Convert(from=m6, to=ans) + DEALLOCATE (m6, kbar, c1bar, realval) !! END SUBROUTINE STMM_28 From a87953613ad908798ee7a8c979c28c9819a616a8 Mon Sep 17 00:00:00 2001 From: Vikas Sharma Date: Mon, 15 Jan 2024 20:59:23 +0900 Subject: [PATCH 06/10] Update MassMatrix_Method.F90 --- .../MassMatrix/src/MassMatrix_Method.F90 | 26 +++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/src/modules/MassMatrix/src/MassMatrix_Method.F90 b/src/modules/MassMatrix/src/MassMatrix_Method.F90 index 21322ddd..c2b6ab31 100644 --- a/src/modules/MassMatrix/src/MassMatrix_Method.F90 +++ b/src/modules/MassMatrix/src/MassMatrix_Method.F90 @@ -26,6 +26,7 @@ MODULE MassMatrix_Method PRIVATE PUBLIC :: MassMatrix +PUBLIC :: ViscousBoundaryMassMatrix !---------------------------------------------------------------------------- ! MassMatrix@MassMatrixMethods @@ -125,6 +126,31 @@ MODULE PURE FUNCTION MassMatrix_4(test, trial, rho, rhorank) & END FUNCTION MassMatrix_4 END INTERFACE MassMatrix +!---------------------------------------------------------------------------- +! MassMatrix@MassMatrixMethods +!---------------------------------------------------------------------------- + +!> author: Vikas Sharma, Ph. D. +! date: 2024-01-15 +! summary: This subroutine makes mass matrix used for viscous boundary + +INTERFACE ViscousBoundaryMassMatrix + MODULE PURE FUNCTION MassMatrix_5(test, trial, lambda, mu, rho) & + & RESULT(ans) + CLASS(ElemshapeData_), INTENT(IN) :: test + !! Shapedata for test function + CLASS(ElemshapeData_), INTENT(IN) :: trial + !! Shapedata for trial function + CLASS(FEVariable_), INTENT(IN) :: lambda + !! Lame parameter + CLASS(FEVariable_), INTENT(IN) :: mu + !! Lame parameter + CLASS(FEVariable_), INTENT(IN) :: rho + !! Mass Density + REAL(DFP), ALLOCATABLE :: ans(:, :) + END FUNCTION MassMatrix_5 +END INTERFACE ViscousBoundaryMassMatrix + !---------------------------------------------------------------------------- ! !---------------------------------------------------------------------------- From 47d979884393c9716c795bd86edfcfdeaa2acc83 Mon Sep 17 00:00:00 2001 From: Vikas Sharma Date: Mon, 15 Jan 2024 20:59:26 +0900 Subject: [PATCH 07/10] Update MassMatrix_Method@Methods.F90 --- .../src/MassMatrix_Method@Methods.F90 | 52 +++++++++++++++++++ 1 file changed, 52 insertions(+) diff --git a/src/submodules/MassMatrix/src/MassMatrix_Method@Methods.F90 b/src/submodules/MassMatrix/src/MassMatrix_Method@Methods.F90 index c08293c5..880619fe 100644 --- a/src/submodules/MassMatrix/src/MassMatrix_Method@Methods.F90 +++ b/src/submodules/MassMatrix/src/MassMatrix_Method@Methods.F90 @@ -267,6 +267,58 @@ END SUBROUTINE MM_2d DEALLOCATE (realval, m2, kbar, m4) END PROCEDURE MassMatrix_4 +!---------------------------------------------------------------------------- +! MassMatrix +!---------------------------------------------------------------------------- + +MODULE PROCEDURE MassMatrix_5 +REAL(DFP), ALLOCATABLE :: realval(:) +REAL(DFP), ALLOCATABLE :: m2(:, :), eyemat(:, :), nij(:, :) +REAL(DFP), ALLOCATABLE :: lambdaBar(:) +REAL(DFP), ALLOCATABLE :: muBar(:) +REAL(DFP), ALLOCATABLE :: rhoBar(:) +REAL(DFP), ALLOCATABLE :: acoeff(:) +REAL(DFP), ALLOCATABLE :: bcoeff(:) +REAL(DFP), ALLOCATABLE :: m4(:, :, :, :) +INTEGER(I4B) :: ii, jj, ips, nsd, nns + +! main +CALL GetInterpolation(obj=trial, interpol=lambdaBar, val=lambda) +CALL GetInterpolation(obj=trial, interpol=muBar, val=mu) +CALL GetInterpolation(obj=trial, interpol=rhoBar, val=rho) + +ALLOCATE (acoeff(SIZE(lambdaBar, 1)), bcoeff(SIZE(lambdaBar, 1))) + +bcoeff = SQRT(rhoBar * muBar) +acoeff = SQRT(rhoBar * (lambdaBar + 2.0_DFP * muBar)) - bcoeff + +nsd = trial%refelem%nsd +eyemat = Eye(nsd, 1.0_DFP) +nns = SIZE(test%N, 1) +ALLOCATE (m4(nns, nns, nsd, nsd)) + +realval = trial%js * trial%ws * trial%thickness + +DO ips = 1, SIZE(realval) + m2 = OUTERPROD(a=test%normal(:, ips), b=trial%normal(:, ips)) + nij = OUTERPROD(a=test%N(:, ips), b=trial%N(:, ips)) + + DO jj = 1, nsd + DO ii = 1, nsd + + m4(:, :, ii, jj) = m4(:, :, ii, jj) + realval(ips) * & + & (acoeff(ips) * m2(ii, jj) + bcoeff(ips) * eyemat(ii, jj)) * nij + + END DO + END DO +END DO + +CALL Convert(From=m4, To=ans) + +DEALLOCATE (realval, m2, lambdaBar, muBar, rhoBar, acoeff, bcoeff, m4, & + & eyemat, nij) +END PROCEDURE MassMatrix_5 + !---------------------------------------------------------------------------- ! !---------------------------------------------------------------------------- From c4d3718c9d90916ba08ea7f68003c5fed6bd5953 Mon Sep 17 00:00:00 2001 From: "Vikas@easifem@archlinux@work" Date: Fri, 26 Jan 2024 13:10:03 +0900 Subject: [PATCH 08/10] Updating BaseType - Adding ReferenceElementInfo type to BaseType --- src/modules/BaseType/src/BaseType.F90 | 12 +++- .../Geometry/src/ReferenceElement_Method.F90 | 55 ++++++++++++++++++- .../ReferenceQuadrangle_Method@Methods.F90 | 14 ++--- 3 files changed, 71 insertions(+), 10 deletions(-) diff --git a/src/modules/BaseType/src/BaseType.F90 b/src/modules/BaseType/src/BaseType.F90 index 5ecda063..ca93c836 100644 --- a/src/modules/BaseType/src/BaseType.F90 +++ b/src/modules/BaseType/src/BaseType.F90 @@ -69,6 +69,7 @@ MODULE BaseType PUBLIC :: Rank2TensorPointer_ PUBLIC :: DeformationGradient_ PUBLIC :: DeformationGradientPointer_ +PUBLIC :: TypeDeformationGradient PUBLIC :: LeftCauchyGreen_ PUBLIC :: TypeLeftCauchyGreen PUBLIC :: LeftCauchyGreenPointer_ @@ -784,9 +785,13 @@ MODULE BaseType TYPE :: ReferenceElement_ CHARACTER(10) :: domainName = "GENERAL" - !! UNIT, BIUNIT, GENERAL + !! UNIT, BIUNIT, GENERAL INTEGER(I4B) :: entityCounts(4) = 0 !! Number of 0D, 1D, 2D, 3D entities + !! entityCounts(1) = total number of points + !! entityCounts(2) = total number of edges + !! entityCounts(3) = total number of faces + !! entityCounts(4) = total number of cells INTEGER(I4B) :: xiDimension = 0 !! Xidimension INTEGER(I4B) :: name = 0 @@ -797,7 +802,10 @@ MODULE BaseType !! Number of spatial dimensions INTEGER(I4B) :: interpolationPointType = Equidistance !! Interpolation point - !! Equidistance, GaussLegendre, GaussLobatto, Chebyshev + !! Equidistance + !! GaussLegendre + !! GaussLobatto + !! Chebyshev TYPE(ReferenceTopology_), ALLOCATABLE :: topology(:) !! Topology information of 0D, 1, 2, 3D entities REAL(DFP), ALLOCATABLE :: xiJ(:, :) diff --git a/src/modules/Geometry/src/ReferenceElement_Method.F90 b/src/modules/Geometry/src/ReferenceElement_Method.F90 index b8a3c4b6..a69fa0c7 100644 --- a/src/modules/Geometry/src/ReferenceElement_Method.F90 +++ b/src/modules/Geometry/src/ReferenceElement_Method.F90 @@ -66,6 +66,59 @@ MODULE ReferenceElement_Method PUBLIC :: GetTotalEdges PUBLIC :: GetTotalFaces PUBLIC :: GetTotalCells +PUBLIC :: ReferenceElementInfo + +!---------------------------------------------------------------------------- +! ReferenceElementInfo_ +!---------------------------------------------------------------------------- + +TYPE :: ReferenceElementInfo_ + INTEGER(I4B) :: point = 1 + INTEGER(I4B) :: line = 2 + INTEGER(I4B) :: triangle = 3 + INTEGER(I4B) :: quadrangle = 4 + INTEGER(I4B) :: tetrahedron = 5 + INTEGER(I4B) :: hexahedron = 6 + INTEGER(I4B) :: prism = 7 + INTEGER(I4B) :: pyramid = 8 + INTEGER(I4B) :: tElemTopologyType_0D = 1 + INTEGER(I4B) :: tElemTopologyType_1D = 1 + INTEGER(I4B) :: tElemTopologyType_2D = 2 + INTEGER(I4B) :: tElemTopologyType_3D = 4 + INTEGER(I4B) :: tElemTopologyType = 8 + INTEGER(I4B) :: elemTopologyName(8) = [ & + & Point, & + & Line, & + & Triangle, & + & Quadrangle, & + & Tetrahedron, Hexahedron, Prism, Pyramid] + INTEGER(I4B) :: maxFaces = 6 + INTEGER(I4B) :: maxEdges = 12 + INTEGER(I4B) :: maxPoints = 8 + INTEGER(I4B) :: tCells(8) = [0, 0, 0, 0, 1, 1, 1, 1] + !! Here cell is a topology for which xidim = 3 + INTEGER(I4B) :: tFaces(8) = [0, 0, 1, 1, 4, 6, 5, 5] + !! Here facet is topology entity for which xidim = 2 + INTEGER(I4B) :: tEdges(8) = [0, 0, 3, 4, 6, 12, 9, 8] + !! Here edge is topology entity for which xidim = 1 + INTEGER(I4B) :: tPoints(8) = [1, 2, 3, 4, 4, 8, 6, 5] + !! A point is topology entity for which xidim = 0 + INTEGER(I4B) :: nne_in_face_triangle(1) = [3] + !! number of nodes in each face of triangle + INTEGER(I4B) :: nne_in_face_quadrangle(1) = [4] + !! number of nodes in each face of quadrangle + INTEGER(I4B) :: nne_in_face_tetrahedron(4) = [3, 3, 3, 3] + !! number of nodes in each face of tetrahedron + INTEGER(I4B) :: nne_in_face_hexahedron(6) = [4, 4, 4, 4, 4, 4] + !! number of nodes in each face of tetrahedron + INTEGER(I4B) :: nne_in_face_prism(5) = [3, 4, 4, 4, 3] + !! number of nodes in each face of tetrahedron + INTEGER(I4B) :: nne_in_face_pyramid(5) = [4, 3, 3, 3, 3] + !! number of nodes in each face of tetrahedron +END TYPE ReferenceElementInfo_ + +TYPE(ReferenceElementInfo_), PARAMETER :: ReferenceElementInfo = & + & ReferenceElementInfo_() !---------------------------------------------------------------------------- ! GetTotalEdges@GeometryMethods @@ -381,7 +434,7 @@ END FUNCTION refelem_Constructor_2 END INTERFACE ReferenceElement_Pointer !---------------------------------------------------------------------------- -! Getnptrs@ConstrucorMethods +! GetConnectivity@ConstrucorMethods !---------------------------------------------------------------------------- !> author: Vikas Sharma, Ph. D. diff --git a/src/submodules/Geometry/src/ReferenceQuadrangle_Method@Methods.F90 b/src/submodules/Geometry/src/ReferenceQuadrangle_Method@Methods.F90 index 89fe9eae..da25f6c2 100644 --- a/src/submodules/Geometry/src/ReferenceQuadrangle_Method@Methods.F90 +++ b/src/submodules/Geometry/src/ReferenceQuadrangle_Method@Methods.F90 @@ -129,7 +129,7 @@ & order=order, & & ipType=ipType, & & layout="VEFC") - obj%domainName=refelem%domainName + obj%domainName = refelem%domainName NNS = LagrangeDOF_Quadrangle(order=order) obj%entityCounts = [NNS, 4, 1, 0] obj%xidimension = 2 @@ -220,9 +220,9 @@ ans = ans + area_triangle END PROCEDURE QuadArea2D -!----------------------------------------------------------------------------- +!---------------------------------------------------------------------------- ! -!----------------------------------------------------------------------------- +!---------------------------------------------------------------------------- PURE FUNCTION R8MATDET4D(a) REAL(DFP), INTENT(IN) :: a(4, 4) @@ -246,9 +246,9 @@ PURE FUNCTION R8MATDET4D(a) + a(2, 3) * (a(3, 1) * a(4, 2) - a(3, 2) * a(4, 1))) END FUNCTION R8MATDET4D -!----------------------------------------------------------------------------- +!---------------------------------------------------------------------------- ! -!----------------------------------------------------------------------------- +!---------------------------------------------------------------------------- !> author: Vikas Sharma, Ph. D. ! date: 2023-07-17 @@ -288,9 +288,9 @@ PURE SUBROUTINE PARALLELOGRAMAREA3D(p, ans) ans = SQRT(SUM(cross(1:3)**2)) END SUBROUTINE PARALLELOGRAMAREA3D -!----------------------------------------------------------------------------- +!---------------------------------------------------------------------------- ! -!----------------------------------------------------------------------------- +!---------------------------------------------------------------------------- !> author: Vikas Sharma, Ph. D. ! date: 2023-07-17 From 16a3683dfd1a575cc4bcf4d46785f9733645eb7e Mon Sep 17 00:00:00 2001 From: "Vikas@easifem@archlinux@work" Date: Tue, 30 Jan 2024 21:57:14 +0900 Subject: [PATCH 09/10] Fixing bug in ReferenceQuadrangle_Method - Initiate method has been fixed --- .../Geometry/src/ReferenceQuadrangle_Method@Methods.F90 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/submodules/Geometry/src/ReferenceQuadrangle_Method@Methods.F90 b/src/submodules/Geometry/src/ReferenceQuadrangle_Method@Methods.F90 index da25f6c2..c73fcbee 100644 --- a/src/submodules/Geometry/src/ReferenceQuadrangle_Method@Methods.F90 +++ b/src/submodules/Geometry/src/ReferenceQuadrangle_Method@Methods.F90 @@ -125,7 +125,7 @@ CALL Initiate(obj=obj, Anotherobj=refelem) CASE DEFAULT obj%xij = InterpolationPoint_Quadrangle( & - & xij=refelem%xij(1:3, 1:4), & + & xij=refelem%xij, & & order=order, & & ipType=ipType, & & layout="VEFC") From bed7f9a4716cff5185a1d3ce23b05ffd34403d61 Mon Sep 17 00:00:00 2001 From: shion <106575883+shishiousan@users.noreply.github.com> Date: Tue, 30 Jan 2024 23:16:41 +0900 Subject: [PATCH 10/10] Updating addOpenBLAS.cmake - Printing BLAS and LAPACK Library --- cmake/addOpenBLAS.cmake | 75 +++++++++++++++++++++-------------------- 1 file changed, 39 insertions(+), 36 deletions(-) diff --git a/cmake/addOpenBLAS.cmake b/cmake/addOpenBLAS.cmake index 9795a6a9..978589ef 100644 --- a/cmake/addOpenBLAS.cmake +++ b/cmake/addOpenBLAS.cmake @@ -1,43 +1,46 @@ -# This program is a part of EASIFEM library -# Copyright (C) 2020-2021 Vikas Sharma, Ph.D +# This program is a part of EASIFEM library Copyright (C) 2020-2021 Vikas +# Sharma, Ph.D # -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. +# This program is free software: you can redistribute it and/or modify it under +# the terms of the GNU General Public License as published by the Free Software +# Foundation, either version 3 of the License, or (at your option) any later +# version. # -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. +# This program is distributed in the hope that it will be useful, but WITHOUT +# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS +# FOR A PARTICULAR PURPOSE. See the GNU General Public License for more +# details. # -# You should have received a copy of the GNU General Public License -# along with this program. If not, see +# You should have received a copy of the GNU General Public License along with +# this program. If not, see # -IF( ${PROJECT_NAME} MATCHES "easifemBase" ) - #SET(BLA_VENDOR "OpenBLAS") - FIND_PACKAGE( LAPACK REQUIRED ) - IF( LAPACK_FOUND ) - MESSAGE(STATUS "FOUND LAPACK") - ENDIF() - IF( BLA_VENDOR MATCHES "MKL" ) - MESSAGE(STATUS "BLA_VENDOR : MKL") - LIST( APPEND TARGET_COMPILE_DEF "-DUSE_INTEL_MKL" ) - ELSEIF( BLA_VENDOR MATCHES "OpenBLAS" ) - MESSAGE(STATUS "BLA_VENDOR : OpenBLAS") - LIST( APPEND TARGET_COMPILE_DEF "-DUSE_OpenBLAS" ) - ELSE( ) - MESSAGE(STATUS "BLA_VENDOR : ${BLA_VENDOR}") - MESSAGE(STATUS "BLA_VENDOR : System provided") - LIST( APPEND TARGET_COMPILE_DEF "-DUSE_NativeBLAS" ) +if(${PROJECT_NAME} MATCHES "easifemBase") + # SET(BLA_VENDOR "OpenBLAS") + find_package(LAPACK REQUIRED) + if(LAPACK_FOUND) + message(STATUS "FOUND LAPACK") + endif() + if(BLA_VENDOR MATCHES "MKL") + message(STATUS "BLA_VENDOR : MKL") + list(APPEND TARGET_COMPILE_DEF "-DUSE_INTEL_MKL") + elseif(BLA_VENDOR MATCHES "OpenBLAS") + message(STATUS "BLA_VENDOR : OpenBLAS") + list(APPEND TARGET_COMPILE_DEF "-DUSE_OpenBLAS") + else() + message(STATUS "BLA_VENDOR : ${BLA_VENDOR}") + message(STATUS "BLA_VENDOR : System provided") + list(APPEND TARGET_COMPILE_DEF "-DUSE_NativeBLAS") - IF(APPLE) - LIST( APPEND TARGET_COMPILE_DEF "-DUSE_APPLE_NativeBLAS" ) - ENDIF() + if(APPLE) + list(APPEND TARGET_COMPILE_DEF "-DUSE_APPLE_NativeBLAS") + endif() - ENDIF( ) - TARGET_LINK_LIBRARIES( - ${PROJECT_NAME} PUBLIC ${LAPACK_LIBRARIES} ${BLAS_LIBRARIES} - ) -ENDIF() + endif() + + message(STATUS "BLAS_LIBRARIES: ${BLAS_LIBRARIES}") + message(STATUS "LAPACK_LIBRARIES: ${LAPACK_LIBRARIES}") + + target_link_libraries(${PROJECT_NAME} PUBLIC ${LAPACK_LIBRARIES} + ${BLAS_LIBRARIES}) +endif()