diff --git a/cmake/Compiler.cmake b/cmake/Compiler.cmake index 45bcebd7..96d0c592 100644 --- a/cmake/Compiler.cmake +++ b/cmake/Compiler.cmake @@ -1,3 +1,20 @@ +# 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 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 +# +# MESSAGE(STATUS "Is the Fortran compiler loaded? ${CMAKE_Fortran_COMPILER_LOADED}") diff --git a/cmake/addGmsh.cmake b/cmake/addGmsh.cmake index 86acb08b..48170025 100644 --- a/cmake/addGmsh.cmake +++ b/cmake/addGmsh.cmake @@ -1,3 +1,19 @@ +# 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 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 +# #GMSH SDK IF( ${PROJECT_NAME} MATCHES "easifemClasses" ) OPTION( USE_GMSH_SDK OFF ) diff --git a/cmake/addHDF5.cmake b/cmake/addHDF5.cmake index 4badd799..e66698cd 100644 --- a/cmake/addHDF5.cmake +++ b/cmake/addHDF5.cmake @@ -1,3 +1,19 @@ +# 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 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 +# # Find HDF5 IF( ${PROJECT_NAME} MATCHES "easifemClasses" ) FIND_PACKAGE(HDF5 REQUIRED COMPONENTS Fortran HL) diff --git a/cmake/addMetis.cmake b/cmake/addMetis.cmake index 22c2bce4..862678b3 100644 --- a/cmake/addMetis.cmake +++ b/cmake/addMetis.cmake @@ -1,3 +1,19 @@ +# 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 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 +# # METIS LIBRARY IF( ${PROJECT_NAME} MATCHES "easifemBase" ) OPTION(USE_METIS ON) diff --git a/cmake/addOpenBLAS.cmake b/cmake/addOpenBLAS.cmake index b6aed8ac..65bf7fce 100644 --- a/cmake/addOpenBLAS.cmake +++ b/cmake/addOpenBLAS.cmake @@ -1,6 +1,22 @@ +# 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 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 +# # INSTALL OPENBLAS IF( ${PROJECT_NAME} MATCHES "easifemBase" ) - SET(BLA_VENDOR "OpenBLAS") + #SET(BLA_VENDOR "OpenBLAS") FIND_PACKAGE( LAPACK REQUIRED ) IF( LAPACK_FOUND ) MESSAGE(STATUS "FOUND LAPACK") diff --git a/cmake/addOpenMP.cmake b/cmake/addOpenMP.cmake index 22939476..2eb9e423 100644 --- a/cmake/addOpenMP.cmake +++ b/cmake/addOpenMP.cmake @@ -1,3 +1,19 @@ +# 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 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 +# # FIND OPENMP OPTION(USE_OpenMP OFF) IF(USE_OpenMP) diff --git a/cmake/addPLPLOT.cmake b/cmake/addPLPLOT.cmake index 543d8408..a200cf1c 100644 --- a/cmake/addPLPLOT.cmake +++ b/cmake/addPLPLOT.cmake @@ -1,3 +1,19 @@ +# 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 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 +# #PLPLOT IF( ${PROJECT_NAME} MATCHES "easifemBase" ) OPTION( USE_PLPLOT OFF ) @@ -13,11 +29,11 @@ IF( ${PROJECT_NAME} MATCHES "easifemBase" ) "/usr/local/lib/libplplotfortran.dylib" ) ELSE() SET(PLPLOT_INCLUDE_DIR - "$ENV{EASIFEM_EXTPKGS}/lib/fortran/modules/plplot" ) + "/usr/lib/x86_64-linux-gnu/fortran/modules/plplot" ) SET(PLPLOT_LIBRARY - "$ENV{EASIFEM_EXTPKGS}/lib/libplplot.so" ) + "/usr/lib/x86_64-linux-gnu/libplplot.so" ) SET(PLPLOT_FORTRAN_LIBRARY - "$ENV{EASIFEM_EXTPKGS}/lib/libplplotfortran.so" ) + "/usr/lib/x86_64-linux-gnu/libplplotfortran.so" ) ENDIF() ENDIF() TARGET_LINK_LIBRARIES( diff --git a/cmake/checkError.cmake b/cmake/checkError.cmake index 9b8ba705..897c629f 100644 --- a/cmake/checkError.cmake +++ b/cmake/checkError.cmake @@ -1,3 +1,19 @@ +# 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 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 +# # SYSTEM INFORMATION # Disable in-source builds to prevent source tree corruption. IF(" ${CMAKE_CURRENT_SOURCE_DIR}" STREQUAL " ${CMAKE_CURRENT_BINARY_DIR}") diff --git a/cmake/makeDirs.cmake b/cmake/makeDirs.cmake index 54c75738..82977adc 100644 --- a/cmake/makeDirs.cmake +++ b/cmake/makeDirs.cmake @@ -1,3 +1,19 @@ +# 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 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 +# INCLUDE( GNUInstallDirs ) SET( CMAKE_Fortran_MODULE_DIRECTORY diff --git a/cmake/prefixPaths.cmake b/cmake/prefixPaths.cmake index ea19398a..2742fc13 100644 --- a/cmake/prefixPaths.cmake +++ b/cmake/prefixPaths.cmake @@ -1,3 +1,19 @@ +# 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 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 +# IF(NOT CMAKE_PREFIX_PATH) LIST( APPEND diff --git a/cmake/targetCompileDefs.cmake b/cmake/targetCompileDefs.cmake index 9f28c056..f7c9ae51 100644 --- a/cmake/targetCompileDefs.cmake +++ b/cmake/targetCompileDefs.cmake @@ -1,5 +1,21 @@ +# 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 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 +# #COMPILE DEF - +# #Single precision or double precision OPTION(USE_Real32 OFF) OPTION(USE_Real64 OFF) diff --git a/cmake/targetCompileOpts.cmake b/cmake/targetCompileOpts.cmake index 03ffe815..ce1b5ba7 100644 --- a/cmake/targetCompileOpts.cmake +++ b/cmake/targetCompileOpts.cmake @@ -1,3 +1,19 @@ +# 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 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 +# #OPTIONS TARGET_COMPILE_OPTIONS( ${PROJECT_NAME} diff --git a/cmake/targetIncludeDirs.cmake b/cmake/targetIncludeDirs.cmake index ce4bb9c0..34e55d1e 100644 --- a/cmake/targetIncludeDirs.cmake +++ b/cmake/targetIncludeDirs.cmake @@ -1,3 +1,19 @@ +# 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 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 +# #INCLDE DIR TARGET_INCLUDE_DIRECTORIES( ${PROJECT_NAME} diff --git a/cmake/targetLinkLibs.cmake b/cmake/targetLinkLibs.cmake index 6888eff8..c789f9df 100644 --- a/cmake/targetLinkLibs.cmake +++ b/cmake/targetLinkLibs.cmake @@ -14,7 +14,7 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see # - +# # Link libs to the project # 1 FUNCTION(FIND_EASIFEM_DEPENDENCY EXT_PKG_LIST) diff --git a/install.py b/install.py index a3b93a70..9673f6bf 100644 --- a/install.py +++ b/install.py @@ -40,44 +40,44 @@ def getOption(key, opt): cmake_def += " -DUSE_METIS=ON" user_query = False if user_query: - + ################################### opt = getOption("CMAKE_GENERATOR", [ "Unix Makefiles", "Ninja", "Ninja Multi-Config"]) if(opt == " "): # opt = '"Unix Makefiles"' opt = '"Ninja"' cmake_def += " -G " + opt - + ################################### opt = getOption("USE_PLPLOT", ["ON", "OFF"]) if(opt == " "): opt = "ON" cmake_def += " -DUSE_PLPLOT=" + opt - + ################################### opt = getOption("USE_BLAS95", ["ON", "OFF"]) if(opt == " "): opt = "ON" cmake_def += " -DUSE_BLAS95=" + opt - + ################################### opt = getOption("USE_LAPACK95", ["ON", "OFF"]) if(opt == " "): opt = "ON" cmake_def += " -DUSE_LAPACK95=" + opt - + ################################### opt = getOption("USE_OpenMP", ["ON", "OFF"]) if(opt == " "): opt = "ON" cmake_def += " -DUSE_OpenMP=" + opt - + ################################### opt = getOption("CMAKE_BUILD_TYPE", ["Release", "Debug"]) if(opt == " "): opt = "Release" cmake_def += " -DCMAKE_BUILD_TYPE=" + opt - + ################################### opt = getOption("BUILD_SHARED_LIBS", ["ON", "OFF"]) if(opt == " "): opt = "ON" cmake_def += " -DBUILD_SHARED_LIBS=" + opt - + ################################### opt = getOption("CMAKE_INSTALL_PREFIX", ["${PREFIX}"]) if(opt == " "): opt = "${EASIFEM_BASE}" diff --git a/src/modules/BaseType/src/BaseType.F90 b/src/modules/BaseType/src/BaseType.F90 index feee4912..15c02dd2 100644 --- a/src/modules/BaseType/src/BaseType.F90 +++ b/src/modules/BaseType/src/BaseType.F90 @@ -25,12 +25,6 @@ MODULE BaseType IMPLICIT NONE PRIVATE -TYPE(String), PUBLIC, PARAMETER :: TypeString = String(raw=NULL()) -TYPE :: StringPointer_ - CLASS(String), POINTER :: ptr => NULL() -END TYPE StringPointer_ -PUBLIC :: StringPointer_ - !---------------------------------------------------------------------------- ! BoundingBox_ !---------------------------------------------------------------------------- @@ -371,7 +365,7 @@ MODULE BaseType PUBLIC :: IterationData_ TYPE(IterationData_), PUBLIC, PARAMETER :: TypeIterationData = & - & IterationData_() + & IterationData_( header=NULL() ) TYPE :: IterationDataPointer_ CLASS(IterationData_), POINTER :: Ptr => NULL() diff --git a/src/modules/String/src/String_Class.F90 b/src/modules/String/src/String_Class.F90 index 55352bb1..62494aeb 100644 --- a/src/modules/String/src/String_Class.F90 +++ b/src/modules/String/src/String_Class.F90 @@ -400,6 +400,17 @@ MODULE String_Class ! !---------------------------------------------------------------------------- +TYPE(String), PUBLIC, PARAMETER :: TypeString = String(raw=NULL()) + +TYPE :: StringPointer_ + CLASS(String), POINTER :: ptr => NULL() +END TYPE StringPointer_ +PUBLIC :: StringPointer_ + +!---------------------------------------------------------------------------- +! +!---------------------------------------------------------------------------- + ! internal parameters CHARACTER(kind=CK, len=26), PARAMETER :: UPPER_ALPHABET = & & 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' diff --git a/src/submodules/FEMatrix/STDiffusionMatrix/DiffusionMatrix_26.part b/src/submodules/FEMatrix/STDiffusionMatrix/DiffusionMatrix_26.part deleted file mode 100755 index 79e86275..00000000 --- a/src/submodules/FEMatrix/STDiffusionMatrix/DiffusionMatrix_26.part +++ /dev/null @@ -1,54 +0,0 @@ -! -!------------------------------------------------------------------------------ -! Author : Vikas sharma -! Position : Doctral Student -! Institute : Kyoto Univeristy, Japan -! Program name: DiffusionMatrix_26.part -! Last Update : Nov-21-2017 -! -!------------------------------------------------------------------------------ -! Details of Program -!============================================================================== -! -! TYPE :: Part of the Code -! -! DESCRIPTION -! - This code is part of the code -! -! HOSTING FILE -! - STDiffusionMatrix_Class.f90 -! -!============================================================================== - -!------------------------------------------------------------------------------ -! getDiffusionMatrix_26 -!------------------------------------------------------------------------------ - - SUBROUTINE getDiffusionMatrix_26( Obj, c1, c2, c1Type, c2Type, nCopy ) - -!. . . . . . . . . . . . . . . . . . . . -! 1. c1( : ) -! 2. c2( :, : ) -!. . . . . . . . . . . . . . . . . . . . - - ! Define intent of dummy variables -#ifdef STMat - CLASS( SpaceTimeMatrix_ ), INTENT( INOUT ), TARGET :: Obj -#else - CLASS( STDiffusionMatrix_ ), INTENT( INOUT ), TARGET :: Obj -#endif - REAL( DFP ), DIMENSION( :, : ), INTENT( IN ) :: c2 - REAL( DFP ), DIMENSION( : ), INTENT( IN ) :: c1 - CHARACTER( LEN = * ), INTENT( IN ) :: c1Type, c2Type - INTEGER( I4B ), INTENT( IN ) :: nCopy - - CALL Obj % getDiffusionMatrix( c1 = c1, c2 = c2, & - & c1Type = c1Type, c2Type = c2Type ) - CALL Obj % MakeDiagonalCopies( nCopy ) - - END SUBROUTINE getDiffusionMatrix_26 - -!------------------------------------------------------------------------------ -! -!------------------------------------------------------------------------------ - diff --git a/src/submodules/FEMatrix/STDiffusionMatrix/DiffusionMatrix_27.part b/src/submodules/FEMatrix/STDiffusionMatrix/DiffusionMatrix_27.part deleted file mode 100755 index b5043456..00000000 --- a/src/submodules/FEMatrix/STDiffusionMatrix/DiffusionMatrix_27.part +++ /dev/null @@ -1,234 +0,0 @@ -! -!------------------------------------------------------------------------------ -! Author : Vikas sharma -! Position : Doctral Student -! Institute : Kyoto Univeristy, Japan -! Program name: DiffusionMatrix_27.part -! Last Update : Nov-21-2017 -! -!------------------------------------------------------------------------------ -! Details of Program -!============================================================================== -! -! TYPE :: Part of the Code -! -! DESCRIPTION -! - This code is part of the code -! -! HOSTING FILE -! - STDiffusionMatrix_Class.f90 -! -!============================================================================== - -!------------------------------------------------------------------------------ -! getDiffusionMatrix_27 -!------------------------------------------------------------------------------ - -SUBROUTINE getDiffusionMatrix_27( Obj, K, Term1, Term2 ) - - !. . . . . . . . . . . . . . . . . . . . - ! 1. K( :, :, : ) - ! 2. Term1, Term2 {dx, dy, dz} - !. . . . . . . . . . . . . . . . . . . . - - USE Utility, ONLY : OUTERPROD - - ! Define intent of dummy variables -#ifdef STMat - CLASS( SpaceTimeMatrix_ ), INTENT( INOUT ), TARGET :: Obj -#else - CLASS( STDiffusionMatrix_ ), INTENT( INOUT ), TARGET :: Obj -#endif - REAL( DFP ), DIMENSION( :, :, :, : ), INTENT( IN ) :: K - CHARACTER( LEN = * ), INTENT( IN ) :: Term1, Term2 - - ! Define internal variables - INTEGER( I4B ) :: NNS, NNT, NIPS, NIPT, IPS, IPT, aa, b, NSD, & - i, j, r1, r2, c1, c2, M - REAL( DFP ) :: RealVal1, RealVal - REAL( DFP ), ALLOCATABLE :: Mat2( :, : ), Mat4( :, :, :, : ) - - INTEGER( I4B ), ALLOCATABLE :: Indx( :, : ) - INTEGER( I4B ) :: XIndx1, XIndx2 - - CLASS( STShapeData_ ), POINTER :: SD - - XIndx1 = 1 - XIndx2 = 1 - -#ifdef DEBUG_VER - IF( .NOT. Obj % isInitiated( ) ) THEN - CALL Err_Msg("STDiffusionMatrix_Class.f90", & - "getDiffusionMatrix_27(), Flag-1", & - "STDiffusionMatrix_ Object is not Initiated" ) - Error_Flag = .TRUE. - RETURN - END IF -#endif - - NNS = SIZE( Obj % SD( 1,1 ) % N ) - NNT = SIZE( Obj % SD( 1,1 ) % T ) - NSD = Obj % SD( 1,1 ) % getNSD( ) - NIPS = SIZE( Obj % SD, 1 ) - NIPT = SIZE( Obj % SD, 2 ) - -#ifdef DEBUG_VER - IF( SIZE( K, 3 ) .NE. NIPS .OR. SIZE( K, 4 ) .NE. NIPT ) THEN - CALL Err_Msg("STDiffusionMatrix_Class.f90", & - "getDiffusionMatrix_27(), Flag-2", & - "The SIZE( K, 3 ) should be NIPS, & - & SIZE( K, 4 ) should be NIPT" ) - Error_Flag = .TRUE. - RETURN - END IF - - IF( SIZE( K, 1 ) .NE. SIZE( K, 2 ) ) THEN - CALL Err_Msg("STDiffusionMatrix_Class.f90", & - "getDiffusionMatrix_27(), Flag-3", & - "The size of first and second dimension of K must be same" ) - Error_Flag = .TRUE. - RETURN - END IF -#endif - - M = SIZE( K, 1 ) - -#ifdef DEBUG_VER - SELECT CASE( TRIM( ADJUSTL( Term1 ) ) ) - - CASE( "X", "x", "x1", "X1", "dX", "dx", "dx1", "dX1" ) - IF( NSD .LT. 1 ) THEN - CALL Err_Msg("STDiffusionMatrix_Class.f90", & - "getDiffusionMatrix_27()", & - "Term1 is 'x' or 'dx' therefore NSD should be & - & greater than or equal to 1" ) - Error_Flag = .TRUE. - RETURN - END IF - - CASE( "Y", "y", "x2", "X2", "dY", "dy", "dx2", "dX2" ) - IF( NSD .LT. 2 ) THEN - CALL Err_Msg("STDiffusionMatrix_Class.f90", & - "getDiffusionMatrix_27()", & - "Term1 is 'dy' or 'y', & - & therefore NSD should be greater than 1" ) - Error_Flag = .TRUE. - RETURN - END IF - - CASE( "Z", "z", "x3", "X3", "dZ", "dz", "dx3", "dX3" ) - IF( NSD .LT. 3 ) THEN - CALL Err_Msg("STDiffusionMatrix_Class.f90", & - "getDiffusionMatrix_27()", & - "Term1 is 'dz' or 'z', therefore, & - & NSD should be greater than 2" ) - Error_Flag = .TRUE. - RETURN - END IF - END SELECT - - SELECT CASE( TRIM( ADJUSTL( Term2 ) ) ) - CASE( "X", "x", "x1", "X1", "dX", "dx", "dx1", "dX1" ) - IF( NSD .LT. 1 ) THEN - CALL Err_Msg("STDiffusionMatrix_Class.f90", & - "getDiffusionMatrix_27()", & - "Term2 is 'x' or 'dx' therefore NSD should be & - & greater than or equal to 1" ) - Error_Flag = .TRUE. - RETURN - END IF - - CASE( "Y", "y", "x2", "X2", "dY", "dy", "dx2", "dX2" ) - IF( NSD .LT. 2 ) THEN - CALL Err_Msg("STDiffusionMatrix_Class.f90", & - "getDiffusionMatrix_27()", & - "Term2 is 'dy' or 'y', & - & therefore NSD should be greater than 1" ) - Error_Flag = .TRUE. - RETURN - END IF - - CASE( "Z", "z", "x3", "X3", "dZ", "dz", "dx3", "dX3" ) - IF( NSD .LT. 3 ) THEN - CALL Err_Msg("STDiffusionMatrix_Class.f90", & - "getDiffusionMatrix_27()", & - "Term2 is 'dz' or 'z', therefore, & - & NSD should be greater than 2" ) - Error_Flag = .TRUE. - RETURN - END IF - END SELECT -#endif - - IF( ALLOCATED( Obj % Mat4 ) ) DEALLOCATE( Obj % Mat4 ) - ALLOCATE( Obj % Mat4( NNS*M, NNS*M, NNT, NNT ) ) - Obj % Mat4 = 0.0_DFP - ALLOCATE( Mat4( NNS, NNS, NNT, NNT ) ) - - ALLOCATE( Indx( M, 2 ) ) - Indx = 0 - DO i = 1, M - Indx( i, 1 ) = (i-1)*NNS + 1 - Indx( i, 2 ) = i*NNS - END DO - - SELECT CASE( TRIM( ADJUSTL( Term1 ) ) ) - CASE( "X", "x", "x1", "X1", "dX", "dx", "dx1", "dX1" ) - XIndx1 = 1 - CASE( "Y", "y", "x2", "X2", "dY", "dy", "dx2", "dX2" ) - XIndx1 = 2 - CASE( "Z", "z", "x3", "X3", "dZ", "dz", "dx3", "dX3" ) - XIndx1 = 3 - END SELECT - - SELECT CASE( TRIM( ADJUSTL( Term2 ) ) ) - CASE( "X", "x", "x1", "X1", "dX", "dx", "dx1", "dX1" ) - XIndx2 = 1 - CASE( "Y", "y", "x2", "X2", "dY", "dy", "dx2", "dX2" ) - XIndx2 = 2 - CASE( "Z", "z", "x3", "X3", "dZ", "dz", "dx3", "dX3" ) - XIndx2 = 3 - END SELECT - - DO IPT = 1, NIPT - DO IPS = 1, NIPS - SD => Obj % SD( IPS, IPT ) - RealVal1 = SD % Ws * SD % Wt * SD % Js_Xi2Xt & - & * SD % Jt * SD % Thickness - - DO b = 1, NNT - DO aa = 1, NNT - Mat4( :, :, aa, b ) = & - & OUTERPROD( a = SD % dNTdXt( :, XIndx1, aa ), & - & b = SD % dNTdXt( :, XIndx2, b ) ) - END DO - END DO - - Mat2 = K( :, :, IPS, IPT ) - - DO j = 1, M - c1 = Indx( j, 1 ) - c2 = Indx( j, 2 ) - DO i = 1, M - r1 = Indx( i, 1 ) - r2 = Indx( i, 2 ) - RealVal = Mat2( i, j ) * RealVal1 - Obj % Mat4( r1:r2, c1:c2, :, : ) = & - Obj % Mat4( r1:r2, c1:c2, :, : ) + Mat4*RealVal - END DO - END DO - END DO - END DO - - CALL Obj % Mat2FromMat4( ) - NULLIFY( SD ) - IF( ALLOCATED( Mat2 ) ) DEALLOCATE( Mat2 ) - IF( ALLOCATED( Mat4 ) ) DEALLOCATE( Mat4 ) - IF( ALLOCATED( Indx ) ) DEALLOCATE( Indx ) - -END SUBROUTINE getDiffusionMatrix_27 - -!------------------------------------------------------------------------------ -! -!------------------------------------------------------------------------------ - diff --git a/src/submodules/FEMatrix/STDiffusionMatrix/DiffusionMatrix_28.part b/src/submodules/FEMatrix/STDiffusionMatrix/DiffusionMatrix_28.part deleted file mode 100755 index 01a7c7dd..00000000 --- a/src/submodules/FEMatrix/STDiffusionMatrix/DiffusionMatrix_28.part +++ /dev/null @@ -1,234 +0,0 @@ -! -!------------------------------------------------------------------------------ -! Author : Vikas sharma -! Position : Doctral Student -! Institute : Kyoto Univeristy, Japan -! Program name: DiffusionMatrix_28.part -! Last Update : Nov-21-2017 -! -!------------------------------------------------------------------------------ -! Details of Program -!============================================================================== -! -! TYPE :: Part of the Code -! -! DESCRIPTION -! - This code is part of the code -! -! HOSTING FILE -! - STDiffusionMatrix_Class.f90 -! -!============================================================================== - -!------------------------------------------------------------------------------ -! getDiffusionMatrix_28 -!------------------------------------------------------------------------------ - -SUBROUTINE getDiffusionMatrix_28( Obj, K, Term1, Term2 ) - - !. . . . . . . . . . . . . . . . . . . . - ! 1. K( :, :, : ) - ! 2. Term1, Term2 {dx, dy, dz} - !. . . . . . . . . . . . . . . . . . . . - - USE Utility, ONLY : OUTERPROD - - ! Define intent of dummy variables -#ifdef STMat - CLASS( SpaceTimeMatrix_ ), INTENT( INOUT ), TARGET :: Obj -#else - CLASS( STDiffusionMatrix_ ), INTENT( INOUT ), TARGET :: Obj -#endif - REAL( DFP ), DIMENSION( :, :, : ), INTENT( IN ) :: K - CHARACTER( LEN = * ), INTENT( IN ) :: Term1, Term2 - - ! Define internal variables - INTEGER( I4B ) :: NNS, NNT, NIPS, NIPT, IPS, IPT, aa, b, NSD, & - i, j, r1, r2, c1, c2, M - REAL( DFP ) :: RealVal1, RealVal - REAL( DFP ), ALLOCATABLE :: Mat2( :, : ), Mat4( :, :, :, : ) - - INTEGER( I4B ), ALLOCATABLE :: Indx( :, : ) - INTEGER( I4B ) :: XIndx1, XIndx2 - - CLASS( STShapeData_ ), POINTER :: SD - - XIndx1 = 1 - XIndx2 = 1 - -#ifdef DEBUG_VER - IF( .NOT. Obj % isInitiated( ) ) THEN - CALL Err_Msg("STDiffusionMatrix_Class.f90", & - "getDiffusionMatrix_28(), Flag-1", & - "STDiffusionMatrix_ Object is not Initiated" ) - Error_Flag = .TRUE. - RETURN - END IF -#endif - - NNS = SIZE( Obj % SD( 1,1 ) % N ) - NNT = SIZE( Obj % SD( 1,1 ) % T ) - NSD = Obj % SD( 1,1 ) % getNSD( ) - NIPS = SIZE( Obj % SD, 1 ) - NIPT = SIZE( Obj % SD, 2 ) - -#ifdef DEBUG_VER - IF( SIZE( K, 3 ) .NE. NIPS ) THEN - CALL Err_Msg("STDiffusionMatrix_Class.f90", & - "getDiffusionMatrix_28(), Flag-2", & - "The SIZE( K, 3 ) should be NIPS" ) - Error_Flag = .TRUE. - RETURN - END IF - - IF( SIZE( K, 1 ) .NE. SIZE( K, 2 ) ) THEN - CALL Err_Msg("STDiffusionMatrix_Class.f90", & - "getDiffusionMatrix_28(), Flag-3", & - "The size of first and second dimension of K must be same" ) - Error_Flag = .TRUE. - RETURN - END IF -#endif - - M = SIZE( K, 1 ) - -#ifdef DEBUG_VER - SELECT CASE( TRIM( ADJUSTL( Term1 ) ) ) - - CASE( "X", "x", "x1", "X1", "dX", "dx", "dx1", "dX1" ) - IF( NSD .LT. 1 ) THEN - CALL Err_Msg("STDiffusionMatrix_Class.f90", & - "getDiffusionMatrix_28()", & - "Term1 is 'x' or 'dx' therefore NSD should be & - & greater than or equal to 1" ) - Error_Flag = .TRUE. - RETURN - END IF - - CASE( "Y", "y", "x2", "X2", "dY", "dy", "dx2", "dX2" ) - IF( NSD .LT. 2 ) THEN - CALL Err_Msg("STDiffusionMatrix_Class.f90", & - "getDiffusionMatrix_28()", & - "Term1 is 'dy' or 'y', & - & therefore NSD should be greater than 1" ) - Error_Flag = .TRUE. - RETURN - END IF - - CASE( "Z", "z", "x3", "X3", "dZ", "dz", "dx3", "dX3" ) - IF( NSD .LT. 3 ) THEN - CALL Err_Msg("STDiffusionMatrix_Class.f90", & - "getDiffusionMatrix_28()", & - "Term1 is 'dz' or 'z', therefore, & - & NSD should be greater than 2" ) - Error_Flag = .TRUE. - RETURN - END IF - - END SELECT - - SELECT CASE( TRIM( ADJUSTL( Term2 ) ) ) - CASE( "X", "x", "x1", "X1", "dX", "dx", "dx1", "dX1" ) - IF( NSD .LT. 1 ) THEN - CALL Err_Msg("STDiffusionMatrix_Class.f90", & - "getDiffusionMatrix_28()", & - "Term2 is 'x' or 'dx' therefore NSD should be & - & greater than or equal to 1" ) - Error_Flag = .TRUE. - RETURN - END IF - - CASE( "Y", "y", "x2", "X2", "dY", "dy", "dx2", "dX2" ) - IF( NSD .LT. 2 ) THEN - CALL Err_Msg("STDiffusionMatrix_Class.f90", & - "getDiffusionMatrix_28()", & - "Term2 is 'dy' or 'y', & - & therefore NSD should be greater than 1" ) - Error_Flag = .TRUE. - RETURN - END IF - - CASE( "Z", "z", "x3", "X3", "dZ", "dz", "dx3", "dX3" ) - IF( NSD .LT. 3 ) THEN - CALL Err_Msg("STDiffusionMatrix_Class.f90", & - "getDiffusionMatrix_28()", & - "Term2 is 'dz' or 'z', therefore, & - & NSD should be greater than 2" ) - Error_Flag = .TRUE. - RETURN - END IF - - END SELECT -#endif - - IF( ALLOCATED( Obj % Mat4 ) ) DEALLOCATE( Obj % Mat4 ) - ALLOCATE( Obj % Mat4( NNS*M, NNS*M, NNT, NNT ) ) - Obj % Mat4 = 0.0_DFP - ALLOCATE( Mat4( NNS, NNS, NNT, NNT ) ) - - ALLOCATE( Indx( M, 2 ) ) - Indx = 0 - DO i = 1, M - Indx( i, 1 ) = (i-1)*NNS + 1 - Indx( i, 2 ) = i*NNS - END DO - - SELECT CASE( TRIM( ADJUSTL( Term1 ) ) ) - CASE( "X", "x", "x1", "X1", "dX", "dx", "dx1", "dX1" ) - XIndx1 = 1 - CASE( "Y", "y", "x2", "X2", "dY", "dy", "dx2", "dX2" ) - XIndx1 = 2 - CASE( "Z", "z", "x3", "X3", "dZ", "dz", "dx3", "dX3" ) - XIndx1 = 3 - END SELECT - - SELECT CASE( TRIM( ADJUSTL( Term2 ) ) ) - CASE( "X", "x", "x1", "X1", "dX", "dx", "dx1", "dX1" ) - XIndx2 = 1 - CASE( "Y", "y", "x2", "X2", "dY", "dy", "dx2", "dX2" ) - XIndx2 = 2 - CASE( "Z", "z", "x3", "X3", "dZ", "dz", "dx3", "dX3" ) - XIndx2 = 3 - END SELECT - - DO IPT = 1, NIPT - DO IPS = 1, NIPS - SD => Obj % SD( IPS, IPT ) - RealVal1 = SD % Ws * SD % Wt * SD % Js_Xi2Xt & - & * SD % Jt * SD % Thickness - DO b = 1, NNT - DO aa = 1, NNT - Mat4( :, :, aa, b ) = & - & OUTERPROD( a = SD % dNTdXt( :, XIndx1, aa ), & - & b = SD % dNTdXt( :, XIndx2, b ) ) - END DO - END DO - - Mat2 = K( :, :, IPS ) - - DO j = 1, M - c1 = Indx( j, 1 ) - c2 = Indx( j, 2 ) - DO i = 1, M - r1 = Indx( i, 1 ) - r2 = Indx( i, 2 ) - RealVal = Mat2( i, j ) * RealVal1 - Obj % Mat4( r1:r2, c1:c2, :, : ) = & - Obj % Mat4( r1:r2, c1:c2, :, : ) + Mat4*RealVal - END DO - END DO - END DO - END DO - - CALL Obj % Mat2FromMat4( ) - NULLIFY( SD ) - IF( ALLOCATED( Mat2 ) ) DEALLOCATE( Mat2 ) - IF( ALLOCATED( Mat4 ) ) DEALLOCATE( Mat4 ) - IF( ALLOCATED( Indx ) ) DEALLOCATE( Indx ) - -END SUBROUTINE getDiffusionMatrix_28 - -!------------------------------------------------------------------------------ -! -!------------------------------------------------------------------------------ - diff --git a/src/submodules/FEMatrix/STDiffusionMatrix/DiffusionMatrix_29.part b/src/submodules/FEMatrix/STDiffusionMatrix/DiffusionMatrix_29.part deleted file mode 100755 index 1de30542..00000000 --- a/src/submodules/FEMatrix/STDiffusionMatrix/DiffusionMatrix_29.part +++ /dev/null @@ -1,222 +0,0 @@ -! -!------------------------------------------------------------------------------ -! Author : Vikas sharma -! Position : Doctral Student -! Institute : Kyoto Univeristy, Japan -! Program name: DiffusionMatrix_29.part -! Last Update : Nov-21-2017 -! -!------------------------------------------------------------------------------ -! Details of Program -!============================================================================== -! -! TYPE :: Part of the Code -! -! DESCRIPTION -! - This code is part of the code -! -! HOSTING FILE -! - STDiffusionMatrix_Class.f90 -! -!============================================================================== - -!------------------------------------------------------------------------------ -! getDiffusionMatrix_29 -!------------------------------------------------------------------------------ - -SUBROUTINE getDiffusionMatrix_29( Obj, K, Term1, Term2 ) - - !. . . . . . . . . . . . . . . . . . . . - ! 1. K( :, : ) - !. . . . . . . . . . . . . . . . . . . . - - USE Utility, ONLY : OUTERPROD - - ! Define intent of dummy variables -#ifdef STMat - CLASS( SpaceTimeMatrix_ ), INTENT( INOUT ), TARGET :: Obj -#else - CLASS( STDiffusionMatrix_ ), INTENT( INOUT ), TARGET :: Obj -#endif - REAL( DFP ), DIMENSION( :, : ), INTENT( IN ) :: K - CHARACTER( LEN = * ), INTENT( IN ) :: Term1, Term2 - - ! Define internal variables - INTEGER( I4B ) :: NNS, NNT, NIPS, NIPT, IPS, IPT, aa, b, NSD, & - i, j, r1, r2, c1, c2, M - REAL( DFP ) :: RealVal1, RealVal - REAL( DFP ), ALLOCATABLE :: Mat4( :, :, :, : ) - - INTEGER( I4B ), ALLOCATABLE :: Indx( :, : ) - INTEGER( I4B ) :: XIndx1, XIndx2 - - CLASS( STShapeData_ ), POINTER :: SD - - XIndx1 = 1 - XIndx2 = 1 - -#ifdef DEBUG_VER - IF( .NOT. Obj % isInitiated( ) ) THEN - CALL Err_Msg("STDiffusionMatrix_Class.f90", & - "getDiffusionMatrix_28(), Flag-1", & - "STDiffusionMatrix_ Object is not Initiated" ) - Error_Flag = .TRUE. - RETURN - END IF -#endif - - NNS = SIZE( Obj % SD( 1,1 ) % N ) - NNT = SIZE( Obj % SD( 1,1 ) % T ) - NSD = Obj % SD( 1,1 ) % getNSD( ) - NIPS = SIZE( Obj % SD, 1 ) - NIPT = SIZE( Obj % SD, 2 ) - -#ifdef DEBUG_VER - IF( SIZE( K, 1 ) .NE. SIZE( K, 2 ) ) THEN - CALL Err_Msg("STDiffusionMatrix_Class.f90", & - "getDiffusionMatrix_28(), Flag-3", & - "The size of first and second dimension of K must be same" ) - Error_Flag = .TRUE. - RETURN - END IF -#endif - - M = SIZE( K, 1 ) - -#ifdef DEBUG_VER - SELECT CASE( TRIM( ADJUSTL( Term1 ) ) ) - CASE( "X", "x", "x1", "X1", "dX", "dx", "dx1", "dX1" ) - IF( NSD .LT. 1 ) THEN - CALL Err_Msg("STDiffusionMatrix_Class.f90", & - "getDiffusionMatrix_28()", & - "Term1 is 'x' or 'dx' therefore NSD should be & - & greater than or equal to 1" ) - Error_Flag = .TRUE. - RETURN - END IF - - CASE( "Y", "y", "x2", "X2", "dY", "dy", "dx2", "dX2" ) - IF( NSD .LT. 2 ) THEN - CALL Err_Msg("STDiffusionMatrix_Class.f90", & - "getDiffusionMatrix_28()", & - "Term1 is 'dy' or 'y', & - & therefore NSD should be greater than 1" ) - Error_Flag = .TRUE. - RETURN - END IF - - CASE( "Z", "z", "x3", "X3", "dZ", "dz", "dx3", "dX3" ) - IF( NSD .LT. 3 ) THEN - CALL Err_Msg("STDiffusionMatrix_Class.f90", & - "getDiffusionMatrix_28()", & - "Term1 is 'dz' or 'z', therefore, & - & NSD should be greater than 2" ) - Error_Flag = .TRUE. - RETURN - END IF - - END SELECT - - SELECT CASE( TRIM( ADJUSTL( Term2 ) ) ) - CASE( "X", "x", "x1", "X1", "dX", "dx", "dx1", "dX1" ) - IF( NSD .LT. 1 ) THEN - CALL Err_Msg("STDiffusionMatrix_Class.f90", & - "getDiffusionMatrix_28()", & - "Term2 is 'x' or 'dx' therefore NSD should be & - & greater than or equal to 1" ) - Error_Flag = .TRUE. - RETURN - END IF - - CASE( "Y", "y", "x2", "X2", "dY", "dy", "dx2", "dX2" ) - IF( NSD .LT. 2 ) THEN - CALL Err_Msg("STDiffusionMatrix_Class.f90", & - "getDiffusionMatrix_28()", & - "Term2 is 'dy' or 'y', & - & therefore NSD should be greater than 1" ) - Error_Flag = .TRUE. - RETURN - END IF - - CASE( "Z", "z", "x3", "X3", "dZ", "dz", "dx3", "dX3" ) - IF( NSD .LT. 3 ) THEN - CALL Err_Msg("STDiffusionMatrix_Class.f90", & - "getDiffusionMatrix_28()", & - "Term2 is 'dz' or 'z', therefore, & - & NSD should be greater than 2" ) - Error_Flag = .TRUE. - RETURN - END IF - - END SELECT -#endif - - IF( ALLOCATED( Obj % Mat4 ) ) DEALLOCATE( Obj % Mat4 ) - ALLOCATE( Obj % Mat4( NNS*M, NNS*M, NNT, NNT ) ) - Obj % Mat4 = 0.0_DFP - ALLOCATE( Mat4( NNS, NNS, NNT, NNT ) ) - - ALLOCATE( Indx( M, 2 ) ) - Indx = 0 - DO i = 1, M - Indx( i, 1 ) = (i-1)*NNS + 1 - Indx( i, 2 ) = i*NNS - END DO - - SELECT CASE( TRIM( ADJUSTL( Term1 ) ) ) - - CASE( "X", "x", "x1", "X1", "dX", "dx", "dx1", "dX1" ) - XIndx1 = 1 - CASE( "Y", "y", "x2", "X2", "dY", "dy", "dx2", "dX2" ) - XIndx1 = 2 - CASE( "Z", "z", "x3", "X3", "dZ", "dz", "dx3", "dX3" ) - XIndx1 = 3 - END SELECT - - SELECT CASE( TRIM( ADJUSTL( Term2 ) ) ) - - CASE( "X", "x", "x1", "X1", "dX", "dx", "dx1", "dX1" ) - XIndx2 = 1 - CASE( "Y", "y", "x2", "X2", "dY", "dy", "dx2", "dX2" ) - XIndx2 = 2 - CASE( "Z", "z", "x3", "X3", "dZ", "dz", "dx3", "dX3" ) - XIndx2 = 3 - END SELECT - - DO IPT = 1, NIPT - DO IPS = 1, NIPS - SD => Obj % SD( IPS, IPT ) - RealVal1 = SD % Ws * SD % Wt * SD % Js_Xi2Xt & - & * SD % Jt * SD % Thickness - DO b = 1, NNT - DO aa = 1, NNT - Mat4( :, :, aa, b ) = & - & OUTERPROD( a = SD % dNTdXt( :, XIndx1, aa ), & - & b = SD % dNTdXt( :, XIndx2, b ) ) - END DO - END DO - DO j = 1, M - c1 = Indx( j, 1 ) - c2 = Indx( j, 2 ) - DO i = 1, M - r1 = Indx( i, 1 ) - r2 = Indx( i, 2 ) - RealVal = K( i, j ) * RealVal1 - Obj % Mat4( r1:r2, c1:c2, :, : ) = & - & Obj % Mat4( r1:r2, c1:c2, :, : ) + Mat4*RealVal - END DO - END DO - END DO - END DO - - CALL Obj % Mat2FromMat4( ) - NULLIFY( SD ) - IF( ALLOCATED( Mat4 ) ) DEALLOCATE( Mat4 ) - IF( ALLOCATED( Indx ) ) DEALLOCATE( Indx ) - -END SUBROUTINE getDiffusionMatrix_29 - -!------------------------------------------------------------------------------ -! -!------------------------------------------------------------------------------ - diff --git a/src/submodules/FEMatrix/STDiffusionMatrix/DiffusionMatrix_3.part b/src/submodules/FEMatrix/STDiffusionMatrix/DiffusionMatrix_3.part deleted file mode 100755 index 2e84b867..00000000 --- a/src/submodules/FEMatrix/STDiffusionMatrix/DiffusionMatrix_3.part +++ /dev/null @@ -1,136 +0,0 @@ -! -!------------------------------------------------------------------------------ -! Author : Vikas sharma -! Position : Doctral Student -! Institute : Kyoto Univeristy, Japan -! Program name: DiffusionMatrix_3.part -! Last Update : Nov-20-2017 -! -!------------------------------------------------------------------------------ -! Details of Program -!============================================================================== -! -! TYPE :: Part of the Code -! -! DESCRIPTION -! - This code is part of the code -! -! HOSTING FILE -! - STDiffusionMatrix_Class.f90 -! -!============================================================================== - -!------------------------------------------------------------------------------ -! getDiffusionMatrix_3 -!------------------------------------------------------------------------------ - -SUBROUTINE getDiffusionMatrix_3( Obj, K ) - - !. . . . . . . . . . . . . . . . . . . . - ! 1. K( :, :, :, : ) - !. . . . . . . . . . . . . . . . . . . . - - USE Utility, ONLY : OUTERPROD - - ! Define intent of dummy variables -#ifdef STMat - CLASS( SpaceTimeMatrix_ ), INTENT( INOUT ), TARGET :: Obj -#else - CLASS( STDiffusionMatrix_ ), INTENT( INOUT ), TARGET :: Obj -#endif - REAL( DFP ), DIMENSION( :, :, :, : ), INTENT( IN ) :: K - - ! Define internal variables - INTEGER( I4B ) :: NNS, NNT, NIPS, NIPT, IPS, IPT, a, & - NSD, j - REAL( DFP ), ALLOCATABLE :: Mat2( :, : ), DummyMat3( :,:,: ), & - DummyVec1( : ), DummyVec2( : ) - REAL( DFP ) :: RealVal - CLASS( STShapeData_ ), POINTER :: SD - -#ifdef DEBUG_VER - Error_Flag = .FALSE. - IF( .NOT. Obj % isInitiated( ) ) THEN - CALL Err_Msg( & - & "STDiffusionMatrix_Class.f90", & - & "getDiffusionMatrix_3(), Flag-1", & - & "STDiffusionMatrix_ Object is not Initiated" ) - Error_Flag = .TRUE. - RETURN - END IF -#endif - - NNS = SIZE( Obj % SD( 1,1 ) % N ) - NNT = SIZE( Obj % SD( 1,1 ) % T ) - NSD = Obj % SD( 1,1 ) % getNSD( ) - NIPS = SIZE( Obj % SD, 1 ) - NIPT = SIZE( Obj % SD, 2 ) - -#ifdef DEBUG_VER - IF( SIZE( K, 1 ) .NE. SIZE( K, 2 ) ) THEN - CALL Err_Msg( & - & "STDiffusionMatrix_Class.f90", & - & "getDiffusionMatrix_3()", & - & "The SIZE(K, 1) should be equal to SIZE(K, 2)" ) - Error_Flag = .TRUE. - RETURN - END IF - - IF( SIZE( K, 1 ) .NE. NSD ) THEN - CALL Err_Msg( & - & "STDiffusionMatrix_Class.f90", & - & "getDiffusionMatrix_3()", & - & "The SIZE(K, 1) should be equal to NSD" ) - Error_Flag = .TRUE. - RETURN - END IF - - IF( SIZE( K, 3 ) .NE. NIPS .OR. SIZE( K, 4 ) .NE. NIPT ) THEN - CALL Err_Msg( & - & "STDiffusionMatrix_Class.f90", & - & "getDiffusionMatrix_3()", & - & "The SIZE(K, 3) should be equal to NIPS, & - & and SIZE(K,4) should be equal to NIPT" ) - Error_Flag = .TRUE. - RETURN - END IF -#endif - - IF( ALLOCATED( Obj % Mat2 ) ) DEALLOCATE( Obj % Mat2 ) - ALLOCATE( Obj % Mat2( NNS*NNT, NNS*NNT ) ) - Obj % Mat2 = 0.0_DFP - - ALLOCATE( DummyMat3( NNS, NSD, NNT ) ) - ALLOCATE( DummyVec1( NNT*NNS ), DummyVec2( NNT*NNS ) ) - - DO IPT = 1, NIPT - DO IPS = 1, NIPS - Mat2 = K( :, :, IPS, IPT ) - SD => Obj % SD( IPS, IPT ) - RealVal = SD % Ws * SD % Wt * SD % Js_Xi2Xt & - & * SD % Jt * SD % Thickness - DO a = 1, NNT - DummyMat3( :, :, a ) = MATMUL( SD % dNTdXt( :, :, a ), Mat2 ) - END DO - - DO j = 1, NSD - DummyVec1 = RESHAPE( SD % dNTdXt( :, j, : ), (/NNS*NNT/) ) - DummyVec2 = RealVal*RESHAPE( DummyMat3( :, j, : ), (/NNS*NNT/) ) - Obj % Mat2( :, : ) = Obj % Mat2( :, : ) & - + OUTERPROD( a = DummyVec1, b = DummyVec2 ) - END DO - END DO - END DO - - CALL Obj % Mat4FromMat2( I3 = NNT, I4 = NNT ) - NULLIFY( SD ) - IF( ALLOCATED( Mat2 ) ) DEALLOCATE( Mat2 ) - IF( ALLOCATED( DummyVec1 ) ) DEALLOCATE( DummyVec1 ) - IF( ALLOCATED( DummyVec2) ) DEALLOCATE( DummyVec2) - IF( ALLOCATED( DummyMat3 ) ) DEALLOCATE( DummyMat3 ) - -END SUBROUTINE getDiffusionMatrix_3 - -!------------------------------------------------------------------------------ -! -!------------------------------------------------------------------------------ diff --git a/src/submodules/FEMatrix/STDiffusionMatrix/DiffusionMatrix_30.part b/src/submodules/FEMatrix/STDiffusionMatrix/DiffusionMatrix_30.part deleted file mode 100755 index 17f5985f..00000000 --- a/src/submodules/FEMatrix/STDiffusionMatrix/DiffusionMatrix_30.part +++ /dev/null @@ -1,180 +0,0 @@ -! -!------------------------------------------------------------------------------ -! Author : Vikas sharma -! Position : Doctral Student -! Institute : Kyoto Univeristy, Japan -! Program name: DiffusionMatrix_30.part -! Last Update : March-05-2018 -! -!------------------------------------------------------------------------------ -! Details of Program -!============================================================================== -! -! TYPE :: Part of the Code -! -! DESCRIPTION -! - This code is part of the code -! -! HOSTING FILE -! - STDiffusionMatrix_Class.f90 -!============================================================================== - -!------------------------------------------------------------------------------ -! getDiffusionMatrix_30 -!------------------------------------------------------------------------------ - - SUBROUTINE getDiffusionMatrix_30( Obj, TimeVector, IntegrationSide ) - -!. . . . . . . . . . . . . . . . . . . . -! 1. Returns Diffusion matrix for acoustic wave equation -! 2. Time Integration is character "Right", "Left", "Both" -!. . . . . . . . . . . . . . . . . . . . - - USE Utility, ONLY : OUTERPROD - - ! Define intent of dummy variables -#ifdef STMat - CLASS( SpaceTimeMatrix_ ), INTENT( INOUT ), TARGET :: Obj -#else - CLASS( STDiffusionMatrix_ ), INTENT( INOUT ), TARGET :: Obj -#endif - REAL( DFP ), INTENT( IN ) :: TimeVector( 2 ) - CHARACTER( LEN = * ), INTENT( IN ) :: IntegrationSide - - ! Define internal variables - INTEGER( I4B ) :: NNS, NNT, NIPS, NIPT, IPS, IPT, aa, b, NSD, & - i, j, M, p, q - REAL( DFP ), ALLOCATABLE :: dNTdXt( :, :, : ), T( : ), dNTdXt2( :, :, : ) - REAL( DFP ) :: Ws, Js, thick, RealVal, Jt, Wt, Kij, t1, t2, Theta - TYPE( STElemShapeData_ ), TARGET :: STElemSD - CLASS( STShapeData_ ), POINTER :: SD - -#ifdef DEBUG_VER - IF( .NOT. Obj % isInitiated( ) ) THEN - CALL Err_Msg( & - "STDiffusionMatrix_Class.f90", & - "getDiffusionMatrix_30()", & - "STDiffusionMatrix_ Object is not Initiated" & - ) - Error_Flag = .TRUE. - RETURN - END IF -#endif - - NNS = Obj % SD( 1,1 ) % getNNS( ) - NNT = Obj % SD( 1,1 ) % getNNT( ) - NSD = Obj % SD( 1, 1 ) % getNSD( ) - NIPS = Obj % getNIPS( ) - NIPT = Obj % getNIPT( ) - - IF( ALLOCATED( Obj % Mat4 ) ) DEALLOCATE( Obj % Mat4 ) - ALLOCATE( Obj % Mat4( NNS, NNS, NNT, NNT ) ) - Obj % Mat4 = 0.0_DFP - - M = NSD - - t1 = TimeVector( 1 ) - t2 = TimeVector( 2 ) - - ! Make copy of Obj - CALL STElemSD % Initiate( Obj ) - - DO IPT = 1, NIPT - - DO IPS = 1, NIPS - - SD => STElemSD .SDPointer. [IPS, IPT] - Theta = .Theta. SD - T = SD .TimeIntegration. [t1, t2, Theta] - - CALL SD % setT( T ) - CALL Check_Error( & - "STDiffusionMatrix_Class.f90>>DiffusionMatrix_30.part", & - "Traceback ---> CALL SD % setT( T )"& - ) - - CALL SD % setdNTdXt( ) - CALL Check_Error( & - "STDiffusionMatrix_Class.f90>>DiffusionMatrix_30.part", & - "Traceback ---> CALL SD % setdNTdXT( )"& - ) - SD => NULL( ) - - END DO - - END DO - - DO IPT = 1, NIPT - - DO IPS = 1, NIPS - - Ws = Obj % SD( IPS, IPT ) % getWs( ) - Wt = Obj % SD( IPS, IPT ) % getWt( ) - - Js = Obj % SD( IPS, IPT ) % getJs_Xi2Xt( ) - Jt = Obj % SD( IPS, IPT ) % getJt( ) - - thick = Obj % SD( IPS, IPT ) % getThickness( ) - - CALL Obj % SD( IPS, IPT ) % getdNTdXt( dNTdXt ) - CALL STElemSD % SD( IPS, IPT ) % getdNTdXt( dNTdXt2 ) - - RealVal = Ws * Wt * Js * Jt * thick - - DO aa = 1, NNT - - DO b = 1, NNT - - DO p = 1, NSD - - SELECT CASE( TRIM( IntegrationSide ) ) - - CASE( "Right", "RIGHT", "right" ) - Obj % Mat4( :, :, aa, b ) = & - Obj % Mat4( :, :, aa, b ) + & - OUTERPROD( a = dNTdXt( :, p, aa ), & - b = dNTdXt2( :, p, b ) ) * RealVal - - CASE( "Left", "LEFT", "left" ) - Obj % Mat4( :, :, aa, b ) = & - Obj % Mat4( :, :, aa, b ) + & - OUTERPROD( a = dNTdXt2( :, p, aa ), & - b = dNTdXt( :, p, b ) ) * RealVal - - CASE( "Both", "BOTH", "both" ) - Obj % Mat4( :, :, aa, b ) = & - Obj % Mat4( :, :, aa, b ) + & - OUTERPROD( a = dNTdXt2( :, p, aa ), & - b = dNTdXt2( :, p, b ) ) * RealVal - - CASE DEFAULT - Obj % Mat4( :, :, aa, b ) = & - Obj % Mat4( :, :, aa, b ) + & - OUTERPROD( a = dNTdXt( :, p, aa ), & - b = dNTdXt( :, p, b ) ) * RealVal - - END SELECT - - END DO - - END DO - - END DO - - END DO - - END DO - - IF( ALLOCATED( Obj % Mat2 ) ) DEALLOCATE( Obj % Mat2 ) - IF( ALLOCATED( dNTdXt ) ) DEALLOCATE( dNTdXt ) - IF( ALLOCATED( dNTdXt2 ) ) DEALLOCATE( dNTdXt2 ) - IF( ALLOCATED( T ) ) DEALLOCATE( T ) - CALL STElemSD % DeallocateData( ) - SD => NULL( ) - - END SUBROUTINE getDiffusionMatrix_30 - -!------------------------------------------------------------------------------ -! -!------------------------------------------------------------------------------ - diff --git a/src/submodules/FEMatrix/STDiffusionMatrix/DiffusionMatrix_31.part b/src/submodules/FEMatrix/STDiffusionMatrix/DiffusionMatrix_31.part deleted file mode 100755 index 933b487e..00000000 --- a/src/submodules/FEMatrix/STDiffusionMatrix/DiffusionMatrix_31.part +++ /dev/null @@ -1,211 +0,0 @@ -! -!------------------------------------------------------------------------------ -! Author : Vikas sharma -! Position : Doctral Student -! Institute : Kyoto Univeristy, Japan -! Program name: DiffusionMatrix_31.part -! Last Update : March-27-2018 -! -!------------------------------------------------------------------------------ -! Details of Program -!============================================================================== -! -! TYPE :: Part of the Code -! -! DESCRIPTION -! - This code is part of the code -! - Diffusion matrix for pressure wave equation for -! alpha-beta-v-STFEM -! -! HOSTING FILE -! - STDiffusionMatrix_Class.f90 -!============================================================================== - -!------------------------------------------------------------------------------ -! getDiffusionMatrix_31 -!------------------------------------------------------------------------------ - - SUBROUTINE getDiffusionMatrix_31( Obj, TimeVector, IntegrationSide, Beta_STFEM ) - -!. . . . . . . . . . . . . . . . . . . . -! 1. Returns Diffusion matrix for acoustic wave equation -! 2. Time Integration is character "Right", "Left", "Both" -!. . . . . . . . . . . . . . . . . . . . - - USE Utility, ONLY : OUTERPROD - - ! Define intent of dummy variables -#ifdef STMat - CLASS( SpaceTimeMatrix_ ), INTENT( INOUT ), TARGET :: Obj -#else - CLASS( STDiffusionMatrix_ ), INTENT( INOUT ), TARGET :: Obj -#endif - REAL( DFP ), INTENT( IN ) :: TimeVector( 2 ), Beta_STFEM - CHARACTER( LEN = * ), INTENT( IN ) :: IntegrationSide - - ! Define internal variables - INTEGER( I4B ) :: NNS, NNT, NIPS, NIPT, IPS, IPT, aa, b, NSD, & - i, j, M, p, q - - REAL( DFP ), ALLOCATABLE :: dNTdXt( :, :, : ), T( : ), dNTdXt2( :, :, : ), & - dNTdXt3( :, :, : ) - REAL( DFP ) :: Beta, Ws, Js, thick, RealVal, Jt, Wt, Kij, t1, t2, Theta - TYPE( STElemShapeData_ ), TARGET :: STElemSD, STElemSD2 - CLASS( STShapeData_ ), POINTER :: SD => NULL( ), SD2 => NULL( ) - - Error_Flag = .FALSE. - - IF( .NOT. Obj % isInitiated( ) ) THEN - - CALL Err_Msg( & - "STDiffusionMatrix_Class.f90", & - "getDiffusionMatrix_31()", & - "STDiffusionMatrix_ Object is not Initiated" & - ) - Error_Flag = .TRUE. - RETURN - - END IF - - NNS = Obj % SD( 1,1 ) % getNNS( ) - NNT = Obj % SD( 1,1 ) % getNNT( ) - NSD = Obj % SD( 1, 1 ) % getNSD( ) - NIPS = Obj % getNIPS( ) - NIPT = Obj % getNIPT( ) - - IF( ALLOCATED( Obj % Mat4 ) ) DEALLOCATE( Obj % Mat4 ) - ALLOCATE( Obj % Mat4( NNS, NNS, NNT, NNT ) ) - Obj % Mat4 = 0.0_DFP - - M = NSD - - t1 = TimeVector( 1 ) - t2 = TimeVector( 2 ) - - Beta = Beta_STFEM * ( t2 - t1 ) - - ! Make copy of Obj - CALL STElemSD % Initiate( Obj ) - CALL STElemSD2 % Initiate( Obj ) - - DO IPT = 1, NIPT - - DO IPS = 1, NIPS - - SD => STElemSD .SDPointer. [IPS, IPT] - Theta = .Theta. SD - T = SD .TimeIntegration. [t1, t2, Theta] - - CALL SD % setT( T ) - CALL Check_Error( & - "STDiffusionMatrix_Class.f90>>DiffusionMatrix_31.part", & - "Traceback ---> CALL SD % setT( T )"& - ) - - CALL SD % setdNTdXt( ) - CALL Check_Error( & - "STDiffusionMatrix_Class.f90>>DiffusionMatrix_31.part", & - "Traceback ---> CALL SD % setdNTdXT( )"& - ) - - SD2 => STElemSD2 % SD( IPS, IPT ) - T = SD2 % dTdTheta / SD2 % Jt - - CALL SD2 % setT( T ) - CALL Check_Error( & - "STStiffnessMatrix_Class.f90>>StiffnessMatrix_13.part", & - "Traceback ---> CALL SD2 % setT( T )"& - ) - - CALL SD2 % setdNTdXt( ) - CALL Check_Error( & - "STStiffnessMatrix_Class.f90>>StiffnessMatrix_13.part", & - "Traceback ---> CALL SD2 % setdNTdXT( )"& - ) - - END DO - - END DO - - DO IPT = 1, NIPT - - DO IPS = 1, NIPS - - Ws = Obj % SD( IPS, IPT ) % getWs( ) - Wt = Obj % SD( IPS, IPT ) % getWt( ) - - Js = Obj % SD( IPS, IPT ) % getJs_Xi2Xt( ) - Jt = Obj % SD( IPS, IPT ) % getJt( ) - - thick = Obj % SD( IPS, IPT ) % getThickness( ) - - CALL Obj % SD( IPS, IPT ) % getdNTdXt( dNTdXt ) - CALL STElemSD % SD( IPS, IPT ) % getdNTdXt( dNTdXt2 ) - CALL STElemSD2 % SD( IPS, IPT ) % getdNTdXt( dNTdXt3 ) - - RealVal = Ws * Wt * Js * Jt * thick * Beta - - DO aa = 1, NNT - - DO b = 1, NNT - - DO p = 1, NSD - - SELECT CASE( TRIM( IntegrationSide ) ) - - CASE( "Right", "RIGHT", "right" ) - Obj % Mat4( :, :, aa, b ) = & - Obj % Mat4( :, :, aa, b ) + & - OUTERPROD( a = dNTdXt3( :, p, aa ), & - b = dNTdXt2( :, p, b ) ) * RealVal - - CASE( "Left", "LEFT", "left" ) - Obj % Mat4( :, :, aa, b ) = & - Obj % Mat4( :, :, aa, b ) + & - OUTERPROD( a = dNTdXt2( :, p, aa ), & - b = dNTdXt3( :, p, b ) ) * RealVal - - CASE( "None", "NONE", "none" ) - Obj % Mat4( :, :, aa, b ) = & - Obj % Mat4( :, :, aa, b ) + & - OUTERPROD( a = dNTdXt3( :, p, aa ), & - b = dNTdXt( :, p, b ) ) * RealVal - - CASE DEFAULT - - CALL Err_Msg( & - "STDiffusionMatrix_Class.f90", & - "getStiffnessMatrix_31()", & - "No case found for given integration side" & - ) - Error_Flag = .TRUE. - RETURN - - END SELECT - - END DO - - END DO - - END DO - - END DO - - END DO - - IF( ALLOCATED( Obj % Mat2 ) ) DEALLOCATE( Obj % Mat2 ) - IF( ALLOCATED( dNTdXt ) ) DEALLOCATE( dNTdXt ) - IF( ALLOCATED( dNTdXt2 ) ) DEALLOCATE( dNTdXt2 ) - IF( ALLOCATED( dNTdXt3 ) ) DEALLOCATE( dNTdXt3 ) - IF( ALLOCATED( T ) ) DEALLOCATE( T ) - CALL STElemSD % DeallocateData( ) - CALL STElemSD2 % DeallocateData( ) - SD => NULL( ) - SD2 => NULL( ) - - END SUBROUTINE getDiffusionMatrix_31 - -!------------------------------------------------------------------------------ -! -!------------------------------------------------------------------------------ - diff --git a/src/submodules/FEMatrix/STDiffusionMatrix/DiffusionMatrix_4.part b/src/submodules/FEMatrix/STDiffusionMatrix/DiffusionMatrix_4.part deleted file mode 100755 index aacf1b0e..00000000 --- a/src/submodules/FEMatrix/STDiffusionMatrix/DiffusionMatrix_4.part +++ /dev/null @@ -1,137 +0,0 @@ -! -!------------------------------------------------------------------------------ -! Author : Vikas sharma -! Position : Doctral Student -! Institute : Kyoto Univeristy, Japan -! Program name: DiffusionMatrix_4.part -! Last Update : Nov-20-2017 -! -!------------------------------------------------------------------------------ -! Details of Program -!============================================================================== -! -! TYPE :: Part of the Code -! -! DESCRIPTION -! - This code is part of the code -! -! HOSTING FILE -! - STDiffusionMatrix_Class.f90 -! -!============================================================================== - -!------------------------------------------------------------------------------ -! getDiffusionMatrix_4 -!------------------------------------------------------------------------------ - -SUBROUTINE getDiffusionMatrix_4( Obj, K ) - - !. . . . . . . . . . . . . . . . . . . . - ! 1. K( :, :, : ) - !. . . . . . . . . . . . . . . . . . . . - - USE Utility, ONLY : OUTERPROD - - ! Define intent of dummy variables -#ifdef STMat - CLASS( SpaceTimeMatrix_ ), INTENT( INOUT ), TARGET :: Obj -#else - CLASS( STDiffusionMatrix_ ), INTENT( INOUT ), TARGET :: Obj -#endif - REAL( DFP ), DIMENSION( :, :, : ), INTENT( IN ) :: K - - ! Define internal variables - INTEGER( I4B ) :: NNS, NNT, NIPS, NIPT, IPS, IPT, a, & - NSD, j - REAL( DFP ), ALLOCATABLE :: Mat2( :, : ), DummyMat3( :,:,: ), & - DummyVec1( : ), DummyVec2( : ) - REAL( DFP ) :: RealVal - CLASS( STShapeData_ ), POINTER :: SD - -#ifdef DEBUG_VER - Error_Flag = .FALSE. - IF( .NOT. Obj % isInitiated( ) ) THEN - CALL Err_Msg( & - & "STDiffusionMatrix_Class.f90", & - & "getDiffusionMatrix_4(), Flag-1", & - & "STDiffusionMatrix_ Object is not Initiated" ) - Error_Flag = .TRUE. - RETURN - END IF -#endif - - NNS = SIZE( Obj % SD( 1,1 ) % N ) - NNT = SIZE( Obj % SD( 1,1 ) % T ) - NSD = Obj % SD( 1,1 ) % getNSD( ) - NIPS = SIZE( Obj % SD, 1 ) - NIPT = SIZE( Obj % SD, 2 ) - -#ifdef DEBUG_VER - IF( SIZE( K, 1 ) .NE. SIZE( K, 2 ) ) THEN - CALL Err_Msg( & - "STDiffusionMatrix_Class.f90", & - "getDiffusionMatrix_4()", & - "The SIZE(K, 1) should be equal to SIZE(K, 2)" ) - Error_Flag = .TRUE. - RETURN - END IF - - IF( SIZE( K, 1 ) .NE. NSD ) THEN - CALL Err_Msg( & - "STDiffusionMatrix_Class.f90", & - "getDiffusionMatrix_4()", & - "The SIZE(K, 1) should be equal to NSD" ) - Error_Flag = .TRUE. - RETURN - END IF - - IF( SIZE( K, 3 ) .NE. NIPS ) THEN - CALL Err_Msg( & - "STDiffusionMatrix_Class.f90", & - "getDiffusionMatrix_4()", & - "The SIZE(K, 3) should be equal to NIPS" ) - Error_Flag = .TRUE. - RETURN - END IF -#endif - - IF( ALLOCATED( Obj % Mat2 ) ) DEALLOCATE( Obj % Mat2 ) - ALLOCATE( Obj % Mat2( NNS*NNT, NNS*NNT ) ) - Obj % Mat2 = 0.0_DFP - - ALLOCATE( DummyMat3( NNS, NSD, NNT ) ) - ALLOCATE( DummyVec1( NNT*NNS ), DummyVec2( NNT*NNS ) ) - - DO IPS = 1, NIPS - Mat2 = K( :, :, IPS ) - DO IPT = 1, NIPT - SD => Obj % SD( IPS, IPT ) - RealVal = SD % Ws * SD % Wt * SD % Js_Xi2Xt & - & * SD % Jt * SD % Thickness - DO a = 1, NNT - DummyMat3( :, :, a ) = MATMUL( SD % dNTdXt( :, :, a ), Mat2 ) - END DO - DO j = 1, NSD - DummyVec1 = RESHAPE( SD % dNTdXt( :, j, : ), (/NNS*NNT/) ) - DummyVec2 = RealVal*RESHAPE( DummyMat3(:,j,:), (/NNS*NNT/) ) - - Obj % Mat2( :, : ) = Obj % Mat2( :, : ) & - + OUTERPROD( a = DummyVec1, b = DummyVec2 ) - END DO - END DO - END DO - - CALL Obj % Mat4FromMat2( I3 = NNT, I4 = NNT ) - - NULLIFY( SD ) - IF( ALLOCATED( Mat2 ) ) DEALLOCATE( Mat2 ) - IF( ALLOCATED( DummyVec1 ) ) DEALLOCATE( DummyVec1 ) - IF( ALLOCATED( DummyVec2) ) DEALLOCATE( DummyVec2) - IF( ALLOCATED( DummyMat3 ) ) DEALLOCATE( DummyMat3 ) - -END SUBROUTINE getDiffusionMatrix_4 - -!------------------------------------------------------------------------------ -! -!------------------------------------------------------------------------------ - diff --git a/src/submodules/FEMatrix/STDiffusionMatrix/DiffusionMatrix_5.part b/src/submodules/FEMatrix/STDiffusionMatrix/DiffusionMatrix_5.part deleted file mode 100755 index cf3bd5a8..00000000 --- a/src/submodules/FEMatrix/STDiffusionMatrix/DiffusionMatrix_5.part +++ /dev/null @@ -1,128 +0,0 @@ -! -!------------------------------------------------------------------------------ -! Author : Vikas sharma -! Position : Doctral Student -! Institute : Kyoto Univeristy, Japan -! Program name: DiffusionMatrix_5.part -! Last Update : Nov-20-2017 -! -!------------------------------------------------------------------------------ -! Details of Program -!============================================================================== -! -! TYPE :: Part of the Code -! -! DESCRIPTION -! - This code is part of the code -! -! HOSTING FILE -! - STDiffusionMatrix_Class.f90 -! -!============================================================================== - -!------------------------------------------------------------------------------ -! getDiffusionMatrix_5 -!------------------------------------------------------------------------------ - -SUBROUTINE getDiffusionMatrix_5( Obj, K ) - - !. . . . . . . . . . . . . . . . . . . . - ! 1. K( :, : ) - !. . . . . . . . . . . . . . . . . . . . - - USE Utility, ONLY : OUTERPROD - - ! Define intent of dummy variables -#ifdef STMat - CLASS( SpaceTimeMatrix_ ), INTENT( INOUT ), TARGET :: Obj -#else - CLASS( STDiffusionMatrix_ ), INTENT( INOUT ), TARGET :: Obj -#endif - REAL( DFP ), DIMENSION( :, : ), INTENT( IN ) :: K - - ! Define internal variables - INTEGER( I4B ) :: NNS, NNT, NIPS, NIPT, IPS, IPT, a, & - NSD, j - REAL( DFP ), ALLOCATABLE :: DummyMat3( :,:,: ), & - DummyVec1( : ), DummyVec2( : ) - REAL( DFP ) :: RealVal - CLASS( STShapeData_ ), POINTER :: SD - -#ifdef DEBUG_VER - Error_Flag = .FALSE. - IF( .NOT. Obj % isInitiated( ) ) THEN - CALL Err_Msg( & - "STDiffusionMatrix_Class.f90", & - "getDiffusionMatrix_4(), Flag-1", & - "STDiffusionMatrix_ Object is not Initiated" & - ) - Error_Flag = .TRUE. - RETURN - END IF -#endif - - NNS = SIZE( Obj % SD( 1,1 ) % N ) - NNT = SIZE( Obj % SD( 1,1 ) % T ) - NSD = Obj % SD( 1,1 ) % getNSD( ) - NIPS = SIZE( Obj % SD, 1 ) - NIPT = SIZE( Obj % SD, 2 ) - -#ifdef DEBUG_VER - IF( SIZE( K, 1 ) .NE. SIZE( K, 2 ) ) THEN - CALL Err_Msg( & - "STDiffusionMatrix_Class.f90", & - "getDiffusionMatrix_4()", & - "The SIZE(K, 1) should be equal to SIZE(K, 2)" ) - Error_Flag = .TRUE. - RETURN - END IF - - IF( SIZE( K, 1 ) .NE. NSD ) THEN - CALL Err_Msg( & - "STDiffusionMatrix_Class.f90", & - "getDiffusionMatrix_4()", & - "The SIZE(K, 1) should be equal to NSD" ) - Error_Flag = .TRUE. - RETURN - END IF -#endif - - IF( ALLOCATED( Obj % Mat2 ) ) DEALLOCATE( Obj % Mat2 ) - ALLOCATE( Obj % Mat2( NNS*NNT, NNS*NNT ) ) - Obj % Mat2 = 0.0_DFP - - ALLOCATE( DummyMat3( NNS, NSD, NNT ) ) - ALLOCATE( DummyVec1( NNT*NNS ), DummyVec2( NNT*NNS ) ) - - DO IPS = 1, NIPS - DO IPT = 1, NIPT - SD => Obj % SD( IPS, IPT ) - RealVal = SD % Ws * SD % Wt * SD % Js_Xi2Xt & - & * SD % Jt * SD % Thickness - DO a = 1, NNT - DummyMat3( :, :, a ) = MATMUL( SD % dNTdXt( :, :, a ), K ) - END DO - - DO j = 1, NSD - DummyVec1 = RESHAPE( SD % dNTdXt( :, j, : ), (/NNS*NNT/) ) - DummyVec2 = RealVal*RESHAPE( DummyMat3( :, j, : ), (/NNS*NNT/) ) - - Obj % Mat2( :, : ) = Obj % Mat2( :, : ) & - & + OUTERPROD( a = DummyVec1, b = DummyVec2 ) - END DO - END DO - END DO - - CALL Obj % Mat4FromMat2( I3 = NNT, I4 = NNT ) - - NULLIFY( SD ) - IF( ALLOCATED( DummyVec1 ) ) DEALLOCATE( DummyVec1 ) - IF( ALLOCATED( DummyVec2) ) DEALLOCATE( DummyVec2) - IF( ALLOCATED( DummyMat3 ) ) DEALLOCATE( DummyMat3 ) - -END SUBROUTINE getDiffusionMatrix_5 - -!------------------------------------------------------------------------------ -! -!------------------------------------------------------------------------------ - diff --git a/src/submodules/FEMatrix/STDiffusionMatrix/DiffusionMatrix_6.part b/src/submodules/FEMatrix/STDiffusionMatrix/DiffusionMatrix_6.part deleted file mode 100755 index 785089aa..00000000 --- a/src/submodules/FEMatrix/STDiffusionMatrix/DiffusionMatrix_6.part +++ /dev/null @@ -1,50 +0,0 @@ -! -!------------------------------------------------------------------------------ -! Author : Vikas sharma -! Position : Doctral Student -! Institute : Kyoto Univeristy, Japan -! Program name: DiffusionMatrix_6.part -! Last Update : Nov-20-2017 -! -!------------------------------------------------------------------------------ -! Details of Program -!============================================================================== -! -! TYPE :: Part of the Code -! -! DESCRIPTION -! - This code is part of the code -! -! HOSTING FILE -! - STDiffusionMatrix_Class.f90 -! -!============================================================================== - -!------------------------------------------------------------------------------ -! getDiffusionMatrix_6 -!------------------------------------------------------------------------------ - -SUBROUTINE getDiffusionMatrix_6( Obj, K, nCopy ) - - !. . . . . . . . . . . . . . . . . . . . - ! 1. - Returns mass matrix; C is a 2D array of STNodal Values - !. . . . . . . . . . . . . . . . . . . . - - ! Define intent of dummy variables -#ifdef STMat - CLASS( SpaceTimeMatrix_ ), INTENT( INOUT ), TARGET :: Obj -#else - CLASS( STDiffusionMatrix_ ), INTENT( INOUT ), TARGET :: Obj -#endif - REAL( DFP ), DIMENSION( :, :, :, : ), INTENT( IN ) :: K - INTEGER( I4B ), INTENT( IN ) :: nCopy - - CALL Obj % getDiffusionMatrix( K = K ) - CALL Obj % MakeDiagonalCopies( nCopy ) - -END SUBROUTINE getDiffusionMatrix_6 - -!------------------------------------------------------------------------------ -! -!------------------------------------------------------------------------------ - diff --git a/src/submodules/FEMatrix/STDiffusionMatrix/DiffusionMatrix_7.part b/src/submodules/FEMatrix/STDiffusionMatrix/DiffusionMatrix_7.part deleted file mode 100755 index 9893d486..00000000 --- a/src/submodules/FEMatrix/STDiffusionMatrix/DiffusionMatrix_7.part +++ /dev/null @@ -1,51 +0,0 @@ -! -!------------------------------------------------------------------------------ -! Author : Vikas sharma -! Position : Doctral Student -! Institute : Kyoto Univeristy, Japan -! Program name: DiffusionMatrix_7.part -! Last Update : Nov-20-2017 -! -!------------------------------------------------------------------------------ -! Details of Program -!============================================================================== -! -! TYPE :: Part of the Code -! -! DESCRIPTION -! - This code is part of the code -! -! HOSTING FILE -! - STDiffusionMatrix_Class.f90 -! -!============================================================================== - -!------------------------------------------------------------------------------ -! getDiffusionMatrix_7 -!------------------------------------------------------------------------------ - -SUBROUTINE getDiffusionMatrix_7( Obj, K, nCopy ) - - !. . . . . . . . . . . . . . . . . . . . - ! 1. K( :, :, : ) - !. . . . . . . . . . . . . . . . . . . . - - - ! Define intent of dummy variables -#ifdef STMat - CLASS( SpaceTimeMatrix_ ), INTENT( INOUT ), TARGET :: Obj -#else - CLASS( STDiffusionMatrix_ ), INTENT( INOUT ), TARGET :: Obj -#endif - REAL( DFP ), DIMENSION( :, :, : ), INTENT( IN ) :: K - INTEGER( I4B ), INTENT( IN ) :: nCopy - - CALL Obj % getDiffusionMatrix( K = K ) - CALL Obj % MakeDiagonalCopies( nCopy ) - -END SUBROUTINE getDiffusionMatrix_7 - -!------------------------------------------------------------------------------ -! -!------------------------------------------------------------------------------ - diff --git a/src/submodules/FEMatrix/STDiffusionMatrix/DiffusionMatrix_8.part b/src/submodules/FEMatrix/STDiffusionMatrix/DiffusionMatrix_8.part deleted file mode 100755 index 92357d92..00000000 --- a/src/submodules/FEMatrix/STDiffusionMatrix/DiffusionMatrix_8.part +++ /dev/null @@ -1,50 +0,0 @@ -! -!------------------------------------------------------------------------------ -! Author : Vikas sharma -! Position : Doctral Student -! Institute : Kyoto Univeristy, Japan -! Program name: DiffusionMatrix_8.part -! Last Update : Nov-20-2017 -! -!------------------------------------------------------------------------------ -! Details of Program -!============================================================================== -! -! TYPE :: Part of the Code -! -! DESCRIPTION -! - This code is part of the code -! -! HOSTING FILE -! - STDiffusionMatrix_Class.f90 -! -!============================================================================== - -!------------------------------------------------------------------------------ -! getDiffusionMatrix_8 -!------------------------------------------------------------------------------ - -SUBROUTINE getDiffusionMatrix_8( Obj, K, nCopy ) - - !. . . . . . . . . . . . . . . . . . . . - ! 1. K( :, : ) - !. . . . . . . . . . . . . . . . . . . . - - ! Define intent of dummy variables -#ifdef STMat - CLASS( SpaceTimeMatrix_ ), INTENT( INOUT ), TARGET :: Obj -#else - CLASS( STDiffusionMatrix_ ), INTENT( INOUT ), TARGET :: Obj -#endif - REAL( DFP ), DIMENSION( :, : ), INTENT( IN ) :: K - INTEGER( I4B ), INTENT( IN ) :: nCopy - - CALL Obj % getDiffusionMatrix( K = K ) - CALL Obj % MakeDiagonalCopies( nCopy ) - -END SUBROUTINE getDiffusionMatrix_8 - -!------------------------------------------------------------------------------ -! -!------------------------------------------------------------------------------ - diff --git a/src/submodules/FEMatrix/STDiffusionMatrix/DiffusionMatrix_9.part b/src/submodules/FEMatrix/STDiffusionMatrix/DiffusionMatrix_9.part deleted file mode 100755 index ff390d6b..00000000 --- a/src/submodules/FEMatrix/STDiffusionMatrix/DiffusionMatrix_9.part +++ /dev/null @@ -1,194 +0,0 @@ -! -!------------------------------------------------------------------------------ -! Author : Vikas sharma -! Position : Doctral Student -! Institute : Kyoto Univeristy, Japan -! Program name: DiffusionMatrix_9.part -! Last Update : Nov-21-2017 -! -!------------------------------------------------------------------------------ -! Details of Program -!============================================================================== -! -! TYPE :: Part of the Code -! -! DESCRIPTION -! - This code is part of the code -! -! HOSTING FILE -! - STDiffusionMatrix_Class.f90 -! -!============================================================================== - -!------------------------------------------------------------------------------ -! getDiffusionMatrix_9 -!------------------------------------------------------------------------------ - -SUBROUTINE getDiffusionMatrix_9( Obj, c1, c2, c1Type, c2Type ) - - !. . . . . . . . . . . . . . . . . . . . - ! 1. c1, c2 ( :, :, : ) - ! 2. c1Type, c2Type NodalValues, QuadPoints - !. . . . . . . . . . . . . . . . . . . . - - USE Utility, ONLY : OUTERPROD - - ! Define intent of dummy variables -#ifdef STMat - CLASS( SpaceTimeMatrix_ ), INTENT( INOUT ), TARGET :: Obj -#else - CLASS( STDiffusionMatrix_ ), INTENT( INOUT ), TARGET :: Obj -#endif - REAL( DFP ), DIMENSION( :, :, : ), INTENT( IN ) :: c1, c2 - CHARACTER( LEN = * ), INTENT( IN ) :: c1Type, c2Type - - ! Define internal variables - INTEGER( I4B ) :: NNS, NNT, NIPS, NIPT, IPS, IPT, NSD - REAL( DFP ), ALLOCATABLE :: c1dNTdXt( :, : ), c2dNTdXt( :, : ), & - DummyVec1( : ), DummyVec2( : ) - REAL( DFP ) :: RealVal - CLASS( STShapeData_ ), POINTER :: SD - LOGICAL( LGT ) :: isC1Nodal, isC2Nodal - - isC1Nodal = .TRUE. - isC2Nodal = .TRUE. - -#ifdef DEBUG_VER - Error_Flag = .FALSE. - IF( .NOT. Obj % isInitiated( ) ) THEN - CALL Err_Msg( & - "STDiffusionMatrix_Class.f90", & - "getDiffusionMatrix_9(), Flag-1", & - "STDiffusionMatrix_ Object is not Initiated" ) - Error_Flag = .TRUE. - RETURN - END IF -#endif - - NNS = SIZE( Obj % SD( 1,1 ) % N ) - NNT = SIZE( Obj % SD( 1,1 ) % T ) - NSD = Obj % SD( 1,1 ) % getNSD( ) - NIPS = SIZE( Obj % SD, 1 ) - NIPT = SIZE( Obj % SD, 2 ) - -#ifdef DEBUG_VER - IF( SIZE( C1, 1 ) .NE. SIZE( C2, 1 ) ) THEN - CALL Err_Msg( & - "STDiffusionMatrix_Class.f90", & - "getDiffusionMatrix_9()", & - "The SIZE(C1, 1) should be equal to SIZE(C2, 1)" ) - Error_Flag = .TRUE. - RETURN - END IF - - IF( SIZE( C1, 1 ) .NE. NSD ) THEN - CALL Err_Msg( & - "STDiffusionMatrix_Class.f90", & - "getDiffusionMatrix_9()", & - "The SIZE(C1, 1), SIZE( C2, 1 ) should be equal to NSD" ) - Error_Flag = .TRUE. - RETURN - END IF - - IF( SIZE( C1, 2 ) .NE. NIPS .AND. SIZE( C1, 2 ) .NE. NNS ) THEN - CALL Err_Msg( & - "STDiffusionMatrix_Class.f90", & - "getDiffusionMatrix_9()", & - "The SIZE(C1, 2) should be equal to either NIPS, & - & or NNS" ) - Error_Flag = .TRUE. - RETURN - END IF - - IF( SIZE( C1, 3 ) .NE. NIPT .AND. SIZE( C1, 3 ) .NE. NNT ) THEN - CALL Err_Msg( & - "STDiffusionMatrix_Class.f90", & - "getDiffusionMatrix_9()", & - "The SIZE(C1, 3) should be equal to either NIPT, & - & or NNT" ) - Error_Flag = .TRUE. - RETURN - END IF - - IF( SIZE( C2, 2 ) .NE. NIPS .AND. SIZE( C2, 2 ) .NE. NNS ) THEN - CALL Err_Msg( & - "STDiffusionMatrix_Class.f90", & - "getDiffusionMatrix_9()", & - "The SIZE(C2, 2) should be equal to either NIPS, & - & or NNS" ) - Error_Flag = .TRUE. - RETURN - END IF - - IF( SIZE( C2, 3 ) .NE. NIPT .AND. SIZE( C2, 3 ) .NE. NNT ) THEN - CALL Err_Msg( & - "STDiffusionMatrix_Class.f90", & - "getDiffusionMatrix_9()", & - "The SIZE(C2, 3) should be equal to either NIPT, & - & or NNT" ) - Error_Flag = .TRUE. - RETURN - END IF -#endif - - SELECT CASE( TRIM( ADJUSTL( c1Type ) ) ) - CASE( "Quad", "QuadPoints", "Quad Points", & - "Integration", "Integration Points", & - "IntegrationPoints" ) - isC1Nodal = .FALSE. - END SELECT - - SELECT CASE( TRIM( ADJUSTL( c2Type ) ) ) - CASE( "Quad", "QuadPoints", "Quad Points", & - "Integration", "Integration Points", & - "IntegrationPoints" ) - isC2Nodal = .FALSE. - END SELECT - - IF( ALLOCATED( Obj % Mat2 ) ) DEALLOCATE( Obj % Mat2 ) - ALLOCATE( Obj % Mat2( NNS*NNT, NNS*NNT ) ) - Obj % Mat2 = 0.0_DFP - - DO IPT = 1, NIPT - DO IPS = 1, NIPS - SD => Obj % SD( IPS, IPT ) - RealVal = SD % Ws * SD % Wt * SD % Js_Xi2Xt & - & * SD % Jt * SD % Thickness - - IF( isC1Nodal ) THEN - CALL SD % getProjectionOfdNTdXt( cdNTdXt = c1dNTdXt, & - & STNodalValues = C1 ) - ELSE - CALL SD % getProjectionOfdNTdXt( cdNTdXt = c1dNTdXt, & - & VectorValues = C1( :, IPS, IPT ) ) - END IF - - IF( isC2Nodal ) THEN - CALL SD % getProjectionOfdNTdXt( cdNTdXt = c2dNTdXt, & - & STNodalValues = C2 ) - ELSE - CALL SD % getProjectionOfdNTdXt( cdNTdXt = c2dNTdXt, & - & VectorValues = C2( :, IPS, IPT ) ) - END IF - - DummyVec1 = RESHAPE( c1dNTdXt, (/NNS*NNT/) ) - DummyVec2 = RealVal * RESHAPE( c2dNTdXt, (/NNS*NNT/) ) - - Obj % Mat2 = Obj % Mat2 & - & + OUTERPROD( a = DummyVec1, b = DummyVec2 ) - END DO - END DO - - CALL Obj % Mat4FromMat2( I3 = NNT, I4 = NNT ) - NULLIFY( SD ) - IF( ALLOCATED( c1dNTdXt ) ) DEALLOCATE( c1dNTdXt ) - IF( ALLOCATED( c2dNTdXt ) ) DEALLOCATE( c2dNTdXt ) - IF( ALLOCATED( DummyVec1 ) ) DEALLOCATE( DummyVec1 ) - IF( ALLOCATED( DummyVec2 ) ) DEALLOCATE( DummyVec2 ) - -END SUBROUTINE getDiffusionMatrix_9 - -!------------------------------------------------------------------------------ -! -!------------------------------------------------------------------------------ - diff --git a/src/submodules/FEMatrix/STDiffusionMatrix/MdFiles/STDiffusionMatrix_Class.md b/src/submodules/FEMatrix/STDiffusionMatrix/MdFiles/STDiffusionMatrix_Class.md deleted file mode 100755 index 6fe667b0..00000000 --- a/src/submodules/FEMatrix/STDiffusionMatrix/MdFiles/STDiffusionMatrix_Class.md +++ /dev/null @@ -1,1971 +0,0 @@ -# Space Time Diffusion Matrix Class - -## ToDo - -## Structure - -## Description - -`STDiffusionMatrix_` object is child of `STElemShapeData_` class. It can be initiated using following commands. - -## Getting Started - -### Making The Object - -We can make the object using the `Initiate` method. - -```fortran -CALL Obj % Initiate( NIPS = NIPS, NIPT = NIPT) -CALL Obj % InitiateMatrix( row= row, col = col) -CALL Obj % InitiateMatrix( I1 = I1, I2 = I2, I3 = I3, I4= I4) -``` - -We can also use the `STDiffusionMatrix()` function - -```fortran -STElemSD = STDiffusionMatrix( ) -STElemSD = STDiffusionMatrix( row = row, col = col, NIPS = NIPS, NIPT = NIPT ) -STElemSD = STDiffusionMatrix( I1, I2, I3, I4, I5, NIPS, NIPT) -``` - -We can also use the `STDiffusionMatrix_Pointer()` function - -```fortran -STElemSD => STDiffusionMatrix_Pointer( ) -STElemSD => STDiffusionMatrix_Pointer( row = row, col = col, NIPS = NIPS, NIPT = NIPT ) -STElemSD => STDiffusionMatrix_Pointer( I1, I2, I3, I4, I5, NIPS, NIPT) -``` - -### Getting The Diffusion Matrix - -To compute the following matrix - -$$\int_{{I_n}}^{} {\int_\Omega ^{} {\frac{{\partial \delta u\,}}{{\partial {\bf{x}}}} \cdot \frac{{\partial u}}{{\partial {\bf{x}}}}d\Omega dt} } = {}^a\delta {u_I}\left[ {\int_{{I_n}}^{} {\int_\Omega ^{} {\frac{{\partial {N^I}{T_a}}}{{\partial {x_i}}}\,\frac{{\partial {N^J}{T_b}}}{{\partial {x_i}}}d\Omega dt} } } \right]\,{}^b{u_J}$$ - -we can use the following command - -```fortran -CALL Obj % getDiffusionMatrix( ) -``` - -To compute the following matrix - -$$ -\int_{{I_n}}^{} {\int_\Omega ^{} {\frac{{\partial \delta {u_i}\,}}{{\partial {\bf{x}}}} \cdot \frac{{\partial {u_i}}}{{\partial {\bf{x}}}}d\Omega dt} } = {}^a\delta {u_{iI}}\left[ {\int_{{I_n}}^{} {\int_\Omega ^{} {\frac{{\partial {N^I}{T_a}}}{{\partial {x_p}}}\,\frac{{\partial {N^J}{T_b}}}{{\partial {x_p}}}d\Omega dt} } } \right]\,{}^b{u_{iJ}} -$$ - -we can call following fortran command. - - -```fortran -CALL Obj % getDiffusionMatrix( nCopy ) -``` - -To compute the following matrix - -$$ -\int_{{I_n}}^{} {\int_\Omega ^{} {\frac{{\partial \delta u\,}}{{\partial {x_i}}}{K_{ij}}\frac{{\partial u}}{{\partial {x_j}}}d\Omega dt} } = {}^a\delta {u_I}\left[ {\int_{{I_n}}^{} {\int_\Omega ^{} {\frac{{\partial {N^I}{T_a}}}{{\partial {x_i}}}\,{K_{ij}}\frac{{\partial {N^J}{T_b}}}{{\partial {x_j}}}d\Omega dt} } } \right]\,{}^b{u_J} -$$ - -We can call following command. - -```fortran -CALL Obj % getDiffusionMatrix( K ) -``` - -To compute the following matrix - -$$ -\int_{{I_n}}^{} {\int_\Omega ^{} {\frac{{\partial \delta {u_i}\,}}{{\partial {x_p}}}{K_{pq}}\frac{{\partial {u_i}}}{{\partial {x_q}}}d\Omega dt} } = {}^a\delta {u_{iI}}\left[ {\int_{{I_n}}^{} {\int_\Omega ^{} {\frac{{\partial {N^I}{T_a}}}{{\partial {x_p}}}\,{K_{pq}}\frac{{\partial {N^J}{T_b}}}{{\partial {x_q}}}d\Omega dt} } } \right]\,{}^b{u_{iJ}} -$$ - -we can call following fortran command. - -```fortran -CALL Obj % getDiffusionMatrix( K, nCopy ) -``` - -In the above two calls `K` can be rank-4 `K(:,:,:,:)`, rank-3 `K(:,:,:)`, rank-2 `K(:,:)`. If `K` is varying in both space and time then it is given by space-time matrix. If `K` is changing only with the space then it is given by the Rank-3, and if `K` is constant in both space and time then it is given by the Rank-2 matrix. `K` is defined at the integration points. - -To compute the following matrix - -$$ -\[\int_{{I_n}}^{} {\int_\Omega ^{} {{{\bf{c}}_1} \cdot \frac{{\partial \delta u}}{{\partial {\bf{x}}}}{{\bf{c}}_2} \cdot \frac{{\partial u}}{{\partial {\bf{x}}}}d\Omega dt} } = {}^a\delta {u_I}\left[ {\int_{{I_n}}^{} {\int_\Omega ^{} {{{\bf{c}}_1} \cdot \frac{{\partial {N^I}{T_a}}}{{\partial {\bf{x}}}}{{\bf{c}}_2} \cdot \frac{{\partial {N^J}{T_b}}}{{\partial {\bf{x}}}}d\Omega dt} } } \right]{}^b{u_J}\] -$$ - -```fortran -CALL Obj % getDiffusionMatrix( c1, c2, c1Type, c2Type ) -CALL Obj % getDiffusionMatrix( c1, c2, c1Type, c2Type, nCopy ) -``` - -In the above call `c1, c2` can be rank-3 `(:,:,:)`, rank-2 `(:,:)`, rank-1 `(:)`. `c1Type, c2Type` can be `NodalValues` or `QuadPoints`. `c1, c2` denotes the convective velocity. - -- If convective velocity is changing in space and time then it must be given by Rank-3 matrix. -- If convective velocity is changing in only space then it must be given by Rank-2 matrix. -- If convective velocity is constant in both space and time then it must be given by Rank-1 matrix. - - - -```fortran -CALL Obj % getDiffusionMatrix( K, Term1, Term2 ) -``` - -In the above call `K` can be rank-4 `K(:,:,:,:)`, rank-3 `K(:,:,:)`, rank-2 `K(:,:)`. `Term1` and `Term2` can be `dx, dy, dz`. - - - - - - - - - - - - - - - - - - - - - - - - - - - - -## Theory - -Consider the following _scalar_ term present in the pde - -$${\nabla}^2 u + \cdots $$ - -then we may need to compute the following matrices. - -$${}^{4}Mat(I, J, a, b) = \delta {}^{a} u_I \int_{Q_n} \frac{\partial N^I T_a}{ \partial x_i} \frac{\partial N^J T_b}{ \partial x_i} {dQ} \quad {}^{b}u_J$$ - -Note here, $u \in R$. - -> These tasks are performed by following methods; `getDiffusionMatrix_1()`, `getDiffusionMatrix_2()` - -Now consider the following terms in a pde. - -$${\nabla} \cdot \Big( -{}^{2}\mathbf{K}{\nabla}u \Big) + \cdots $$ -or -$$\frac{\partial}{\partial x_i} \cdot \Big( -{}^{2}K_{ij} \frac{\partial u}{\partial x_j} \Big) + \cdots $$ - -> These tasks are performed by following methods; `getDiffusionMatrix_3()`, `getDiffusionMatrix_4()`, `getDiffusionMatrix_5()`, `getDiffusionMatrix_6()`, `getDiffusionMatrix_7()`, and `getDiffusionMatrix_8()` - - - -## Methods - -### getDiffusionMatrix_1() - -INTERFACE - -```fortran - SUBROUTINE getDiffusionMatrix_1( Obj ) - - USE Utility, ONLY : OUTERPROD - - CLASS( STDiffusionMatrix_ ), INTENT( INOUT ) :: Obj -``` - -DESCRIPTION - -- This methods computes the diffusion matrix for a scalar variable. This is the simplest form possible. No arguments are required. - -CODE SNIPPET - -```fortran -CALL STElemSD % getDiffusionMatrix( ) -``` - -SYMBOLIC CALCULATION - -$${}^{4}Mat(I, J, a, b) = \delta {}^{a} u_I \int_{Q_n} \frac{\partial N^I T_a}{ \partial x_i} \frac{\partial N^J T_b}{ \partial x_i} {dQ} \quad {}^{b}u_J$$ - -TESTING - -```fortran -CALL STElemSD % getDiffusionMatrix( ) - -CALL BlankLines( ) -WRITE( *, "(A)") "CALL STElemSD % getDiffusionMatrix_1( )" -CALL STElemSD % DisplayMatrix4 -``` - -__NIPS = 4, NIPT = 2__ - -```fortran -CALL STElemSD % getDiffusionMatrix_1( ) - -MATRIX STORED IN ST-ELEMENT-SHAPEDATA - -NIPS :: 4 NIPT :: 2 - -------------------------------------------------- - -4D MATRIX, MAT4(:,:,:,:) :: - -Mat4( :, :, 1, 1 ) - - 0.4444444 -0.1111111 -0.2222222 -0.1111111 - -0.1111111 0.4444444 -0.1111111 -0.2222222 - -0.2222222 -0.1111111 0.4444444 -0.1111111 - -0.1111111 -0.2222222 -0.1111111 0.4444444 - -Mat4( :, :, 1, 2 ) - - 0.2222222 -0.5555556E-01 -0.1111111 -0.5555556E-01 - -0.5555556E-01 0.2222222 -0.5555556E-01 -0.1111111 - -0.1111111 -0.5555556E-01 0.2222222 -0.5555556E-01 - -0.5555556E-01 -0.1111111 -0.5555556E-01 0.2222222 - -Mat4( :, :, 2, 1 ) - - 0.2222222 -0.5555556E-01 -0.1111111 -0.5555556E-01 - -0.5555556E-01 0.2222222 -0.5555556E-01 -0.1111111 - -0.1111111 -0.5555556E-01 0.2222222 -0.5555556E-01 - -0.5555556E-01 -0.1111111 -0.5555556E-01 0.2222222 - -Mat4( :, :, 2, 2 ) - - 0.4444444 -0.1111111 -0.2222222 -0.1111111 - -0.1111111 0.4444444 -0.1111111 -0.2222222 - -0.2222222 -0.1111111 0.4444444 -0.1111111 - -0.1111111 -0.2222222 -0.1111111 0.4444444 -``` -> Note that in this case integrad is quadratic in time, therefore we need atleast 2 integration points in the time. This condition may change when the mesh is moving. Note that the row sum and column sum is zero as expected. - -### getDiffusionMatrix_2() - -INTERFACE - -```fortran - SUBROUTINE getDiffusionMatrix_2( Obj, nCopy ) - - USE Utility, ONLY : OUTERPROD - - CLASS( STDiffusionMatrix_ ), INTENT( INOUT ) :: Obj - INTEGER( I4B ), INTENT( IN ) :: nCopy -``` - -DESCRIPTION - -- This methods computes the diffusion matrix for a scalar variable. This is the simplest form possible. No arguments are required. -- `nCopy` is an integer, which decides how many copies need to be placed on the diagonal. - -CODE SNIPPET - -```fortran -CALL STElemSD % getDiffusionMatrix( nCopy = 2 ) -``` - -SYMBOLIC CALCULATION - -$${}^{4}Mat(I, J, a, b) = \delta {}^{a} u_I \int_{Q_n} \frac{\partial N^I T_a}{ \partial x_i} \frac{\partial N^J T_b}{ \partial x_i} {dQ} \quad {}^{b}u_J$$ - -TESTING - -```fortran -CALL STElemSD % getDiffusionMatrix( nCopy = 2 ) - -CALL BlankLines( ) -WRITE( *, "(A)") "CALL STElemSD % getDiffusionMatrix_2( nCopy = 2 )" -CALL STElemSD % DisplayMatrix4 -``` - -__NIPS = 4, NIPT = 2__ - -```fortran -CALL STElemSD % getDiffusionMatrix_2( nCopy = 2 ) - -MATRIX STORED IN ST-ELEMENT-SHAPEDATA - -NIPS :: 4 NIPT :: 2 - -------------------------------------------------- - -4D MATRIX, MAT4(:,:,:,:) :: - -Mat4( :, :, 1, 1 ) - - 0.4444444 -0.1111111 -0.2222222 -0.1111111 0.000000 0.000000 0.000000 0.000000 - -0.1111111 0.4444444 -0.1111111 -0.2222222 0.000000 0.000000 0.000000 0.000000 - -0.2222222 -0.1111111 0.4444444 -0.1111111 0.000000 0.000000 0.000000 0.000000 - -0.1111111 -0.2222222 -0.1111111 0.4444444 0.000000 0.000000 0.000000 0.000000 - 0.000000 0.000000 0.000000 0.000000 0.4444444 -0.1111111 -0.2222222 -0.1111111 - 0.000000 0.000000 0.000000 0.000000 -0.1111111 0.4444444 -0.1111111 -0.2222222 - 0.000000 0.000000 0.000000 0.000000 -0.2222222 -0.1111111 0.4444444 -0.1111111 - 0.000000 0.000000 0.000000 0.000000 -0.1111111 -0.2222222 -0.1111111 0.4444444 - -Mat4( :, :, 1, 2 ) - - 0.2222222 -0.5555556E-01 -0.1111111 -0.5555556E-01 0.000000 0.000000 0.000000 0.000000 - -0.5555556E-01 0.2222222 -0.5555556E-01 -0.1111111 0.000000 0.000000 0.000000 0.000000 - -0.1111111 -0.5555556E-01 0.2222222 -0.5555556E-01 0.000000 0.000000 0.000000 0.000000 - -0.5555556E-01 -0.1111111 -0.5555556E-01 0.2222222 0.000000 0.000000 0.000000 0.000000 - 0.000000 0.000000 0.000000 0.000000 0.2222222 -0.5555556E-01 -0.1111111 -0.5555556E-01 - 0.000000 0.000000 0.000000 0.000000 -0.5555556E-01 0.2222222 -0.5555556E-01 -0.1111111 - 0.000000 0.000000 0.000000 0.000000 -0.1111111 -0.5555556E-01 0.2222222 -0.5555556E-01 - 0.000000 0.000000 0.000000 0.000000 -0.5555556E-01 -0.1111111 -0.5555556E-01 0.2222222 - -Mat4( :, :, 2, 1 ) - - 0.2222222 -0.5555556E-01 -0.1111111 -0.5555556E-01 0.000000 0.000000 0.000000 0.000000 - -0.5555556E-01 0.2222222 -0.5555556E-01 -0.1111111 0.000000 0.000000 0.000000 0.000000 - -0.1111111 -0.5555556E-01 0.2222222 -0.5555556E-01 0.000000 0.000000 0.000000 0.000000 - -0.5555556E-01 -0.1111111 -0.5555556E-01 0.2222222 0.000000 0.000000 0.000000 0.000000 - 0.000000 0.000000 0.000000 0.000000 0.2222222 -0.5555556E-01 -0.1111111 -0.5555556E-01 - 0.000000 0.000000 0.000000 0.000000 -0.5555556E-01 0.2222222 -0.5555556E-01 -0.1111111 - 0.000000 0.000000 0.000000 0.000000 -0.1111111 -0.5555556E-01 0.2222222 -0.5555556E-01 - 0.000000 0.000000 0.000000 0.000000 -0.5555556E-01 -0.1111111 -0.5555556E-01 0.2222222 - -Mat4( :, :, 2, 2 ) - - 0.4444444 -0.1111111 -0.2222222 -0.1111111 0.000000 0.000000 0.000000 0.000000 - -0.1111111 0.4444444 -0.1111111 -0.2222222 0.000000 0.000000 0.000000 0.000000 - -0.2222222 -0.1111111 0.4444444 -0.1111111 0.000000 0.000000 0.000000 0.000000 - -0.1111111 -0.2222222 -0.1111111 0.4444444 0.000000 0.000000 0.000000 0.000000 - 0.000000 0.000000 0.000000 0.000000 0.4444444 -0.1111111 -0.2222222 -0.1111111 - 0.000000 0.000000 0.000000 0.000000 -0.1111111 0.4444444 -0.1111111 -0.2222222 - 0.000000 0.000000 0.000000 0.000000 -0.2222222 -0.1111111 0.4444444 -0.1111111 - 0.000000 0.000000 0.000000 0.000000 -0.1111111 -0.2222222 -0.1111111 0.4444444 -``` - -### getDiffusionMatrix_3() - -INTERFACE - -```fortran - SUBROUTINE getDiffusionMatrix_3( Obj, K ) - - USE Utility, ONLY : OUTERPROD - - CLASS( STDiffusionMatrix_ ), INTENT( INOUT ) :: Obj - REAL( DFP ), DIMENSION( :, :, :, : ), INTENT( IN ) :: K -``` - -DESCRIPTION - -- This methods computes the diffusion matrix for a scalar variable. -- `K(:,:,:,:)` is a four dimensional array. The shape of `K` should be `(NSD, NSD, NIPS, NIPT)`. The third index denotes the spatial-integration points. The fourth index denotes the temporal integration points. In this case, `K` matrix varies in both space and time. - -CODE SNIPPET - -```fortran -CALL STElemSD % getDiffusionMatrix( K = DummyMat4 ) -``` - -SYMBOLIC CALCULATION - -$${}^{4}Mat(I, J, a, b) = \delta {}^{a} u_I \int_{Q_n} \frac{\partial N^I T_a}{ \partial x_i} \frac{\partial N^J T_b}{ \partial x_i} {dQ} \quad {}^{b}u_J$$ - -TESTING - -```fortran -IF( ALLOCATED( DummyMat4 ) ) DEALLOCATE( DummyMat4 ) -ALLOCATE( DummyMat4( NSD, NSD, NIPS, NIPT ) ) -DummyMat4 = 0.0_DFP; DummyMat4( 1, 1, :, : ) = 1.0_DFP -DummyMat4( 2, 2, :, : ) = 1.0_DFP - -CALL STElemSD % getDiffusionMatrix( K = DummyMat4 ) -cALL Check_Error( " " , " " ) - -CALL BlankLines( ) -WRITE( *, "(A)") "CALL STElemSD % getDiffusionMatrix_3( K = DummyMat4 )" -CALL STElemSD % DisplayMatrix4( ) -``` - -__NIPS = 4, NIPT = 2__ - -```fortran -CALL STElemSD % getDiffusionMatrix_3( K = DummyMat4 ) - -MATRIX STORED IN ST-ELEMENT-SHAPEDATA - -NIPS :: 4 NIPT :: 2 - -------------------------------------------------- - -4D MATRIX, MAT4(:,:,:,:) :: - -Mat4( :, :, 1, 1 ) - - 0.4444444 -0.1111111 -0.2222222 -0.1111111 - -0.1111111 0.4444444 -0.1111111 -0.2222222 - -0.2222222 -0.1111111 0.4444444 -0.1111111 - -0.1111111 -0.2222222 -0.1111111 0.4444444 - -Mat4( :, :, 1, 2 ) - - 0.2222222 -0.5555556E-01 -0.1111111 -0.5555556E-01 - -0.5555556E-01 0.2222222 -0.5555556E-01 -0.1111111 - -0.1111111 -0.5555556E-01 0.2222222 -0.5555556E-01 - -0.5555556E-01 -0.1111111 -0.5555556E-01 0.2222222 - -Mat4( :, :, 2, 1 ) - - 0.2222222 -0.5555556E-01 -0.1111111 -0.5555556E-01 - -0.5555556E-01 0.2222222 -0.5555556E-01 -0.1111111 - -0.1111111 -0.5555556E-01 0.2222222 -0.5555556E-01 - -0.5555556E-01 -0.1111111 -0.5555556E-01 0.2222222 - -Mat4( :, :, 2, 2 ) - - 0.4444444 -0.1111111 -0.2222222 -0.1111111 - -0.1111111 0.4444444 -0.1111111 -0.2222222 - -0.2222222 -0.1111111 0.4444444 -0.1111111 - -0.1111111 -0.2222222 -0.1111111 0.4444444 -``` - -### getDiffusionMatrix_4() - -INTERFACE - -```fortran - SUBROUTINE getDiffusionMatrix_4( Obj, K ) - - USE Utility, ONLY : OUTERPROD - - CLASS( STDiffusionMatrix_ ), INTENT( INOUT ) :: Obj - REAL( DFP ), DIMENSION( :, :, : ), INTENT( IN ) :: K -``` - -DESCRIPTION - -- This methods computes the diffusion matrix for a scalar variable. -- `K(:,:,:)` is a three dimensional array. The shape of `K` should be `(NSD, NSD, NIPS)`. The third index denotes the spatial-integration points. In this case, `K` matrix varies in only in space and remains constant in time. - -CODE SNIPPET - -```fortran -CALL STElemSD % getDiffusionMatrix( K = DummyMat3 ) -``` - -SYMBOLIC CALCULATION - -$${}^{4}Mat(I, J, a, b) = \delta {}^{a} u_I \int_{Q_n} \frac{\partial N^I T_a}{ \partial x_i} \frac{\partial N^J T_b}{ \partial x_i} {dQ} \quad {}^{b}u_J$$ - -TESTING - -```fortran -IF( ALLOCATED( DummyMat3 ) ) DEALLOCATE( DummyMat3 ) -ALLOCATE( DummyMat3( NSD, NSD, NIPS ) ) -DummyMat3 = 0.0_DFP; DummyMat3( 1, 1, : ) = 1.0_DFP -DummyMat3( 2, 2, : ) = 1.0_DFP - -CALL STElemSD % getDiffusionMatrix( K = DummyMat3 ) -cALL Check_Error( " " , " " ) - -CALL BlankLines( ) -WRITE( *, "(A)") "CALL STElemSD % getDiffusionMatrix_4( K = DummyMat3 )" -CALL STElemSD % DisplayMatrix4( ) -``` - -__NIPS = 4, NIPT = 2__ - -```fortran -CALL STElemSD % getDiffusionMatrix_4( K = DummyMat3 ) - -MATRIX STORED IN ST-ELEMENT-SHAPEDATA - -NIPS :: 4 NIPT :: 2 - -------------------------------------------------- - -4D MATRIX, MAT4(:,:,:,:) :: - -Mat4( :, :, 1, 1 ) - - 0.4444444 -0.1111111 -0.2222222 -0.1111111 - -0.1111111 0.4444444 -0.1111111 -0.2222222 - -0.2222222 -0.1111111 0.4444444 -0.1111111 - -0.1111111 -0.2222222 -0.1111111 0.4444444 - -Mat4( :, :, 1, 2 ) - - 0.2222222 -0.5555556E-01 -0.1111111 -0.5555556E-01 - -0.5555556E-01 0.2222222 -0.5555556E-01 -0.1111111 - -0.1111111 -0.5555556E-01 0.2222222 -0.5555556E-01 - -0.5555556E-01 -0.1111111 -0.5555556E-01 0.2222222 - -Mat4( :, :, 2, 1 ) - - 0.2222222 -0.5555556E-01 -0.1111111 -0.5555556E-01 - -0.5555556E-01 0.2222222 -0.5555556E-01 -0.1111111 - -0.1111111 -0.5555556E-01 0.2222222 -0.5555556E-01 - -0.5555556E-01 -0.1111111 -0.5555556E-01 0.2222222 - -Mat4( :, :, 2, 2 ) - - 0.4444444 -0.1111111 -0.2222222 -0.1111111 - -0.1111111 0.4444444 -0.1111111 -0.2222222 - -0.2222222 -0.1111111 0.4444444 -0.1111111 - -0.1111111 -0.2222222 -0.1111111 0.4444444 -``` - -### getDiffusionMatrix_5() - -INTERFACE - -```fortran - SUBROUTINE getDiffusionMatrix_5( Obj, K ) - - USE Utility, ONLY : OUTERPROD - - CLASS( STDiffusionMatrix_ ), INTENT( INOUT ) :: Obj - REAL( DFP ), DIMENSION( :, : ), INTENT( IN ) :: K -``` - -DESCRIPTION - -- This methods computes the diffusion matrix for a scalar variable. -- `K(:,:)` is a two dimensional array. The shape of `K` should be `(NSD, NSD)`. In this case, `K` matrix remains constant in both space and time. - -CODE SNIPPET - -```fortran -CALL STElemSD % getDiffusionMatrix( K = DummyMat2 ) -``` - -SYMBOLIC CALCULATION - -$${}^{4}Mat(I, J, a, b) = \delta {}^{a} u_I \int_{Q_n} \frac{\partial N^I T_a}{ \partial x_i} \frac{\partial N^J T_b}{ \partial x_i} {dQ} \quad {}^{b}u_J$$ - -TESTING - -```fortran -IF( ALLOCATED( DummyMat2 ) ) DEALLOCATE( DummyMat2 ) -ALLOCATE( DummyMat2( NSD, NSD ) ) -DummyMat2 = 0.0_DFP; DummyMat2( 1, 1 ) = 1.0_DFP -DummyMat2( 2, 2 ) = 1.0_DFP - -CALL STElemSD % getDiffusionMatrix( K = DummyMat2 ) -cALL Check_Error( " " , " " ) - -CALL BlankLines( ) -WRITE( *, "(A)") "CALL STElemSD % getDiffusionMatrix_5( K = DummyMat2 )" -CALL STElemSD % DisplayMatrix4( ) -``` - -__NIPS = 4, NIPT = 2__ - -```fortran -CALL STElemSD % getDiffusionMatrix_5( K = DummyMat2 ) - -MATRIX STORED IN ST-ELEMENT-SHAPEDATA - -NIPS :: 4 NIPT :: 2 - -------------------------------------------------- - -4D MATRIX, MAT4(:,:,:,:) :: - -Mat4( :, :, 1, 1 ) - - 0.4444444 -0.1111111 -0.2222222 -0.1111111 - -0.1111111 0.4444444 -0.1111111 -0.2222222 - -0.2222222 -0.1111111 0.4444444 -0.1111111 - -0.1111111 -0.2222222 -0.1111111 0.4444444 - -Mat4( :, :, 1, 2 ) - - 0.2222222 -0.5555556E-01 -0.1111111 -0.5555556E-01 - -0.5555556E-01 0.2222222 -0.5555556E-01 -0.1111111 - -0.1111111 -0.5555556E-01 0.2222222 -0.5555556E-01 - -0.5555556E-01 -0.1111111 -0.5555556E-01 0.2222222 - -Mat4( :, :, 2, 1 ) - - 0.2222222 -0.5555556E-01 -0.1111111 -0.5555556E-01 - -0.5555556E-01 0.2222222 -0.5555556E-01 -0.1111111 - -0.1111111 -0.5555556E-01 0.2222222 -0.5555556E-01 - -0.5555556E-01 -0.1111111 -0.5555556E-01 0.2222222 - -Mat4( :, :, 2, 2 ) - - 0.4444444 -0.1111111 -0.2222222 -0.1111111 - -0.1111111 0.4444444 -0.1111111 -0.2222222 - -0.2222222 -0.1111111 0.4444444 -0.1111111 - -0.1111111 -0.2222222 -0.1111111 0.4444444 -``` - -### getDiffusionMatrix_6() - -INTERFACE - -```fortran - SUBROUTINE getDiffusionMatrix_6( Obj, K, nCopy ) - - USE Utility, ONLY : OUTERPROD - - CLASS( STDiffusionMatrix_ ), INTENT( INOUT ) :: Obj - REAL( DFP ), DIMENSION( :, :, :, : ), INTENT( IN ) :: K - INTEGER( I4B ), INTENT( IN ) :: nCopy -``` - -DESCRIPTION - -- This methods computes the diffusion matrix for a scalar variable. -- `K(:,:,:,:)` is a four dimensional array. The shape of `K` should be `(NSD, NSD, NIPS, NIPT)`. The third index denotes the spatial-integration points. The fourth index denotes the temporal integration points. In this case, `K` matrix varies in both space and time. - -CODE SNIPPET - -```fortran -CALL STElemSD % getDiffusionMatrix( K = DummyMat4, nCopy = 2 ) -``` - -SYMBOLIC CALCULATION - -$${}^{4}Mat(I, J, a, b) = \delta {}^{a} u_I \int_{Q_n} \frac{\partial N^I T_a}{ \partial x_i} \frac{\partial N^J T_b}{ \partial x_i} {dQ} \quad {}^{b}u_J$$ - -TESTING - -```fortran -IF( ALLOCATED( DummyMat4 ) ) DEALLOCATE( DummyMat4 ) -ALLOCATE( DummyMat4( NSD, NSD, NIPS, NIPT ) ) -DummyMat4 = 0.0_DFP; DummyMat4( 1, 1, :, : ) = 1.0_DFP -DummyMat4( 2, 2, :, : ) = 1.0_DFP - -CALL STElemSD % getDiffusionMatrix( K = DummyMat4, nCopy = 2 ) - -CALL BlankLines( ) -WRITE( *, "(A)") "CALL STElemSD % getDiffusionMatrix_6( K = DummyMat4 )" -CALL STElemSD % DisplayMatrix4( ) -``` - -__NIPS = 4, NIPT = 2__ - -```fortran -CALL STElemSD % getDiffusionMatrix_6( K = DummyMat4 ) - -MATRIX STORED IN ST-ELEMENT-SHAPEDATA - -NIPS :: 4 NIPT :: 2 - -------------------------------------------------- - -4D MATRIX, MAT4(:,:,:,:) :: - -Mat4( :, :, 1, 1 ) - - 0.4444444 -0.1111111 -0.2222222 -0.1111111 0.000000 0.000000 0.000000 0.000000 - -0.1111111 0.4444444 -0.1111111 -0.2222222 0.000000 0.000000 0.000000 0.000000 - -0.2222222 -0.1111111 0.4444444 -0.1111111 0.000000 0.000000 0.000000 0.000000 - -0.1111111 -0.2222222 -0.1111111 0.4444444 0.000000 0.000000 0.000000 0.000000 - 0.000000 0.000000 0.000000 0.000000 0.4444444 -0.1111111 -0.2222222-0.1111111 - 0.000000 0.000000 0.000000 0.000000 -0.1111111 0.4444444 -0.1111111-0.2222222 - 0.000000 0.000000 0.000000 0.000000 -0.2222222 -0.1111111 0.4444444-0.1111111 - 0.000000 0.000000 0.000000 0.000000 -0.1111111 -0.2222222 -0.1111111 0.4444444 - -Mat4( :, :, 1, 2 ) - - 0.2222222 -0.5555556E-01 -0.1111111 -0.5555556E-01 0.000000 0.000000 0.000000 0.000000 - -0.5555556E-01 0.2222222 -0.5555556E-01 -0.1111111 0.000000 0.000000 0.000000 0.000000 - -0.1111111 -0.5555556E-01 0.2222222 -0.5555556E-01 0.000000 0.000000 0.000000 0.000000 - -0.5555556E-01 -0.1111111 -0.5555556E-01 0.2222222 0.000000 0.000000 0.000000 0.000000 - 0.000000 0.000000 0.000000 0.000000 0.2222222 -0.5555556E-01 -0.1111111-0.5555556E-01 - 0.000000 0.000000 0.000000 0.000000 -0.5555556E-01 0.2222222 -0.5555556E-01-0.1111111 - 0.000000 0.000000 0.000000 0.000000 -0.1111111 -0.5555556E-01 0.2222222-0.5555556E-01 - 0.000000 0.000000 0.000000 0.000000 -0.5555556E-01 -0.1111111 -0.5555556E-01 0.2222222 - -Mat4( :, :, 2, 1 ) - - 0.2222222 -0.5555556E-01 -0.1111111 -0.5555556E-01 0.000000 0.000000 0.000000 0.000000 - -0.5555556E-01 0.2222222 -0.5555556E-01 -0.1111111 0.000000 0.000000 0.000000 0.000000 - -0.1111111 -0.5555556E-01 0.2222222 -0.5555556E-01 0.000000 0.000000 0.000000 0.000000 - -0.5555556E-01 -0.1111111 -0.5555556E-01 0.2222222 0.000000 0.000000 0.000000 0.000000 - 0.000000 0.000000 0.000000 0.000000 0.2222222 -0.5555556E-01 -0.1111111-0.5555556E-01 - 0.000000 0.000000 0.000000 0.000000 -0.5555556E-01 0.2222222 -0.5555556E-01-0.1111111 - 0.000000 0.000000 0.000000 0.000000 -0.1111111 -0.5555556E-01 0.2222222-0.5555556E-01 - 0.000000 0.000000 0.000000 0.000000 -0.5555556E-01 -0.1111111 -0.5555556E-01 0.2222222 - -Mat4( :, :, 2, 2 ) - - 0.4444444 -0.1111111 -0.2222222 -0.1111111 0.000000 0.000000 0.000000 0.000000 - -0.1111111 0.4444444 -0.1111111 -0.2222222 0.000000 0.000000 0.000000 0.000000 - -0.2222222 -0.1111111 0.4444444 -0.1111111 0.000000 0.000000 0.000000 0.000000 - -0.1111111 -0.2222222 -0.1111111 0.4444444 0.000000 0.000000 0.000000 0.000000 - 0.000000 0.000000 0.000000 0.000000 0.4444444 -0.1111111 -0.2222222-0.1111111 - 0.000000 0.000000 0.000000 0.000000 -0.1111111 0.4444444 -0.1111111-0.2222222 - 0.000000 0.000000 0.000000 0.000000 -0.2222222 -0.1111111 0.4444444-0.1111111 - 0.000000 0.000000 0.000000 0.000000 -0.1111111 -0.2222222 -0.1111111 0.4444444 -``` - -### getDiffusionMatrix_7() - -INTERFACE - -```fortran - SUBROUTINE getDiffusionMatrix_7( Obj, K, nCopy ) - - USE Utility, ONLY : OUTERPROD - - CLASS( STDiffusionMatrix_ ), INTENT( INOUT ) :: Obj - REAL( DFP ), DIMENSION( :, :, : ), INTENT( IN ) :: K - INTEGER( I4B ), INTENT( IN ) :: nCopy -``` - -DESCRIPTION - -- This methods computes the diffusion matrix for a scalar variable. -- `K(:,:,:)` is a three dimensional array. The shape of `K` should be `(NSD, NSD, NIPS)`. The third index denotes the spatial-integration points. In this case, `K` matrix varies in only in space and remains constant in time. -CODE SNIPPET - -```fortran -CALL STElemSD % getDiffusionMatrix( K = DummyMat3, nCopy = 2 ) -``` - -SYMBOLIC CALCULATION - -$${}^{4}Mat(I, J, a, b) = \delta {}^{a} u_I \int_{Q_n} \frac{\partial N^I T_a}{ \partial x_i} \frac{\partial N^J T_b}{ \partial x_i} {dQ} \quad {}^{b}u_J$$ - -TESTING - -```fortran -IF( ALLOCATED( DummyMat3 ) ) DEALLOCATE( DummyMat3 ) -ALLOCATE( DummyMat3( NSD, NSD, NIPS ) ) -DummyMat3 = 0.0_DFP; DummyMat3( 1, 1, : ) = 1.0_DFP -DummyMat3( 2, 2, : ) = 1.0_DFP - -CALL STElemSD % getDiffusionMatrix( K = DummyMat3, nCopy = 2 ) - -CALL BlankLines( ) -WRITE( *, "(A)") "CALL STElemSD % getDiffusionMatrix_7( K = DummyMat3 )" -CALL STElemSD % DisplayMatrix4( ) -``` - -__NIPS = 4, NIPT = 2__ - -```fortran -CALL STElemSD % getDiffusionMatrix_7( K = DummyMat3 ) - -MATRIX STORED IN ST-ELEMENT-SHAPEDATA - -NIPS :: 4 NIPT :: 2 - -------------------------------------------------- - -4D MATRIX, MAT4(:,:,:,:) :: - -Mat4( :, :, 1, 1 ) - - 0.4444444 -0.1111111 -0.2222222 -0.1111111 0.000000 0.000000 0.000000 0.000000 - -0.1111111 0.4444444 -0.1111111 -0.2222222 0.000000 0.000000 0.000000 0.000000 - -0.2222222 -0.1111111 0.4444444 -0.1111111 0.000000 0.000000 0.000000 0.000000 - -0.1111111 -0.2222222 -0.1111111 0.4444444 0.000000 0.000000 0.000000 0.000000 - 0.000000 0.000000 0.000000 0.000000 0.4444444 -0.1111111 -0.2222222-0.1111111 - 0.000000 0.000000 0.000000 0.000000 -0.1111111 0.4444444 -0.1111111-0.2222222 - 0.000000 0.000000 0.000000 0.000000 -0.2222222 -0.1111111 0.4444444-0.1111111 - 0.000000 0.000000 0.000000 0.000000 -0.1111111 -0.2222222 -0.1111111 0.4444444 - -Mat4( :, :, 1, 2 ) - - 0.2222222 -0.5555556E-01 -0.1111111 -0.5555556E-01 0.000000 0.000000 0.000000 0.000000 - -0.5555556E-01 0.2222222 -0.5555556E-01 -0.1111111 0.000000 0.000000 0.000000 0.000000 - -0.1111111 -0.5555556E-01 0.2222222 -0.5555556E-01 0.000000 0.000000 0.000000 0.000000 - -0.5555556E-01 -0.1111111 -0.5555556E-01 0.2222222 0.000000 0.000000 0.000000 0.000000 - 0.000000 0.000000 0.000000 0.000000 0.2222222 -0.5555556E-01 -0.1111111-0.5555556E-01 - 0.000000 0.000000 0.000000 0.000000 -0.5555556E-01 0.2222222 -0.5555556E-01-0.1111111 - 0.000000 0.000000 0.000000 0.000000 -0.1111111 -0.5555556E-01 0.2222222-0.5555556E-01 - 0.000000 0.000000 0.000000 0.000000 -0.5555556E-01 -0.1111111 -0.5555556E-01 0.2222222 - -Mat4( :, :, 2, 1 ) - - 0.2222222 -0.5555556E-01 -0.1111111 -0.5555556E-01 0.000000 0.000000 0.000000 0.000000 - -0.5555556E-01 0.2222222 -0.5555556E-01 -0.1111111 0.000000 0.000000 0.000000 0.000000 - -0.1111111 -0.5555556E-01 0.2222222 -0.5555556E-01 0.000000 0.000000 0.000000 0.000000 - -0.5555556E-01 -0.1111111 -0.5555556E-01 0.2222222 0.000000 0.000000 0.000000 0.000000 - 0.000000 0.000000 0.000000 0.000000 0.2222222 -0.5555556E-01 -0.1111111-0.5555556E-01 - 0.000000 0.000000 0.000000 0.000000 -0.5555556E-01 0.2222222 -0.5555556E-01-0.1111111 - 0.000000 0.000000 0.000000 0.000000 -0.1111111 -0.5555556E-01 0.2222222-0.5555556E-01 - 0.000000 0.000000 0.000000 0.000000 -0.5555556E-01 -0.1111111 -0.5555556E-01 0.2222222 - -Mat4( :, :, 2, 2 ) - - 0.4444444 -0.1111111 -0.2222222 -0.1111111 0.000000 0.000000 0.000000 0.000000 - -0.1111111 0.4444444 -0.1111111 -0.2222222 0.000000 0.000000 0.000000 0.000000 - -0.2222222 -0.1111111 0.4444444 -0.1111111 0.000000 0.000000 0.000000 0.000000 - -0.1111111 -0.2222222 -0.1111111 0.4444444 0.000000 0.000000 0.000000 0.000000 - 0.000000 0.000000 0.000000 0.000000 0.4444444 -0.1111111 -0.2222222-0.1111111 - 0.000000 0.000000 0.000000 0.000000 -0.1111111 0.4444444 -0.1111111-0.2222222 - 0.000000 0.000000 0.000000 0.000000 -0.2222222 -0.1111111 0.4444444-0.1111111 - 0.000000 0.000000 0.000000 0.000000 -0.1111111 -0.2222222 -0.1111111 0.4444444 -``` - -### getDiffusionMatrix_8() - -INTERFACE - -```fortran - SUBROUTINE getDiffusionMatrix_8( Obj, K, nCopy ) - - USE Utility, ONLY : OUTERPROD - - CLASS( STDiffusionMatrix_ ), INTENT( INOUT ) :: Obj - REAL( DFP ), DIMENSION( :, : ), INTENT( IN ) :: K - INTEGER( I4B ), INTENT( IN ) :: nCopy -``` - -DESCRIPTION - -- This methods computes the diffusion matrix for a scalar variable. -- `K(:,:)` is a two dimensional array. The shape of `K` should be `(NSD, NSD)`. In this case, `K` matrix remains constant in both space and time. - -```fortran -CALL STElemSD % getDiffusionMatrix( K = DummyMat2, nCopy = 2 ) -``` - -SYMBOLIC CALCULATION - -$${}^{4}Mat(I, J, a, b) = \delta {}^{a} u_I \int_{Q_n} \frac{\partial N^I T_a}{ \partial x_i} \frac{\partial N^J T_b}{ \partial x_i} {dQ} \quad {}^{b}u_J$$ - -TESTING - -```fortran -IF( ALLOCATED( DummyMat2 ) ) DEALLOCATE( DummyMat2 ) -ALLOCATE( DummyMat2( NSD, NSD ) ) -DummyMat2 = 0.0_DFP; DummyMat2( 1, 1 ) = 1.0_DFP -DummyMat2( 2, 2 ) = 1.0_DFP - -CALL STElemSD % getDiffusionMatrix( K = DummyMat2, nCopy = 2 ) - -CALL BlankLines( ) -WRITE( *, "(A)") "CALL STElemSD % getDiffusionMatrix_5( K = DummyMat2 )" -CALL STElemSD % DisplayMatrix4( ) -``` - -__NIPS = 4, NIPT = 2__ - -```fortran -CALL STElemSD % getDiffusionMatrix_5( K = DummyMat2 ) - -MATRIX STORED IN ST-ELEMENT-SHAPEDATA - -NIPS :: 4 NIPT :: 2 - -------------------------------------------------- - -4D MATRIX, MAT4(:,:,:,:) :: - -Mat4( :, :, 1, 1 ) - - 0.4444444 -0.1111111 -0.2222222 -0.1111111 0.000000 0.000000 0.000000 0.000000 - -0.1111111 0.4444444 -0.1111111 -0.2222222 0.000000 0.000000 0.000000 0.000000 - -0.2222222 -0.1111111 0.4444444 -0.1111111 0.000000 0.000000 0.000000 0.000000 - -0.1111111 -0.2222222 -0.1111111 0.4444444 0.000000 0.000000 0.000000 0.000000 - 0.000000 0.000000 0.000000 0.000000 0.4444444 -0.1111111 -0.2222222-0.1111111 - 0.000000 0.000000 0.000000 0.000000 -0.1111111 0.4444444 -0.1111111-0.2222222 - 0.000000 0.000000 0.000000 0.000000 -0.2222222 -0.1111111 0.4444444-0.1111111 - 0.000000 0.000000 0.000000 0.000000 -0.1111111 -0.2222222 -0.1111111 0.4444444 - -Mat4( :, :, 1, 2 ) - - 0.2222222 -0.5555556E-01 -0.1111111 -0.5555556E-01 0.000000 0.000000 0.000000 0.000000 - -0.5555556E-01 0.2222222 -0.5555556E-01 -0.1111111 0.000000 0.000000 0.000000 0.000000 - -0.1111111 -0.5555556E-01 0.2222222 -0.5555556E-01 0.000000 0.000000 0.000000 0.000000 - -0.5555556E-01 -0.1111111 -0.5555556E-01 0.2222222 0.000000 0.000000 0.000000 0.000000 - 0.000000 0.000000 0.000000 0.000000 0.2222222 -0.5555556E-01 -0.1111111-0.5555556E-01 - 0.000000 0.000000 0.000000 0.000000 -0.5555556E-01 0.2222222 -0.5555556E-01-0.1111111 - 0.000000 0.000000 0.000000 0.000000 -0.1111111 -0.5555556E-01 0.2222222-0.5555556E-01 - 0.000000 0.000000 0.000000 0.000000 -0.5555556E-01 -0.1111111 -0.5555556E-01 0.2222222 - -Mat4( :, :, 2, 1 ) - - 0.2222222 -0.5555556E-01 -0.1111111 -0.5555556E-01 0.000000 0.000000 0.000000 0.000000 - -0.5555556E-01 0.2222222 -0.5555556E-01 -0.1111111 0.000000 0.000000 0.000000 0.000000 - -0.1111111 -0.5555556E-01 0.2222222 -0.5555556E-01 0.000000 0.000000 0.000000 0.000000 - -0.5555556E-01 -0.1111111 -0.5555556E-01 0.2222222 0.000000 0.000000 0.000000 0.000000 - 0.000000 0.000000 0.000000 0.000000 0.2222222 -0.5555556E-01 -0.1111111-0.5555556E-01 - 0.000000 0.000000 0.000000 0.000000 -0.5555556E-01 0.2222222 -0.5555556E-01-0.1111111 - 0.000000 0.000000 0.000000 0.000000 -0.1111111 -0.5555556E-01 0.2222222-0.5555556E-01 - 0.000000 0.000000 0.000000 0.000000 -0.5555556E-01 -0.1111111 -0.5555556E-01 0.2222222 - -Mat4( :, :, 2, 2 ) - - 0.4444444 -0.1111111 -0.2222222 -0.1111111 0.000000 0.000000 0.000000 0.000000 - -0.1111111 0.4444444 -0.1111111 -0.2222222 0.000000 0.000000 0.000000 0.000000 - -0.2222222 -0.1111111 0.4444444 -0.1111111 0.000000 0.000000 0.000000 0.000000 - -0.1111111 -0.2222222 -0.1111111 0.4444444 0.000000 0.000000 0.000000 0.000000 - 0.000000 0.000000 0.000000 0.000000 0.4444444 -0.1111111 -0.2222222-0.1111111 - 0.000000 0.000000 0.000000 0.000000 -0.1111111 0.4444444 -0.1111111-0.2222222 - 0.000000 0.000000 0.000000 0.000000 -0.2222222 -0.1111111 0.4444444-0.1111111 - 0.000000 0.000000 0.000000 0.000000 -0.1111111 -0.2222222 -0.1111111 0.4444444 -``` - -### getDiffusionMatrix_9() - -INTERFACE - -```fortran - SUBROUTINE getDiffusionMatrix_9( Obj, c1, c2, c1Type, c2Type ) - - USE Utility, ONLY : OUTERPROD - - CLASS( STDiffusionMatrix_ ), INTENT( INOUT ) :: Obj - REAL( DFP ), DIMENSION( :, :, : ), INTENT( IN ) :: c1, c2 - CHARACTER( LEN = * ), INTENT( IN ) :: c1Type, c2Type -``` - -DESCRIPTION - -- This methods computes the diffusion matrix for a scalar variable. -- `c1(:,:,:)` and `c2(:,:,:)` are three dimensional arrays. They denotes the vector over which projection of $\frac{\partial N^I T_a}{\partial x_k}$ will be taken. -- `C1Type` or `C2Type` are in the set `[Nodal, NodalValues, Nodal Values, STNodalValues, ST Nodal Values]` then `c1` and/or `c2` denotes the space-time nodal values. In this case their shape should be `(NSD, NNS, NNT)`. The first index denotes the spatial-coordinate. The second index denotes the spatial-node. Third index denotes the temporal nodes. -- `C1Type` or `C2Type` are in the set `[Integration, IntegrationPoints, Integration Points, Quad, QuadPoints, Qaud Points]` then `c1` and/or `c2` denotes the values at space-time integration(quadrature) points. In this case, their shape should be `(NSD, NIPS, NIPT)`. The first index denotes the spatial-coordinate. The second index denotes the spatial-node. Third index denotes the temporal nodes. - -CODE SNIPPET - -```fortran -CALL STElemSD % getDiffusionMatrix( c1 = DummyMat3, c2 = DummyMat3, C1Type = 'Quad', C2Type = 'Quad' ) -CALL STElemSD % getDiffusionMatrix( c1 = DummyMat3, c2 = DummyMat3, C1Type = 'Nodal', C2Type = 'Nodal' ) -CALL STElemSD % getDiffusionMatrix( c1 = DummyMat3, c2 = DummyMat3, C1Type = 'Nodal', C2Type = 'Quad' ) -CALL STElemSD % getDiffusionMatrix( c1 = DummyMat3, c2 = DummyMat3, C1Type = 'Quad', C2Type = 'Nodal' ) -``` - -SYMBOLIC CALCULATION -? - -TESTING - -```fortran -IF( ALLOCATED( DummyMat3 ) ) DEALLOCATE( DummyMat3 ) -ALLOCATE( DummyMat3( NSD, NIPS, NIPT ) ) -DummyMat3 = 1.0_DFP - -CALL STElemSD % getDiffusionMatrix( c1 = DummyMat3, c2 = DummyMat3,& -C1Type = 'Quad', C2Type = 'Quad' ) - -CALL BlankLines( ) -WRITE( *, "(A)") "CALL STElemSD % getDiffusionMatrix_9( c1 = & -DummyMat3, c2 = DummyMat3, C1Type = 'Quad', C2Type = 'Quad' )" -CALL STElemSD % DisplayMatrix4( ) -``` - -__NIPS = 4, NIPT = 2__ - -```fortran -CALL STElemSD % getDiffusionMatrix_9( c1 = DummyMat3, c2 = DummyMat3, C1Type = 'Quad', C2Type = 'Quad' ) - -MATRIX STORED IN ST-ELEMENT-SHAPEDATA - -NIPS :: 4 NIPT :: 2 - -------------------------------------------------- - -4D MATRIX, MAT4(:,:,:,:) :: - -Mat4( :, :, 1, 1 ) - - 0.7777778 -0.1111111 -0.5555556 -0.1111111 - -0.1111111 0.1111111 -0.1111111 0.1111111 - -0.5555556 -0.1111111 0.7777778 -0.1111111 - -0.1111111 0.1111111 -0.1111111 0.1111111 - -Mat4( :, :, 1, 2 ) - - 0.3888889 -0.5555556E-01 -0.2777778 -0.5555556E-01 - -0.5555556E-01 0.5555556E-01 -0.5555556E-01 0.5555556E-01 - -0.2777778 -0.5555556E-01 0.3888889 -0.5555556E-01 - -0.5555556E-01 0.5555556E-01 -0.5555556E-01 0.5555556E-01 - -Mat4( :, :, 2, 1 ) - - 0.3888889 -0.5555556E-01 -0.2777778 -0.5555556E-01 - -0.5555556E-01 0.5555556E-01 -0.5555556E-01 0.5555556E-01 - -0.2777778 -0.5555556E-01 0.3888889 -0.5555556E-01 - -0.5555556E-01 0.5555556E-01 -0.5555556E-01 0.5555556E-01 - -Mat4( :, :, 2, 2 ) - - 0.7777778 -0.1111111 -0.5555556 -0.1111111 - -0.1111111 0.1111111 -0.1111111 0.1111111 - -0.5555556 -0.1111111 0.7777778 -0.1111111 - -0.1111111 0.1111111 -0.1111111 0.1111111 -``` - -### getDiffusionMatrix_10() - -INTERFACE - -```fortran - SUBROUTINE getDiffusionMatrix_9( Obj, c1, c2, c1Type, c2Type ) - - USE Utility, ONLY : OUTERPROD - - CLASS( STDiffusionMatrix_ ), INTENT( INOUT ) :: Obj - REAL( DFP ), DIMENSION( :, : ), INTENT( IN ) :: c1, c2 - CHARACTER( LEN = * ), INTENT( IN ) :: c1Type, c2Type -``` - -DESCRIPTION - -- This methods computes the diffusion matrix for a scalar variable. -- `c1(:,:)` and `c2(:,:)` are two dimensional arrays. They denotes the vector over which projection of $\frac{\partial N^I T_a}{\partial x_k}$ will be taken. -- `C1Type` or `C2Type` are in the set `[Nodal, NodalValues, Nodal Values, STNodalValues, ST Nodal Values]` then `c1` and/or `c2` denotes the spatial nodal values. In this case, their shape should be `(NSD, NNS)`. The first index denotes the spatial-coordinate. The second index denotes the spatial-node. -- `C1Type` or `C2Type` are in the set `[Integration, IntegrationPoints, Integration Points, Quad, QuadPoints, Qaud Points]` then `c1` and/or `c2` denotes the values at spatial integration(quadrature) points. In this case, their shape should be `(NSD, NIPS)`. The first index denotes the spatial-coordinate. The second index denotes the spatial-node. - -CODE SNIPPET - -```fortran -CALL STElemSD % getDiffusionMatrix( c1 = DummyMat2, c2 = DummyMat2, C1Type = 'Quad', C2Type = 'Quad' ) -CALL STElemSD % getDiffusionMatrix( c1 = DummyMat2, c2 = DummyMat2, C1Type = 'Nodal', C2Type = 'Nodal' ) -CALL STElemSD % getDiffusionMatrix( c1 = DummyMat2, c2 = DummyMat2, C1Type = 'Quad', C2Type = 'Nodal' ) -CALL STElemSD % getDiffusionMatrix( c1 = DummyMat2, c2 = DummyMat2, C1Type = 'Nodal', C2Type = 'Quad' ) -``` - -SYMBOLIC CALCULATION - -? - -TESTING - -```fortran -IF( ALLOCATED( DummyMat2 ) ) DEALLOCATE( DummyMat2 ) -ALLOCATE( DummyMat2( NSD, NIPS ) ) -DummyMat2 = 1.0_DFP - -CALL STElemSD % getDiffusionMatrix( c1 = DummyMat2, c2 = DummyMat2,& -C1Type = 'Quad', C2Type = 'Quad' ) - -CALL BlankLines( ) -WRITE( *, "(A)") "CALL STElemSD % getDiffusionMatrix_10( c1 = & -DummyMat2, c2 = DummyMat2, C1Type = 'Quad', C2Type = 'Quad' )" -CALL STElemSD % DisplayMatrix4( ) -``` - -__NIPS = 4, NIPT = 2__ - -```fortran -CALL STElemSD % getDiffusionMatrix_10( c1 = DummyMat2, c2 = DummyMat2, C1Type = 'Quad', C2Type = 'Quad' ) - -MATRIX STORED IN ST-ELEMENT-SHAPEDATA - -NIPS :: 4 NIPT :: 2 - -------------------------------------------------- - -4D MATRIX, MAT4(:,:,:,:) :: - -Mat4( :, :, 1, 1 ) - - 0.7777778 -0.1111111 -0.5555556 -0.1111111 - -0.1111111 0.1111111 -0.1111111 0.1111111 - -0.5555556 -0.1111111 0.7777778 -0.1111111 - -0.1111111 0.1111111 -0.1111111 0.1111111 - -Mat4( :, :, 1, 2 ) - - 0.3888889 -0.5555556E-01 -0.2777778 -0.5555556E-01 - -0.5555556E-01 0.5555556E-01 -0.5555556E-01 0.5555556E-01 - -0.2777778 -0.5555556E-01 0.3888889 -0.5555556E-01 - -0.5555556E-01 0.5555556E-01 -0.5555556E-01 0.5555556E-01 - -Mat4( :, :, 2, 1 ) - - 0.3888889 -0.5555556E-01 -0.2777778 -0.5555556E-01 - -0.5555556E-01 0.5555556E-01 -0.5555556E-01 0.5555556E-01 - -0.2777778 -0.5555556E-01 0.3888889 -0.5555556E-01 - -0.5555556E-01 0.5555556E-01 -0.5555556E-01 0.5555556E-01 - -Mat4( :, :, 2, 2 ) - - 0.7777778 -0.1111111 -0.5555556 -0.1111111 - -0.1111111 0.1111111 -0.1111111 0.1111111 - -0.5555556 -0.1111111 0.7777778 -0.1111111 - -0.1111111 0.1111111 -0.1111111 0.1111111 -``` - -### getDiffusionMatrix_11() - -INTERFACE - -```fortran - SUBROUTINE getDiffusionMatrix_9( Obj, c1, c2, c1Type, c2Type ) - - USE Utility, ONLY : OUTERPROD - - CLASS( STDiffusionMatrix_ ), INTENT( INOUT ) :: Obj - REAL( DFP ), DIMENSION( : ), INTENT( IN ) :: c1, c2 - CHARACTER( LEN = * ), INTENT( IN ) :: c1Type, c2Type -``` - -DESCRIPTION - -- This methods computes the diffusion matrix for a scalar variable. -- `c1(:)` and `c2(:)` are vectors. They denotes the vector over which projection of $\frac{\partial N^I T_a}{\partial x_k}$ will be taken. -- `C1Type` or `C2Type` are string type and has no effect on the functionality of the method. they are inlcuded here to maintain the subroutine. - -CODE SNIPPET - -```fortran -CALL STElemSD % getDiffusionMatrix( c1 = DummyVec, c2 = DummyVec, C1Type = 'Quad', C2Type = 'Quad' ) -CALL STElemSD % getDiffusionMatrix( c1 = DummyVec, c2 = DummyVec, C1Type = 'Nodal', C2Type = 'Nodal' ) -CALL STElemSD % getDiffusionMatrix( c1 = DummyVec, c2 = DummyVec, C1Type = 'Quad', C2Type = 'Nodal' ) -CALL STElemSD % getDiffusionMatrix( c1 = DummyVec, c2 = DummyVec, C1Type = 'Nodal', C2Type = 'Quad' ) -``` - -SYMBOLIC CALCULATION - -? - -TESTING - -```fortran -IF( ALLOCATED( DummyVec ) ) DEALLOCATE( DummyVec ) -ALLOCATE( DummyVec( NSD) ) -DummyVec = 1.0_DFP - -CALL STElemSD % getDiffusionMatrix( c1 = DummyVec, c2 = DummyVec,& -C1Type = 'Quad', C2Type = 'Quad' ) - -CALL BlankLines( ) -WRITE( *, "(A)") "CALL STElemSD % getDiffusionMatrix_11( c1 = & -DummyVec, c2 = DummyVec, C1Type = 'Quad', C2Type = 'Quad' )" -CALL STElemSD % DisplayMatrix4( ) -``` - -__NIPS = 4, NIPT = 2__ - -```fortran -CALL STElemSD % getDiffusionMatrix_11( c1 = DummyVec, c2 = DummyVec, C1Type = 'Quad', C2Type = 'Quad' ) - -MATRIX STORED IN ST-ELEMENT-SHAPEDATA - -NIPS :: 4 NIPT :: 2 - -------------------------------------------------- - -4D MATRIX, MAT4(:,:,:,:) :: - -Mat4( :, :, 1, 1 ) - - 0.7777778 -0.1111111 -0.5555556 -0.1111111 - -0.1111111 0.1111111 -0.1111111 0.1111111 - -0.5555556 -0.1111111 0.7777778 -0.1111111 - -0.1111111 0.1111111 -0.1111111 0.1111111 - -Mat4( :, :, 1, 2 ) - - 0.3888889 -0.5555556E-01 -0.2777778 -0.5555556E-01 - -0.5555556E-01 0.5555556E-01 -0.5555556E-01 0.5555556E-01 - -0.2777778 -0.5555556E-01 0.3888889 -0.5555556E-01 - -0.5555556E-01 0.5555556E-01 -0.5555556E-01 0.5555556E-01 - -Mat4( :, :, 2, 1 ) - - 0.3888889 -0.5555556E-01 -0.2777778 -0.5555556E-01 - -0.5555556E-01 0.5555556E-01 -0.5555556E-01 0.5555556E-01 - -0.2777778 -0.5555556E-01 0.3888889 -0.5555556E-01 - -0.5555556E-01 0.5555556E-01 -0.5555556E-01 0.5555556E-01 - -Mat4( :, :, 2, 2 ) - - 0.7777778 -0.1111111 -0.5555556 -0.1111111 - -0.1111111 0.1111111 -0.1111111 0.1111111 - -0.5555556 -0.1111111 0.7777778 -0.1111111 - -0.1111111 0.1111111 -0.1111111 0.1111111 -``` - -### getDiffusionMatrix_12() - -INTERFACE - -```fortran - SUBROUTINE getDiffusionMatrix_12( Obj, c1, c2, c1Type, c2Type ) - - USE Utility, ONLY : OUTERPROD - - CLASS( STDiffusionMatrix_ ), INTENT( INOUT ) :: Obj - REAL( DFP ), DIMENSION( :, :, : ), INTENT( IN ) :: c1 - REAL( DFP ), DIMENSION( :, : ), INTENT( IN ) :: c2 - CHARACTER( LEN = * ), INTENT( IN ) :: c1Type, c2Type -``` - -DESCRIPTION - -- This methods computes the diffusion matrix for a scalar variable. -- `c1(:,:,:)` is three dimensional arrays. They denotes the vector over which projection of $\frac{\partial N^I T_a}{\partial x_k}$ will be taken. -- `C1Type` is in the set `[Nodal, NodalValues, Nodal Values, STNodalValues, ST Nodal Values]` then `c1` denotes the space-time nodal values. In this case their shape should be `(NSD, NNS, NNT)`. The first index denotes the spatial-coordinate. The second index denotes the spatial-node. Third index denotes the temporal nodes. -- `C1Type` is in the set `[Integration, IntegrationPoints, Integration Points, Quad, QuadPoints, Qaud Points]` then `c1` denotes the values at space-time integration(quadrature) points. In this case, their shape should be `(NSD, NIPS, NIPT)`. The first index denotes the spatial-coordinate. The second index denotes the spatial-node. Third index denotes the temporal nodes. -- `c2(:,:)` are two dimensional arrays. They denotes the vector over which projection of $\frac{\partial N^I T_a}{\partial x_k}$ will be taken. -- `C2Type` is in the set `[Nodal, NodalValues, Nodal Values, STNodalValues, ST Nodal Values]` then `c2` denotes the spatial nodal values. In this case, their shape should be `(NSD, NNS)`. The first index denotes the spatial-coordinate. The second index denotes the spatial-node. -- `C2Type` are in the set `[Integration, IntegrationPoints, Integration Points, Quad, QuadPoints, Qaud Points]` then `c2` denotes the values at spatial integration(quadrature) points. In this case, their shape should be `(NSD, NIPS)`. The first index denotes the spatial-coordinate. The second index denotes the spatial-node. - - - - -CODE SNIPPET - -```fortran -CALL STElemSD % getDiffusionMatrix( c1 = DummyMat3, c2 = DummyMat2, C1Type = 'Quad', C2Type = 'Quad' ) -CALL STElemSD % getDiffusionMatrix( c1 = DummyMat3, c2 = DummyMat2, C1Type = 'Nodal', C2Type = 'Nodal' ) -CALL STElemSD % getDiffusionMatrix( c1 = DummyMat3, c2 = DummyMat2, C1Type = 'Quad', C2Type = 'Nodal' ) -CALL STElemSD % getDiffusionMatrix( c1 = DummyMat3, c2 = DummyMat2, C1Type = 'Nodal', C2Type = 'Quad' ) -``` - -SYMBOLIC CALCULATION - -? - -TESTING - -```fortran -IF( ALLOCATED( DummyMat3 ) ) DEALLOCATE( DummyMat3 ) -ALLOCATE( DummyMat3( NSD, NIPS, NIPT ) ) -DummyMat3 = 1.0_DFP - -IF( ALLOCATED( DummyMat2 ) ) DEALLOCATE( DummyMat2 ) -ALLOCATE( DummyMat2( NSD, NIPS ) ) -DummyMat2 = 1.0_DFP - -CALL STElemSD % getDiffusionMatrix( c1 = DummyMat3, c2 = DummyMat2,& -C1Type = 'Quad', C2Type = 'Quad' ) - -CALL BlankLines( ) -WRITE( *, "(A)") "CALL STElemSD % getDiffusionMatrix_12( c1 = & -DummyMat3, c2 = DummyMat2, C1Type = 'Quad', C2Type = 'Quad' )" -CALL STElemSD % DisplayMatrix4( ) -``` - -__NIPS = 4, NIPT = 2__ - -```fortran -CALL STElemSD % getDiffusionMatrix_12( c1 = DummyMat3, c2 = DummyMat2, C1Type = 'Quad', C2Type = 'Quad' ) - -MATRIX STORED IN ST-ELEMENT-SHAPEDATA - -NIPS :: 4 NIPT :: 2 - -------------------------------------------------- - -4D MATRIX, MAT4(:,:,:,:) :: - -Mat4( :, :, 1, 1 ) - - 0.7777778 -0.1111111 -0.5555556 -0.1111111 - -0.1111111 0.1111111 -0.1111111 0.1111111 - -0.5555556 -0.1111111 0.7777778 -0.1111111 - -0.1111111 0.1111111 -0.1111111 0.1111111 - -Mat4( :, :, 1, 2 ) - - 0.3888889 -0.5555556E-01 -0.2777778 -0.5555556E-01 - -0.5555556E-01 0.5555556E-01 -0.5555556E-01 0.5555556E-01 - -0.2777778 -0.5555556E-01 0.3888889 -0.5555556E-01 - -0.5555556E-01 0.5555556E-01 -0.5555556E-01 0.5555556E-01 - -Mat4( :, :, 2, 1 ) - - 0.3888889 -0.5555556E-01 -0.2777778 -0.5555556E-01 - -0.5555556E-01 0.5555556E-01 -0.5555556E-01 0.5555556E-01 - -0.2777778 -0.5555556E-01 0.3888889 -0.5555556E-01 - -0.5555556E-01 0.5555556E-01 -0.5555556E-01 0.5555556E-01 - -Mat4( :, :, 2, 2 ) - - 0.7777778 -0.1111111 -0.5555556 -0.1111111 - -0.1111111 0.1111111 -0.1111111 0.1111111 - -0.5555556 -0.1111111 0.7777778 -0.1111111 - -0.1111111 0.1111111 -0.1111111 0.1111111 -``` - -### getDiffusionMatrix_13() - -INTERFACE - -```fortran - SUBROUTINE getDiffusionMatrix_12( Obj, c1, c2, c1Type, c2Type ) - - USE Utility, ONLY : OUTERPROD - - CLASS( STDiffusionMatrix_ ), INTENT( INOUT ) :: Obj - REAL( DFP ), DIMENSION( :, :, : ), INTENT( IN ) :: c2 - REAL( DFP ), DIMENSION( :, : ), INTENT( IN ) :: c1 - CHARACTER( LEN = * ), INTENT( IN ) :: c1Type, c2Type -``` - -DESCRIPTION - -- This methods computes the diffusion matrix for a scalar variable. -- `c2(:,:,:)` is three dimensional arrays. They denotes the vector over which projection of $\frac{\partial N^I T_a}{\partial x_k}$ will be taken. -- `C2Type` is in the set `[Nodal, NodalValues, Nodal Values, STNodalValues, ST Nodal Values]` then `c1` denotes the space-time nodal values. In this case their shape should be `(NSD, NNS, NNT)`. The first index denotes the spatial-coordinate. The second index denotes the spatial-node. Third index denotes the temporal nodes. -- `C2Type` is in the set `[Integration, IntegrationPoints, Integration Points, Quad, QuadPoints, Qaud Points]` then `c2` denotes the values at space-time integration(quadrature) points. In this case, their shape should be `(NSD, NIPS, NIPT)`. The first index denotes the spatial-coordinate. The second index denotes the spatial-node. Third index denotes the temporal nodes. -- `c1(:,:)` are two dimensional arrays. They denotes the vector over which projection of $\frac{\partial N^I T_a}{\partial x_k}$ will be taken. -- `C1Type` is in the set `[Nodal, NodalValues, Nodal Values, STNodalValues, ST Nodal Values]` then `c1` denotes the spatial nodal values. In this case, their shape should be `(NSD, NNS)`. The first index denotes the spatial-coordinate. The second index denotes the spatial-node. -- `C1Type` are in the set `[Integration, IntegrationPoints, Integration Points, Quad, QuadPoints, Qaud Points]` then `c1` denotes the values at spatial integration(quadrature) points. In this case, their shape should be `(NSD, NIPS)`. The first index denotes the spatial-coordinate. The second index denotes the spatial-node. - - - - -CODE SNIPPET - -```fortran -CALL STElemSD % getDiffusionMatrix( c1 = DummyMat2, c2 = DummyMat3, C1Type = 'Quad', C2Type = 'Quad' ) -CALL STElemSD % getDiffusionMatrix( c1 = DummyMat2, c2 = DummyMat3, C1Type = 'Nodal', C2Type = 'Nodal' ) -CALL STElemSD % getDiffusionMatrix( c1 = DummyMat2, c2 = DummyMat3, C1Type = 'Quad', C2Type = 'Nodal' ) -CALL STElemSD % getDiffusionMatrix( c1 = DummyMat2, c2 = DummyMat3, C1Type = 'Nodal', C2Type = 'Quad' ) -``` - -SYMBOLIC CALCULATION - -? - -TESTING - -```fortran -IF( ALLOCATED( DummyMat3 ) ) DEALLOCATE( DummyMat3 ) -ALLOCATE( DummyMat3( NSD, NIPS, NIPT ) ) -DummyMat3 = 1.0_DFP - -IF( ALLOCATED( DummyMat2 ) ) DEALLOCATE( DummyMat2 ) -ALLOCATE( DummyMat2( NSD, NIPS ) ) -DummyMat2 = 1.0_DFP - -CALL STElemSD % getDiffusionMatrix( c1 = DummyMat2, c2 = DummyMat3,& -C1Type = 'Quad', C2Type = 'Quad' ) - -CALL BlankLines( ) -WRITE( *, "(A)") "CALL STElemSD % getDiffusionMatrix_12( c1 = & -DummyMat2, c2 = DummyMat3, C1Type = 'Quad', C2Type = 'Quad' )" -CALL STElemSD % DisplayMatrix4( ) -``` - -__NIPS = 4, NIPT = 2__ - -```fortran -CALL STElemSD % getDiffusionMatrix_13( c1 = DummyMat2, c2 = DummyMat3, C1Type = 'Quad', C2Type = 'Quad' ) - -MATRIX STORED IN ST-ELEMENT-SHAPEDATA - -NIPS :: 4 NIPT :: 2 - -------------------------------------------------- - -4D MATRIX, MAT4(:,:,:,:) :: - -Mat4( :, :, 1, 1 ) - - 0.7777778 -0.1111111 -0.5555556 -0.1111111 - -0.1111111 0.1111111 -0.1111111 0.1111111 - -0.5555556 -0.1111111 0.7777778 -0.1111111 - -0.1111111 0.1111111 -0.1111111 0.1111111 - -Mat4( :, :, 1, 2 ) - - 0.3888889 -0.5555556E-01 -0.2777778 -0.5555556E-01 - -0.5555556E-01 0.5555556E-01 -0.5555556E-01 0.5555556E-01 - -0.2777778 -0.5555556E-01 0.3888889 -0.5555556E-01 - -0.5555556E-01 0.5555556E-01 -0.5555556E-01 0.5555556E-01 - -Mat4( :, :, 2, 1 ) - - 0.3888889 -0.5555556E-01 -0.2777778 -0.5555556E-01 - -0.5555556E-01 0.5555556E-01 -0.5555556E-01 0.5555556E-01 - -0.2777778 -0.5555556E-01 0.3888889 -0.5555556E-01 - -0.5555556E-01 0.5555556E-01 -0.5555556E-01 0.5555556E-01 - -Mat4( :, :, 2, 2 ) - - 0.7777778 -0.1111111 -0.5555556 -0.1111111 - -0.1111111 0.1111111 -0.1111111 0.1111111 - -0.5555556 -0.1111111 0.7777778 -0.1111111 - -0.1111111 0.1111111 -0.1111111 0.1111111 -``` - -### getDiffusionMatrix_14() - -INTERFACE - -```fortran - SUBROUTINE getDiffusionMatrix_12( Obj, c1, c2, c1Type, c2Type ) - - USE Utility, ONLY : OUTERPROD - - CLASS( STDiffusionMatrix_ ), INTENT( INOUT ) :: Obj - REAL( DFP ), DIMENSION( :, :, : ), INTENT( IN ) :: c1 - REAL( DFP ), DIMENSION( : ), INTENT( IN ) :: c2 - CHARACTER( LEN = * ), INTENT( IN ) :: c1Type, c2Type -``` - -DESCRIPTION - -- This methods computes the diffusion matrix for a scalar variable. -- `c1(:,:,:)` is three dimensional arrays. They denotes the vector over which projection of $\frac{\partial N^I T_a}{\partial x_k}$ will be taken. -- `C1Type` is in the set `[Nodal, NodalValues, Nodal Values, STNodalValues, ST Nodal Values]` then `c1` denotes the space-time nodal values. In this case their shape should be `(NSD, NNS, NNT)`. The first index denotes the spatial-coordinate. The second index denotes the spatial-node. Third index denotes the temporal nodes. -- `C1Type` is in the set `[Integration, IntegrationPoints, Integration Points, Quad, QuadPoints, Qaud Points]` then `c1` denotes the values at space-time integration(quadrature) points. In this case, their shape should be `(NSD, NIPS, NIPT)`. The first index denotes the spatial-coordinate. The second index denotes the spatial-node. Third index denotes the temporal nodes. -- `c2(:)` is a vector. It denotes the vector over which projection of $\frac{\partial N^I T_a}{\partial x_k}$ will be taken. -- `C2Type` is string type and has no effect on the functionality of the method. they are inlcuded here to maintain the subroutine. - - - -CODE SNIPPET - -```fortran -CALL STElemSD % getDiffusionMatrix( c1 = DummyMat3, c2 = DummyVec, C1Type = 'Quad', C2Type = 'Quad' ) -CALL STElemSD % getDiffusionMatrix( c1 = DummyMat3, c2 = DummyVec, C1Type = 'Nodal', C2Type = 'Nodal' ) -CALL STElemSD % getDiffusionMatrix( c1 = DummyMat3, c2 = DummyVec, C1Type = 'Quad', C2Type = 'Nodal' ) -CALL STElemSD % getDiffusionMatrix( c1 = DummyMat3, c2 = DummyVec, C1Type = 'Nodal', C2Type = 'Quad' ) -``` - -SYMBOLIC CALCULATION - -? - -TESTING - -```fortran -IF( ALLOCATED( DummyMat3 ) ) DEALLOCATE( DummyMat3 ) -ALLOCATE( DummyMat3( NSD, NIPS, NIPT ) ) -DummyMat3 = 1.0_DFP - -IF( ALLOCATED( DummyVec ) ) DEALLOCATE( DummyVec ) -ALLOCATE( DummyVec( NSD ) ) -DummyVec = 1.0_DFP - -CALL STElemSD % getDiffusionMatrix( c1 = DummyMat3, c2 = DummyVec,& -C1Type = 'Quad', C2Type = 'Quad' ) - -CALL BlankLines( ) -WRITE( *, "(A)") "CALL STElemSD % getDiffusionMatrix_14( c1 = & -DummyMat3, c2 = DummyVec, C1Type = 'Quad', C2Type = 'Quad' )" -CALL STElemSD % DisplayMatrix4( ) -``` - -__NIPS = 4, NIPT = 2__ - -```fortran -CALL STElemSD % getDiffusionMatrix_14( c1 = DummyMat3, c2 = DummyVec, C1Type = 'Quad', C2Type = 'Quad' ) - -MATRIX STORED IN ST-ELEMENT-SHAPEDATA - -NIPS :: 4 NIPT :: 2 - -------------------------------------------------- - -4D MATRIX, MAT4(:,:,:,:) :: - -Mat4( :, :, 1, 1 ) - - 0.7777778 -0.1111111 -0.5555556 -0.1111111 - -0.1111111 0.1111111 -0.1111111 0.1111111 - -0.5555556 -0.1111111 0.7777778 -0.1111111 - -0.1111111 0.1111111 -0.1111111 0.1111111 - -Mat4( :, :, 1, 2 ) - - 0.3888889 -0.5555556E-01 -0.2777778 -0.5555556E-01 - -0.5555556E-01 0.5555556E-01 -0.5555556E-01 0.5555556E-01 - -0.2777778 -0.5555556E-01 0.3888889 -0.5555556E-01 - -0.5555556E-01 0.5555556E-01 -0.5555556E-01 0.5555556E-01 - -Mat4( :, :, 2, 1 ) - - 0.3888889 -0.5555556E-01 -0.2777778 -0.5555556E-01 - -0.5555556E-01 0.5555556E-01 -0.5555556E-01 0.5555556E-01 - -0.2777778 -0.5555556E-01 0.3888889 -0.5555556E-01 - -0.5555556E-01 0.5555556E-01 -0.5555556E-01 0.5555556E-01 - -Mat4( :, :, 2, 2 ) - - 0.7777778 -0.1111111 -0.5555556 -0.1111111 - -0.1111111 0.1111111 -0.1111111 0.1111111 - -0.5555556 -0.1111111 0.7777778 -0.1111111 - -0.1111111 0.1111111 -0.1111111 0.1111111 -``` - -### getDiffusionMatrix_15() - -INTERFACE - -```fortran - SUBROUTINE getDiffusionMatrix_12( Obj, c1, c2, c1Type, c2Type ) - - USE Utility, ONLY : OUTERPROD - - CLASS( STDiffusionMatrix_ ), INTENT( INOUT ) :: Obj - REAL( DFP ), DIMENSION( :, :, : ), INTENT( IN ) :: c2 - REAL( DFP ), DIMENSION( : ), INTENT( IN ) :: c1 - CHARACTER( LEN = * ), INTENT( IN ) :: c1Type, c2Type -``` - -DESCRIPTION - -- This methods computes the diffusion matrix for a scalar variable. -- `c2(:,:,:)` is three dimensional arrays. They denotes the vector over which projection of $\frac{\partial N^I T_a}{\partial x_k}$ will be taken. -- `C2Type` is in the set `[Nodal, NodalValues, Nodal Values, STNodalValues, ST Nodal Values]` then `c2` denotes the space-time nodal values. In this case their shape should be `(NSD, NNS, NNT)`. The first index denotes the spatial-coordinate. The second index denotes the spatial-node. Third index denotes the temporal nodes. -- `C2Type` is in the set `[Integration, IntegrationPoints, Integration Points, Quad, QuadPoints, Qaud Points]` then `c2` denotes the values at space-time integration(quadrature) points. In this case, their shape should be `(NSD, NIPS, NIPT)`. The first index denotes the spatial-coordinate. The second index denotes the spatial-node. Third index denotes the temporal nodes. -- `c1(:)` is a vector. It denotes the vector over which projection of $\frac{\partial N^I T_a}{\partial x_k}$ will be taken. -- `C1Type` is string type and has no effect on the functionality of the method. they are inlcuded here to maintain the subroutine. - - - -CODE SNIPPET - -```fortran -CALL STElemSD % getDiffusionMatrix( c1 = DummyVec, c2 = DummyMat3, C1Type = 'Quad', C2Type = 'Quad' ) -CALL STElemSD % getDiffusionMatrix( c1 = DummyVec, c2 = DummyMat3, C1Type = 'Nodal', C2Type = 'Nodal' ) -CALL STElemSD % getDiffusionMatrix( c1 = DummyVec, c2 = DummyMat3, C1Type = 'Quad', C2Type = 'Nodal' ) -CALL STElemSD % getDiffusionMatrix( c1 = DummyVec, c2 = DummyMat3, C1Type = 'Nodal', C2Type = 'Quad' ) -``` - -SYMBOLIC CALCULATION - -? - -TESTING - -```fortran -IF( ALLOCATED( DummyMat3 ) ) DEALLOCATE( DummyMat3 ) -ALLOCATE( DummyMat3( NSD, NIPS, NIPT ) ) -DummyMat3 = 1.0_DFP - -IF( ALLOCATED( DummyVec ) ) DEALLOCATE( DummyVec ) -ALLOCATE( DummyVec( NSD ) ) -DummyVec = 1.0_DFP - -CALL STElemSD % getDiffusionMatrix( c1 = DummyVec, c2 = DummyMat3,& -C1Type = 'Quad', C2Type = 'Quad' ) - -CALL BlankLines( ) -WRITE( *, "(A)") "CALL STElemSD % getDiffusionMatrix_15( c1 = & -DummyVec, c2 = DummyMat3, C1Type = 'Quad', C2Type = 'Quad' )" -CALL STElemSD % DisplayMatrix4( ) -``` - -__NIPS = 4, NIPT = 2__ - -```fortran -CALL STElemSD % getDiffusionMatrix_15( c1 = DummyVec, c2 = DummyMat3, C1Type = 'Quad', C2Type = 'Quad' ) - -MATRIX STORED IN ST-ELEMENT-SHAPEDATA - -NIPS :: 4 NIPT :: 2 - -------------------------------------------------- - -4D MATRIX, MAT4(:,:,:,:) :: - -Mat4( :, :, 1, 1 ) - - 0.7777778 -0.1111111 -0.5555556 -0.1111111 - -0.1111111 0.1111111 -0.1111111 0.1111111 - -0.5555556 -0.1111111 0.7777778 -0.1111111 - -0.1111111 0.1111111 -0.1111111 0.1111111 - -Mat4( :, :, 1, 2 ) - - 0.3888889 -0.5555556E-01 -0.2777778 -0.5555556E-01 - -0.5555556E-01 0.5555556E-01 -0.5555556E-01 0.5555556E-01 - -0.2777778 -0.5555556E-01 0.3888889 -0.5555556E-01 - -0.5555556E-01 0.5555556E-01 -0.5555556E-01 0.5555556E-01 - -Mat4( :, :, 2, 1 ) - - 0.3888889 -0.5555556E-01 -0.2777778 -0.5555556E-01 - -0.5555556E-01 0.5555556E-01 -0.5555556E-01 0.5555556E-01 - -0.2777778 -0.5555556E-01 0.3888889 -0.5555556E-01 - -0.5555556E-01 0.5555556E-01 -0.5555556E-01 0.5555556E-01 - -Mat4( :, :, 2, 2 ) - - 0.7777778 -0.1111111 -0.5555556 -0.1111111 - -0.1111111 0.1111111 -0.1111111 0.1111111 - -0.5555556 -0.1111111 0.7777778 -0.1111111 - -0.1111111 0.1111111 -0.1111111 0.1111111 -``` - -### getDiffusionMatrix_16() - -INTERFACE - -```fortran - SUBROUTINE getDiffusionMatrix_12( Obj, c1, c2, c1Type, c2Type ) - - USE Utility, ONLY : OUTERPROD - - CLASS( STDiffusionMatrix_ ), INTENT( INOUT ) :: Obj - REAL( DFP ), DIMENSION( :, : ), INTENT( IN ) :: c1 - REAL( DFP ), DIMENSION( : ), INTENT( IN ) :: c2 - CHARACTER( LEN = * ), INTENT( IN ) :: c1Type, c2Type -``` - -DESCRIPTION - -- This methods computes the diffusion matrix for a scalar variable. -- `c1(:,:)` is three dimensional arrays. They denotes the vector over which projection of $\frac{\partial N^I T_a}{\partial x_k}$ will be taken. -- `C1Type` is in the set `[Nodal, NodalValues, Nodal Values, STNodalValues, ST Nodal Values]` then `c1` denotes the space nodal values. In this case their shape should be `(NSD, NNS)`. The first index denotes the spatial-coordinate. The second index denotes the spatial-node. -- `C1Type` is in the set `[Integration, IntegrationPoints, Integration Points, Quad, QuadPoints, Qaud Points]` then `c1` denotes the values at space integration(quadrature) points. In this case, their shape should be `(NSD, NIPS)`. The first index denotes the spatial-coordinate. The second index denotes the spatial-node. -- `c2(:)` is a vector. It denotes the vector over which projection of $\frac{\partial N^I T_a}{\partial x_k}$ will be taken. -- `C2Type` is string type and has no effect on the functionality of the method. they are inlcuded here to maintain the subroutine. - - -CODE SNIPPET - -```fortran -CALL STElemSD % getDiffusionMatrix( c1 = DummyMat2, c2 = DummyVec, C1Type = 'Quad', C2Type = 'Quad' ) -CALL STElemSD % getDiffusionMatrix( c1 = DummyMat2, c2 = DummyVec, C1Type = 'Nodal', C2Type = 'Nodal' ) -CALL STElemSD % getDiffusionMatrix( c1 = DummyMat2, c2 = DummyVec, C1Type = 'Quad', C2Type = 'Nodal' ) -CALL STElemSD % getDiffusionMatrix( c1 = DummyMat2, c2 = DummyVec, C1Type = 'Nodal', C2Type = 'Quad' ) -``` - -SYMBOLIC CALCULATION - -? - -TESTING - -```fortran - -IF( ALLOCATED( DummyMat2 ) ) DEALLOCATE( DummyMat2 ) -ALLOCATE( DummyMat2( NSD, NIPS ) ) -DummyMat2 = 1.0_DFP - -IF( ALLOCATED( DummyVec ) ) DEALLOCATE( DummyVec ) -ALLOCATE( DummyVec( NSD ) ) -DummyVec = 1.0_DFP - -CALL STElemSD % getDiffusionMatrix( c1 = DummyMat2, c2 = DummyVec,& -C1Type = 'Quad', C2Type = 'Quad' ) - -CALL BlankLines( ) -WRITE( *, "(A)") "CALL STElemSD % getDiffusionMatrix_16( c1 = & -DummyMat2, c2 = DummyVec, C1Type = 'Quad', C2Type = 'Quad' )" -CALL STElemSD % DisplayMatrix4( ) -``` - -__NIPS = 4, NIPT = 2__ - -```fortran -CALL STElemSD % getDiffusionMatrix_16( c1 = DummyMat2, c2 = DummyVec, C1Type = 'Quad', C2Type = 'Quad' ) - -MATRIX STORED IN ST-ELEMENT-SHAPEDATA - -NIPS :: 4 NIPT :: 2 - -------------------------------------------------- - -4D MATRIX, MAT4(:,:,:,:) :: - -Mat4( :, :, 1, 1 ) - - 0.7777778 -0.1111111 -0.5555556 -0.1111111 - -0.1111111 0.1111111 -0.1111111 0.1111111 - -0.5555556 -0.1111111 0.7777778 -0.1111111 - -0.1111111 0.1111111 -0.1111111 0.1111111 - -Mat4( :, :, 1, 2 ) - - 0.3888889 -0.5555556E-01 -0.2777778 -0.5555556E-01 - -0.5555556E-01 0.5555556E-01 -0.5555556E-01 0.5555556E-01 - -0.2777778 -0.5555556E-01 0.3888889 -0.5555556E-01 - -0.5555556E-01 0.5555556E-01 -0.5555556E-01 0.5555556E-01 - -Mat4( :, :, 2, 1 ) - - 0.3888889 -0.5555556E-01 -0.2777778 -0.5555556E-01 - -0.5555556E-01 0.5555556E-01 -0.5555556E-01 0.5555556E-01 - -0.2777778 -0.5555556E-01 0.3888889 -0.5555556E-01 - -0.5555556E-01 0.5555556E-01 -0.5555556E-01 0.5555556E-01 - -Mat4( :, :, 2, 2 ) - - 0.7777778 -0.1111111 -0.5555556 -0.1111111 - -0.1111111 0.1111111 -0.1111111 0.1111111 - -0.5555556 -0.1111111 0.7777778 -0.1111111 - -0.1111111 0.1111111 -0.1111111 0.1111111 -``` - -### getDiffusionMatrix_17() - -INTERFACE - -```fortran - SUBROUTINE getDiffusionMatrix_12( Obj, c1, c2, c1Type, c2Type ) - - USE Utility, ONLY : OUTERPROD - - CLASS( STDiffusionMatrix_ ), INTENT( INOUT ) :: Obj - REAL( DFP ), DIMENSION( :, : ), INTENT( IN ) :: c2 - REAL( DFP ), DIMENSION( : ), INTENT( IN ) :: c1 - CHARACTER( LEN = * ), INTENT( IN ) :: c1Type, c2Type -``` - -DESCRIPTION - -- This methods computes the diffusion matrix for a scalar variable. -- `c2(:,:)` is three dimensional arrays. They denotes the vector over which projection of $\frac{\partial N^I T_a}{\partial x_k}$ will be taken. -- `C2Type` is in the set `[Nodal, NodalValues, Nodal Values, STNodalValues, ST Nodal Values]` then `c2` denotes the space nodal values. In this case their shape should be `(NSD, NNS, NNT)`. The first index denotes the spatial-coordinate. The second index denotes the spatial-node. -- `C2Type` is in the set `[Integration, IntegrationPoints, Integration Points, Quad, QuadPoints, Qaud Points]` then `c2` denotes the values at space integration(quadrature) points. In this case, their shape should be `(NSD, NIPS)`. The first index denotes the spatial-coordinate. The second index denotes the spatial-node. Third index denotes the temporal nodes. -- `c1(:)` is a vector. It denotes the vector over which projection of $\frac{\partial N^I T_a}{\partial x_k}$ will be taken. -- `C1Type` is string type and has no effect on the functionality of the method. they are inlcuded here to maintain the subroutine. - - - -CODE SNIPPET - -```fortran -CALL STElemSD % getDiffusionMatrix( c1 = DummyVec, c2 = DummyMat2, C1Type = 'Quad', C2Type = 'Quad' ) -CALL STElemSD % getDiffusionMatrix( c1 = DummyVec, c2 = DummyMat2, C1Type = 'Nodal', C2Type = 'Nodal' ) -CALL STElemSD % getDiffusionMatrix( c1 = DummyVec, c2 = DummyMat2, C1Type = 'Quad', C2Type = 'Nodal' ) -CALL STElemSD % getDiffusionMatrix( c1 = DummyVec, c2 = DummyMat2, C1Type = 'Nodal', C2Type = 'Quad' ) -``` - -SYMBOLIC CALCULATION - -? - -TESTING - -```fortran -IF( ALLOCATED( DummyMat2 ) ) DEALLOCATE( DummyMat2 ) -ALLOCATE( DummyMat2( NSD, NIPS ) ) -DummyMat2 = 1.0_DFP - -IF( ALLOCATED( DummyVec ) ) DEALLOCATE( DummyVec ) -ALLOCATE( DummyVec( NSD ) ) -DummyVec = 1.0_DFP - -CALL STElemSD % getDiffusionMatrix( c1 = DummyVec, c2 = DummyMat2,& -C1Type = 'Quad', C2Type = 'Quad' ) - -CALL BlankLines( ) -WRITE( *, "(A)") "CALL STElemSD % getDiffusionMatrix_17( c1 = & -DummyVec, c2 = DummyMat2, C1Type = 'Quad', C2Type = 'Quad' )" -CALL STElemSD % DisplayMatrix4( ) -``` - -__NIPS = 4, NIPT = 2__ - -```fortran -CALL STElemSD % getDiffusionMatrix_17( c1 = DummyVec, c2 = DummyMat2, C1Type = 'Quad', C2Type = 'Quad' ) - -MATRIX STORED IN ST-ELEMENT-SHAPEDATA - -NIPS :: 4 NIPT :: 2 - -------------------------------------------------- - -4D MATRIX, MAT4(:,:,:,:) :: - -Mat4( :, :, 1, 1 ) - - 0.7777778 -0.1111111 -0.5555556 -0.1111111 - -0.1111111 0.1111111 -0.1111111 0.1111111 - -0.5555556 -0.1111111 0.7777778 -0.1111111 - -0.1111111 0.1111111 -0.1111111 0.1111111 - -Mat4( :, :, 1, 2 ) - - 0.3888889 -0.5555556E-01 -0.2777778 -0.5555556E-01 - -0.5555556E-01 0.5555556E-01 -0.5555556E-01 0.5555556E-01 - -0.2777778 -0.5555556E-01 0.3888889 -0.5555556E-01 - -0.5555556E-01 0.5555556E-01 -0.5555556E-01 0.5555556E-01 - -Mat4( :, :, 2, 1 ) - - 0.3888889 -0.5555556E-01 -0.2777778 -0.5555556E-01 - -0.5555556E-01 0.5555556E-01 -0.5555556E-01 0.5555556E-01 - -0.2777778 -0.5555556E-01 0.3888889 -0.5555556E-01 - -0.5555556E-01 0.5555556E-01 -0.5555556E-01 0.5555556E-01 - -Mat4( :, :, 2, 2 ) - - 0.7777778 -0.1111111 -0.5555556 -0.1111111 - -0.1111111 0.1111111 -0.1111111 0.1111111 - -0.5555556 -0.1111111 0.7777778 -0.1111111 - -0.1111111 0.1111111 -0.1111111 0.1111111 -``` - -### getDiffusionMatrix_18() - -INTERFACE - -```fortran - SUBROUTINE getDiffusionMatrix_18( Obj, c1, c2, c1Type, c2Type, nCopy ) - - USE Utility, ONLY : OUTERPROD - - CLASS( STDiffusionMatrix_ ), INTENT( INOUT ) :: Obj - REAL( DFP ), DIMENSION( :, :, : ), INTENT( IN ) :: c1, c2 - CHARACTER( LEN = * ), INTENT( IN ) :: c1Type, c2Type - INTEGER( I4B ), INTENT( IN ) :: nCopy -``` - -### getDiffusionMatrix_19() - -INTERFACE - -```fortran - SUBROUTINE getDiffusionMatrix_19( Obj, c1, c2, c1Type, c2Type, nCopy ) - - USE Utility, ONLY : OUTERPROD - - CLASS( STDiffusionMatrix_ ), INTENT( INOUT ) :: Obj - REAL( DFP ), DIMENSION( :, : ), INTENT( IN ) :: c1, c2 - CHARACTER( LEN = * ), INTENT( IN ) :: c1Type, c2Type - INTEGER( I4B ), INTENT( IN ) :: nCopy -``` - -### getDiffusionMatrix_20() - -INTERFACE - -```fortran - SUBROUTINE getDiffusionMatrix_20( Obj, c1, c2, c1Type, c2Type, nCopy ) - - USE Utility, ONLY : OUTERPROD - - CLASS( STDiffusionMatrix_ ), INTENT( INOUT ) :: Obj - REAL( DFP ), DIMENSION( : ), INTENT( IN ) :: c1, c2 - CHARACTER( LEN = * ), INTENT( IN ) :: c1Type, c2Type - INTEGER( I4B ), INTENT( IN ) :: nCopy -``` - -### getDiffusionMatrix_21() - -INTERFACE - -```fortran - SUBROUTINE getDiffusionMatrix_21( Obj, c1, c2, c1Type, c2Type, nCopy ) - - USE Utility, ONLY : OUTERPROD - - CLASS( STDiffusionMatrix_ ), INTENT( INOUT ) :: Obj - REAL( DFP ), DIMENSION( :, :, : ), INTENT( IN ) :: c1 - REAL( DFP ), DIMENSION( :, : ), INTENT( IN ) :: c2 - CHARACTER( LEN = * ), INTENT( IN ) :: c1Type, c2Type - INTEGER( I4B ), INTENT( IN ) :: nCopy -``` - -### getDiffusionMatrix_22() - -INTERFACE - -```fortran - SUBROUTINE getDiffusionMatrix_22( Obj, c1, c2, c1Type, c2Type, nCopy ) - - USE Utility, ONLY : OUTERPROD - - CLASS( STDiffusionMatrix_ ), INTENT( INOUT ) :: Obj - REAL( DFP ), DIMENSION( :, :, : ), INTENT( IN ) :: c2 - REAL( DFP ), DIMENSION( :, : ), INTENT( IN ) :: c1 - CHARACTER( LEN = * ), INTENT( IN ) :: c1Type, c2Type - INTEGER( I4B ), INTENT( IN ) :: nCopy -``` - -### getDiffusionMatrix_23() - -INTERFACE - -```fortran - SUBROUTINE getDiffusionMatrix_23( Obj, c1, c2, c1Type, c2Type, nCopy ) - - USE Utility, ONLY : OUTERPROD - - CLASS( STDiffusionMatrix_ ), INTENT( INOUT ) :: Obj - REAL( DFP ), DIMENSION( :, :, : ), INTENT( IN ) :: c1 - REAL( DFP ), DIMENSION( : ), INTENT( IN ) :: c2 - CHARACTER( LEN = * ), INTENT( IN ) :: c1Type, c2Type - INTEGER( I4B ), INTENT( IN ) :: nCopy -``` - -### getDiffusionMatrix_24() - -INTERFACE - -```fortran - SUBROUTINE getDiffusionMatrix_24( Obj, c1, c2, c1Type, c2Type, nCopy ) - - USE Utility, ONLY : OUTERPROD - - CLASS( STDiffusionMatrix_ ), INTENT( INOUT ) :: Obj - REAL( DFP ), DIMENSION( :, :, : ), INTENT( IN ) :: c2 - REAL( DFP ), DIMENSION( : ), INTENT( IN ) :: c1 - CHARACTER( LEN = * ), INTENT( IN ) :: c1Type, c2Type - INTEGER( I4B ), INTENT( IN ) :: nCopy -``` - -### getDiffusionMatrix_25() - -INTERFACE - -```fortran - SUBROUTINE getDiffusionMatrix_25( Obj, c1, c2, c1Type, c2Type, nCopy ) - - USE Utility, ONLY : OUTERPROD - - CLASS( STDiffusionMatrix_ ), INTENT( INOUT ) :: Obj - REAL( DFP ), DIMENSION( :, : ), INTENT( IN ) :: c1 - REAL( DFP ), DIMENSION( : ), INTENT( IN ) :: c2 - CHARACTER( LEN = * ), INTENT( IN ) :: c1Type, c2Type - INTEGER( I4B ), INTENT( IN ) :: nCopy -``` - -### getDiffusionMatrix_26() - -INTERFACE - -```fortran - SUBROUTINE getDiffusionMatrix_26( Obj, c1, c2, c1Type, c2Type, nCopy ) - - USE Utility, ONLY : OUTERPROD - - CLASS( STDiffusionMatrix_ ), INTENT( INOUT ) :: Obj - REAL( DFP ), DIMENSION( :, : ), INTENT( IN ) :: c2 - REAL( DFP ), DIMENSION( : ), INTENT( IN ) :: c1 - CHARACTER( LEN = * ), INTENT( IN ) :: c1Type, c2Type - INTEGER( I4B ), INTENT( IN ) :: nCopy -``` - -### getDiffusionMatrix_27() - -INTERFACE - -```fortran - SUBROUTINE getDiffusionMatrix_27( Obj, K, Term1, Term2 ) - - USE Utility, ONLY : OUTERPROD - - CLASS( STDiffusionMatrix_ ), INTENT( INOUT ) :: Obj - REAL( DFP ), DIMENSION( :, :, :, : ), INTENT( IN ) :: K - CHARACTER( LEN = * ), INTENT( IN ) :: Term1, Term2 -``` - -### getDiffusionMatrix_28() - -INTERFACE - -```fortran - SUBROUTINE getDiffusionMatrix_28( Obj, K, Term1, Term2 ) - - USE Utility, ONLY : OUTERPROD - - CLASS( STDiffusionMatrix_ ), INTENT( INOUT ) :: Obj - REAL( DFP ), DIMENSION( :, :, : ), INTENT( IN ) :: K - CHARACTER( LEN = * ), INTENT( IN ) :: Term1, Term2 -``` - -### getDiffusionMatrix_29() - -INTERFACE - -```fortran - SUBROUTINE getDiffusionMatrix_29( Obj, K, Term1, Term2 ) - - USE Utility, ONLY : OUTERPROD - - CLASS( STDiffusionMatrix_ ), INTENT( INOUT ) :: Obj - REAL( DFP ), DIMENSION( :, : ), INTENT( IN ) :: K - CHARACTER( LEN = * ), INTENT( IN ) :: Term1, Term2 -``` - - diff --git a/src/submodules/FEMatrix/STDiffusionMatrix/MethodNames.part b/src/submodules/FEMatrix/STDiffusionMatrix/MethodNames.part deleted file mode 100644 index 9f920588..00000000 --- a/src/submodules/FEMatrix/STDiffusionMatrix/MethodNames.part +++ /dev/null @@ -1,31 +0,0 @@ -getDiffusionMatrix_1, & -getDiffusionMatrix_2 , & -getDiffusionMatrix_3 , & -getDiffusionMatrix_4 , & -getDiffusionMatrix_5 , & -getDiffusionMatrix_6 , & -getDiffusionMatrix_7 , & -getDiffusionMatrix_8 , & -getDiffusionMatrix_9 , & -getDiffusionMatrix_10 , & -getDiffusionMatrix_11 , & -getDiffusionMatrix_12 , & -getDiffusionMatrix_13 , & -getDiffusionMatrix_14 , & -getDiffusionMatrix_15 , & -getDiffusionMatrix_16 , & -getDiffusionMatrix_17 , & -getDiffusionMatrix_18 , & -getDiffusionMatrix_19 , & -getDiffusionMatrix_20 , & -getDiffusionMatrix_21 , & -getDiffusionMatrix_22 , & -getDiffusionMatrix_23 , & -getDiffusionMatrix_24 , & -getDiffusionMatrix_25 , & -getDiffusionMatrix_26 , & -getDiffusionMatrix_27 , & -getDiffusionMatrix_28 , & -getDiffusionMatrix_29 , & -getDiffusionMatrix_30 , & -getDiffusionMatrix_31 \ No newline at end of file diff --git a/src/submodules/FEMatrix/STDiffusionMatrix/STDiffusionMatrix_Class.f90 b/src/submodules/FEMatrix/STDiffusionMatrix/STDiffusionMatrix_Class.f90 deleted file mode 100755 index 75fa6cf2..00000000 --- a/src/submodules/FEMatrix/STDiffusionMatrix/STDiffusionMatrix_Class.f90 +++ /dev/null @@ -1,100 +0,0 @@ -! -!------------------------------------------------------------------------------ -! Author : Vikas sharma -! Position : Doctral Student -! Institute : Kyoto Univeristy, Japan -! Program name: STDiffusionMatrix_Class.f90 -! Last Update : Nov-20-2017 -! -!------------------------------------------------------------------------------ -! Details of Program -!============================================================================== -! -! TYPE :: Module -! -! DESCRIPTION -! - Diffusion matrices for space-time elements -! -!============================================================================== - - MODULE STDiffusionMatrix_Class - USE GlobalData - USE IO - USE STElemShapeData_Class - USE STShapeData_Class - IMPLICIT NONE - - PRIVATE - PUBLIC :: STDiffusionMatrix_, STDiffusionMatrix, & - STDiffusionMatrix_Pointer - -!------------------------------------------------------------------------------ -! STElemShapeData_ -!------------------------------------------------------------------------------ - - TYPE, EXTENDS( STElemShapeData_ ) :: STDiffusionMatrix_ - -!. . . . . . . . . . . . . . . . . . . . -! 1. Diffusion matrices for the space-time element. -!. . . . . . . . . . . . . . . . . . . . - - CONTAINS - - PROCEDURE, PUBLIC, PASS( Obj ) :: & -#include "./MethodNames.part" - - END TYPE STDiffusionMatrix_ - -!------------------------------------------------------------------------------ -! INTERFACES -!------------------------------------------------------------------------------ - - INTERFACE STDiffusionMatrix_Pointer - MODULE PROCEDURE Constructor_1, Constructor_2, Constructor_3 - END INTERFACE - - INTERFACE STDiffusionMatrix - MODULE PROCEDURE Constructor1, Constructor2, Constructor3 - END INTERFACE - -!------------------------------------------------------------------------------ -! CONTAINS -!------------------------------------------------------------------------------ - - CONTAINS - -#include "./Constructor.part" -#include "./DiffusionMatrix_1.part" -#include "./DiffusionMatrix_2.part" -#include "./DiffusionMatrix_3.part" -#include "./DiffusionMatrix_4.part" -#include "./DiffusionMatrix_5.part" -#include "./DiffusionMatrix_6.part" -#include "./DiffusionMatrix_7.part" -#include "./DiffusionMatrix_8.part" -#include "./DiffusionMatrix_9.part" -#include "./DiffusionMatrix_10.part" -#include "./DiffusionMatrix_11.part" -#include "./DiffusionMatrix_12.part" -#include "./DiffusionMatrix_13.part" -#include "./DiffusionMatrix_14.part" -#include "./DiffusionMatrix_15.part" -#include "./DiffusionMatrix_16.part" -#include "./DiffusionMatrix_17.part" -#include "./DiffusionMatrix_18.part" -#include "./DiffusionMatrix_19.part" -#include "./DiffusionMatrix_20.part" -#include "./DiffusionMatrix_21.part" -#include "./DiffusionMatrix_22.part" -#include "./DiffusionMatrix_23.part" -#include "./DiffusionMatrix_24.part" -#include "./DiffusionMatrix_25.part" -#include "./DiffusionMatrix_26.part" -#include "./DiffusionMatrix_27.part" -#include "./DiffusionMatrix_28.part" -#include "./DiffusionMatrix_29.part" -#include "./DiffusionMatrix_30.part" -#include "./DiffusionMatrix_31.part" - - END MODULE STDiffusionMatrix_Class - diff --git a/src/submodules/FEMatrix/STDiffusionMatrix/STDiffusionMatrix_Class.f90~ b/src/submodules/FEMatrix/STDiffusionMatrix/STDiffusionMatrix_Class.f90~ deleted file mode 100755 index 75fa6cf2..00000000 --- a/src/submodules/FEMatrix/STDiffusionMatrix/STDiffusionMatrix_Class.f90~ +++ /dev/null @@ -1,100 +0,0 @@ -! -!------------------------------------------------------------------------------ -! Author : Vikas sharma -! Position : Doctral Student -! Institute : Kyoto Univeristy, Japan -! Program name: STDiffusionMatrix_Class.f90 -! Last Update : Nov-20-2017 -! -!------------------------------------------------------------------------------ -! Details of Program -!============================================================================== -! -! TYPE :: Module -! -! DESCRIPTION -! - Diffusion matrices for space-time elements -! -!============================================================================== - - MODULE STDiffusionMatrix_Class - USE GlobalData - USE IO - USE STElemShapeData_Class - USE STShapeData_Class - IMPLICIT NONE - - PRIVATE - PUBLIC :: STDiffusionMatrix_, STDiffusionMatrix, & - STDiffusionMatrix_Pointer - -!------------------------------------------------------------------------------ -! STElemShapeData_ -!------------------------------------------------------------------------------ - - TYPE, EXTENDS( STElemShapeData_ ) :: STDiffusionMatrix_ - -!. . . . . . . . . . . . . . . . . . . . -! 1. Diffusion matrices for the space-time element. -!. . . . . . . . . . . . . . . . . . . . - - CONTAINS - - PROCEDURE, PUBLIC, PASS( Obj ) :: & -#include "./MethodNames.part" - - END TYPE STDiffusionMatrix_ - -!------------------------------------------------------------------------------ -! INTERFACES -!------------------------------------------------------------------------------ - - INTERFACE STDiffusionMatrix_Pointer - MODULE PROCEDURE Constructor_1, Constructor_2, Constructor_3 - END INTERFACE - - INTERFACE STDiffusionMatrix - MODULE PROCEDURE Constructor1, Constructor2, Constructor3 - END INTERFACE - -!------------------------------------------------------------------------------ -! CONTAINS -!------------------------------------------------------------------------------ - - CONTAINS - -#include "./Constructor.part" -#include "./DiffusionMatrix_1.part" -#include "./DiffusionMatrix_2.part" -#include "./DiffusionMatrix_3.part" -#include "./DiffusionMatrix_4.part" -#include "./DiffusionMatrix_5.part" -#include "./DiffusionMatrix_6.part" -#include "./DiffusionMatrix_7.part" -#include "./DiffusionMatrix_8.part" -#include "./DiffusionMatrix_9.part" -#include "./DiffusionMatrix_10.part" -#include "./DiffusionMatrix_11.part" -#include "./DiffusionMatrix_12.part" -#include "./DiffusionMatrix_13.part" -#include "./DiffusionMatrix_14.part" -#include "./DiffusionMatrix_15.part" -#include "./DiffusionMatrix_16.part" -#include "./DiffusionMatrix_17.part" -#include "./DiffusionMatrix_18.part" -#include "./DiffusionMatrix_19.part" -#include "./DiffusionMatrix_20.part" -#include "./DiffusionMatrix_21.part" -#include "./DiffusionMatrix_22.part" -#include "./DiffusionMatrix_23.part" -#include "./DiffusionMatrix_24.part" -#include "./DiffusionMatrix_25.part" -#include "./DiffusionMatrix_26.part" -#include "./DiffusionMatrix_27.part" -#include "./DiffusionMatrix_28.part" -#include "./DiffusionMatrix_29.part" -#include "./DiffusionMatrix_30.part" -#include "./DiffusionMatrix_31.part" - - END MODULE STDiffusionMatrix_Class - diff --git a/src/submodules/FEMatrix/STFextVector/Constructor.part b/src/submodules/FEMatrix/STFextVector/Constructor.part deleted file mode 100755 index 10c3d85b..00000000 --- a/src/submodules/FEMatrix/STFextVector/Constructor.part +++ /dev/null @@ -1,152 +0,0 @@ -! -!------------------------------------------------------------------------------ -! Author : Vikas sharma -! Position : Doctral Student -! Institute : Kyoto Univeristy, Japan -! Program name: Constructor.part -! Last Update : Nov-24-2017 -! -!------------------------------------------------------------------------------ -! Details of Program -!============================================================================== -! -! TYPE :: Part of the Code -! -! DESCRIPTION -! - This code is part of the code -! - Space Interpolation of scalar and vector -! -! HOSTING FILE -! - STFextVector_Class.f90 -! -!============================================================================== - -!------------------------------------------------------------------------------ -! Constructor_1 -!------------------------------------------------------------------------------ - - FUNCTION Constructor_1( Row, NIPS, NIPT ) - -!. . . . . . . . . . . . . . . . . . . . -! 1. Returns the STFextVector_ pointer -! Allocates the Obj % Vec1( row ) -! Allocates the Obj % SD( NIPS, NIPT ) -!. . . . . . . . . . . . . . . . . . . . - - ! Define intent of dummy variables - CLASS( STFextVector_ ), POINTER :: Constructor_1 - INTEGER( I4B ), INTENT( IN ) :: row, NIPS, NIPT - - ALLOCATE( Constructor_1 ) - ALLOCATE( Constructor_1 % Vec1( row ) ) - Constructor_1 % Vec1 = 0.0_DFP - CALL Constructor_1 % Initiate( NIPS = NIPS, NIPT = NIPT ) - - END FUNCTION Constructor_1 - -!------------------------------------------------------------------------------ -! Constructor_2 -!------------------------------------------------------------------------------ - - FUNCTION Constructor_2( I1, I2, I3, NIPS, NIPT ) - -!. . . . . . . . . . . . . . . . . . . . -! 1. Returns the STFextVector_ pointer -! Allocates the Obj % Vec3( I1, I2, I3 ) -! Allocates the Obj % SD( NIPS, NIPT ) -!. . . . . . . . . . . . . . . . . . . . - - ! Define intent of dummy variables - CLASS( STFextVector_ ), POINTER :: Constructor_2 - INTEGER( I4B ), INTENT( IN ) :: I1, I2, I3, NIPS, NIPT - - ALLOCATE( Constructor_2 ) - ALLOCATE( Constructor_2 % Vec3( I1, I2, I3 ) ) - Constructor_2 % Vec3 = 0.0_DFP - CALL Constructor_2 % Initiate( NIPS = NIPS, NIPT = NIPT ) - - END FUNCTION Constructor_2 - -!------------------------------------------------------------------------------ -! Constructor_3 -!------------------------------------------------------------------------------ - - FUNCTION Constructor_3( ) - -!. . . . . . . . . . . . . . . . . . . . -! 1. Returns the STFextVector_ pointer -! Empty constructor -!. . . . . . . . . . . . . . . . . . . . - - ! Define intent of dummy variables - CLASS( STFextVector_ ), POINTER :: Constructor_3 - - ALLOCATE( Constructor_3 ) - - END FUNCTION Constructor_3 - - -!------------------------------------------------------------------------------ -! Constructor1 -!------------------------------------------------------------------------------ - - FUNCTION Constructor1( Row, NIPS, NIPT ) - -!. . . . . . . . . . . . . . . . . . . . -! 1. Returns the STFextVector_ object -! Allocates the Obj % Vec1( row ) -! Allocates the Obj % SD( NIPS, NIPT ) -!. . . . . . . . . . . . . . . . . . . . - - ! Define intent of dummy variables - TYPE( STFextVector_ ) :: Constructor1 - INTEGER( I4B ), INTENT( IN ) :: row, NIPS, NIPT - - ALLOCATE( Constructor1 % Vec1( row ) ) - Constructor1 % Vec1 = 0.0_DFP - CALL Constructor1 % Initiate( NIPS = NIPS, NIPT = NIPT ) - - END FUNCTION Constructor1 - -!------------------------------------------------------------------------------ -! Constructor2 -!------------------------------------------------------------------------------ - - FUNCTION Constructor2( I1, I2, I3, NIPS, NIPT ) - -!. . . . . . . . . . . . . . . . . . . . -! 1. Returns the STFextVector_ object -! Allocates the Obj % Vec3( I1, I2, I3 ) -! Allocates the Obj % SD( NIPS, NIPT ) -!. . . . . . . . . . . . . . . . . . . . - - ! Define intent of dummy variables - TYPE( STFextVector_ ) :: Constructor2 - INTEGER( I4B ), INTENT( IN ) :: I1, I2, I3, NIPS, NIPT - - ALLOCATE( Constructor2 % Vec3( I1, I2, I3 ) ) - Constructor2 % Vec3 = 0.0_DFP - CALL Constructor2 % Initiate( NIPS = NIPS, NIPT = NIPT ) - - END FUNCTION Constructor2 - -!------------------------------------------------------------------------------ -! Constructor3 -!------------------------------------------------------------------------------ - - FUNCTION Constructor3( ) - -!. . . . . . . . . . . . . . . . . . . . -! 1. Returns the STFextVector_ object -! Empty constructor -!. . . . . . . . . . . . . . . . . . . . - - ! Define intent of dummy variables - TYPE( STFextVector_ ) :: Constructor3 - - END FUNCTION Constructor3 - -!------------------------------------------------------------------------------ -! -!------------------------------------------------------------------------------ - diff --git a/src/submodules/FEMatrix/STFextVector/FextVector_1.part b/src/submodules/FEMatrix/STFextVector/FextVector_1.part deleted file mode 100755 index f1abbb7c..00000000 --- a/src/submodules/FEMatrix/STFextVector/FextVector_1.part +++ /dev/null @@ -1,111 +0,0 @@ -! -!------------------------------------------------------------------------------ -! Author : Vikas sharma -! Position : Doctral Student -! Institute : Kyoto Univeristy, Japan -! Program name: FextVector_1.part -! Last Update : Nov-23-2017 -! -!------------------------------------------------------------------------------ -! Details of Program -!============================================================================== -! -! TYPE :: Part of the Code -! -! DESCRIPTION -! - This code is part of the code -! - Space Interpolation of scalar and vector -! -! HOSTING FILE -! - STFextVector_Class.f90 -! -!============================================================================== - -!------------------------------------------------------------------------------ -! getFextVector_1 -!------------------------------------------------------------------------------ - -SUBROUTINE getFextVector_1( Obj, Fext ) - - !. . . . . . . . . . . . . . . . . . . . - ! 1. Fext denotes the space-time nodal values - !. . . . . . . . . . . . . . . . . . . . - - USE Utility, ONLY:OUTERPROD - ! Define intent of dummy variables -#ifdef STMat - CLASS( SpaceTimeMatrix_ ), INTENT( INOUT ), TARGET :: Obj -#else - CLASS( STFextVector_ ), INTENT( INOUT ), TARGET :: Obj -#endif - - REAL( DFP ), DIMENSION( :, :, : ), INTENT( IN ) :: Fext - - ! Define internal variables - INTEGER( I4B ) :: NNS, NNT, NIPS, NIPT, IPS, IPT, a, I, M - REAL( DFP ), ALLOCATABLE :: Fbar( : ), DummyMat(:,:) - REAL( DFP ) :: RealVal - CLASS( STShapeData_ ), POINTER :: SD - -#ifdef DEBUG_VER - Error_Flag = .FALSE. - IF( .NOT. Obj % isInitiated( ) ) THEN - CALL Err_Msg( & - & "STFextVector_Class.f90", & - & "getFextVector_1(Obj, Fext)", & - & "STFextVector_ Object is not Initiated" ) - Error_Flag = .TRUE. - RETURN - END IF -#endif - - NNS = Obj % SD( 1,1 ) % getNNS( ) - NNT = Obj % SD( 1,1 ) % getNNT( ) - -#ifdef DEBUG_VER - IF( SIZE( Fext, 2 ) .NE. NNS .OR. SIZE( Fext, 3 ) .NE. NNT ) THEN - CALL Err_Msg( & - & "STFextVector_Class.f90", & - & "getFextVector_1(Obj, Fext)", & - & "The SIZE( Fext, 2 ) should be equal to NNS, & - & The SIZE( Fext, 3 ) should be equal to NNT" ) - Error_Flag = .TRUE. - RETURN - END IF -#endif - - M = SIZE( Fext, 1 ) - ALLOCATE( Fbar( M ) ) - IF( ALLOCATED( Obj % Vec3 ) ) DEALLOCATE( Obj % Vec3 ) - ALLOCATE( Obj % Vec3( M, NNS, NNT ) ) - Obj % Vec3 = 0.0_DFP - - NIPS = Obj % getNIPS( ) - NIPT = Obj % getNIPT( ) - - DO IPT = 1, NIPT - DO IPS = 1, NIPS - SD => Obj % SD( IPS, IPT ) - CALL SD % getInterpolationOfVector( & - & STNodalValues = Fext, Val = Fbar ) - - RealVal = SD % Ws * SD % Wt * SD % Js_Xi2Xt & - & * SD % Jt * SD % Thickness - - DummyMat = OUTERPROD( Fbar, SD % N ) - - DO a = 1, NNT - Obj % Vec3( :, :, a ) = Obj % Vec3( :, :, a ) + & - & DummyMat * RealVal * SD % T( a ) - END DO - END DO - END DO - - DEALLOCATE( Fbar, DummyMat ) - NULLIFY( SD ) - -END SUBROUTINE getFextVector_1 - -!------------------------------------------------------------------------------ -! -!------------------------------------------------------------------------------ diff --git a/src/submodules/FEMatrix/STFextVector/FextVector_10.part b/src/submodules/FEMatrix/STFextVector/FextVector_10.part deleted file mode 100755 index 65285394..00000000 --- a/src/submodules/FEMatrix/STFextVector/FextVector_10.part +++ /dev/null @@ -1,141 +0,0 @@ -! -!------------------------------------------------------------------------------ -! Author : Vikas sharma -! Position : Doctral Student -! Institute : Kyoto Univeristy, Japan -! Program name: FextVector_10.part -! Last Update : Nov-23-2017 -! -!------------------------------------------------------------------------------ -! Details of Program -!============================================================================== -! -! TYPE :: Part of the Code -! -! DESCRIPTION -! - This code is part of the code -! - Space Interpolation of scalar and vector -! -! HOSTING FILE -! - STFextVector_Class.f90 -! -!============================================================================== - -!------------------------------------------------------------------------------ -! getFextVector_10 -!------------------------------------------------------------------------------ - -SUBROUTINE getFextVector_10( Obj, Fext, C, FextType, CType ) - - !. . . . . . . . . . . . . . . . . . . . - ! 1. Fext denotes space-time nodal value, C denotes constant value - !. . . . . . . . . . . . . . . . . . . . - - USE Utility, ONLY : OUTERPROD - - ! Define intent of dummy variables -#ifdef STMat - CLASS( SpaceTimeMatrix_ ), INTENT( INOUT ), TARGET :: Obj -#else - CLASS( STFextVector_ ), INTENT( INOUT ), TARGET :: Obj -#endif - - REAL( DFP ), DIMENSION( :, :, : ), INTENT( IN ) :: Fext - REAL( DFP ), DIMENSION( : ), INTENT( IN ) :: C - CHARACTER( LEN = * ), INTENT( IN ) :: FextType, CType - - ! Define internal variables - INTEGER( I4B ) :: NNS, NNT, NIPS, NIPT, IPS, IPT, a, M, NSD - REAL( DFP ), ALLOCATABLE :: cdNTdXt( :, : ), Fbar( : ) - REAL( DFP ) :: RealVal - LOGICAL( LGT ) :: isFNodal - CLASS( STShapeData_ ), POINTER :: SD - -#ifdef DEBUG_VER - Error_Flag = .FALSE. - IF( .NOT. Obj % isInitiated( ) ) THEN - CALL Err_Msg("STFextVector_Class.f90", & - "getFextVector_10(), Flag-1", & - "STFextVector_ Object is not Initiated" ) - Error_Flag = .TRUE. - RETURN - END IF -#endif - - NNS = Obj % SD( 1,1 ) % getNNS( ) - NSD = Obj % SD( 1,1 ) % getNSD( ) - NNT = Obj % SD( 1,1 ) % getNNT( ) - NIPS = Obj % getNIPS( ) - NIPT = Obj % getNIPT( ) - -#ifdef DEBUG_VER - IF( SIZE( Fext, 2 ) .NE. NNS .AND. SIZE( Fext, 2 ) .NE. NIPS ) THEN - CALL Err_Msg("STFextVector_Class.f90", & - & "getFextVector_10(), Flag-2", & - & "The SIZE( Fext, 2 ) should be equal to NNS or NIPS" ) - Error_Flag = .TRUE. - RETURN - END IF - IF( SIZE( Fext, 3 ) .NE. NNT .AND. SIZE( Fext, 3 ) .NE. NIPT ) THEN - CALL Err_Msg("STFextVector_Class.f90", & - & "getFextVector_10(), Flag-3", & - & "The SIZE( Fext, 3 ) should be equal to NNT, or NIPT" ) - Error_Flag = .TRUE. - RETURN - END IF - IF( SIZE( C, 1 ) .NE. NSD ) THEN - CALL Err_Msg("STFextVector_Class.f90", & - & "getFextVector_10(), Flag-4", & - & "The SIZE( C, 1 ) should be equal to NSD" ) - Error_Flag = .TRUE. - RETURN - END IF -#endif - - isFNodal = .TRUE. - SELECT CASE( TRIM( ADJUSTL( FextType ) ) ) - CASE( 'Quad', 'QuadPoints', 'Quad Points', & - & 'Integration', 'Integration Points', & - & 'IntegrationPoints' ) - isFNodal = .FALSE. - END SELECT - - M = SIZE( Fext, 1 ) - ALLOCATE( Fbar( M ) ) - IF( ALLOCATED( Obj % Vec3 ) ) DEALLOCATE( Obj % Vec3 ) - ALLOCATE( Obj % Vec3( M, NNS, NNT ) ) - Obj % Vec3 = 0.0_DFP - - DO IPT = 1, NIPT - DO IPS = 1, NIPS - - SD => Obj%SD(IPS,IPT) - RealVal = SD % Ws * SD % Wt * SD % Js_Xi2Xt & - & * SD % Jt * SD % Thickness - - CALL SD % getProjectionOfdNTdXt( & - & VectorValues = C, cdNTdXt = cdNTdXt ) - - IF( isFNodal ) THEN - CALL SD % getInterpolationOfVector( & - & STNodalValues = Fext, Val = Fbar ) - ELSE - Fbar = Fext( :, IPS, IPT ) - END IF - - DO a = 1, NSD - Obj % Vec3( a, :, : ) = Obj % Vec3( a, :, : ) + & - & RealVal * cdNTdXt * Fbar( a ) - END DO - END DO - END DO - - DEALLOCATE( Fbar, cdNTdXt ) - NULLIFY( SD ) - -END SUBROUTINE getFextVector_10 - -!------------------------------------------------------------------------------ -! -!------------------------------------------------------------------------------ - diff --git a/src/submodules/FEMatrix/STFextVector/FextVector_11.part b/src/submodules/FEMatrix/STFextVector/FextVector_11.part deleted file mode 100755 index c6e7561b..00000000 --- a/src/submodules/FEMatrix/STFextVector/FextVector_11.part +++ /dev/null @@ -1,161 +0,0 @@ -! -!------------------------------------------------------------------------------ -! Author : Vikas sharma -! Position : Doctral Student -! Institute : Kyoto Univeristy, Japan -! Program name: FextVector_11.part -! Last Update : Nov-23-2017 -! -!------------------------------------------------------------------------------ -! Details of Program -!============================================================================== -! -! TYPE :: Part of the Code -! -! DESCRIPTION -! - This code is part of the code -! - Space Interpolation of scalar and vector -! -! HOSTING FILE -! - STFextVector_Class.f90 -! -!============================================================================== - -!------------------------------------------------------------------------------ -! getFextVector_11 -!------------------------------------------------------------------------------ - -SUBROUTINE getFextVector_11( Obj, Fext, C, FextType, CType ) - - !. . . . . . . . . . . . . . . . . . . . - ! 1. Spacetime nodal values C; Fext Space nodal values - !. . . . . . . . . . . . . . . . . . . . - - USE Utility, ONLY : OUTERPROD - - ! Define intent of dummy variables -#ifdef STMat - CLASS( SpaceTimeMatrix_ ), INTENT( INOUT ), TARGET :: Obj -#else - CLASS( STFextVector_ ), INTENT( INOUT ), TARGET :: Obj -#endif - - REAL( DFP ), DIMENSION( :, : ), INTENT( IN ) :: Fext - REAL( DFP ), DIMENSION( :, :, : ), INTENT( IN ) :: C - CHARACTER( LEN = * ), INTENT( IN ) :: FextType, CType - - ! Define internal variables - INTEGER( I4B ) :: NNS, NNT, NIPS, NIPT, IPS, IPT, a, M, NSD - REAL( DFP ), ALLOCATABLE :: cdNTdXt( :, : ), Fbar( : ) - REAL( DFP ) :: RealVal - LOGICAL( LGT ) :: isCNodal, isFNodal - CLASS( STShapeData_ ), POINTER :: SD - -#ifdef DEBUG_VER - Error_Flag = .FALSE. - IF( .NOT. Obj % isInitiated( ) ) THEN - CALL Err_Msg("STFextVector_Class.f90", & - "getFextVector_11(), Flag-1", & - "STFextVector_ Object is not Initiated" ) - Error_Flag = .TRUE. - RETURN - END IF -#endif - - NNS = Obj % SD( 1,1 ) % getNNS( ) - NSD = Obj % SD( 1,1 ) % getNSD( ) - NNT = Obj % SD( 1,1 ) % getNNT( ) - NIPS = Obj % getNIPS( ) - NIPT = Obj % getNIPT( ) - -#ifdef DEBUG_VER - IF( SIZE( Fext, 2 ) .NE. NNS .AND. SIZE( Fext, 2 ) .NE. NIPS ) THEN - CALL Err_Msg("STFextVector_Class.f90", & - "getFextVector_11(), Flag-2", & - "The SIZE( Fext, 2 ) should be equal to NNS or NIPS" ) - Error_Flag = .TRUE. - RETURN - END IF - IF( SIZE( C, 2 ) .NE. NNS .AND. SIZE( C, 2 ) .NE. NIPS ) THEN - CALL Err_Msg("STFextVector_Class.f90", & - "getFextVector_11(), Flag-3", & - "The SIZE( C, 2 ) should be equal to NNS or NIPS" ) - Error_Flag = .TRUE. - RETURN - END IF - IF( SIZE( C, 3 ) .NE. NNT .AND. SIZE( C, 3 ) .NE. NIPT ) THEN - CALL Err_Msg("STFextVector_Class.f90", & - "getFextVector_11(), Flag-4", & - "The SIZE( C, 3 ) should be equal to NNT, or NIPT" ) - Error_Flag = .TRUE. - RETURN - END IF - IF( SIZE( C, 1 ) .NE. NSD ) THEN - CALL Err_Msg("STFextVector_Class.f90", & - "getFextVector_11(), Flag-5", & - "The SIZE( C, 1 ) should be equal to NSD" ) - Error_Flag = .TRUE. - RETURN - END IF -#endif - - isFNodal = .TRUE. - SELECT CASE( TRIM( ADJUSTL( FextType ) ) ) - CASE( 'Quad', 'QuadPoints', 'Quad Points', & - & 'Integration', 'Integration Points', & - & 'IntegrationPoints' ) - isFNodal = .FALSE. - END SELECT - - isCNodal = .TRUE. - SELECT CASE( TRIM( ADJUSTL( CType ) ) ) - CASE( 'Quad', 'QuadPoints', 'Quad Points', & - & 'Integration', 'Integration Points', & - & 'IntegrationPoints' ) - isCNodal = .FALSE. - END SELECT - - M = SIZE( Fext, 1 ) - ALLOCATE( Fbar( M ) ) - IF( ALLOCATED( Obj % Vec3 ) ) DEALLOCATE( Obj % Vec3 ) - ALLOCATE( Obj % Vec3( M, NNS, NNT ) ) - Obj % Vec3 = 0.0_DFP - - DO IPT = 1, NIPT - DO IPS = 1, NIPS - - SD => Obj%SD(IPS,IPT) - RealVal = SD % Ws * SD % Wt * SD % Js_Xi2Xt & - & * SD % Jt * SD % Thickness - - IF( isCNodal ) THEN - CALL SD % getProjectionOfdNTdXt( & - & STNodalValues = C, cdNTdXt = cdNTdXt ) - ELSE - CALL SD % getProjectionOfdNTdXt( & - & VectorValues = C(:,IPS,IPT), cdNTdXt = cdNTdXt ) - END IF - - IF( isFNodal ) THEN - CALL SD % getInterpolationOfVector( & - & SpaceNodalValues = Fext, Val = Fbar ) - ELSE - Fbar = Fext( :, IPS ) - END IF - - DO a = 1, NSD - Obj % Vec3( a, :, : ) = Obj % Vec3( a, :, : ) + & - & RealVal * cdNTdXt * Fbar( a ) - END DO - END DO - END DO - - DEALLOCATE( Fbar, cdNTdXt ) - NULLIFY( SD ) - -END SUBROUTINE getFextVector_11 - -!------------------------------------------------------------------------------ -! -!------------------------------------------------------------------------------ - diff --git a/src/submodules/FEMatrix/STFextVector/delme.f90 b/src/submodules/FEMatrix/STFextVector/delme.f90 deleted file mode 100644 index a7971671..00000000 --- a/src/submodules/FEMatrix/STFextVector/delme.f90 +++ /dev/null @@ -1,338 +0,0 @@ - - SELECT CASE( TRIM( ADJUSTL( FextType ) ) ) - CASE( 'Nodal', 'Nodal Values', 'NodalValues', & - 'STNodalValues', 'ST Nodal Values' ) - - SELECT CASE( TRIM( ADJUSTL( Term1 ) ) ) - - CASE( 'dx', 'dx1', 'dX', 'dX1', 'x', 'X', 'x1', 'X1' ) - - DO a = 1, NNT - - DO I = 1, NNS - - DO IPT = 1, NIPT - - DO IPS = 1, NIPS - - Ws = Obj % SD( IPS, IPT ) % getWs( ) - Wt = Obj % SD( IPS, IPT ) % getWt( ) - - Js = Obj % SD( IPS, IPT ) % getJs_Xi2Xt( ) - Jt = Obj % SD( IPS, IPT ) % getJt( ) - - thick = Obj % SD( IPS, IPT ) % getThickness( ) - - CALL Obj % SD( IPS, IPT ) % getInterpolationOfVector( & - STNodalValues = Fext, Val = Fbar ) - - CALL Obj % SD( IPS, IPT ) % getdNTdXt( dNTdXt ) - - RealVal = Ws * Wt * Js * Jt * thick * dNTdXt( I, 1, a ) - - Obj % Vec3( :, I, a ) = Obj % Vec3( :, I, a ) + & - Fbar * RealVal - - END DO - - END DO - - END DO - - END DO - - CASE( 'dy', 'dx2', 'dY', 'dX2', 'y', 'Y', 'x2', 'X2' ) - - DO a = 1, NNT - - DO I = 1, NNS - - DO IPT = 1, NIPT - - DO IPS = 1, NIPS - - Ws = Obj % SD( IPS, IPT ) % getWs( ) - Wt = Obj % SD( IPS, IPT ) % getWt( ) - - Js = Obj % SD( IPS, IPT ) % getJs_Xi2Xt( ) - Jt = Obj % SD( IPS, IPT ) % getJt( ) - - thick = Obj % SD( IPS, IPT ) % getThickness( ) - - CALL Obj % SD( IPS, IPT ) % getInterpolationOfVector( & - STNodalValues = Fext, Val = Fbar ) - - CALL Obj % SD( IPS, IPT ) % getdNTdXt( dNTdXt ) - - RealVal = Ws * Wt * Js * Jt * thick * dNTdXt( I, 2, a ) - - Obj % Vec3( :, I, a ) = Obj % Vec3( :, I, a ) + & - Fbar * RealVal - - END DO - - END DO - - END DO - - END DO - - CASE( 'dz', 'dx3', 'dZ', 'dX3', 'z', 'Z', 'x3', 'X3' ) - - DO a = 1, NNT - - DO I = 1, NNS - - DO IPT = 1, NIPT - - DO IPS = 1, NIPS - - Ws = Obj % SD( IPS, IPT ) % getWs( ) - Wt = Obj % SD( IPS, IPT ) % getWt( ) - - Js = Obj % SD( IPS, IPT ) % getJs_Xi2Xt( ) - Jt = Obj % SD( IPS, IPT ) % getJt( ) - - thick = Obj % SD( IPS, IPT ) % getThickness( ) - - CALL Obj % SD( IPS, IPT ) % getInterpolationOfVector( & - STNodalValues = Fext, Val = Fbar ) - - CALL Obj % SD( IPS, IPT ) % getdNTdXt( dNTdXt ) - - RealVal = Ws * Wt * Js * Jt * thick * dNTdXt( I, 3, a ) - - Obj % Vec3( :, I, a ) = Obj % Vec3( :, I, a ) + & - Fbar * RealVal - - END DO - - END DO - - END DO - - END DO - - CASE( 'dt', 'dT', 'Dt', 't' ) - - DO a = 1, NNT - - DO I = 1, NNS - - DO IPT = 1, NIPT - - DO IPS = 1, NIPS - - Ws = Obj % SD( IPS, IPT ) % getWs( ) - Wt = Obj % SD( IPS, IPT ) % getWt( ) - - Js = Obj % SD( IPS, IPT ) % getJs_Xi2Xt( ) - Jt = Obj % SD( IPS, IPT ) % getJt( ) - - thick = Obj % SD( IPS, IPT ) % getThickness( ) - - CALL Obj % SD( IPS, IPT ) % getInterpolationOfVector( & - STNodalValues = Fext, Val = Fbar ) - - CALL Obj % SD( IPS, IPT ) % getdNTdt( dNTdt ) - - RealVal = Ws * Wt * Js * Jt * thick * dNTdt( I, a ) - - Obj % Vec3( :, I, a ) = Obj % Vec3( :, I, a ) + & - Fbar * RealVal - - END DO - - END DO - - END DO - - END DO - - CASE DEFAULT - - CALL Err_Msg( 'STFextVector_Class.f90>>FextVector_24.part', & - & 'getFextVector_24()', & - & 'No case found for Term1, It should be, & - & [dx, dx1, dX, dX1, x, X, x1, X1], & - & [dy, dx2, dY, dX2, y, Y, x2, X2], & - & [dz, dx3, dZ, dX3, z, Z, x3, X3], & - & [dt, dT, t, Dt]' ) - Error_Flag = .TRUE. - RETURN - - END SELECT - - - - CASE( 'Integration', 'Integration Points', 'IntegrationPoints', & - 'Quad', 'QuadPoints', 'Quad Points' ) - - SELECT CASE( TRIM( ADJUSTL( Term1 ) ) ) - - CASE( 'dx', 'dx1', 'dX', 'dX1', 'x', 'X', 'x1', 'X1' ) - - DO a = 1, NNT - - DO I = 1, NNS - - DO IPT = 1, NIPT - - DO IPS = 1, NIPS - - Ws = Obj % SD( IPS, IPT ) % getWs( ) - Wt = Obj % SD( IPS, IPT ) % getWt( ) - - Js = Obj % SD( IPS, IPT ) % getJs_Xi2Xt( ) - Jt = Obj % SD( IPS, IPT ) % getJt( ) - - thick = Obj % SD( IPS, IPT ) % getThickness( ) - - Fbar = Fext( :, IPS, IPT ) - - CALL Obj % SD( IPS, IPT ) % getdNTdXt( dNTdXt ) - - RealVal = Ws * Wt * Js * Jt * thick * dNTdXt( I, 1, a ) - - Obj % Vec3( :, I, a ) = Obj % Vec3( :, I, a ) + & - Fbar * RealVal - - END DO - - END DO - - END DO - - END DO - - CASE( 'dy', 'dx2', 'dY', 'dX2', 'y', 'Y', 'x2', 'X2' ) - - DO a = 1, NNT - - DO I = 1, NNS - - DO IPT = 1, NIPT - - DO IPS = 1, NIPS - - Ws = Obj % SD( IPS, IPT ) % getWs( ) - Wt = Obj % SD( IPS, IPT ) % getWt( ) - - Js = Obj % SD( IPS, IPT ) % getJs_Xi2Xt( ) - Jt = Obj % SD( IPS, IPT ) % getJt( ) - - thick = Obj % SD( IPS, IPT ) % getThickness( ) - - Fbar = Fext( :, IPS, IPT ) - - CALL Obj % SD( IPS, IPT ) % getdNTdXt( dNTdXt ) - - RealVal = Ws * Wt * Js * Jt * thick * dNTdXt( I, 2, a ) - - Obj % Vec3( :, I, a ) = Obj % Vec3( :, I, a ) + & - Fbar * RealVal - - END DO - - END DO - - END DO - - END DO - - CASE( 'dz', 'dx3', 'dZ', 'dX3', 'z', 'Z', 'x3', 'X3' ) - - DO a = 1, NNT - - DO I = 1, NNS - - DO IPT = 1, NIPT - - DO IPS = 1, NIPS - - Ws = Obj % SD( IPS, IPT ) % getWs( ) - Wt = Obj % SD( IPS, IPT ) % getWt( ) - - Js = Obj % SD( IPS, IPT ) % getJs_Xi2Xt( ) - Jt = Obj % SD( IPS, IPT ) % getJt( ) - - thick = Obj % SD( IPS, IPT ) % getThickness( ) - - Fbar = Fext( :, IPS, IPT ) - - CALL Obj % SD( IPS, IPT ) % getdNTdXt( dNTdXt ) - - RealVal = Ws * Wt * Js * Jt * thick * dNTdXt( I, 3, a ) - - Obj % Vec3( :, I, a ) = Obj % Vec3( :, I, a ) + & - Fbar * RealVal - - END DO - - END DO - - END DO - - END DO - - CASE( 'dt', 'dT', 'Dt', 't' ) - - DO a = 1, NNT - - DO I = 1, NNS - - DO IPT = 1, NIPT - - DO IPS = 1, NIPS - - Ws = Obj % SD( IPS, IPT ) % getWs( ) - Wt = Obj % SD( IPS, IPT ) % getWt( ) - - Js = Obj % SD( IPS, IPT ) % getJs_Xi2Xt( ) - Jt = Obj % SD( IPS, IPT ) % getJt( ) - - thick = Obj % SD( IPS, IPT ) % getThickness( ) - - Fbar = Fext( :, IPS, IPT ) - - CALL Obj % SD( IPS, IPT ) % getdNTdt( dNTdt ) - - RealVal = Ws * Wt * Js * Jt * thick * dNTdt( I, a ) - - Obj % Vec3( :, I, a ) = Obj % Vec3( :, I, a ) + & - Fbar * RealVal - - END DO - - END DO - - END DO - - END DO - - CASE DEFAULT - - CALL Err_Msg( 'STFextVector_Class.f90>>FextVector_24.part', & - & 'getFextVector_24()', & - & 'No case found for Term1, It should be, & - & [dx, dx1, dX, dX1, x, X, x1, X1], & - & [dy, dx2, dY, dX2, y, Y, x2, X2], & - & [dz, dx3, dZ, dX3, z, Z, x3, X3], & - & [dt, dT, t, Dt]' ) - Error_Flag = .TRUE. - RETURN - - END SELECT - - CASE DEFAULT - - CALL Err_Msg("STFextVector_Class.f90", & - "getFextVector_24(), Flag-1", & - "No case found for FextType, It should be & - 'Nodal', 'Nodal Values', 'NodalValues', 'STNodalValues', 'ST Nodal Values', & - & 'Integration', 'Integration Points', 'IntegrationPoints', 'Quad', 'QuadPoints', & - & 'Quad Points'" ) - Error_Flag = .TRUE. - RETURN - - END SELECT \ No newline at end of file