Cartesius Library
|
Implements points in different spaces and coordinate systems. More...
Data Types | |
interface | assignment(=) |
interface | index_of_eqv_action |
interface | index_of_eqv_action_frac |
interface | operator(*) |
interface | operator(.eqf.) |
interface | operator(.eqft.) |
interface | operator(.eqt.) |
interface | operator(==) |
type | point |
Contains the coordinates of a point relative to the local affine frame. More... | |
interface | point_array_to_list |
interface | point_list_to_array |
type | point_ptr |
type | pointarray |
Functions/Subroutines | |
subroutine | point_to_point (p1, p2) |
Assigns the fields of one point to another. More... | |
subroutine | tocartesian (this) |
Tranforms the coordinate system and coordinates to cartesian. More... | |
subroutine | tospherical (this) |
Tranforms the coordinate system and coordinates to cartesian. More... | |
subroutine | init_laboratory_frame (laboratory, system) |
Unified initializer for laboratory frame. Creates a laboratory frame with no displacement (r = [0,0,0]) and identity rotation (o = E3). Creates a new spaceTree and adds the new laboratory frame as its root. More... | |
subroutine | add_child_point (parent_point, id, system, r, o, result_point) |
Adds a point as a child to the given point. Initailzes all fields of the point. More... | |
type(point) function, pointer | getpointfromspacetree (tree, pointID) |
type(node) function, pointer | get_point_node (pPoint) |
Returns the node of the point in the spaceTree. More... | |
type(point) function, pointer | getparentpoint (pPoint) |
subroutine | normalize_point_frac (pnt) |
Returns the point with shift coordinates between 0 and 1. If the shift is close to 1, it is assumed to be equal to 0. More... | |
type(point) function | invert_point (pnt) |
Returns a point whose action on the original point produces the identity transformation. More... | |
type(point) function | apply_point (point_a, point_b) |
Returns the combined affine transform given by the composition A ○ B. More... | |
logical function | points_equal (point_a, point_b) |
Returns true if the affine transformations given by the two points are the same. More... | |
logical function | points_equal_translation (point_a, point_b) |
Returns true if the translational part of the two points is the same. More... | |
logical function | points_equal_wrapper (xpoint_a, xpoint_b) |
Wrapper for points_equal for calls with lists and trees. More... | |
logical function | points_equal_fractional (point_a, point_b) |
Returns true if the affine transformations given by the two points are the same, up to fractional coordinates. More... | |
logical function | points_equal_fractional_translation (point_a, point_b) |
Returns true if the translational part of the two points is the same, up to fractional coordinates. More... | |
logical function | points_equal_fractional_wrapper (xpoint_a, xpoint_b) |
Wrapper for points_equal_fractional for calls with lists and trees. More... | |
integer function | index_of_eqv_action_ptr (point_array, ref_action, orig_point) |
Returns the index of the element of point_array which sends orig_point to the same coordinates as ref_action. More... | |
integer function | index_of_eqv_action_type (point_array, ref_action, orig_point) |
Returns the index of the element of point_array which sends orig_point to the same coordinates as ref_action. More... | |
integer function | index_of_eqv_action_frac_ptr (point_array, ref_action, orig_point) |
Returns the index of the element of point_array which sends orig_point to the same coordinates as ref_action (up to translation) More... | |
integer function | index_of_eqv_action_frac_type (point_array, ref_action, orig_point) |
Returns the index of the element of point_array which sends orig_point to the same coordinates as ref_action (up to translation) More... | |
subroutine | reduce (somePoint) |
type(point) function | reducedaffinetransform_node (point_node) |
Returns the total affine transform from the given point's frame (contained in the given node) to the laboratory frame. More... | |
type(point) function | reducedaffinetransform (somePoint) |
Returns the total affine transform from the given point's frame to the laboratory frame. More... | |
type(point) function | localaffinetransform (somePoint) |
Returns the total affine transform from the laboratory frame to the given point's frame. More... | |
real function, dimension(3) | reducedcoords (somePoint) |
Returns the coordinates of the point in the laboratory frame without changing the spaceTree structure. More... | |
real function, dimension(3) | localcoords (somePoint, vec) |
Converts the coordinates of a point, given by vec, from the laboratory frame to the somePoint local frame. More... | |
real function, dimension(3, 3) | reducedtransformmatrix_node (point_node) |
real function, dimension(3, 3) | reducedtransformmatrix (somePoint) |
Returns the total transformation matrix from the local frame to the laboratory frame. More... | |
real function, dimension(3, 3) | localtransformmatrix (somePoint) |
Returns the total transformation matrix from the laboratory frame to the local frame. More... | |
real function, dimension(1:3) | reducedtransform (somePoint, vec) |
Converts the given vector coordinates from the somePoint local frame to the laboratory frame by applying all spaceTree coordinate transformations successively. More... | |
real function, dimension(3) | localtransform (somePoint, vec) |
Converts the given vector coordinates from the laboratory frame to the somePoint local frame by applying inverse spaceTree coordinate transformations successively. More... | |
subroutine | reducecoordinates (somePoint) |
subroutine | reducetothesame (point1, point2) |
subroutine | reducecoordinatestothesame (point1, point2) |
subroutine | reducethreepointstothesame (point1, point2, point3) |
subroutine | reducethreepointscoordstothesame (point1, point2, point3) |
real function | distance (point1, point2) |
Returns the distance between two points. More... | |
real function | distance_with_reducing (point1, point2) |
Returns the distance between the points, reducing them to the same spaceTree node. More... | |
real function | angle (point1, point2, point3) |
Returns the angle formed by points 123. More... | |
real function | angle_with_reducing (point1, point2, point3) |
Returns the angle formed by points 123, reducing them to the same spaceTree node. More... | |
subroutine | write_spacetree_node_to_gnuplot (tree, handle) |
subroutine | write_spacetree_to_gnuplot (tree, filename) |
subroutine | print_spacetree (somePoint) |
subroutine | print_point_node_new (pNode, arg) |
type(point) function, pointer | point_from_polymorphic (x) |
Converts a polymorpihc pointer to a point pointer if possible, else returns a null-pointer. More... | |
subroutine | point_list_to_array_alloc (point_list, point_array) |
subroutine | point_list_to_array_ptr_alloc (point_list, point_array) |
subroutine | point_list_to_array_type (point_list, point_array) |
subroutine | point_array_alloc_to_list (point_array, point_list) |
subroutine | point_array_ptr_alloc_to_list (point_array, point_list) |
subroutine | point_array_type_to_list (point_array, point_list) |
subroutine | deallocate_point (pValue) |
Deallocates the given point. Does not deallocate its spaceTree. More... | |
Variables | |
character(len=9), parameter, public | key_cartesian = 'cartesian' |
character(len=9), parameter, public | key_spherical = 'spherical' |
character(len=11), parameter, public | key_cylindrical = 'cylindrical' |
Implements points in different spaces and coordinate systems.
subroutine points::add_child_point | ( | class(point), intent(in) | parent_point, |
character(len = *), intent(in) | id, | ||
character(len = *), intent(in), optional | system, | ||
real, dimension(3), intent(in), optional | r, | ||
real, dimension(3,3), intent(in), optional | o, | ||
type(point), intent(out), optional, pointer | result_point | ||
) |
Adds a point as a child to the given point. Initailzes all fields of the point.
id | [in] Identifier of the new point. Normally should end with 'point'. |
system | [in, optional] Type of coordinate system of the new point. Defaults to cartesian. |
r | [in, optional] Coordinate shift relative to the parent. Defaults to zero. |
o | [in, optional] Transformation matrix applied to (possible) children of the new point. Defaults to identity. |
result_point | [out, optional] Pointer to the newly created point. |
real function points::angle | ( | type(point), intent(in) | point1, |
type(point), intent(in) | point2, | ||
type(point), intent(in) | point3 | ||
) |
Returns the angle formed by points 123.
real function points::angle_with_reducing | ( | type(point), intent(inout) | point1, |
type(point), intent(inout) | point2, | ||
type(point), intent(inout) | point3 | ||
) |
Returns the angle formed by points 123, reducing them to the same spaceTree node.
type(point) function points::apply_point | ( | type(point), intent(in) | point_a, |
type(point), intent(in) | point_b | ||
) |
Returns the combined affine transform given by the composition A ○ B.
subroutine points::deallocate_point | ( | class(*), intent(inout), pointer | pValue | ) |
Deallocates the given point. Does not deallocate its spaceTree.
real function points::distance | ( | type(point), intent(inout) | point1, |
type(point), intent(inout) | point2 | ||
) |
Returns the distance between two points.
real function points::distance_with_reducing | ( | type(point), intent(inout) | point1, |
type(point), intent(inout) | point2 | ||
) |
Returns the distance between the points, reducing them to the same spaceTree node.
Returns the node of the point in the spaceTree.
get_point_node
and make sure every point knows its node by construction. E.g. by always using add_child_point type(point) function, pointer points::getpointfromspacetree | ( | type(node), intent(inout) | tree, |
character(len=*), intent(in) | pointID | ||
) |
integer function points::index_of_eqv_action_frac_ptr | ( | type(point_ptr), dimension(:), intent(in) | point_array, |
type(point), intent(in) | ref_action, | ||
type(point), intent(in) | orig_point | ||
) |
Returns the index of the element of point_array which sends orig_point to the same coordinates as ref_action (up to translation)
integer function points::index_of_eqv_action_frac_type | ( | class(pointarray), intent(in) | point_array, |
type(point), intent(in) | ref_action, | ||
type(point), intent(in) | orig_point | ||
) |
Returns the index of the element of point_array which sends orig_point to the same coordinates as ref_action (up to translation)
integer function points::index_of_eqv_action_ptr | ( | type(point_ptr), dimension(:), intent(in) | point_array, |
type(point), intent(in) | ref_action, | ||
type(point), intent(in) | orig_point | ||
) |
Returns the index of the element of point_array which sends orig_point to the same coordinates as ref_action.
integer function points::index_of_eqv_action_type | ( | class(pointarray), intent(in) | point_array, |
type(point), intent(in) | ref_action, | ||
type(point), intent(in) | orig_point | ||
) |
Returns the index of the element of point_array which sends orig_point to the same coordinates as ref_action.
subroutine points::init_laboratory_frame | ( | type(point), intent(inout), target | laboratory, |
character(len=*), intent(in), optional | system | ||
) |
Unified initializer for laboratory frame. Creates a laboratory frame with no displacement (r = [0,0,0]) and identity rotation (o = E3). Creates a new spaceTree and adds the new laboratory frame as its root.
system | [in, optional] |
Returns a point whose action on the original point produces the identity transformation.
Returns the total affine transform from the laboratory frame to the given point's frame.
real function, dimension(3) points::localcoords | ( | type(point), intent(in) | somePoint, |
real, dimension(3), intent(in) | vec | ||
) |
Converts the coordinates of a point, given by vec, from the laboratory frame to the somePoint local frame.
real function, dimension(3) points::localtransform | ( | type(point), intent(in) | somePoint, |
real, dimension(3), intent(in) | vec | ||
) |
Converts the given vector coordinates from the laboratory frame to the somePoint local frame by applying inverse spaceTree coordinate transformations successively.
real function, dimension(3,3) points::localtransformmatrix | ( | type(point), intent(in) | somePoint | ) |
Returns the total transformation matrix from the laboratory frame to the local frame.
subroutine points::normalize_point_frac | ( | type(point), intent(inout) | pnt | ) |
Returns the point with shift coordinates between 0 and 1. If the shift is close to 1, it is assumed to be equal to 0.
subroutine points::point_array_alloc_to_list | ( | type(point), dimension(:), intent(in), allocatable | point_array, |
type(list), intent(out) | point_list | ||
) |
subroutine points::point_array_ptr_alloc_to_list | ( | type(point_ptr), dimension(:), intent(in), allocatable | point_array, |
type(list), intent(out) | point_list | ||
) |
subroutine points::point_array_type_to_list | ( | type(pointarray), intent(in) | point_array, |
type(list), intent(out) | point_list | ||
) |
type(point) function, pointer points::point_from_polymorphic | ( | class(*), intent(in), pointer | x | ) |
Converts a polymorpihc pointer to a point pointer if possible, else returns a null-pointer.
subroutine points::point_list_to_array_alloc | ( | type(list), intent(in) | point_list, |
type(point), dimension(:), intent(out), allocatable | point_array | ||
) |
subroutine points::point_list_to_array_ptr_alloc | ( | type(list), intent(in) | point_list, |
type(point_ptr), dimension(:), intent(out), allocatable | point_array | ||
) |
subroutine points::point_list_to_array_type | ( | type(list), intent(in) | point_list, |
type(pointarray), intent(out) | point_array | ||
) |
Assigns the fields of one point to another.
logical function points::points_equal | ( | type(point), intent(in) | point_a, |
type(point), intent(in) | point_b | ||
) |
Returns true if the affine transformations given by the two points are the same.
logical function points::points_equal_fractional | ( | type(point), intent(in) | point_a, |
type(point), intent(in) | point_b | ||
) |
Returns true if the affine transformations given by the two points are the same, up to fractional coordinates.
logical function points::points_equal_fractional_translation | ( | type(point), intent(in) | point_a, |
type(point), intent(in) | point_b | ||
) |
Returns true if the translational part of the two points is the same, up to fractional coordinates.
logical function points::points_equal_fractional_wrapper | ( | class(*), intent(in) | xpoint_a, |
class(*), intent(in) | xpoint_b | ||
) |
Wrapper for points_equal_fractional
for calls with lists and trees.
logical function points::points_equal_translation | ( | type(point), intent(in) | point_a, |
type(point), intent(in) | point_b | ||
) |
Returns true if the translational part of the two points is the same.
logical function points::points_equal_wrapper | ( | class(*), intent(in) | xpoint_a, |
class(*), intent(in) | xpoint_b | ||
) |
Wrapper for points_equal
for calls with lists and trees.
subroutine points::print_point_node_new | ( | type(node), intent(inout) | pNode, |
class(*), intent(inout), pointer | arg | ||
) |
subroutine points::print_spacetree | ( | type(point), intent(inout) | somePoint | ) |
subroutine points::reduce | ( | type(point), intent(inout) | somePoint | ) |
subroutine points::reducecoordinates | ( | type(point), intent(inout) | somePoint | ) |
subroutine points::reducecoordinatestothesame | ( | type(point), intent(inout) | point1, |
type(point), intent(inout) | point2 | ||
) |
@see
reduceCoordinates
Returns the total affine transform from the given point's frame to the laboratory frame.
Returns the total affine transform from the given point's frame (contained in the given node) to the laboratory frame.
real function, dimension(3) points::reducedcoords | ( | type(point), intent(in) | somePoint | ) |
Returns the coordinates of the point in the laboratory frame without changing the spaceTree structure.
real function, dimension(1:3) points::reducedtransform | ( | type(point), intent(in) | somePoint, |
real, dimension(1:3), intent(in), optional | vec | ||
) |
Converts the given vector coordinates from the somePoint local frame to the laboratory frame by applying all spaceTree coordinate transformations successively.
real function, dimension(3,3) points::reducedtransformmatrix | ( | type(point), intent(in) | somePoint | ) |
Returns the total transformation matrix from the local frame to the laboratory frame.
real function, dimension(3,3) points::reducedtransformmatrix_node | ( | type(node), intent(in) | point_node | ) |
subroutine points::reducethreepointscoordstothesame | ( | type(point), intent(inout) | point1, |
type(point), intent(inout) | point2, | ||
type(point), intent(inout) | point3 | ||
) |
@see
reduceCoordinates
subroutine points::reducethreepointstothesame | ( | type(point), intent(inout) | point1, |
type(point), intent(inout) | point2, | ||
type(point), intent(inout) | point3 | ||
) |
subroutine points::reducetothesame | ( | type(point), intent(inout) | point1, |
type(point), intent(inout) | point2 | ||
) |
subroutine points::tocartesian | ( | class(point), intent(inout) | this | ) |
Tranforms the coordinate system and coordinates to cartesian.
subroutine points::tospherical | ( | type(point), intent(inout) | this | ) |
Tranforms the coordinate system and coordinates to cartesian.
subroutine points::write_spacetree_node_to_gnuplot | ( | type(node), intent(inout) | tree, |
class(*), intent(inout), pointer | handle | ||
) |
subroutine points::write_spacetree_to_gnuplot | ( | type(node), intent(inout) | tree, |
character(len=*), intent(in), optional | filename | ||
) |
character(len=9), parameter, public points::key_cartesian = 'cartesian' |
character(len=11), parameter, public points::key_cylindrical = 'cylindrical' |
character(len=9), parameter, public points::key_spherical = 'spherical' |