V3FIT
|
Module is part of the LIBSTELL. This modules containes code to convert from different coordinate systems. More...
Functions/Subroutines | |
pure real(rprec) function, dimension(3), public | cart_to_cyl (cart) |
Convert a point from cartes cartesian coordinates to cylindical coordinates. More... | |
pure real(rprec) function, dimension(3), public | cyl_to_cart (cyl) |
Convert a point from cylindical coordinates to cartesian coordinates. More... | |
pure real(rprec) function, dimension(3), public | cyl_to_cart_vec (cyl, vec) |
Convert vector from cylindical coordinates to cartesian coordinates. More... | |
pure real(rprec) function, dimension(3) | cart_to_cyl_vec (cart, vec) |
Convert vector from cartesian coordinates to cylindical coordinates. More... | |
logical function, public | cood_utils_test () |
Coordinate utilities unit test function. More... | |
logical function, private | check (expected, received, testNum, name) |
Check a value. More... | |
Module is part of the LIBSTELL. This modules containes code to convert from different coordinate systems.
pure real (rprec) function, dimension(3), public coordinate_utilities::cart_to_cyl | ( | real (rprec), dimension(3), intent(in) | cart | ) |
Convert a point from cartes cartesian coordinates to cylindical coordinates.
r = Sqrt(x*x + y*y) phi = atan(y/x) z = z
[in] | cart | Point in cartesian coordinates. |
Definition at line 40 of file coordinate_utilities.f.
pure real (rprec) function, dimension(3) coordinate_utilities::cart_to_cyl_vec | ( | real (rprec), dimension(3), intent(in) | cart, |
real (rprec), dimension(3), intent(in) | vec | ||
) |
Convert vector from cartesian coordinates to cylindical coordinates.
[ v_r ] [ x/r y/r 0 ] [ v_x ] [ v_phi ] = [ -y/r x/r 0 ] * [ v_y ] [ v_z ] [ 0 0 1 ] [ v_z ]
Where r = Sqrt(x*x + y*y)
[in] | cart | Point in cartesian coordinates. |
[in] | vec | Point in cartesian coordinates. |
Definition at line 126 of file coordinate_utilities.f.
|
private |
Check a value.
Checks that the expected value matches the recieved. Otherwise report an error.
[in] | expected | The known value. |
[in] | received | The known test value. |
[in] | testNum | The number of the test. |
[in] | name | The name of the test. |
Definition at line 271 of file coordinate_utilities.f.
logical function, public coordinate_utilities::cood_utils_test |
Coordinate utilities unit test function.
This runs the associated unit tests and returns the result.
Definition at line 157 of file coordinate_utilities.f.
pure real (rprec) function, dimension(3), public coordinate_utilities::cyl_to_cart | ( | real (rprec), dimension(3), intent(in) | cyl | ) |
Convert a point from cylindical coordinates to cartesian coordinates.
x = r*cos(phi) y = r*sin(phi) z = z
[in] | cyl | Point in cylindical coordinates. |
Definition at line 67 of file coordinate_utilities.f.
pure real (rprec) function, dimension(3), public coordinate_utilities::cyl_to_cart_vec | ( | real (rprec), dimension(3), intent(in) | cyl, |
real (rprec), dimension(3), intent(in) | vec | ||
) |
Convert vector from cylindical coordinates to cartesian coordinates.
[ v_x ] [ cos[phi] -sin[phi] 0 ] [ v_r ] [ v_y ] = [ sin[phi] cos[phi] 0 ] * [ v_phi ] [ v_z ] [ 0 0 1 ] [ v_z ]
[in] | cyl | Point in cylindical coordinates. |
[in] | vec | Vector in cylindical coordinates. |
Definition at line 95 of file coordinate_utilities.f.