Discrete Space

To enable numerical evaluation of the integrals in the weak form, the first step is to discretize the smooth vector fields and . This allows them to be represented by a finite set of samples, along with appropriate interpolation functions.

Example 17.1.1 (1D Function Interpolation). In 1D, to approximate a function using three sample points , , (Figure 17.1.1), we can use interpolation functions and form .

Figure 17.1.1. With interpolation functions , , and sample points , , , a function can be approximated as .

Given a set of sample points indexed by or in the simulation domain, we can approximate the test function and the DOF as: where refers to the -th dimension of evaluated at sample point at time , and is the interpolation function at sample point . In this way, we similarly have: Plugging these discretizations into the weak form (Equation (17.1)) and expressing summations with the index notation, we obtain: On the left-hand side, we see that the sample values and are in fact independent of , so we can move them out of the integral and obtain: where is the mass matrix.

Remark 17.1.1 (Mass Matrix Properties). The mass matrix (Equation (17.1.2)) is symmetric and positive semi-definite because it can be expressed as: where . Thus, for any vector , In practice, this mass matrix may be singular. To address this, we typically use a "mass lumping" strategy to approximate the mass matrix with a diagonal and positive definite form. This is achieved by summing each row and defining:

After spatial discretization, the solution of the weak form (Equation (17.1)) is confined to -dimensional function spaces, where represents the number of sample points, assuming all interpolation functions are mutually orthogonal. This means that there could be continuous solutions to the weak form outside of our solution space. In such cases, we can only provide an approximate solution based on the chosen sample points and interpolation functions.

Definition 17.1.1 (Orthogonal Functions). Similar to the orthogonality of two vectors and , defined as , the orthogonality of two functions and is defined as: Just as a basis of vectors can span a finite-dimensional space, orthogonal functions can form an infinite basis for a function space. Conceptually, the integral above is analogous to a vector dot product.

That being said, to generate equations solvable for the unknowns, the arbitrary test function does not need to cover all possibilities to produce an infinite number of equations. Instead, we only need to produce a finite set of equations that spans the entire solution space. Therefore, for traversing all sample points, and , we can assign the test function: to obtain equations: resulting in unknowns and equations, bringing us closer to the discrete form.

The two integrals on the right side of Equation (17.1.3) can be evaluated analytically or using quadrature rules, depending on the specific choice of interpolation functions. We will discuss these in detail in future lectures.