Module for Tensor operations in NAFPack
function that calculates the dot product of two real 3-dimensional vectors and
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| real(kind=dp), | intent(in), | dimension(:) | :: | a | ||
| real(kind=dp), | intent(in), | dimension(:) | :: | b |
function that calculates the cross product between two real 3-dimensional vectors and 1
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| real(kind=dp), | intent(in), | dimension(3) | :: | a | ||
| real(kind=dp), | intent(in), | dimension(3) | :: | b |
function that calculates the Euclidean norm (L2 norm) of a vector , where where is the dimension of the real vector .
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| real(kind=dp), | intent(in), | dimension(:) | :: | a |
function that calculates the Euclidean norm (L2 norm or modulus) of a vector , where where is the dimension of the complex vector .
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| complex(kind=dp), | intent(in), | dimension(:) | :: | a |
function that normalises a real vector a to make it a unit vector, where
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| real(kind=dp), | intent(in), | dimension(:) | :: | a |
function that normalises a complex vector a to make it a unit vector, where
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| complex(kind=dp), | intent(in), | dimension(:) | :: | a |
function that calculates the trace of a square matrix
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| real(kind=dp), | intent(in), | dimension(:, :) | :: | A |
function which checks if A is diagonally dominant
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| real(kind=dp), | intent(in), | dimension(:, :) | :: | A |
function that returns the identity matrix for a given size N
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| integer, | intent(in) | :: | N | |||
| logical, | intent(in), | optional | :: | use_concurrent |
function that extracts the diagonal of a matrix where is a vector containing the diagonal elements of the matrix .
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| real(kind=dp), | intent(in), | dimension(:, :) | :: | A |
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| real(kind=dp), | intent(in), | dimension(:) | :: | d_minus | ||
| real(kind=dp), | intent(in), | dimension(:) | :: | d | ||
| real(kind=dp), | intent(in), | dimension(:) | :: | d_plus |
Function to create a rotation matrix
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| real(kind=dp), | intent(in), | dimension(:, :) | :: | A | ||
| integer, | intent(in), | dimension(2) | :: | rotation |