1. Vectors and Matrices
1.1. Building Vectors
Usual syntax to create vectors:
Feel++ Keyword |
Math Object |
Description |
Dimension |
|
\(\begin{pmatrix} v_1\\v_2\\ \vdots \\v_n \end{pmatrix}\) |
Column Vector with \(n\) rows entries being expressions |
\(n \times 1\) |
You can also use expressions and the unit base vectors:
Feel++ Keyword |
Math Object |
Description |
|
\(\begin{pmatrix} 1\\0\\0 \end{pmatrix}\) |
Unit vector \(\overrightarrow{i}\) |
|
\(\begin{pmatrix} 0\\1\\0 \end{pmatrix}\) |
Unit vector \(\overrightarrow{j}\) |
|
\(\begin{pmatrix} 0\\0\\1 \end{pmatrix}\) |
Unit vector \(\overrightarrow{k}\) |
1.2. Building Matrices
Feel++ Keyword | Math Object | Description | Dimension |
---|---|---|---|
|
\(\begin{pmatrix} m_{11} & m_{12} & ...\\ m_{21} & m_{22} & ...\\ \vdots & & \end{pmatrix}\) |
\(m\times n\) Matrix entries being expressions |
\(m \times n\) |
|
\(\begin{pmatrix} 1 & 1 & ...\\ 1 & 1 & ...\\ \vdots & & \end{pmatrix}\) |
\(m\times n\) Matrix Filled with 1 |
\(m \times n\) |
|
\(\begin{pmatrix} 0 & 0 & ...\\ 0 & 0 & ...\\ \vdots & & \end{pmatrix}\) |
\(m\times n\) Matrix Filled with 0 |
\(m \times n\) |
|
\(\begin{pmatrix} c & c & ...\\ c & c & ...\\ \vdots & & \end{pmatrix}\) |
\(m\times n\) Matrix Filled with a constant c |
\(m \times n\) |
|
\(\begin{pmatrix} 1 & 0 & ...\\ 0 & 1 & ...\\ \vdots & & \end{pmatrix}\) |
Unit diagonal Matrix of size \(n\times n\) |
\(n \times n\) |
|
\(\begin{pmatrix} 1 & 0 & ...\\ 0 & 1 & ...\\ \vdots & & \end{pmatrix}\) |
Unit diagonal Matrix of size \(n\times n\) |
\(n \times n\) |
1.3. Manipulating Vectors and Matrices
Let \(A\) and \(B\) be two matrices (or two vectors of the operation is defined) of dimension \(m \times n\). \(A\) and \(B\) may depend on space variables
Feel++ Keyword | Math Object | Description | Dimension of the output |
---|---|---|---|
|
\(A^{-1}\) |
Inverse of matrix \(A\) |
\(n \times n\) |
|
\(\det (A)\) |
Determinant of matrix \(A\) |
\(1 \times 1\) |
|
\(\text{Sym}(A)\) |
Symmetric part of matrix \(A\): \(\frac{1}{2}(A+A^T)\) |
\(n \times n\) |
|
\( \text{Asym}(A)\) |
Antisymmetric part of \(A\): \(\frac{1}{2}(A-A^T)\) |
\(n \times n\) |
|
\(\text{tr}(A)\) |
Trace of square matrix \(A\) |
\(1 \times 1\) |
|
\(B^T\) |
Transpose of matrix \(B\) Can be used on non-squared Matrix Can be used on Vectors |
\(n \times m\) |
|
\( A \cdot B \\ A:B = \text{tr}(A*B^T)\) |
Scalar product of two vectors Generalized scalar product of two matrix |
\(1 \times 1\) |
|
\( A\times B\) |
Cross product of two vectors |
\(n \times 1\) |
|
\(\begin{pmatrix}\lambda_1 \\ \lambda_2 \\ \lambda_3\end{pmatrix}\) |
vector of real \(n\) eigenvalues \(\lambda_1,\lambda_2,\lambda_3)\) of \(A\). \(A\) must be symmetric. |
\(n \times 1\) |
|
\(\begin{matrix} \text{1D:}& A_v = & A_{11}\\ \text{2D:}& A_v = & (A_{11}^2- A_{11}A_{22}+ A_{22}^2+3A_{12}^2)^{1/2} \\ \text{3D:}& A_v = & ((A_{11} - A_{22})^2 + (A_{22} - A_{33})^2 + \\ & & (A_{33} - A_{11})^2 + 6(A_{12}^2 + A_{23}^2 + A_{31}^2))^{1/2} \end{matrix}\) |
if \(A\) is the Cauchy stress tensor, it computes the Von Mises yield criterion \(A_v\) (scalar value). A material starts yielding when the von Mises stress \(A_v\) reaches a value known as yield strength |
\(1 \times 1\) |
|
\(rr\) |
* If * If |
stem:[1 \times n] |
we have \(eig(A)\) |