assemΒΆ
K = assem(edof, K, Ke)
[K, f] = assem(edof, K, Ke, f, fe)
- Description:
assem adds the element stiffness matrix
\(\mathbf{K}^e\), stored in Ke, to the structure stiffness matrix \(\mathbf{K}\), stored in K, according to the topology matrix edof.
The element topology matrix edof is defined as
edof\(= [el \quad \underbrace{dof_1\quad dof_2\quad\ldots \quad dof_{ned}}_{\text{global dof.}} ]\)
where the first column contains the element number, and columns 2 to \((ned+1)\) contain the corresponding global degrees of freedom (\(ned\) = number of element degrees of freedom).
In the case where the matrix \(\mathbf{K}^e\) is identical for several elements, assembling of these can be carried out simultaneously. Each row in edof then represents one element, i.e. \(nel\) is the total number of considered elements.
Edof\(= \left. \left[
\begin{array}{c}
el_1 \\
el_2 \\
\vdots \\
el_{nel}
\end{array}
\quad
\begin{array}{cccccc}
dof_1 & dof_2 & \cdots & \cdots & \cdots & dof_{ned} \\
dof_1 & dof_2 & \cdots & \cdots & \cdots & dof_{ned} \\
\vdots & \vdots & & & & \vdots \\
dof_1 & dof_2 & \cdots & \cdots & \cdots & dof_{ned}
\end{array}
\right] \right\} \text{one row for each element}\)
If \(\mathbf{fe}\) and \(\mathbf{f}\) are given in the function, the element load vector \(\mathbf{f}^e\) is also added to the global load vector \(\mathbf{f}\).