tensor
List of: Classes
Subjects: Mathematics
Contents: Kernel

Purpose: Defines a 3 X 3 tensor.

Derivation: tensor : ACIS_OBJECT : -

Filename: kern/kernel/kernutil/tensor/tensor.hxx

Description: This class defines a 3 X 3 general tensor. Examples of tensors include the inertia tensor of mass-property calculations, and the second-order gradient of an implicit function of the three spatial variables x, y, and z.

Constructor: public: tensor::tensor ();


C++ allocation constructor requests memory for this object but does not populate it.






public: tensor::tensor (


symtensor const& // symmetric tensor


);


C++ initialize constructor requests memory for this object and populates it with the data supplied as arguments.



Methods: public: void tensor::debug (


char const*, // leader


FILE* // file name



= debug_file_ptr


) const;


Prints a tensor in three rows with a given leader string on each row bar first.






public: double tensor::element (


int row, // row


int col // column


) const;


Extracts an element (i,j), where row and column, i and j, range from 0 to 2.






public: tensor const& tensor::operator*= (


double // double value


);


Multiplies a tensor by a double.






public: tensor const& tensor::operator*= (


SPAmatrix const& // matrix


);


Transforms a tensor by a 3 X 3 (orthogonal) matrix. This method pre-multiplies tensor by the matrix, and then post-multiplies the result by the transpose of the matrix.






public: tensor const& tensor::operator*= (


SPAtransf const& // transformation


);


Transforms a tensor by a 3 X 3 transformation. This method performs the matrix multiplication for the rotation part, then it multiplies by the scaling factor twice. Any translation part is ignored. This method treats the tensor like a vector (as opposed to a position or unit vector).






public: tensor const& tensor::operator+= (


tensor const& // tensor


);


Performs the unary plus operation.






public: tensor const& tensor::operator-= (


tensor const& // tensor


);


Performs the unary minus operation.






public: void tensor::set_element (


int, // ith value


int, // jth value


double // value to be set


);


Sets an element (i,j), where i and j range from 0 to 2.






public: void tensor::zero ();


Zeroes all elements of the tensor.




Related Fncs: outer, sym_outer






friend: tensor operator* (


double, // double value


tensor const& // tensor


);


Multiplies a tensor by a double.






friend: tensor operator* (


tensor const&, // tensor


double // double value


);


Multiplies a tensor by a double.






friend: tensor operator* (


tensor const&, // tensor


SPAmatrix const& // matrix


);


Transforms a tensor by a 3 x 3 (orthogonal) matrix. This method pre-multiplies the tensor by the matrix, then it post-multiplies the result by the transpose of the matrix.






friend: tensor operator* (


tensor const&, // tensor


SPAtransf const& // transformation


);


Transforms a tensor by a general transformation. This method does a matrix multiplication for the rotation part, and then multiplies it by the scaling factor twice any translation part is ignored. This treats the tensor on a par with a vector (as opposed to a position or unit vector).






friend: tensor operator+ (


tensor const&, // tensor


tensor const& // tensor


);


Performs a binary plus operation.






friend: tensor operator- (


tensor const& // tensor


);


Performs a unary minus operation.






friend: tensor operator- (


tensor const&, // first tensor


tensor const& // second tensor


);


Performs a binary minus operation.
PDF/KERN/38CLT.PDF
HTM/DATA/KERN/KERN/38CLT/0004.HTM