Now we compute the load vector for the three-dimensional case. The load vector is related to the integral of the product of the source function and the trial function. Consider the integral for a single tetrahedron with vertices
(6.45)
The trial function on the tetrahedron has the form . To evaluate the integral, the source function must be interpolated on the tetrahedron by a linear function. Let us represent in the form . The coefficients are determined from the interpolation conditions at the nodes
(6.46)
Since the hat functions equal one at their own node and zero at the others, the linear interpolant of the source function, expressed through them, takes the form
(6.47)
where are the values of the source function at the vertices of the tetrahedron.
Substitute the interpolated source function and the trial function into (6.45). We take into account (6.30) from the section on hat functions
where the indices and run over the vertices of the tetrahedron .
We use the relations (6.31) for the integrals of products of hat functions, derived when computing the damping matrix, where is the volume of the tetrahedron, which is computed by formula (6.15). After collecting like terms we obtain
We introduce the notation for the elements of the local load vector of the tetrahedron
(6.48)
Thus, the local load vector for a three-dimensional tetrahedral element has the form
(6.49)
Note that the resulting load vector coincides with the product of the local damping matrix (6.33) and the vector of nodal source values, that is .
The global load vector is obtained by summing the contributions from all tetrahedral elements of the mesh using the assembly method: the elements of the local vectors are added to the corresponding elements of the global vector according to the global node numbering. The dimension of the global load vector equals , where is the total number of nodes in the mesh. It is important to note that for interior nodes the contributions from all adjacent tetrahedral elements containing the given node are summed. For boundary nodes the element contributions are assembled in the same way, but the corresponding components of the system may be modified when boundary conditions are imposed.