Stellarator-Tools
|
Utility to check fields written from mgrid. More...
Functions/Subroutines | |
program | check_fields |
Checks mgrid fields against analytic values. | |
subroutine | check_int (ncid, name, value, error) |
check an expected int value. More... | |
subroutine | check_real (ncid, name, value, tolarance, error) |
check an expected real value. More... | |
subroutine | check_real_2d (ncid, name, value, tolarance, i, j, error) |
check an expected real value. More... | |
subroutine | check_real_2d_all (ncid, name, value, tolarance, error) |
check an expected real value. More... | |
real(dp) function | bz_axis (z) |
Compute the field at a Z away from the center. More... | |
Utility to check fields written from mgrid.
real (dp) function bz_axis | ( | real (dp), intent(in) | z | ) |
Compute the field at a Z away from the center.
The magnetic field at a point R=0, Z is given by
B_z = mu0/2 R^2*I/(z^2 + R^2)^3/2
[in] | z | NetCDF file reference. @erturns The B_z at point z. |
subroutine check_int | ( | integer, intent(in) | ncid, |
character (len=*), intent(in) | name, | ||
integer, intent(in) | value, | ||
integer, intent(inout) | error | ||
) |
check an expected int value.
Checks an integer value for the expected result.
[in] | ncid | NetCDF file reference. |
[in] | name | Name of the |
[in] | value | Expected value. |
[in,out] | error | Current error condition. |
subroutine check_real | ( | integer, intent(in) | ncid, |
character (len=*), intent(in) | name, | ||
real (dp), intent(in) | value, | ||
real (dp), intent(in) | tolarance, | ||
integer, intent(inout) | error | ||
) |
check an expected real value.
Checks an real value for the expected result with in the tolarance.
[in] | ncid | NetCDF file reference. |
[in] | name | Name of the |
[in] | value | Expected value. |
[in] | tolarance | Expected value. |
[in,out] | error | Current error condition. |
subroutine check_real_2d | ( | integer, intent(in) | ncid, |
character (len=*), intent(in) | name, | ||
real (dp), intent(in) | value, | ||
real (dp), intent(in) | tolarance, | ||
integer, intent(in) | i, | ||
integer, intent(in) | j, | ||
integer, intent(inout) | error | ||
) |
check an expected real value.
Checks an real value for the expected result with in the tolarance.
[in] | ncid | NetCDF file reference. |
[in] | name | Name of the |
[in] | value | Expected value. |
[in] | tolarance | Expected value. |
[in] | i | R index value. |
[in] | j | Z index value. |
[in,out] | error | Current error condition. |
subroutine check_real_2d_all | ( | integer, intent(in) | ncid, |
character (len=*), intent(in) | name, | ||
real (dp), intent(in) | value, | ||
real (dp), intent(in) | tolarance, | ||
integer, intent(inout) | error | ||
) |
check an expected real value.
Checks an real value for the expected result with in the tolarance at all index points.
[in] | ncid | NetCDF file reference. |
[in] | name | Name of the |
[in] | value | Expected value. |
[in] | tolarance | Expected value. |
[in] | i | R index value. |
[in] | j | Z index value. |
[in,out] | error | Current error condition. |