Module for working with tensors
Array size must be specific (either 2 or 3) for this to work!
Extend to complex numbers
Dot product
Dot product of two vectors
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real(kind=wp), | intent(in), | dimension(3) | :: | u | First vector |
|
real(kind=wp), | intent(in), | dimension(3) | :: | v | Second vector |
Result
Dot product (left) of a vector and a tensor
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real(kind=wp), | intent(in), | dimension(3) | :: | u | Vector |
|
real(kind=wp), | intent(in), | dimension(3,3) | :: | T | Tensor |
Result
Dot product (right) of a tensor and a vector
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real(kind=wp), | intent(in), | dimension(3,3) | :: | T | Tensor |
|
real(kind=wp), | intent(in), | dimension(3) | :: | v | Vector |
Result
Dot product of two tensors
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real(kind=wp), | intent(in), | dimension(3,3) | :: | U | First tensor |
|
real(kind=wp), | intent(in), | dimension(3,3) | :: | V | Second tensor |
Result
Cross product
Cross product of two vectors
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real(kind=wp), | intent(in), | dimension(3) | :: | u | First vector |
|
real(kind=wp), | intent(in), | dimension(3) | :: | v | Second vector |
Result
Cross product of 2D vectors
Cross product of two 2D vectors
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real(kind=wp), | intent(in), | dimension(2) | :: | u | First vector |
|
real(kind=wp), | intent(in), | dimension(2) | :: | v | Second vector |
Result z-component
Dyadic product
Dyadic (tensor) product of two vectors
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real(kind=wp), | intent(in), | dimension(3) | :: | u | First vector |
|
real(kind=wp), | intent(in), | dimension(3) | :: | v | Second vector |
Result
Double dot product
Double dot product of two tensors
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real(kind=wp), | intent(in), | dimension(3,3) | :: | U | Fisrt tensor |
|
real(kind=wp), | intent(in), | dimension(3,3) | :: | V | Second vector |
Result