Module implementing useful routines for unit testing
Check equality between single or double precision numbers
Checks whether (a-b) / max(a,eps) within tolerance
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| real(kind=SP), | intent(in) | :: | a |
values to be compared |
||
| real(kind=SP), | intent(in) | :: | b |
values to be compared |
||
| real(kind=SP) | :: | rtol |
relative tolerance |
|||
| real(kind=SP) | :: | atol |
minumum value for normalisation (~absolute tolerance for rtol=0) |
Checks whether (a-b) / max(a,eps) within tolerance
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| real(kind=DP), | intent(in) | :: | a |
values to be compared |
||
| real(kind=DP), | intent(in) | :: | b |
values to be compared |
||
| real(kind=DP) | :: | rtol |
relative tolerance |
|||
| real(kind=DP) | :: | atol |
minumum value for normalisation (~absolute tolerance for rtol=0) |
Checks whether (a-b) / max(a,eps) within tolerance
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| real(kind=SP), | intent(in) | :: | a |
values to be compared |
||
| real(kind=SP), | intent(in) | :: | b |
values to be compared |
||
| real(kind=SP) | :: | rtol |
relative tolerance |
|||
| real(kind=SP) | :: | atol |
minumum value for normalisation (~absolute tolerance for rtol=0) |
Checks whether (a-b) / max(a,eps) within tolerance
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| real(kind=DP), | intent(in) | :: | a |
values to be compared |
||
| real(kind=DP), | intent(in) | :: | b |
values to be compared |
||
| real(kind=DP) | :: | rtol |
relative tolerance |
|||
| real(kind=DP) | :: | atol |
minumum value for normalisation (~absolute tolerance for rtol=0) |
Excludes third quadrant in field line tracing for circular equilibrium
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| real(kind=FP), | intent(in) | :: | x | |||
| real(kind=FP), | intent(in) | :: | y | |||
| real(kind=FP), | intent(in) | :: | phi |
Excludes third quadrant in field line tracing for cerfons equilibrium
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| real(kind=FP), | intent(in) | :: | x | |||
| real(kind=FP), | intent(in) | :: | y | |||
| real(kind=FP), | intent(in) | :: | phi |
Calculates the digit sum of the csr matrix mat
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| type(csrmat_t), | intent(in) | :: | mat |
csr matrix |
||
| integer, | intent(out) | :: | isum |
sum over i index of matrix |
||
| integer, | intent(out) | :: | jsum |
sum over j index of matrix |
||
| real(kind=FP), | intent(out) | :: | valsum |
sum over values of matrix |