xref: /libCEED/examples/bps.md (revision edf0491998c1d524f2f70fdd683669b8904cb3b6)
1(bps)=
2
3# CEED Bakeoff Problems
4
5```{include} ./README.md
6:start-after: bps-inclusion-marker
7:end-before: bps-exclusion-marker
8```
9
10(mass-operator)=
11
12## Mass Operator
13
14The Mass Operator used in BP1 and BP2 is defined via the $L^2$ projection problem, posed as a weak form on a Hilbert space $V^p \subset H^1$, i.e., find $u \in V^p$ such that for all $v \in V^p$
15
16$$
17\langle v,u \rangle = \langle v,f \rangle ,
18$$ (eq-general-weak-form)
19
20where $\langle v,u\rangle$ and $\langle v,f\rangle$ express the continuous bilinear and linear forms, respectively, defined on $V^p$, and, for sufficiently regular $u$, $v$, and $f$, we have:
21
22$$
23\begin{aligned} \langle v,u \rangle &:= \int_{\Omega} \, v \, u \, dV ,\\ \langle v,f \rangle &:= \int_{\Omega} \, v \, f \, dV . \end{aligned}
24$$
25
26Following the standard finite/spectral element approach, we formally expand all functions in terms of basis functions, such as
27
28$$
29\begin{aligned}
30u(\bm x) &= \sum_{j=1}^n u_j \, \phi_j(\bm x) ,\\
31v(\bm x) &= \sum_{i=1}^n v_i \, \phi_i(\bm x) .
32\end{aligned}
33$$ (eq-nodal-values)
34
35The coefficients $\{u_j\}$ and $\{v_i\}$ are the nodal values of $u$ and $v$, respectively.
36Inserting the expressions {eq}`eq-nodal-values` into {eq}`eq-general-weak-form`, we obtain the inner-products
37
38$$
39\langle v,u \rangle = \bm v^T M \bm u , \qquad  \langle v,f\rangle =  \bm v^T \bm b \,.
40$$ (eq-inner-prods)
41
42Here, we have introduced the mass matrix, $M$, and the right-hand side, $\bm b$,
43
44$$
45M_{ij} :=  (\phi_i,\phi_j), \;\; \qquad b_{i} :=  \langle \phi_i, f \rangle,
46$$
47
48each defined for index sets $i,j \; \in \; \{1,\dots,n\}$.
49
50(laplace-operator)=
51
52## Laplace's Operator
53
54The Laplace's operator used in BP3-BP6 is defined via the following variational formulation, i.e., find $u \in V^p$ such that for all $v \in V^p$
55
56$$
57a(v,u) = \langle v,f \rangle , \,
58$$
59
60where now $a (v,u)$ expresses the continuous bilinear form defined on $V^p$ for sufficiently regular $u$, $v$, and $f$, that is:
61
62$$
63\begin{aligned} a(v,u) &:= \int_{\Omega}\nabla v \, \cdot \, \nabla u \, dV ,\\ \langle v,f \rangle &:= \int_{\Omega} \, v \, f \, dV . \end{aligned}
64$$
65
66After substituting the same formulations provided in {eq}`eq-nodal-values`, we obtain
67
68$$
69a(v,u) = \bm v^T K \bm u ,
70$$
71
72in which we have introduced the stiffness (diffusion) matrix, $K$, defined as
73
74$$
75K_{ij} = a(\phi_i,\phi_j),
76$$
77
78for index sets $i,j \; \in \; \{1,\dots,n\}$.
79