where \code{mesh} is a \code{Mesh} object defining the structure for which the
equations of statics are to be solved, and \code{spatial\_dimension} is the
dimensionality of the problem. If \code{spatial\_dimension} is omitted, the
problem is assumed to have the same dimensionality as the one specified by the
mesh.
\note[\ 1]{Dynamic computations are not supported to date.}
\note[\ 2]{Structural meshes are created and loaded as described in
Section~\ref{sect:common:mesh} with \code{MeshIOMSHStruct} instead of \code{MeshIOMSH}.}
\vspace{1cm}
This model contains at least the following \code{Vectors}:
\begin{description}
\item[boundary] contains a boolean value for each degree of freedom
specifying whether that degree is blocked or not. A Dirichlet boundary
condition can be prescribed by setting the \textbf{boundary} value of a degree
of freedom to \code{true}. A Neumann boundary condition can be applied
by setting the corresponding \textbf{boundary} value to \code{false}.
The \textbf{displacement} is computed for all degrees of freedom for which the \textbf{boundary} value is set to \code{false}. For the remaining degrees of freedom, the imposed values (zero by default after initialization) are kept.
\item[displacement\_rotation] contains the generalized displacements (displacements and rotations) of all
degrees of freedom. It can be either a computed displacement for free degrees
of freedom or an imposed displacement in case of blocked ones ($\vec{u}$ in
the following).
\item[force\_moment] contains the generalized external forces (forces and moments) applied to the
nodes ($\vec{f_{\st{ext}}}$ in the following).
\item[residual] contains the difference between external and internal forces and
moments. On the blocked degrees of freedom, \textbf{residual} contains the support
reactions ($\vec{r}$ in the following). It should be mentioned that at
equilibrium, \textbf{residual} should be zero on the free degrees of freedom.
\end{description}
An example to help understand how to use this model will be presented in the
next section.
\section{Model setup}
\label{sec:structMechMod:setup}
\subsection{Initialization}
The easiest way to initialize the structural mechanics model is:
%\begin{cpp}
% model.initModel();
%
% StructuralMaterial mat1;
% mat1.E=2.05e11;
% mat1.I=0.00128;
% mat1.A=0.01; // for example
%
% model.addMaterial(mat1); ASK NICO ABOUT THIS CRAP
%
% model.initVectors();
% model.initImplicitSolver();
%\end{cpp}
%The method \code{initModel} computes the shape functions, \code{addMaterial} sets the material parameters to be used, \code{initVectors} initializes all the internal vectors mentioned before and \code{initImplicitSolver} creates the stiffness matrix.
\begin{cpp}
model.initFull();
\end{cpp}
The method \code{initFull} computes the shape functions, initializes the internal vectors mentioned above and allocates the memory for the stiffness matrix.
Material properties are defined using the \code{StructuralMaterial}
structure described in Table~\ref{tab:structMechMod:strucMaterial}. Such a definition could for instance look like
\begin{cpp}
StructuralMaterial mat;
mat.E=3e10;
mat.I=0.0025;
mat.A=0.01;
\end{cpp}
\begin{table}[htb] \centering
\begin{tabular}{c|c} field & description \\\hline\hline
\code{E} & Young's modulus \\\hline
\code{A} & Cross section area \\\hline
\code{I} & Second cross sectional moment of inertia (for 2D elements)
\\\hline \code{Iy} & \code{I} around beam $y$--axis (for 3D elements)
\\\hline \code{Iz} & \code{I} around beam $z$--axis (for 3D elements)
\\\hline \code{GJ} & Polar moment of inertia of beam cross section (for 3D elements)
\end{tabular}
\caption{Material properties for structural elements as defined by
the structure \code{StructuralMaterial}.}
\label{tab:structMechMod:strucMaterial}
\end{table}
Materials can be added to the model's \code{element\_material} vector using
\begin{cpp}
model.addMaterial(material);
\end{cpp}
They are used just like for the \code{SolidMechanicsModel}