The Assembler is class embedded in an Integrator object, and its function is to generate the global mass matrix \(\mathcal{M}\), global stiffness matrix \(\mathcal{K}\), global damping matrix \(\mathcal{C}\) as well as the global external force vector \(\mathcal{F}\). This process is done by looping over all the elements and adding their contribution to the total quantity to be assembled. These tasks are implemented specifically in the following member function:
The Mesh object is employed in the Assembler and Integrator:
The assemble process is performed in two steps:
\[ \mathcal{M} = \sum_\textrm{e = 1}^{\textrm{N}_\textrm{e}} {\mathbf{A}^\textrm{e}}^\top \, \textbf{M}^\textrm{e} \,\mathbf{A}^\textrm{e} \,, \; \mathcal{C} = \sum_\textrm{e = 1}^{\textrm{N}_\textrm{e}} {\mathbf{A}^\textrm{e}}^\top \, \textbf{C}^\textrm{e} \,\mathbf{A}^\textrm{e} \,, \; \mathcal{K} = \sum_\textrm{e = 1}^{\textrm{N}_\textrm{e}} {\mathbf{A}^\textrm{e}}^\top \, \textbf{K}^\textrm{e} \,\mathbf{A}^\textrm{e} \,, \; \mathcal{F} = \sum_\textrm{e = 1}^{\textrm{N}_\textrm{e}} {\mathbf{A}^\textrm{e}}^\top \, \textbf{F}^\textrm{e} \,, \nonumber \]
where the matrices \(\mathcal{M}, \mathcal{C}, \mathcal{K} \in \mathbb{F}^{\textrm{N}_{\textrm{total}} \times \textrm{N}_{\textrm{total}}}\), and the vector \(\mathcal{F} \in \mathbb{R}^{\textrm{N}_{\textrm{total}}}\).\[ \textbf{M} = \mathbf{T}^\top \mathcal{M} \, \mathbf{T} \,, \; \textbf{C} = \mathbf{T}^\top \mathcal{C} \, \mathbf{T} \,, \; \textbf{K} = \mathbf{T}^\top \mathcal{K} \, \mathbf{T} \,, \; \textbf{F} = \mathbf{T}^\top \mathcal{F} \,, \nonumber \]
where the matrices \(\textbf{M}, \textbf{C}, \textbf{K} \in \mathbb{R}^{\textrm{N}_{\textrm{free}} \times \textrm{N}_{\textrm{free}}}\), and the vector \(\mathbf{F} \in \mathbb{R}^{\textrm{N}_{\textrm{free}}}\).REFERENCE: