FEDEM Solver
R8.0
Source code of the dynamics solver
|
Module with subroutines for manipulation of integer and real matrices. More...
Data Types | |
interface | writeobject |
Standard routine for writing an object to file. More... | |
interface | diagmatmul |
Matrix multiplication involving diagonal matrices. More... | |
interface | matmul34 |
Matrix multiplication involving 3×4 position matrices. More... | |
interface | dyadic_product |
Dyadic product between two vectors. More... | |
Functions/Subroutines | |
real(dp) function, dimension(3) | cross_product (y, z) |
Returns the cross product between the vectors y and z. More... | |
real(dp) function, dimension(size(x), size(x)), private | travmulv (x) |
Returns the dyadic vector product x Tx . More... | |
real(dp) function, dimension(size(x), size(y)), private | traumulv (x, y) |
Returns the dyadic vector product x Ty . More... | |
subroutine | diagtransform (D, A, T, ierr) |
Performs the transformation T = A T∗D ∗A where D is a diagonal matrix. More... | |
subroutine, private | diagmatmulmat (D, A, B, iflag, ierr) |
Performs the matrix multiplication B = c1 ∗B + c2 ∗D ∗A . More... | |
subroutine, private | diagmatmulvec (D, X, Y, iflag, ierr) |
Performs the matrix-vector multiplication Y = c1 ∗Y + c2 ∗D ∗X . More... | |
real(dp) function, dimension(3, 4), private | matmul34mat (a, b) |
Returns the matrix product a ∗b . More... | |
real(dp) function, dimension(3), private | matmul34vec (a, b) |
Returns the matrix-vector product a ∗b . More... | |
real(dp) function, dimension(2, 2) | invert22 (a, lpu, ierr) |
Returns the inverse of the 2×2 matrix a . More... | |
real(dp) function, dimension(3, 3) | invert33 (a, lpu, ierr) |
Returns the inverse of the 3×3 matrix a . More... | |
real(dp) function, dimension(3, 4) | invert34 (a) |
Returns the inverse of the 3×4 transformation matrix a . More... | |
real(dp) function, dimension(3, 4) | trans3p (P1, P2, P3, lpu, ierr) |
Returns a 3×4 transformation matrix calculated from 3 points. More... | |
real(dp) function, dimension(3, 3) | trans1v (V1, lpu, ierr) |
Returns a 3×3 transformation matrix based on the given X-direction vector V1 . More... | |
subroutine, private | writeintarray (array, lpu, text) |
Writes out and integer array in a formatted way. More... | |
subroutine | writeint8array (array, lpu, text) |
Writes out an integer array in a formatted way. More... | |
subroutine, private | writerealarray (array, lpu, text, nellIn, eps) |
Writes out a single precision array in a formatted way. More... | |
subroutine, private | writerealmatrix (array, lpu, text, nellIn, eps) |
Writes out a 2D single precision array in a formatted way. More... | |
subroutine, private | writedoublearray (array, lpu, text, nellIn, eps) |
Writes out a double precision array in a formatted way. More... | |
subroutine, private | writedoublematrix (array, lpu, text, nellIn, eps) |
Writes out a 2D double precision array in a formatted way. More... | |
subroutine | unify (A) |
Unifies the given matrix A. More... | |
integer function, dimension(:,:), pointer | matrixpointtoarray_int (array, rows, columns) |
Returns a matrix pointer to an integer array. More... | |
real(dp) function, dimension(:,:), pointer | matrixpointtoarray_real (array, rows, columns) |
Returns a matrix pointer to a real array. More... | |
Module with subroutines for manipulation of integer and real matrices.
This module contains various utility subroutines (and functions) for manipulation of matrices, such as specialiced multiplication routines, printing to file, etc.
Karl Erik Thoresen
real(dp) function, dimension(3) manipmatrixmodule::cross_product | ( | real(dp), dimension(3), intent(in) | y, |
real(dp), dimension(3), intent(in) | z | ||
) |
Returns the cross product between the vectors y and z.
|
private |
Performs the matrix multiplication B = c1
∗B + c2
∗D
∗A
.
D
is a diagonal matrix, whereas B
and A
are full matrices. The value of the parameters c1
and c2
are determined from the input variable iflag
, as follows:
|
private |
Performs the matrix-vector multiplication Y = c1
∗Y + c2
∗D
∗X
.
D
is a diagonal matrix, whereas Y
and X
are vectors. The value of the parameters c1
and c2
are determined from the input variable iflag
, as follows:
subroutine manipmatrixmodule::diagtransform | ( | real(dp), dimension(:), intent(in) | D, |
real(dp), dimension(:,:), intent(in) | A, | ||
real(dp), dimension(:,:), intent(out) | T, | ||
integer, intent(out) | ierr | ||
) |
Performs the transformation T = A
T∗D
∗A
where D
is a diagonal matrix.
real(dp) function, dimension(2,2) manipmatrixmodule::invert22 | ( | real(dp), dimension(2,2), intent(in) | a, |
integer, intent(in), optional | lpu, | ||
integer, intent(out), optional | ierr | ||
) |
Returns the inverse of the 2×2 matrix a
.
real(dp) function, dimension(3,3) manipmatrixmodule::invert33 | ( | real(dp), dimension(3,3), intent(in) | a, |
integer, intent(in), optional | lpu, | ||
integer, intent(out), optional | ierr | ||
) |
Returns the inverse of the 3×3 matrix a
.
real(dp) function, dimension(3,4) manipmatrixmodule::invert34 | ( | real(dp), dimension(3,4), intent(in) | a | ) |
Returns the inverse of the 3×4 transformation matrix a
.
The matrix a
is assumed to have the implicit dimension 4×4 with the 4th line being equal to [0 0 0 1]
.
|
private |
Returns the matrix product a
∗b
.
a
and b
are both 3×4 matrices with the assumed dimension 4×4, and the 4th row being [0 0 0 1]
.
|
private |
Returns the matrix-vector product a
∗b
.
a
is a 3×4 matrices with the assumed dimension 4×4 and the 4th row being [0 0 0 1]
, whereas b
is a vector with size 3 and assumed size 4.
integer function, dimension(:,:), pointer manipmatrixmodule::matrixpointtoarray_int | ( | integer, dimension(rows,columns), intent(in), target | array, |
integer, intent(in) | rows, | ||
integer, intent(in) | columns | ||
) |
Returns a matrix pointer to an integer array.
array can be a one-dimensional array as actual argument, but is a matrix as dummy argument.
real(dp) function, dimension(:,:), pointer manipmatrixmodule::matrixpointtoarray_real | ( | real(dp), dimension(rows,columns), intent(in), target | array, |
integer, intent(in) | rows, | ||
integer, intent(in) | columns | ||
) |
Returns a matrix pointer to a real array.
array can be a one-dimensional array as actual argument, but is a matrix as dummy argument.
real(dp) function, dimension(3,3) manipmatrixmodule::trans1v | ( | real(dp), dimension(3), intent(in) | V1, |
integer, intent(in), optional | lpu, | ||
integer, intent(out), optional | ierr | ||
) |
Returns a 3×3 transformation matrix based on the given X-direction vector V1
.
real(dp) function, dimension(3,4) manipmatrixmodule::trans3p | ( | real(dp), dimension(3), intent(in) | P1, |
real(dp), dimension(3), intent(in) | P2, | ||
real(dp), dimension(3), intent(in) | P3, | ||
integer, intent(in), optional | lpu, | ||
integer, intent(out), optional | ierr | ||
) |
Returns a 3×4 transformation matrix calculated from 3 points.
|
private |
Returns the dyadic vector product x
Ty
.
|
private |
Returns the dyadic vector product x
Tx
.
subroutine manipmatrixmodule::unify | ( | real(dp), dimension(:,:), intent(inout) | A | ) |
Unifies the given matrix A.
If A is not square, the greatest possible square matrix will be unified and the rest will be zeroed.
|
private |
Writes out a double precision array in a formatted way.
[in] | array | The array to print out |
[in] | lpu | File unit number to print to |
[in] | text | Heading to be printed before the array elements |
[in] | nellIn | Max number of values to print per line |
[in] | eps | Zero tolerance, truncate terms with smaller absolute value |
|
private |
Writes out a 2D double precision array in a formatted way.
[in] | array | The array to print out |
[in] | lpu | File unit number to print to |
[in] | text | Heading to be printed before the matrix elements |
[in] | nellIn | Max number of values to print per line |
[in] | eps | Zero tolerance, truncate terms with smaller absolute value |
subroutine manipmatrixmodule::writeint8array | ( | integer(i8), dimension(:), intent(in) | array, |
integer, intent(in) | lpu, | ||
character(*), intent(in), optional | text | ||
) |
Writes out an integer array in a formatted way.
[in] | array | The array to print out |
[in] | lpu | File unit number to print to |
[in] | text | Heading to be printed before the matrix values |
|
private |
Writes out and integer array in a formatted way.
[in] | array | The array to print out |
[in] | lpu | File unit number to print to |
[in] | text | Heading to be printed before the matrix values |
|
private |
Writes out a single precision array in a formatted way.
[in] | array | The array to print out |
[in] | lpu | File unit number to print to |
[in] | text | Heading to be printed before the array elements |
[in] | nellIn | Max number of values to print per line |
[in] | eps | Zero tolerance, truncate terms with smaller absolute value |
|
private |
Writes out a 2D single precision array in a formatted way.
[in] | array | The array to print out |
[in] | lpu | File unit number to print to |
[in] | text | Heading to be printed before the matrix elements |
[in] | nellIn | Max number of values to print per line |
[in] | eps | Zero tolerance, truncate terms with smaller absolute value |