HyperWorks Solvers

TCNVRT

TCNVRT

Previous topic Next topic No expanding text in this topic  

TCNVRT

Previous topic Next topic JavaScript is required for expanding text JavaScript is required for the print function  

Subroutine Type

Utility/General

Definition

Converts translational coordinates between the various supported representations.

Use

This function can be called by any user-defined subroutine.

Calling Syntax

Fortran

CALL TCNVRT (SYS1, COORD1, SYS2, COORD2, ISTAT)

 

C

c_tcnvrt(sys1, coord1, sys2, coord2, istat)

 

Python

[coord2, istat] = py_tcnvrt(sys1, coord1, sys2)

 

MATLAB

[coord2, istat] = m_tcnvrt(sys1, coord1, sys2)

Input Arguments

SYS1 [Character]

A string specifying the system in which the values are passed in coord1.

 

COORD1 [double precision]

An array containing the coordinates to be converted.  Angles should be input in radians.

 

SYS2 [Character]

A string specifying the system in which the values are returned as output in coord2.

Output Values

COORD2 [double precision]

An array containing the converted coordinates.  Angles are output in radians.

 

ISTAT [integer]

A variable indicating the success or the reason for the failure of the call to TCNVRT.

Comments

The following table lists the valid options you may specify for SYS1 or SYS2 and the corresponding sizes of the input or output arrays COORD1 or COORD2.

 

SYS1/SYS2 string

COORD1/COORD2 size

COORD1/COORD2 contents

CARTESIAN

3

[x, y, z]

SPHERICAL

3

[rho, phi, theta]

CYLINDRICAL

3

[r, theta, z]

See Also:

Data Access Subroutines