Matrix Transform
Add a Matrix Transform node () to define variables representing the components of an input matrix transformed to another coordinate system in a 3D vector space. You add it by right-clicking the Definitions node and choosing Variable Utilities>Matrix Transform. If Group by Type has been selected for the Definitions branch, then you can also add it by right-clicking the Variable Utilities node and choosing Matrix Transform.
Use the Name field to select a namespace for the input and output vector components, as well as for components of the transformation matrix.
In the Domain Selection section, select the domains in which this transformation is valid.
In addition, the Settings window for a Matrix Transform node contains the following sections:
Input
In this section, you define the matrix to be transformed. It can be defined as a new matrix by manually entering expressions in the table, or chosen from the postprocessing variables in the Replace Expression () menu. When you use the Replace Expression tree, an attempt is made to infer the other settings in this section from the properties of the selected matrix.
The choice of Matrix format, Full or Symmetric, controls the available coordinate system settings. For a Full matrix (the default), you must specify both the Row Coordinate System and the Column Coordinate System in which this tensor is represented. For a Symmetric matrix, the row and column system must be the same and only a single Coordinate system setting is needed. When the matrix is entered manually, the default coordinate system settings are always the Global spatial system; when using Replace Expression, the default is inferred from the properties of the selected matrix.
If a selected coordinate system is a relative system such that its reference frame cannot be deduced from its definition, select an appropriate Reference frame. This selection is only shown when a relative input system is selected.
If the relation between an input coordinate system and a corresponding output coordinate system is not a pure rotation, you must specify a component type for each affected index. In the corresponding Treat components as, Treat row indices as or Treat column indices as drop down, select whether the corresponding input matrix index is Covariant or Contravariant (the default). When using Replace Expression, the default is inferred from the properties of the selected matrix.
Output
Select the Row Coordinate System and the Column Coordinate System in which the transformed matrix will be represented. Note that row and column system are set separately also when the input matrix is symmetric. To retain symmetry in the output components, select the same system for both row and column indices. If any of the selected systems is a relative system, also select a corresponding reference frame.
The components of the transformed matrix in those systems become available as variables <name>.V<xi><xj>, where <name> is the name of the node set in the Name field, and <xi> and <xj> are the coordinates with indices i and j. The components of the input matrix also become available as <name>.U<i><j>. For example, if the Matrix Transform node has the name mattr1, the first component of an input matrix being transformed to the spatial frame in both indices becomes mattr1.U11, while the first component of the output matrix becomes mattr1.Vxx. Both matrices also become available as matrix objects which can be evaluated using a matrix evaluation node under Derived Values or selected as input for another Matrix Transform.
The row transformation matrix also becomes available as <name>.Tr, while the column transformation matrix becomes available as <name>.Tc. These matrices are the composition of all transformation matrices used for the respective index. For example, if the column indices are changed between covariant and contravariant at the same time as the coordinate system for the columns is changed, the matrix <name>.Tc is the product of the metric and a coordinate transformation matrix.
Transform Settings
Choose Transform as, which determines how the input matrix transforms between the chosen coordinate systems. If the option Generalized tensor density is chosen, the choices of Input volume reference and Output volume reference for the change in volume between coordinate systems become available.
Since you can use this option to choose the reference systems for the determinant of the Jacobian, it can be used to transform matrices as either tensor densities or tensor capacities. It can even be used to take into account the volume change between other coordinate systems. The Tensor option transforms matrices as normal tensors, not taking into account the volume change. For convenience, there is one more option, called Stress Tensor. What it means is that the tensor transforms as a tensor density where the volume reference change is taken from the choice of input and output column coordinate systems.
Advanced
As a default, the output matrix will have the same type of basis elements as the input matrix. You can force the representation of the each of the indices of the output matrix to be covariant or contravariant, independent of the form of the input matrix. In order to do this, change the Row component change or Column component change list from the default value None. Depending on how the indices were set in the Input section, the other options can be Covariant->Contravariant and Contravariant->Covariant. The two indices on the matrix components will be raised or lowered accordingly.
When choosing anything other than None, the choices of which metric to use for the row transformation and the column transformation become available. Here, choose these metrics as either Spatial or Material.