In GooseFEM there are three ways to represent vectors. In particular, a vector field (e.g. the displacement) can be collected:
* per node (denoted "nodevec", :ref:`see below <conventions_storage>`),
* per degree-of-freedom (denoted "dofval", :ref:`see below <conventions_storage>`),
* per element (denoted "elemvec", :ref:`see below <conventions_storage>`).
.. warning::
Care has to be taken in the conversion from one representation to the other as 'down-sizing' can be done in more than one way, see :ref:`conventions_vector_conversion`.
Consider a simple two-dimensional mesh of just two elements, and a displacement vector per node:
.. image:: figures/data-representation.svg
:width: 400px
:align: center
|
Collected per node
------------------
.. math::
\texttt{disp} =
\begin{bmatrix}
u_x^{(0)} & u_y^{(0)} \\
u_x^{(1)} & u_y^{(1)} \\
u_x^{(2)} & u_y^{(2)} \\
u_x^{(3)} & u_y^{(3)} \\
u_x^{(4)} & u_y^{(4)} \\
u_x^{(5)} & u_y^{(5)}
\end{bmatrix}
Collected per degree-of-freedom
-------------------------------
The following definition
.. math::
\texttt{dofs} =
\begin{bmatrix}
0 & 1 \\
2 & 3 \\
4 & 5 \\
6 & 7 \\
8 & 9 \\
10 & 11
\end{bmatrix}
gives:
.. math::
\texttt{u} =
\big[
u_x^{(0)} \,
u_y^{(0)} \,
u_x^{(1)} \,
u_y^{(1)} \,
u_x^{(2)} \,
u_y^{(2)} \,
u_x^{(3)} \,
u_y^{(3)} \,
u_x^{(4)} \,
u_y^{(4)} \,
u_x^{(5)} \,
u_y^{(5)}
\big]^T
Whereby "dofs" can be used to:
* **Reorder** "u" such that is can be easily (even directly) partitioned. For example, consider that all :math:`x`-coordinates are *Prescribed* and all :math:`y`-coordinates are *Unknown*. In particular,
.. math::
\texttt{dofs} =
\begin{bmatrix}
6 & 0 \\
7 & 1 \\
8 & 2 \\
9 & 3 \\
10 & 4 \\
11 & 5
\end{bmatrix}
gives
.. math::
\texttt{u} =
\big[
u_y^{(0)} \,
u_y^{(1)} \,
u_y^{(2)} \,
u_y^{(3)} \,
u_y^{(4)} \,
u_y^{(5)} \, \;
u_x^{(0)} \,
u_x^{(1)} \,
u_x^{(2)} \,
u_x^{(3)} \,
u_x^{(4)} \,
u_x^{(5)}
\big]^T
=
\big[
\texttt{u}_u \, \;
\texttt{u}_p
\big]^T
which allows
.. math::
\texttt{u}_u &= \texttt{u[:6]} \\
\texttt{u}_p &= \texttt{u[6:]}
|
* **Eliminate** dependent nodes. For example, suppose that the displacement of all top nodes is equal to that of the bottom nodes. In this one could:
Conversion to a larger representation (up-sizing) can always be done uniquely, however, conversion to a more compact representation (down-sizing) can be done in two ways. In particular: