OpenCMISS-Iron Internal API Documentation
coordinate_routines Module Reference

This module contains all coordinate transformation and support routines. More...

Data Types

interface  coordinate_convert_from_rc
 COORDINATE_CONVERT_FROM_RC performs a coordinate transformation from a rectangular cartesian coordinate at the point with coordinate Z(:) to the returned point with coordinate X(:) in the coordinate system identified by COORDINATE_SYSTEM. More...
 
interface  coordinate_convert_to_rc
 COORDINATE_CONVERT_TO_RC performs a coordinate transformation from a coordinate system identified by COORDINATE_SYSTEM at the point X(:) to the returned point Z(:) in rectangular cartesian coordinates. More...
 
interface  coordinate_delta_calculate
 Calculates the difference (or delta) between two points in a coordinate system. Discontinuities for polar coordinate systems are accounted for. More...
 
interface  coordinate_derivative_convert_to_rc
 
type  coordinate_systems_type
 
interface  d2zx
 
interface  dxz
 Calculates DX(:)/DZ(I) at X, where Z(I) are rectangular cartesian and X(:) are curvilinear coordinates defined by COORDINATE_SYSTEM. More...
 
interface  dzx
 

Functions/Subroutines

real(dp) function, dimension(size(z, 1)) coordinate_convert_from_rc_dp (COORDINATE_SYSTEM, Z, ERR, ERROR)
 Performs a coordinate transformation from a rectangular cartesian coordinate at the point with coordinate Z(:) to the returned point with coordinate X(:) in the coordinate system identified by COORDINATE_SYSTEM for double precision coordinates. More...
 
real(sp) function, dimension(size(z, 1)) coordinate_convert_from_rc_sp (COORDINATE_SYSTEM, Z, ERR, ERROR)
 COORDINATE_CONVERT_FROM_RC_SP performs a coordinate transformation from a rectangular cartesian coordinate at the point with coordinate Z(:) to the returned point with coordinate X(:) in the coordinate system identified by COORDINATE_SYSTEM for single precision coordinates. More...
 
real(dp) function, dimension(size(x, 1)) coordinate_convert_to_rc_dp (COORDINATE_SYSTEM, X, ERR, ERROR)
 COORDINATE_CONVERT_TO_RC_DP performs a coordinate transformation from a coordinate system identified by COORDINATE_SYSTEM at the point X(:) to the returned point Z(:) in rectangular cartesian coordinates for double precision coordinates. More...
 
real(sp) function, dimension(size(x, 1)) coordinate_convert_to_rc_sp (COORDINATE_SYSTEM, X, ERR, ERROR)
 COORDINATE_CONVERT_TO_RC_SP performs a coordinate transformation from a coordinate system identified by COORDINATE_SYSTEM at the point X(:) to the returned point Z(:) in rectangular cartesian coordinates for single precision coordinates. More...
 
real(dp) function, dimension(size(x, 1)) coordinate_delta_calculate_dp (COORDINATE_SYSTEM, X, Y, ERR, ERROR)
 Calculates the difference (or detlta) between the point X and the point Y i.e., Y-X, in the given coordinate system. 0->2Pi discontinuities with polar coordinates are accounted for. More...
 
subroutine, public coordinate_metrics_calculate (COORDINATE_SYSTEM, JACOBIAN_TYPE, METRICS, ERR, ERROR,)
 Calculates the covariant metric tensor GL(i,j), the contravariant metric tensor GU(i,J), the Jacobian and derivative of the interpolated coordinate system (XI_i) with respect to the given coordinate (X_j) system (DXI_DX) at a point (X - normally a Gauss point). Old cmiss name: XGMG. More...
 
subroutine coordinate_system_normal_calculate (COORDINATE_SYSTEM, REVERSE, X, N, ERR, ERROR,)
 Calculates the normal vector, N, at the point X. IF REVERSE is true the reversed normal is returned. Old-cmiss-name: NORMAL. More...
 
subroutine, public coordinate_system_dimension_get (COORDINATE_SYSTEM, NUMBER_OF_DIMENSIONS, ERR, ERROR,)
 Gets the coordinate system dimension. More...
 
subroutine coordinate_system_finalise (COORDINATE_SYSTEM, ERR, ERROR,)
 Finalises a coordinate system and deallocates all memory. More...
 
subroutine, public coordinate_system_focus_get (COORDINATE_SYSTEM, FOCUS, ERR, ERROR,)
 Returns the coordinate system focus. More...
 
subroutine, public coordinates_radialinterpolationtypeget (coordinateSystem, radialInterpolationType, err, error,)
 Gets the coordinate system radial interpolation type. More...
 
subroutine, public coordinate_system_type_get (COORDINATE_SYSTEM, SYSTEM_TYPE, ERR, ERROR,)
 Gets the coordinate system type. More...
 
subroutine, public coordinate_system_dimension_set (COORDINATE_SYSTEM, DIMENSION, ERR, ERROR,)
 Sets/changes the dimension of the coordinate system. More...
 
subroutine, public coordinate_system_focus_set (COORDINATE_SYSTEM, FOCUS, ERR, ERROR,)
 Sets/changes the focus of a coordinate system. More...
 
subroutine, public coordinates_radialinterpolationtypeset (coordinateSystem, radialInterpolationType, err, error,)
 Sets/changes the radial interpolation type of a coordinate system. More...
 
subroutine, public coordinate_system_type_set (COORDINATE_SYSTEM, TYPE, ERR, ERROR,)
 Sets/changes the type of a coordinate system. More...
 
subroutine, public coordinate_system_origin_get (COORDINATE_SYSTEM, ORIGIN, ERR, ERROR,)
 Returns the origin of a coordinate system. More...
 
subroutine, public coordinate_system_origin_set (COORDINATE_SYSTEM, ORIGIN, ERR, ERROR,)
 Sets/changes the origin of a coordinate system. More...
 
subroutine, public coordinate_system_orientation_get (COORDINATE_SYSTEM, ORIENTATION, ERR, ERROR,)
 Returns the orientation of a coordinate system. More...
 
subroutine, public coordinate_system_orientation_set (COORDINATE_SYSTEM, ORIENTATION, ERR, ERROR,)
 Sets/changes the orientation of a coordinate system. More...
 
subroutine, public coordinate_system_create_start (USER_NUMBER, COORDINATE_SYSTEM, ERR, ERROR,)
 Starts the creation of and initialises a new coordinate system. More...
 
subroutine, public coordinate_system_create_finish (COORDINATE_SYSTEM, ERR, ERROR,)
 Finishes the creation of a new coordinate system. More...
 
subroutine, public coordinate_system_destroy (COORDINATE_SYSTEM, ERR, ERROR,)
 Destroys a coordinate system. More...
 
real(dp) function, dimension(size(x, 1)) dxz_dp (COORDINATE_SYSTEM, I, X, ERR, ERROR)
 Calculates DX(:)/DZ(I) at X, where Z(I) are rectangular cartesian and X(:) are curvilinear coordinates defined by COORDINATE_SYSTEM for double precision coordinates. More...
 
real(dp) function, dimension(size(x, 1)) d2zx_dp (COORDINATE_SYSTEM, I, J, X, ERR, ERROR)
 
real(dp) function, dimension(size(x, 1)) dzx_dp (COORDINATE_SYSTEM, I, X, ERR, ERROR)
 
subroutine coordinate_derivative_convert_to_rc_dp (COORDINATE_SYSTEM, PART_DERIV_TYPE, X, Z, ERR, ERROR,)
 
subroutine coordinate_derivative_convert_to_rc_sp (COORDINATE_SYSTEM, PART_DERIV_TYPE, X, Z, ERR, ERROR,)
 
subroutine, public coordinate_derivative_norm (COORDINATE_SYSTEM, PART_DERIV_INDEX, INTERPOLATED_POINT, DERIV_NORM, ERR, ERROR,)
 Calculates the norm of a derivative in a coordinate system identified by COORDINATE_SYSTEM at the given interpolated point and returns the value in NORM for single precision coordinates. PART_DERIV_INDEX is used to select the appropriate partial derivative (i.e., wrt S1, S2 or S3) to normalise. More...
 
subroutine, public coordinate_interpolation_adjust (COORDINATE_SYSTEM, PARTIAL_DERIVATIVE_INDEX, VALUE, ERR, ERROR,)
 Adjusts the interpolation for non-rectangular cartesian coordinate systems. More...
 
subroutine, public coordinate_interpolation_parameters_adjust (COORDINATE_SYSTEM, INTERPOLATION_PARAMETERS, ERR, ERROR,)
 Adjusts the interpolation parameters for non-rectangular cartesian coordinate systems. More...
 
subroutine, public coordinates_materialsystemcalculate (geometricInterpPointMetrics, fibreInterpPoint, dNudX, dXdNu, dNudXi, dXidNu, err, error,)
 Calculates the tensor to get from material coordinate system, nu, to local coordinate system, xi. More...
 
subroutine coordinates_materialsystemcalculatedxdnu2d (geometricInterpPointMetrics, angle, dXdNu, err, error,)
 Calculates transformation between spatial CS and rotated reference orthogonal material CS in 2D space. More...
 
subroutine coordinates_materialsystemcalculatedxdnu3d (geometricInterpPointMetrics, angle, dXdNu, err, error,)
 Calculates transformation between spatial CS and rotated reference orthogonal material CS in 3D space. More...
 
subroutine, public coordinate_system_user_number_find (USER_NUMBER, COORDINATE_SYSTEM, ERR, ERROR,)
 Returns a pointer to the coordinate system identified by USER_NUMBER. If a coordinate system with that number is not found then COORDINATE_SYSTEM is set to NULL. More...
 
subroutine, public coordinate_systems_finalise (ERR, ERROR,)
 Finalises the coordinate systems and destroys all coordinate systems. More...
 
subroutine, public coordinate_systems_initialise (ERR, ERROR,)
 Initialises the coordinate systems and creates the world coordinate system. More...
 

Variables

integer(intg), parameter, public coordinate_rectangular_cartesian_type =1
 Rectangular Cartesian coordinate system type. More...
 
integer(intg), parameter, public coordinate_cylindrical_polar_type =2
 Cylindrical polar coordinate system type. More...
 
integer(intg), parameter, public coordinate_spherical_polar_type =3
 Spherical polar coordinate system type. More...
 
integer(intg), parameter, public coordinate_prolate_spheroidal_type =4
 Prolate spheroidal coordinate system type. More...
 
integer(intg), parameter, public coordinate_oblate_spheroidal_type =5
 Oblate spheroidal coordinate system type. More...
 
integer(intg), parameter, public coordinate_no_radial_interpolation_type =0
 No radial interpolation. More...
 
integer(intg), parameter, public coordinate_radial_interpolation_type =1
 r radial interpolation More...
 
integer(intg), parameter, public coordinate_radial_squared_interpolation_type =2
 r^2 radial interpolation More...
 
integer(intg), parameter, public coordinate_radial_cubed_interpolation_type =3
 r^3 radial interpolation More...
 
integer(intg), parameter, public coordinate_jacobian_no_type =0
 No Jacobian. More...
 
integer(intg), parameter, public coordinate_jacobian_line_type =1
 Line type Jacobian. More...
 
integer(intg), parameter, public coordinate_jacobian_area_type =2
 Area type Jacobian. More...
 
