FEDEM Solver
R8.0
Source code of the dynamics solver
|
System matrix extension module. More...
Data Types | |
interface | cstransform |
Performs a triple matrix multiplication. More... | |
interface | cspremult |
Performs a matrix-matrix multiplication. More... | |
interface | csgetsub12 |
Extracts and off-diagonal submatrix from the system matrix. More... | |
Functions/Subroutines | |
subroutine | cstransformmat (aMat, tMat, bMat, ierr) |
Performs a triple matrix multiplication. More... | |
subroutine | cstransformvec (aMat, v, bVal, ierr) |
Performs a vector-matrix-vector multiplication. More... | |
subroutine | cspremultmat (aMat, bMat, cMat, iflag, ierr) |
Performs a matrix-matrix multiplication. More... | |
subroutine | cspremultmatrix (aMat, bMat, ierr) |
Performs a matrix-matrix multiplication. More... | |
subroutine | cspremultvec (aMat, bVec, cVec, iflag, ierr) |
Performs a matrix-vector multiplication. More... | |
subroutine | cspremultvector (aMat, bVec, ierr) |
Performs a matrix-vector multiplication. More... | |
subroutine, public | csaddmat (aMat, bMat, alpha, ierr) |
Performs the matrix operation A = A + α B. More... | |
subroutine, public | cscopymat (aMat, bMat, ierr) |
Performs the matrix operation A = B. More... | |
subroutine, public | csgetsub11 (sysMat, meqn1, subMat11, ierr) |
Extracts the 11 sub-matrix from a system matrix. More... | |
subroutine | csgetsub12dense (sysMat, meqn1, meqn2, subMat12, ierr) |
Extracts the 12 sub-matrix from a system matrix. More... | |
subroutine | csgetsub12sparse (sysMat, subMat12, ierr) |
Extracts the 12 sub-matrix from a system matrix. More... | |
subroutine, public | csgetsub22 (sysMat, meqn2, subMat22, ierr) |
Extracts the 22 sub-matrix from a system matrix. More... | |
subroutine, public | csgetdiag (samData, sysMat, dt, dr, ierr) |
Extracts characteristic measures for a system matrix. More... | |
System matrix extension module.
This module contains subroutines for performing various operations on system matrices, such as matrix-matrix multiplication, matrix-vector multiplications, and extraction of sub-matrices from the system matrix. The module defines an interface between the FEDEM solver applications and the various linear algebra packages that are being used.
subroutine, public matextensionmodule::csaddmat | ( | type(sysmatrixtype), intent(inout) | aMat, |
type(sysmatrixtype), intent(in) | bMat, | ||
real(dp), intent(in) | alpha, | ||
integer, intent(out) | ierr | ||
) |
Performs the matrix operation A = A + α B.
aMat | System matrix A on compact (sparse) form | |
[in] | bMat | System matrix B on compact (sparse) form |
[in] | alpha | Scaling factor α |
[out] | ierr | Error flag |
subroutine, public matextensionmodule::cscopymat | ( | type(sysmatrixtype), intent(inout) | aMat, |
type(sysmatrixtype), intent(in) | bMat, | ||
integer, intent(out) | ierr | ||
) |
Performs the matrix operation A = B.
aMat | System matrix A on compact (sparse) form | |
[in] | bMat | System matrix B on compact (sparse) form |
[out] | ierr | Error flag |
subroutine, public matextensionmodule::csgetdiag | ( | type(samtype), intent(in) | samData, |
type(sysmatrixtype), intent(inout) | sysMat, | ||
real(dp), dimension(3), intent(out) | dt, | ||
real(dp), dimension(3), intent(out) | dr, | ||
integer, intent(out) | ierr | ||
) |
Extracts characteristic measures for a system matrix.
[in] | samData | Data for managing system matrix assembly |
[in] | sysMat | The system matrix to extract data from |
[out] | dt | Min, mean and max translational diagonal coefficients |
[out] | dr | Min, mean and max rotational diagonal coefficients |
[out] | ierr | Error flag |
The minimum, mean and maximum, translational and rotational, diagonal coefficents are extracted from the given system matrix.
subroutine, public matextensionmodule::csgetsub11 | ( | type(sysmatrixtype), intent(inout) | sysMat, |
integer, dimension(:), intent(in) | meqn1, | ||
real(dp), dimension(:,:), intent(out) | subMat11, | ||
integer, intent(out) | ierr | ||
) |
Extracts the 11 sub-matrix from a system matrix.
[in] | sysMat | The system matrix to extract the sub-matrix from |
[in] | meqn1 | Matrix of status 1 equation numbers |
[out] | subMat11 | Extracted sub-matrix |
[out] | ierr | Error flag |
The system matrix sysMat is stored on compact (sparse) form, but is logically composed of four submatrices, like
sysMat = | sub11 sub12 | | sub21 sub22 |
The sub-matrix sub11 is returned as a dense square matrix.
subroutine matextensionmodule::csgetsub12dense | ( | type(sysmatrixtype), intent(inout) | sysMat, |
integer, dimension(:), intent(in) | meqn1, | ||
integer, dimension(:), intent(in) | meqn2, | ||
real(dp), dimension(:,:), intent(out) | subMat12, | ||
integer, intent(out) | ierr | ||
) |
Extracts the 12 sub-matrix from a system matrix.
[in] | sysMat | The system matrix to extract the sub-matrix from |
[in] | meqn1 | Matrix of status 1 equation numbers |
[in] | meqn2 | Matrix of status 2 equation numbers |
[out] | subMat12 | Extracted sub-matrix |
[out] | ierr | Error flag |
The system matrix sysMat is stored on compact (sparse) form, but is logically composed of four submatrices, like
sysMat = | sub11 sub12 | | sub21 sub22 |
The sub-matrix sub12 is returned as a dense rectangular matrix.
subroutine matextensionmodule::csgetsub12sparse | ( | type(sysmatrixtype), intent(inout) | sysMat, |
type(sparsematrixtype), intent(out) | subMat12, | ||
integer, intent(out) | ierr | ||
) |
Extracts the 12 sub-matrix from a system matrix.
[in] | sysMat | The system matrix to extract the sub-matrix from |
[out] | subMat12 | Extracted sub-matrix |
[out] | ierr | Error flag |
The system matrix sysMat is stored on compact (sparse) form, but is logically composed of four submatrices, like
sysMat = | sub11 sub12 | | sub21 sub22 |
The sub-matrix sub12 is returned as a sparse matrix.
subroutine, public matextensionmodule::csgetsub22 | ( | type(sysmatrixtype), intent(inout) | sysMat, |
integer, dimension(:), intent(in) | meqn2, | ||
real(dp), dimension(:,:), intent(out) | subMat22, | ||
integer, intent(out) | ierr | ||
) |
Extracts the 22 sub-matrix from a system matrix.
[in] | sysMat | The system matrix to extract the sub-matrix from |
[in] | meqn2 | Matrix of status 2 equation numbers |
[out] | subMat22 | Extracted sub-matrix |
[out] | ierr | Error flag |
The system matrix sysMat is stored on compact (sparse) form, but is logically composed of four submatrices, like
sysMat = | sub11 sub12 | | sub21 sub22 |
The sub-matrix sub22 is returned as a dense square matrix.
subroutine matextensionmodule::cspremultmat | ( | type(sysmatrixtype), intent(inout) | aMat, |
real(dp), dimension(:,:), intent(in) | bMat, | ||
real(dp), dimension(:,:), intent(out), target | cMat, | ||
integer, intent(in) | iflag, | ||
integer, intent(out) | ierr | ||
) |
Performs a matrix-matrix multiplication.
[in] | aMat | System matrix A |
[in] | bMat | Rectangular dense matrix B |
[out] | cMat | Resulting matrix C |
[in] | iflag | Operation flag (see below) |
[out] | ierr | Error flag |
The matrix multiplication C = A B is performed, where A is on compact (sparse) form whereas C and B are dense rectangular matrices. The value on iflag determines the sign on the resulting matrix, as follows:
subroutine matextensionmodule::cspremultmatrix | ( | type(sysmatrixtype), intent(inout) | aMat, |
real(dp), dimension(:,:), intent(inout), target | bMat, | ||
integer, intent(out) | ierr | ||
) |
Performs a matrix-matrix multiplication.
[in] | aMat | System matrix A |
bMat | Rectangular dense matrix B | |
[out] | ierr | Error flag |
The matrix multiplication B = A B is performed, where A is on compact (sparse) form and B is a dense rectangular matrix.
subroutine matextensionmodule::cspremultvec | ( | type(sysmatrixtype), intent(inout) | aMat, |
real(dp), dimension(:), intent(in) | bVec, | ||
real(dp), dimension(:), intent(out), target | cVec, | ||
integer, intent(in) | iflag, | ||
integer, intent(out) | ierr | ||
) |
Performs a matrix-vector multiplication.
[in] | aMat | System matrix A |
[in] | bVec | System vector b |
[out] | cVec | Resulting matrix c |
[in] | iflag | Operation flag (see below) |
[out] | ierr | Error flag |
The matrix-vector multiplication c = A b is performed, where A is on compact (sparse) form whereas c and b are vectors. The value on iflag determines the sign on the resulting vector, as follows:
subroutine matextensionmodule::cspremultvector | ( | type(sysmatrixtype), intent(inout) | aMat, |
real(dp), dimension(:), intent(inout), target | bVec, | ||
integer, intent(out) | ierr | ||
) |
Performs a matrix-vector multiplication.
[in] | aMat | System matrix A |
bVec | System vector b | |
[out] | ierr | Error flag |
The matrix-vector multiplication b = A b is performed, where A is on compact (sparse) form and b is a vector.
|
private |
Performs a triple matrix multiplication.
[in] | aMat | System matrix A |
[in] | tMat | Transformation matrix T |
[out] | bMat | Resulting matrix B |
[out] | ierr | Error flag |
The matrix multiplication B = T T A T is performed, where A is on compact (sparse) form and T is a dense rectangular matrix.
subroutine matextensionmodule::cstransformvec | ( | type(sysmatrixtype), intent(inout) | aMat, |
real(dp), dimension(:), intent(in), target | v, | ||
real(dp), intent(out) | bVal, | ||
integer, intent(out) | ierr | ||
) |
Performs a vector-matrix-vector multiplication.
[in] | aMat | System matrix A |
[in] | v | System vector |
[out] | bVal | Resulting value |
[out] | ierr | Error flag |
The multiplication b = v T A v is performed, where A is on compact (sparse) form and v is a vector. The result b is s scalar quantity.