- I.2.1 The CoordSys object
- I.2.2 Construction or manipulation functions
- I.2.2.1 ``CoordSys.initWith3PointsinitWith3Points''
- I.2.2.2 Three functions ``CoordSys.initWithOViVjinitWithOViVj''
- I.2.2.3 Function ``CoordSys.updateDefWrt0updateDefWrt0''

- I.2.3 Transformation of point coordinates
- I.2.3.1 Method ``CoordSys.changeCoordsA20changeCoordsA20''
- I.2.3.2 Method ``CoordSys.changeCoords02BchangeCoords02B''
- I.2.3.3 Method ``CoordSys.changeCoordsA2BchangeCoordsA2B''

- I.2.4 Transformation of vector and tensor components
- I.2.4.1 Method ``CoordSys.changeCompsA20changeCompsA20''
- I.2.4.2 Method ``CoordSys.changeComps02BchangeComps02B''
- I.2.4.3 Method ``CoordSys.changeCompsA2BchangeCompsA2B''

- I.2.5 Other functions

I.2 The ``CoordSys'' class

It may be practical to manipulate coordinate systems at post-processing level. Therefore, a ``CoordSys'' class devoted to the manipulation of coordinate systems is proposed. The methods defined in that class are described in sections I.2.2 and I.2.5. A list of the methods defined in ``CoordSys'' class is given in Table I.2.1.

(FeResPost list of classes is given in
Table 1
page .) |
||

Method Name |
Description |
Example |

Creation and initialization methods |
||

CoordSys.newnew | I.2.2 | IV.2.4.5 |

CoordSys.initializeinitialize | I.2.5 | |

CoordSys.cloneclone | I.2.5 | |

Definition |
||

CoordSys.initWith3PointsinitWith3Points | I.2.2.1 | IV.2.4.5 |

CoordSys.initWithOV1V2initWithOV1V2 | I.2.2.2 | |

CoordSys.initWithOV2V3initWithOV2V3 | I.2.2.2 | |

CoordSys.initWithOV3V1initWithOV3V1 | I.2.2.2 | |

CoordSys.initWithOV2V1initWithOV2V1 | I.2.2.2 | |

CoordSys.initWithOV3V2initWithOV3V2 | I.2.2.2 | |

CoordSys.initWithOV1V3initWithOV1V3 | I.2.2.2 | |

CoordSys.updateDefWrt0updateDefWrt0 | I.2.2.2 | |

Modifying point coordinates |
||

CoordSys.changeCoordsA20changeCoordsA20 | I.2.3.1 | IV.2.4.5 |

CoordSys.changeCoords02BchangeCoords02B | I.2.3.2 | IV.2.4.5 |

CoordSys.changeCoordsA2BchangeCoordsA2B | I.2.3.3 | IV.2.4.5 |

Modifying vector or tensor components |
||

CoordSys.changeCompsA20changeCompsA20 | I.2.4.1 | IV.2.4.5 |

CoordSys.changeComps02BchangeComps02B | I.2.4.2 | IV.2.4.5 |

CoordSys.changeCompsA2BchangeCompsA2B | I.2.4.3 | IV.2.4.5 |

Printing |
||

CoordSys.to_sto_s | I.2.5 | |

Attributes |
||

Id | I.2.5 | |

I.2.1 The CoordSys object

A CoordSys object corresponds to a coordinate system. CoordSys objects are generally created in a DataBase when a model is imported.

Besides the data corresponding to the definition of the coordinate system, the CoordSys object also contains a definition of the coordinate system wrt the most basic coordinate system ``0''. The corresponding member data are used by functions like the Result methods of modification of reference coordinate systems to perform the transformations of components (sections I.4.5.7 and I.4.5.8). Practically those functions work in two steps:

- The components of the Result object are expressed wrt the basic coordinate system ``0''.
- Then, the components are expressed wrt the new coordinate system.

I.2.2 Construction or manipulation functions

Besides the ``CoordSys.newnew'' class method that returns a new coordinate system initialized to the ``0'' structural coordinate system, several functions can be used to modify the CoordSys objects.

I.2.2.1 ``CoordSys.initWith3PointsinitWith3Points''

This function is used to define a coordinate system with the coordinates of three points A, B and C. (See the definition of ``CORD2C'', ``CORD2R'' and ``CORD2S'' in [Sof04b].) This function has 5 arguments:

