This module contains some useful mathematical functions.
The following functions are provided:
The following types are provided:
Type | Visibility | Attributes | Name | Initial | |||
---|---|---|---|---|---|---|---|
real(kind=rkind), | public, | parameter | :: | pi | = | 3.14159265358979323846_rkind |
value of |
Create a new ramp function with given start, duration, y1 and y2
Create a new ramp function with given start, duration, y1 and y2
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real(kind=rkind), | intent(in) | :: | start | |||
real(kind=rkind), | intent(in) | :: | duration | |||
real(kind=rkind), | intent(in) | :: | y1 | |||
real(kind=rkind), | intent(in) | :: | y2 |
Abstract type for 1D functions
procedure(at), public, deferred :: at | evaluates the function at given x |
Ramp function linearly changes the value from y1 to y2.
Type | Visibility | Attributes | Name | Initial | |||
---|---|---|---|---|---|---|---|
real(kind=rkind), | public | :: | duration | ||||
real(kind=rkind), | public | :: | start | ||||
real(kind=rkind), | public | :: | y1 | ||||
real(kind=rkind), | public | :: | y2 |
Create a new ramp function with given start, duration, y1 and y2
private function new_ramp_function_t (start, duration, y1, y2) | Create a new ramp function with given start, duration, y1 and y2 |
procedure, public :: at => ramp_function_at |
Inverse cosine of x, result in degrees
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real(kind=rkind), | intent(in) | :: | x |
Inverse sine of x, result in degrees
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real(kind=rkind), | intent(in) | :: | x |
Inverse tangents of y/x (see atan2d), result in degrees
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real(kind=rkind), | intent(in) | :: | y | |||
real(kind=rkind), | intent(in) | :: | x |
Inverse tangents of x, result in degrees
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real(kind=rkind), | intent(in) | :: | x |
Cosine of x in degrees
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real(kind=rkind), | intent(in) | :: | x |
Cross product in R3
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real(kind=rkind), | intent(in) | :: | u(3) | |||
real(kind=rkind), | intent(in) | :: | v(3) |
Conversion from degrees to radians
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real(kind=rkind), | intent(in) | :: | deg |
Standard L2 norm of a vector
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real(kind=rkind), | intent(in) | :: | x(:) |
Standard L2 norm of a vector squared
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real(kind=rkind), | intent(in) | :: | x(:) |
Outer product
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real(kind=rkind), | intent(in) | :: | u(:) | |||
real(kind=rkind), | intent(in) | :: | v(:) |
Conversion from radians to degres
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real(kind=rkind), | intent(in) | :: | rad |
Sine of x in degrees
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real(kind=rkind), | intent(in) | :: | x |
Tangents of x in degrees
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real(kind=rkind), | intent(in) | :: | x |