integer(intg), parameter, public coordinate_jacobian_volume_type =3
 Volume type Jacobian. More...
 
character(len=21), dimension(5), public coordinate_system_type_string = (/ "Rectangular Cartesian", "Cylindrical Polar ", "Spherical Polar ", "Prolate Spheroidal ", "Oblate Spheroidal " /)
 
type(coordinate_systems_typecoordinate_systems
 

Detailed Description

This module contains all coordinate transformation and support routines.

Function/Subroutine Documentation

real(dp) function, dimension(size(z,1)) coordinate_routines::coordinate_convert_from_rc_dp ( type(coordinate_system_type), intent(in)  COORDINATE_SYSTEM,
real(dp), dimension(:), intent(in)  Z,
integer(intg), intent(out)  ERR,
type(varying_string), intent(out)  ERROR 
)
private

Performs a coordinate transformation from a rectangular cartesian coordinate at the point with coordinate Z(:) to the returned point with coordinate X(:) in the coordinate system identified by COORDINATE_SYSTEM for double precision coordinates.

Parameters
[in]coordinate_systemThe coordinate system to perform the conversion on
[in]zThe rectangular cartesian coordiantes to convert
[out]errThe error code
[out]errorThe error string

Definition at line 206 of file coordinate_routines.f90.

References coordinate_cylindrical_polar_type, coordinate_oblate_spheroidal_type, coordinate_prolate_spheroidal_type, coordinate_rectangular_cartesian_type, coordinate_spherical_polar_type, base_routines::enters(), base_routines::exits(), constants::pi, and constants::zero_tolerance.

real(sp) function, dimension(size(z,1)) coordinate_routines::coordinate_convert_from_rc_sp ( type(coordinate_system_type), intent(in)  COORDINATE_SYSTEM,
real(sp), dimension(:), intent(in)  Z,
integer(intg), intent(out)  ERR,
type(varying_string), intent(out)  ERROR 
)
private

COORDINATE_CONVERT_FROM_RC_SP performs a coordinate transformation from a rectangular cartesian coordinate at the point with coordinate Z(:) to the returned point with coordinate X(:) in the coordinate system identified by COORDINATE_SYSTEM for single precision coordinates.

Parameters
[in]coordinate_systemThe coordinate system to convert from RC to
[in]zThe coordinate to convert from rectangular cartesian
[out]errThe error code
[out]errorThe error string

Definition at line 325 of file coordinate_routines.f90.

References coordinate_cylindrical_polar_type, coordinate_oblate_spheroidal_type, coordinate_prolate_spheroidal_type, coordinate_rectangular_cartesian_type, coordinate_spherical_polar_type, base_routines::enters(), base_routines::exits(), and constants::zero_tolerance_sp.

real(dp) function, dimension(size(x,1)) coordinate_routines::coordinate_convert_to_rc_dp ( type(coordinate_system_type), intent(in)  COORDINATE_SYSTEM,
real(dp), dimension(:), intent(in)  X,
integer(intg), intent(out)  ERR,
type(varying_string), intent(out)  ERROR 
)
private

COORDINATE_CONVERT_TO_RC_DP performs a coordinate transformation from a coordinate system identified by COORDINATE_SYSTEM at the point X(:) to the returned point Z(:) in rectangular cartesian coordinates for double precision coordinates.

Parameters
[in]coordinate_systemThe coordinate system to convert to rectangular cartesian
[in]xThe coordiante to convert
[out]errThe error coode
[out]errorThe error string

Definition at line 445 of file coordinate_routines.f90.

References coordinate_cylindrical_polar_type, coordinate_oblate_spheroidal_type, coordinate_prolate_spheroidal_type, coordinate_rectangular_cartesian_type, coordinate_spherical_polar_type, base_routines::enters(), and base_routines::exits().

real(sp) function, dimension(size(x,1)) coordinate_routines::coordinate_convert_to_rc_sp ( type(coordinate_system_type), intent(in)  COORDINATE_SYSTEM,
real(sp), dimension(:), intent(in)  X,
integer(intg), intent(out)  ERR,
type(varying_string), intent(out)  ERROR 
)
private

COORDINATE_CONVERT_TO_RC_SP performs a coordinate transformation from a coordinate system identified by COORDINATE_SYSTEM at the point X(:) to the returned point Z(:) in rectangular cartesian coordinates for single precision coordinates.

Parameters
[in]coordinate_systemThe coordinate system to convert to rectangular cartesian
[in]xThe coordinate to convert
[out]errThe error code
[out]errorThe error string

Definition at line 522 of file coordinate_routines.f90.

References coordinate_cylindrical_polar_type, coordinate_oblate_spheroidal_type, coordinate_prolate_spheroidal_type, coordinate_rectangular_cartesian_type, coordinate_spherical_polar_type, base_routines::enters(), and base_routines::exits().

real(dp) function, dimension(size(x,1)) coordinate_routines::coordinate_delta_calculate_dp ( type(coordinate_system_type), intent(in)  COORDINATE_SYSTEM,
real(dp), dimension(:), intent(in)  X,
real(dp), dimension(:), intent(in)  Y,
integer(intg), intent(out)  ERR,
type(varying_string), intent(out)  ERROR 
)
private

Calculates the difference (or detlta) between the point X and the point Y i.e., Y-X, in the given coordinate system. 0->2Pi discontinuities with polar coordinates are accounted for.

Parameters
[in]coordinate_systemThe coordinate system to calculate the delta for
[in]xThe first coordinate
[in]yThe second coordinate
[out]errThe error code
[out]errorThe error string

Definition at line 598 of file coordinate_routines.f90.

References coordinate_cylindrical_polar_type, coordinate_oblate_spheroidal_type, coordinate_prolate_spheroidal_type, coordinate_rectangular_cartesian_type, coordinate_spherical_polar_type, base_routines::enters(), and base_routines::exits().

subroutine coordinate_routines::coordinate_derivative_convert_to_rc_dp ( type(coordinate_system_type), intent(in)  COORDINATE_SYSTEM,
integer(intg), intent(in)  PART_DERIV_TYPE,
real(dp), dimension(:,:), intent(in)  X,
real(dp), dimension(:), intent(out)  Z,
integer(intg), intent(out)  ERR,
type(varying_string), intent(out)  ERROR 
)
private
subroutine coordinate_routines::coordinate_derivative_convert_to_rc_sp ( type(coordinate_system_type), intent(in)  COORDINATE_SYSTEM,
integer(intg), intent(in)  PART_DERIV_TYPE,
real(sp), dimension(:,:), intent(in)  X,
real(sp), dimension(:), intent(out)  Z,
integer(intg), intent(out)  ERR,
type(varying_string), intent(out)  ERROR 
)
private
subroutine, public coordinate_routines::coordinate_derivative_norm ( type(coordinate_system_type), pointer  COORDINATE_SYSTEM,
integer(intg), intent(in)  PART_DERIV_INDEX,
type(field_interpolated_point_type), pointer  INTERPOLATED_POINT,
real(dp), intent(out)  DERIV_NORM,
integer(intg), intent(out)  ERR,
type(varying_string), intent(out)  ERROR 
)

Calculates the norm of a derivative in a coordinate system identified by COORDINATE_SYSTEM at the given interpolated point and returns the value in NORM for single precision coordinates. PART_DERIV_INDEX is used to select the appropriate partial derivative (i.e., wrt S1, S2 or S3) to normalise.

Parameters
coordinate_systemA pointer to the coordinate system to calculate the derivative norm for
[in]part_deriv_indexThe partial derivative index to select the direction to normalise
interpolated_pointA pointer to the interpolated point
[out]deriv_normOn exit, the derivative norm of the coordinate
[out]errThe error code
[out]errorThe error string

Definition at line 3607 of file coordinate_routines.f90.

References coordinate_cylindrical_polar_type, coordinate_oblate_spheroidal_type, coordinate_prolate_spheroidal_type, coordinate_rectangular_cartesian_type, coordinate_spherical_polar_type, base_routines::enters(), base_routines::exits(), constants::first_part_deriv, constants::part_deriv_s1, constants::part_deriv_s2, and constants::part_deriv_s3.

subroutine, public coordinate_routines::coordinate_interpolation_adjust ( type(coordinate_system_type), pointer  COORDINATE_SYSTEM,
integer(intg), intent(in)  PARTIAL_DERIVATIVE_INDEX,
real(dp), intent(inout)  VALUE,
integer(intg), intent(out)  ERR,
type(varying_string), intent(out)  ERROR 
)

Adjusts the interpolation for non-rectangular cartesian coordinate systems.

Parameters
coordinate_systemA pointer to the coordinate system to adjust
[in]partial_derivative_indexThe partial derivative index to adjust
[in,out]valueOn entry, the coordinate value to adjust. On exit, the adjusted value.
[out]errThe error code
[out]errorThe error string

Definition at line 3699 of file coordinate_routines.f90.

References coordinate_cylindrical_polar_type, coordinate_oblate_spheroidal_type, coordinate_prolate_spheroidal_type, coordinate_radial_cubed_interpolation_type, coordinate_radial_interpolation_type, coordinate_radial_squared_interpolation_type, coordinate_rectangular_cartesian_type, coordinate_spherical_polar_type, base_routines::enters(), base_routines::exits(), and constants::no_part_deriv.

subroutine, public coordinate_routines::coordinate_interpolation_parameters_adjust ( type(coordinate_system_type), pointer  COORDINATE_SYSTEM,
type(field_interpolation_parameters_type), pointer  INTERPOLATION_PARAMETERS,
integer(intg), intent(out)  ERR,
type(varying_string), intent(out)  ERROR 
)

Adjusts the interpolation parameters for non-rectangular cartesian coordinate systems.

Parameters
coordinate_systemA pointer to the coordinate system to adjust
interpolation_parametersA pointer to the interpolation parameters to adjust
[out]errThe error code
[out]errorThe error string

Definition at line 3807 of file coordinate_routines.f90.

References coordinate_cylindrical_polar_type, coordinate_oblate_spheroidal_type, coordinate_prolate_spheroidal_type, coordinate_radial_cubed_interpolation_type, coordinate_radial_interpolation_type, coordinate_radial_squared_interpolation_type, coordinate_rectangular_cartesian_type, coordinate_spherical_polar_type, base_routines::enters(), and base_routines::exits().

subroutine, public coordinate_routines::coordinate_metrics_calculate ( type(coordinate_system_type), pointer  COORDINATE_SYSTEM,
integer(intg), intent(in)  JACOBIAN_TYPE,
type(field_interpolated_point_metrics_type), pointer  METRICS,
integer(intg), intent(out)  ERR,
type(varying_string), intent(out)  ERROR 
)

Calculates the covariant metric tensor GL(i,j), the contravariant metric tensor GU(i,J), the Jacobian and derivative of the interpolated coordinate system (XI_i) with respect to the given coordinate (X_j) system (DXI_DX) at a point (X - normally a Gauss point). Old cmiss name: XGMG.

Parameters
coordinate_systemA pointer to the coordinate system to calculate the metrics for
[in]jacobian_typeThe type of Jacobian to calculate
See also
COORDINATE_ROUTINES_JacobianTypes,COORDINATE_ROUTINES
Parameters
metricsA pointer to the metrics to calculate
[out]errThe error code
[out]errorThe error string

Definition at line 648 of file coordinate_routines.f90.

References coordinate_cylindrical_polar_type, coordinate_jacobian_area_type, coordinate_jacobian_line_type, coordinate_jacobian_no_type, coordinate_jacobian_volume_type, coordinate_oblate_spheroidal_type, coordinate_prolate_spheroidal_type, coordinate_rectangular_cartesian_type, coordinate_spherical_polar_type, coordinate_system_type_string, base_routines::diagnostic_output_type, base_routines::diagnostics1, base_routines::enters(), base_routines::exits(), constants::first_part_deriv, constants::partial_derivative_first_derivative_map, constants::partial_derivative_second_derivative_map, input_output::write_string_matrix_name_and_indices, and constants::zero_tolerance.

subroutine, public coordinate_routines::coordinate_system_create_finish ( type(coordinate_system_type), pointer  COORDINATE_SYSTEM,
integer(intg), intent(out)  ERR,
type(varying_string), intent(out)  ERROR 
)

Finishes the creation of a new coordinate system.

Parameters
coordinate_systemA pointer to the coordinate system to finish
[out]errThe error code
[out]errorThe error string

Definition at line 1810 of file coordinate_routines.f90.

References coordinate_system_type_string, coordinate_systems, base_routines::diagnostic_output_type, base_routines::diagnostics1, base_routines::enters(), and base_routines::exits().

subroutine, public coordinate_routines::coordinate_system_create_start ( integer(intg), intent(in)  USER_NUMBER,
type(coordinate_system_type), pointer  COORDINATE_SYSTEM,
integer(intg), intent(out)  ERR,
type(varying_string), intent(out)  ERROR 
)

Starts the creation of and initialises a new coordinate system.

See also
OPENCMISS::CMISSCoordinateSystemCreateStart The default values of the COORDINATE_SYSTEM's attributes are:
  • TYPE: 1 (COORDINATE_RECTANGULAR_CARTESIAN_TYPE)
  • RADIAL_INTERPOLATION_TYPE: 0 (COORDINATE_NO_RADIAL_INTERPOLATION_TYPE)
  • Dimensions: 3
  • Focus: 1.0
  • Origin: (0.0,0.0,0.0)
  • Oritention: ((1.0,0.0,0.0),(0.0,1.0,0.0),(0.0,0.0,1.0))
Parameters
[in]user_numberThe user number for the created coordinate system
coordinate_systemOn exit, a pointer to the created coordinate system. Must not be associated on entry.
[out]errThe error code
[out]errorThe error string

Definition at line 1737 of file coordinate_routines.f90.

References coordinate_no_radial_interpolation_type, coordinate_rectangular_cartesian_type, coordinate_system_user_number_find(), coordinate_systems, base_routines::enters(), and base_routines::exits().

Referenced by fieldml_input_routines::fieldmlinput_coordinatesystemcreatestart().

subroutine, public coordinate_routines::coordinate_system_destroy ( type(coordinate_system_type), pointer  COORDINATE_SYSTEM,
integer(intg), intent(out)  ERR,
type(varying_string), intent(out)  ERROR 
)

Destroys a coordinate system.

Parameters
coordinate_systemA pointer to the coordinate system to destroy
[out]errThe error code
[out]errorThe error string

Definition at line 1852 of file coordinate_routines.f90.

References coordinate_system_finalise(), coordinate_systems, base_routines::enters(), and base_routines::exits().

subroutine, public coordinate_routines::coordinate_system_dimension_get ( type(coordinate_system_type), pointer  COORDINATE_SYSTEM,
integer(intg), intent(out)  NUMBER_OF_DIMENSIONS,
integer(intg), intent(out)  ERR,
type(varying_string), intent(out)  ERROR 
)

Gets the coordinate system dimension.

Parameters
coordinate_systemA pointer to the coordinate system to get the dimension for
[out]number_of_dimensionsOn return, the number of dimensions in the coordinate system.
[out]errThe error code
[out]errorThe error string

Definition at line 1187 of file coordinate_routines.f90.

References base_routines::enters(), and base_routines::exits().

subroutine, public coordinate_routines::coordinate_system_dimension_set ( type(coordinate_system_type), pointer  COORDINATE_SYSTEM,
integer(intg), intent(in)  DIMENSION,
integer(intg), intent(out)  ERR,
type(varying_string), intent(out)  ERROR 
)

Sets/changes the dimension of the coordinate system.

See also
OPENCMISS::CMISSCoordinateSystemDimensionSet
Parameters
coordinate_systemA pointer the coordinate system to set the dimension for
[in]dimensionThe dimension to set
[out]errThe error code
[out]errorThe error string

Definition at line 1356 of file coordinate_routines.f90.

References coordinate_cylindrical_polar_type, coordinate_oblate_spheroidal_type, coordinate_prolate_spheroidal_type, coordinate_rectangular_cartesian_type, coordinate_spherical_polar_type, base_routines::enters(), and base_routines::exits().

Referenced by fieldml_input_routines::fieldmlinput_coordinatesystemcreatestart().

subroutine coordinate_routines::coordinate_system_finalise ( type(coordinate_system_type), pointer  COORDINATE_SYSTEM,
integer(intg), intent(out)  ERR,
type(varying_string), intent(out)  ERROR 
)
private

Finalises a coordinate system and deallocates all memory.

Parameters
coordinate_systemA pointer to the coordinate system to finalise.
[out]errThe error code
[out]errorThe error string

Definition at line 1220 of file coordinate_routines.f90.

References base_routines::enters(), and base_routines::exits().

Referenced by coordinate_system_destroy(), and coordinate_systems_finalise().

subroutine, public coordinate_routines::coordinate_system_focus_get ( type(coordinate_system_type), pointer  COORDINATE_SYSTEM,
real(dp), intent(out)  FOCUS,
integer(intg), intent(out)  ERR,
type(varying_string), intent(out)  ERROR 
)

Returns the coordinate system focus.

Parameters
coordinate_systemA pointer to the coordinate system to get the focus for
[out]focusOn return, the focus of the coordinate system.
[out]errThe error code
[out]errorThe error string

Definition at line 1246 of file coordinate_routines.f90.

References coordinate_oblate_spheroidal_type, coordinate_prolate_spheroidal_type, base_routines::enters(), and base_routines::exits().

subroutine, public coordinate_routines::coordinate_system_focus_set ( type(coordinate_system_type), pointer  COORDINATE_SYSTEM,
real(dp), intent(in)  FOCUS,
integer(intg), intent(out)  ERR,
type(varying_string), intent(out)  ERROR 
)

Sets/changes the focus of a coordinate system.

See also
OPENCMISS::CMISSCoordinateSystemFocusSet
Parameters
coordinate_systemA pointer to the coordinate system to set the focus for
[in]focusThe focus to set
[out]errThe error code
[out]errorThe error string

Definition at line 1421 of file coordinate_routines.f90.

References coordinate_oblate_spheroidal_type, coordinate_prolate_spheroidal_type, base_routines::enters(), base_routines::exits(), and constants::zero_tolerance.

subroutine coordinate_routines::coordinate_system_normal_calculate ( type(coordinate_system_type), pointer  COORDINATE_SYSTEM,
logical, intent(in)  REVERSE,
real(dp), dimension(:,:), intent(in)  X,
real(dp), dimension(3), intent(out)  N,
integer(intg), intent(out)  ERR,
type(varying_string), intent(out)  ERROR 
)
private

Calculates the normal vector, N, at the point X. IF REVERSE is true the reversed normal is returned. Old-cmiss-name: NORMAL.

Parameters
coordinate_systemThe coordinate system to calculate the normal for
[in]reverseIf .TRUE. the reversed normal is returned.
[in]xThe coordinate and it's derivatives to calcualte the normal at
[out]nOn exit, the normal vector
[out]errThe error code
[out]errorThe error string

Definition at line 1044 of file coordinate_routines.f90.

References coordinate_cylindrical_polar_type, coordinate_oblate_spheroidal_type, coordinate_prolate_spheroidal_type, coordinate_rectangular_cartesian_type, coordinate_spherical_polar_type, coordinate_system_type_string, base_routines::diagnostic_output_type, base_routines::diagnostics1, base_routines::enters(), base_routines::exits(), constants::partial_derivative_first_derivative_map, constants::partial_derivative_second_derivative_map, and constants::zero_tolerance.

subroutine, public coordinate_routines::coordinate_system_orientation_get ( type(coordinate_system_type), pointer  COORDINATE_SYSTEM,
real(dp), dimension(:,:), intent(out)  ORIENTATION,
integer(intg), intent(out)  ERR,
type(varying_string), intent(out)  ERROR 
)

Returns the orientation of a coordinate system.

See also
OPENCMISS::CMISSCoordinateSystemOrientationSets/changesGet
Parameters
coordinate_systemA pointer to the coordinate system to get the orientation for
[out]orientationOn return, the orientation of the coordinate system
[out]errThe error code
[out]errorThe error string

Definition at line 1657 of file coordinate_routines.f90.

References base_routines::enters(), and base_routines::exits().

subroutine, public coordinate_routines::coordinate_system_orientation_set ( type(coordinate_system_type), pointer  COORDINATE_SYSTEM,
real(dp), dimension(:,:), intent(in)  ORIENTATION,
integer(intg), intent(out)  ERR,
type(varying_string), intent(out)  ERROR 
)

Sets/changes the orientation of a coordinate system.

See also
OPENCMISS::CMISSCoordinateSystemOrientationSet
Parameters
coordinate_systemA pointer to the coordinate system to set the orientation for
[in]orientationThe orientation to set
[out]errThe error code
[out]errorThe error string

Definition at line 1693 of file coordinate_routines.f90.

References base_routines::enters(), and base_routines::exits().

subroutine, public coordinate_routines::coordinate_system_origin_get ( type(coordinate_system_type), pointer  COORDINATE_SYSTEM,
real(dp), dimension(:), intent(out)  ORIGIN,
integer(intg), intent(out)  ERR,
type(varying_string), intent(out)  ERROR 
)

Returns the origin of a coordinate system.

See also
OPENCMISS::CMISSCoordinateSystemOriginGet
Parameters
coordinate_systemA pointer to the coordinate system to get the origin for
[out]originOn return, the origin of the coordinate system.
[out]errThe error code
[out]errorThe error string

Definition at line 1584 of file coordinate_routines.f90.

References base_routines::enters(), and base_routines::exits().

subroutine, public coordinate_routines::coordinate_system_origin_set ( type(coordinate_system_type), pointer  COORDINATE_SYSTEM,
real(dp), dimension(:), intent(in)  ORIGIN,
integer(intg), intent(out)  ERR,
type(varying_string), intent(out)  ERROR 
)

Sets/changes the origin of a coordinate system.

See also
OPENCMISS::CMISSCoordinateSystemOriginSet
Parameters
coordinate_systemA pointer to the coordinate system to set the origin for
[in]originThe origin to set
[out]errThe error code
[out]errorThe error string

Definition at line 1621 of file coordinate_routines.f90.

References base_routines::enters(), and base_routines::exits().

subroutine, public coordinate_routines::coordinate_system_type_get ( type(coordinate_system_type), pointer  COORDINATE_SYSTEM,
integer(intg), intent(out)  SYSTEM_TYPE,
integer(intg), intent(out)  ERR,
type(varying_string), intent(out)  ERROR 
)

Gets the coordinate system type.

Parameters
coordinate_systemA pointer to the coordinate system to get the type for
[out]system_typeOn return, the type for the coordinate system.
[out]errThe error code
[out]errorThe error string

Definition at line 1323 of file coordinate_routines.f90.

References base_routines::enters(), and base_routines::exits().

Referenced by fieldml_output_routines::fieldml_output_get_value_type().

subroutine, public coordinate_routines::coordinate_system_type_set ( type(coordinate_system_type), pointer  COORDINATE_SYSTEM,
integer(intg), intent(in)  TYPE,
integer(intg), intent(out)  ERR,
type(varying_string), intent(out)  ERROR 
)

Sets/changes the type of a coordinate system.

See also
OPENCMISS::CMISSCoordinateSystemTypeSet
Parameters
coordinate_systemThe coordinate system to set the type for
[in]typeThe coordinate system type to set
See also
COORDINATE_ROUTINES_CoordinateSystemTypes,COORDINATE_ROUTINES
Parameters
[out]errThe error code
[out]errorThe error string

Definition at line 1539 of file coordinate_routines.f90.

References coordinate_cylindrical_polar_type, coordinate_oblate_spheroidal_type, coordinate_prolate_spheroidal_type, coordinate_rectangular_cartesian_type, coordinate_spherical_polar_type, base_routines::enters(), and base_routines::exits().

Referenced by fieldml_input_routines::fieldmlinput_coordinatesystemcreatestart().

subroutine, public coordinate_routines::coordinate_system_user_number_find ( integer(intg), intent(in)  USER_NUMBER,
type(coordinate_system_type), pointer  COORDINATE_SYSTEM,
integer(intg), intent(out)  ERR,
type(varying_string), intent(out)  ERROR 
)

Returns a pointer to the coordinate system identified by USER_NUMBER. If a coordinate system with that number is not found then COORDINATE_SYSTEM is set to NULL.

Parameters
[in]user_numberThe user number of the coordinate system to find.
coordinate_systemOn exit, a pointer to the coordinate system with the specified user number if it exists. If no coordinate system has the specified user number the pointer is returned as NULL. Must not be associated on entry.
[out]errThe error code
[out]errorThe error string

Definition at line 4253 of file coordinate_routines.f90.

References coordinate_systems, base_routines::enters(), and base_routines::exits().

Referenced by coordinate_system_create_start(), and region_routines::regions_initialise().

subroutine, public coordinate_routines::coordinate_systems_finalise ( integer(intg), intent(out)  ERR,
type(varying_string), intent(out)  ERROR 
)

Finalises the coordinate systems and destroys all coordinate systems.

Parameters
[out]errThe error code
[out]errorThe error string

Definition at line 4290 of file coordinate_routines.f90.

References coordinate_system_finalise(), coordinate_systems, base_routines::enters(), and base_routines::exits().

Referenced by cmiss::cmfe_finalise_().

subroutine, public coordinate_routines::coordinate_systems_initialise ( integer(intg), intent(out)  ERR,
type(varying_string), intent(out)  ERROR 
)

Initialises the coordinate systems and creates the world coordinate system.

Parameters
[out]errThe error code
[out]errorThe error string

Definition at line 4317 of file coordinate_routines.f90.

References coordinate_rectangular_cartesian_type, coordinate_systems, base_routines::enters(), and base_routines::exits().

Referenced by cmiss::cmfe_initialise_().

subroutine, public coordinate_routines::coordinates_materialsystemcalculate ( type(field_interpolated_point_metrics_type), pointer  geometricInterpPointMetrics,
type(field_interpolated_point_type), pointer  fibreInterpPoint,
real(dp), dimension(:,:), intent(out)  dNudX,
real(dp), dimension(:,:), intent(out)  dXdNu,
real(dp), dimension(:,:), intent(out)  dNudXi,
real(dp), dimension(:,:), intent(out)  dXidNu,
integer(intg), intent(out)  err,
type(varying_string), intent(out)  error 
)

Calculates the tensor to get from material coordinate system, nu, to local coordinate system, xi.

Parameters
geometricinterppointmetricsThe geometric interpolation point metrics at the point to calculate the material coordinate system from.
fibreinterppointThe fibre interpolation point at the point to calculate the material coordinate system from
[out]dnudxdNudX(nuIdx,xIdx). On return, the tensor to transform from the material system to the geometric coordinate system
[out]dxdnudXdNu(xIdx,nuIdx). On return, the tensor to transform from the geometric coordinate system to the material coordinate system
[out]dnudxidNudXi(nuIdx,xiIdx). On return, the tensor to transform from the material system to the xi coordinate system
[out]dxidnudXidNu(xiIdx,nuIdx). On return, the tensor to transform from the xi coordinate system to the material coordinate system
[out]errThe error code
[out]errorThe error string

Definition at line 3885 of file coordinate_routines.f90.

References coordinates_materialsystemcalculatedxdnu2d(), coordinates_materialsystemcalculatedxdnu3d(), base_routines::diagnostic_output_type, base_routines::diagnostics1, base_routines::enters(), base_routines::exits(), and input_output::write_string_matrix_name_and_indices.

Referenced by finite_elasticity_routines::finiteelasticity_gaussdeformationgradienttensor(), laplace_equations_routines::laplaceequation_finiteelementcalculate(), and poisson_equations_routines::poisson_equation_finite_element_calculate().

subroutine coordinate_routines::coordinates_materialsystemcalculatedxdnu2d ( type(field_interpolated_point_metrics_type), pointer  geometricInterpPointMetrics,
real(dp), dimension(:), intent(in)  angle,
real(dp), dimension(:,:), intent(out)  dXdNu,
integer(intg), intent(out)  err,
type(varying_string), intent(out)  error 
)
private

Calculates transformation between spatial CS and rotated reference orthogonal material CS in 2D space.

Parameters
geometricinterppointmetricsThe geometric interpolated point metrics at the point to calculate dXdNu at.
[in]angleangle(fibreIdx). The fibre angle (in radians)
[out]dxdnudXdNu(coordinateIdx,coordinateIdx). On exit, the dXdNu tensor.
[out]errThe error code
[out]errorThe error string

Definition at line 3998 of file coordinate_routines.f90.

References base_routines::diagnostic_output_type, base_routines::diagnostics1, base_routines::diagnostics2, base_routines::enters(), base_routines::exits(), and input_output::write_string_matrix_name_and_indices.

Referenced by coordinates_materialsystemcalculate().

subroutine coordinate_routines::coordinates_materialsystemcalculatedxdnu3d ( type(field_interpolated_point_metrics_type), pointer  geometricInterpPointMetrics,
real(dp), dimension(:), intent(in)  angle,
real(dp), dimension(:,:), intent(out)  dXdNu,
integer(intg), intent(out)  err,
type(varying_string), intent(out)  error 
)
private

Calculates transformation between spatial CS and rotated reference orthogonal material CS in 3D space.

Parameters
geometricinterppointmetricsThe geometric interpolated point metrics at the point to calculate dXdNu at.
[in]angleangles(fibreIdx). The fibre, imbrication and sheet (in radians)
[out]dxdnudXdNu(coordinateIdx,coordinateIdx). On exit, the dXdNu tensor.
[out]errThe error code
[out]errorThe error string

Definition at line 4078 of file coordinate_routines.f90.

References base_routines::diagnostic_output_type, base_routines::diagnostics1, base_routines::diagnostics2, base_routines::enters(), base_routines::exits(), and input_output::write_string_matrix_name_and_indices.

Referenced by coordinates_materialsystemcalculate().

subroutine, public coordinate_routines::coordinates_radialinterpolationtypeget ( type(coordinate_system_type), pointer  coordinateSystem,
integer(intg), intent(out)  radialInterpolationType,
integer(intg), intent(out)  err,
type(varying_string), intent(out)  error 
)

Gets the coordinate system radial interpolation type.

Parameters
coordinatesystemThe coordinate system to get the radial interpolation for
[out]radialinterpolationtypeOn return, the radial interpolation type for the coordinate system
See also
COORDINATE_ROUTINES::RadialInterpolations,COORDINATE_ROUTINES
Parameters
[out]errThe error code
[out]errorThe error string

Definition at line 1285 of file coordinate_routines.f90.

References coordinate_cylindrical_polar_type, coordinate_spherical_polar_type, base_routines::enters(), and base_routines::exits().

subroutine, public coordinate_routines::coordinates_radialinterpolationtypeset ( type(coordinate_system_type), pointer  coordinateSystem,
integer(intg), intent(in)  radialInterpolationType,
integer(intg), intent(out)  err,
type(varying_string), intent(out)  error 
)

Sets/changes the radial interpolation type of a coordinate system.

See also
OPENCMISS::CMISSCoordinateSystemRadialInterpolationTypeSet
Parameters
coordinatesystemThe coordinate system to set the interpolation type for
[in]radialinterpolationtypeThe interpolation type to set
See also
COORDINATE_ROUTINES::RadialInterpolations,COORDINATE_ROUTINES
Parameters
[out]errThe error code
[out]errorThe error string

Definition at line 1468 of file coordinate_routines.f90.

References coordinate_cylindrical_polar_type, coordinate_no_radial_interpolation_type, coordinate_oblate_spheroidal_type, coordinate_prolate_spheroidal_type, coordinate_radial_cubed_interpolation_type, coordinate_radial_interpolation_type, coordinate_radial_squared_interpolation_type, coordinate_rectangular_cartesian_type, coordinate_spherical_polar_type, base_routines::enters(), and base_routines::exits().

real(dp) function, dimension(size(x,1)) coordinate_routines::d2zx_dp ( type(coordinate_system_type), intent(in)  COORDINATE_SYSTEM,
integer(intg), intent(in)  I,
integer(intg), intent(in)  J,
real(dp), dimension(:), intent(in)  X,
integer(intg), intent(out)  ERR,
type(varying_string), intent(out)  ERROR 
)
private
real(dp) function, dimension(size(x,1)) coordinate_routines::dxz_dp ( type(coordinate_system_type), intent(in)  COORDINATE_SYSTEM,
integer(intg), intent(in)  I,
real(dp), dimension(:), intent(in)  X,
integer(intg), intent(out)  ERR,
type(varying_string), intent(out)  ERROR 
)
private

Calculates DX(:)/DZ(I) at X, where Z(I) are rectangular cartesian and X(:) are curvilinear coordinates defined by COORDINATE_SYSTEM for double precision coordinates.

Definition at line 1906 of file coordinate_routines.f90.

References coordinate_cylindrical_polar_type, coordinate_oblate_spheroidal_type, coordinate_prolate_spheroidal_type, coordinate_rectangular_cartesian_type, coordinate_spherical_polar_type, base_routines::enters(), and base_routines::exits().

real(dp) function, dimension(size(x,1)) coordinate_routines::dzx_dp ( type(coordinate_system_type), intent(in)  COORDINATE_SYSTEM,
integer(intg), intent(in)  I,
real(dp), dimension(:), intent(in)  X,
integer(intg), intent(out)  ERR,
type(varying_string), intent(out)  ERROR 
)
private

Variable Documentation

character(len=21), dimension(5), public coordinate_routines::coordinate_system_type_string = (/ "Rectangular Cartesian", "Cylindrical Polar ", "Spherical Polar ", "Prolate Spheroidal ", "Oblate Spheroidal " /)