- A string argument corresponding to the type of coordinate system being build. Three values are accepted: ``CORDC'', ``CORDR'' and ``CORDS''. (Remark that the ``2'' of Nastran has disappeared.)
- A DataBase object that will allow the definition of coordinate system wrt the base coordinate system.
- An integer argument corresponding to the reference coordinate system (coordinate system wrt which the coordinates of points A, B and C are given). A coordinate system corresponding to this integer must be defined in the DataBase passed as previous argument.
- A vector containing the coordinates of point A. (Point A corresponds to the origin of the coordinate system.)
- A vector containing the coordinates of point B. (Point B defines the axis Z of the coordinate system. More precisely, point B is on axis Z.)
- A vector containing the coordinates of point C. (Point C defines the axis X of the coordinate system. More precisely, the axis X of the coordinate system is defined in the half-plane defined by the straight-line AB and the point C.)

Note that no check is made in a DataBase to ensure that the data are consistent. (For example, checking that the reference coordinate system exists.)

I.2.2.2 Three functions ``CoordSys.initWithOViVjinitWithOViVj''

The three functions are ``CoordSys.initWithOV1V2initWithOV1V2'', ``CoordSys.initWithOV2V3initWithOV2V3'',
``CoordSys.initWithOV3V1initWithOV3V1'', ``CoordSys.initWithOV2V1initWithOV2V1'', ``CoordSys.initWithOV3V2initWithOV3V2'' and
``CoordSys.initWithOV1V3initWithOV1V3''. They produce CoordSys objects defined by their origin
and two direction vectors corresponding to vector
and to the
orientation of vector
**
**
respectively.

The six arguments of these methods are:

