next up previous contents index
Next: I.3 The ``Group'' class Up: I. FeResPost Reference Manual Previous: I.1 Generic ``DataBase'' class   Contents   Index

Subsections


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.

Table I.2.1: The different methods that have been defined in ``CoordSys'' class. userManual.CoordSys.methods.tab
(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:

  1. The components of the Result object are expressed wrt the basic coordinate system ``0''.
  2. Then, the components are expressed wrt the new coordinate system.
The definition of the corresponding member data is done by calling the method ``CoordSys.updateDefWrt0updateDefWrt0'' (section I.2.2.3).


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:

The three vectors mentioned above are actually Arrays of three real values corresponding to the coordinates of points given in coordinate system identified by the integer argument.

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 $ e$ $ _i$ and to the orientation of vector $ e$ $ _j$ respectively.

The six arguments of these methods are:

Note that the orientation vector $ e$ $ _j$ is not necessarily orthogonal to $ e$ $ _i$ . If the vectors are not orthogonal, then $ i$ is a unit vector parallel to $ e$ $ _i$ , and vector $ j$ is the unit vector perpendicular to $ i$ closest to $ e$ $ _j$ . The last vector $ k$ of the coordinate system is a unit vector perpendicular to both $ i$ and $ j$ .

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 method is called as follows:
   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 method is called as follows:
   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 method is called as follows:
   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:


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 method is called as follows:
   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 method is called as follows:
   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 method is called as follows:
   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.

I.2.5.1 ``CoordSys.initializeinitialize''

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

I.2.5.2 ``CoordSys.cloneclone''

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

I.2.5.3 ``CoordSys.to_sto_s''

This function is used for printing the Result object.

I.2.5.4 ``CoordSys.IdId'' attribute

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


next up previous contents index
Next: I.3 The ``Group'' class Up: I. FeResPost Reference Manual Previous: I.1 Generic ``DataBase'' class   Contents   Index
FeResPost 2017-05-28