- A string argument corresponding to the type of coordinate system being build. Three values are accepted: `CORDC'', ``CORDR'' and ``CORDS''.
- A DataBase argument that provides the information needed to complete the definition of the coordinate system.
- An integer argument corresponding to the reference coordinate system (coordinate system wrt which the origin and direction vectors are specified).
- A vector containing the coordinates of the origin. This origin is specified with an Array of three real values corresponding to the components of O wrt the reference coordinate system identified with the integer argument.
- A vector (Array of three real values) corresponding to the
direction
if the reference coordinate system is curvilinear).**0** - A vector (Array of three real values) corresponding to the
orientation of base vector
if the reference coordinate system is curvilinear).**0**

Here again, no check is made in a DataBase to ensure that the data are consistent. (For example, checking that the reference coordinate system exists.)

I.2.2.3 Function ``CoordSys.updateDefWrt0updateDefWrt0''

This function updates the definition of a CoordSys object wrt to ``0'' (most basic coordinate system). This function has one argument: the DataBase in which the information needed to build the definition wrt 0 is found.

Note that if one works with several DataBases, the responsibility of managing the correspondence of coordinate systems and DataBases lies on the user.

I.2.3 Transformation of point coordinates

The ``CoordSys'' class defines three methods devoted to the transformation of a point coordinates from one coordinate system to another.

I.2.3.1 Method ``CoordSys.changeCoordsA20changeCoordsA20''

Method ``changeCoordsA20'' is used to calculate the coordinates of a point wrt basic or ``0'' coordinate system:

- The coordinate system on which the method is called is the coordinate system in which the initial coordinates of the point are defined. (Coordinate system ``A''.)
- The method has one ``CoordA'' argument: an Array of three real values corresponding to the initial coordinates of the point in coordinate system ``A''.
- The method returns a ``Coord0'' Array of three real values corresponding to the coordinate of the same point, but expressed wrt basic coordinate system ``0''.

coords0=csA.changeCoordsA20(coordsA)

I.2.3.2 Method ``CoordSys.changeCoords02BchangeCoords02B''

Method ``changeCoords02B'' is used to calculate the coordinates of a point wrt a given coordinate system ``B'':

- The coordinate system on which the method is called is the coordinate system in which one wants to express the point coordinates (Coordinate system ``B''.)
- The method has one ``Coord0'' argument: an Array of three real values corresponding to the initial coordinates of the point in basic coordinate system ``0''.
- The method returns a ``CoordB'' Array of three real values corresponding to the coordinate of the same point, but expressed wrt coordinate system ``B''.

coordsB=csB.changeCoords02B(coords0)

I.2.3.3 Method ``CoordSys.changeCoordsA2BchangeCoordsA2B''

Method ``changeCoordsA2B'' is used to calculate the coordinates of a point wrt a given coordinate system ``B''. The initial coordinate system is a given ``A'' coordinate system:

- The coordinate system on which the method is called is the initial coordinate system in which the point coordinates are expressed (Coordinate system ``A''.)
- The first ``CoordA'' argument is an Array of three real values corresponding to the initial coordinates of the point in coordinate system ``A''.
- The second ``CsB'' argument is a ``CoordSys'' object wrt which one wants to calculate the point new coordinates.
- The method returns a ``CoordB'' Array of three real values corresponding to the coordinate of the point expressed wrt coordinate system ``B''.

coordsB=csA.changeCoordsA2B(coordsA,csB)

I.2.4 Transformation of vector and tensor components

The ``CoordSys'' class defines three methods devoted to the transformation of a vector or tensor components from one coordinate system to another. These methods are similar to the methods used to transform point coordinates in section I.2.3 but with the following differences:

- One modifies the components of a vector or of a tensor.
- A vector is defined as an Array of three real values. A tensor is defined as an Array of three Arrays of three real values.
- If a vector argument is given, the method returns a vector. If a tensor argument is given, the method returns a tensor.
- For each of the methods given here, the coordinates of the point at which the vector or tensor argument is defined, are also given as argument. This means that the methods have one additional argument compared to the corresponding methods of section I.2.3.3. The position of the point matters when curvilinear coordinate systems are involved in the transformation.

I.2.4.1 Method ``CoordSys.changeCompsA20changeCompsA20''

Method ``changeCompsA20'' is used to calculate the components of a vector or tensor wrt basic or ``0'' coordinate system:

- The coordinate system on which the method is called is the coordinate system in which the initial components are defined. (Coordinate system ``A''.)
- The first ``CoordA'' argument is an Array of three real values corresponding to the coordinates of the point in coordinate system ``A''.
- The second ``vmA'' argument corresponds to the components of vector or tensor (matrix) in coordinate system ``A''. (An Array of three real values, or an Array of Arrays of three real values.)
- The method returns the components of a vector or tensor, but expressed wrt basic coordinate system ``0''. (An Array of three real values, or an Array of Arrays of three real values.)

vm0=csA.changeCompsA20(coordsA,vmA)

I.2.4.2 Method ``CoordSys.changeComps02BchangeComps02B''

Method ``changeComps02B'' is used to calculate the components of a vector or tensor wrt basic or ``B'' coordinate system:

- The coordinate system on which the method is called is the coordinate system in which one wants to express the components. (Coordinate system ``B''.)
- The first ``Coord0'' argument is an Array of three real values corresponding to the coordinates of the point in coordinate system ``0''.
- The second ``vm0'' argument corresponds to the components of vector or tensor (matrix) in coordinate system ``0''. (An Array of three real values, or an Array of Arrays of three real values.)
- The method returns the components of a vector or tensor, but expressed wrt basic coordinate system ``B''. (An Array of three real values, or an Array of Arrays of three real values.)

vmB=csB.changeCoords02B(coords0,vm0)

I.2.4.3 Method ``CoordSys.changeCompsA2BchangeCompsA2B''

Method ``changeCompsA2B'' is used to calculate the components of a vector or tensor wrt basic or ``B'' coordinate system:

- The coordinate system on which the method is called is the coordinate system in which the initial components are defined. (Coordinate system ``A''.)
- The first ``CoordA'' argument is an Array of three real values corresponding to the coordinates of the point in coordinate system ``A''.
- The second ``vmA'' argument corresponds to the components of vector or tensor (matrix) in coordinate system ``A''. (An Array of three real values, or an Array of Arrays of three real values.)
- The third ``CsB'' argument is a ``CoordSys'' object wrt which one wants to calculate the new components.
- The method returns the components of a vector or tensor, but expressed wrt basic coordinate system ``B''. (An Array of three real values, or an Array of Arrays of three real values.)

vmB=csA.changeCoordsA2B(coordsA,vmA,csB)

I.2.5 Other functions

One gives here a list of functions that do not fit in any category listed above.

This function initializes or clears a CoordSys object. After initializing, the definition corresponds to the ``0'' structural coordinate system.

This function returns a Copy of the CoordSys object to which it is applied.

This function is used for printing the Result object.

This integer attribute corresponds to the integer identifier of the CoordSys object. One defines a ``setter'' and ``getter'' attribute (``Id='' and ``Id'' methods respectively).