# Computational Analysis of PDE-Based Shape Analysis Models by Exploring the Damped Wave Equation
## 3 Basic Discretisation
### Spatial Discretisation  
We now want to explain spatial discretisation. Let us illustrate the proceeding at hand of Equation (7). Setting \(k=0\) in this example will get us the discretisation for Equation (6). First, we consider Equation (7) over a shape \(\mathcal{M}\) and time interval \(\mathcal{I}\). The integration over time and space will lead to  
\[\int\limits_{\mathcal{I}}\int\limits_{\mathcal{M}}\partial_{tt}u(x,t)+k \partial_{t}u(x,t)\,\mathrm{d}x\,\mathrm{d}t=\int\limits_{\mathcal{I}}\int \limits_{\mathcal{M}}\Delta_{\mathcal{M}}\,u(x,t)\,\mathrm{d}x\,\mathrm{d}t \tag{11}\]  
In the discretisation, we subdivide our meshed surface \(\mathcal{M}_{d}\) and the time interval \(\mathcal{I}\) in the following manner:  
\[\mathcal{M}_{d}=\bigcup\limits_{i=1}^{N}\Omega_{i},\quad\mathcal{I}=\bigcup \limits_{l=1}^{M}\mathcal{I}_{l}\quad\text{with}\quad\mathcal{I}_{l}=[t_{l-1}, t_{l}] \tag{12}\]  
with \(N\) the total number of barycentric cell volumes \(\Omega_{i}\) located around the point \(x_{i}\) and \(M\) the total number of time intervals \(0:=t_{0}<t_{1}<\ldots<t_{M}:=T\) with the time increment \(\tau=t_{l}-t_{l-1}\) uniform for all \(l\in\{1,\ldots,M\}\). This allows us to focus on one arbitrarily chosen time period with \(t\in\mathcal{I}_{l}\) and a fixed cell \(\Omega_{i}\):  
\[\int\limits_{\mathcal{I}_{l}}\int\limits_{\Omega_{i}}\partial_{tt}u(x,t)+k \partial_{t}u(x,t)\,\mathrm{d}x\,\mathrm{d}t=\int\limits_{\mathcal{I}_{l}} \int\limits_{\Omega_{i}}\Delta_{\mathcal{M}}\,u(x,t)\,\mathrm{d}x\,\mathrm{d}t \tag{13}\]  
Additionally, with the definition of the cell average  
\[u_{i}(t)=\frac{1}{|\Omega_{i}|}\int\limits_{\Omega_{i}}u(x,t)\approx u(\bar{ x}_{i},t)\,\mathrm{d}x \tag{14}\]  
Figure 3: **(Left)** The 2D Riemannian manifold \(\mathcal{M}\) of the centaur’s head. **(Middle)** The discrete approximation \(\mathcal{M}_{d}\) of this manifold. \(\mathcal{M}_{d}\) is displayed via the point cloud \(\mathcal{P}\) and the triangles \(\mathcal{T}\). **(Right)** The setting for the calculation of the LBO around the point \(x_{i}\). The yellow area indicates the cell volume \(\Omega_{i}\). Additionally, we see the two angles \(\alpha_{ij}\) and \(\beta_{ij}\) opposite to the edge \((x_{i},x_{j})\) (green line). where the approximation is an identity up to second-order accuracy [15] and where \(|\Omega_{i}|\) denotes the area of \(\Omega_{i}\), we can calculate the averaged Laplacian as  
\[Lu_{i}(t)=\frac{1}{|\Omega_{i}|}\int_{\Omega_{i}}\Delta_{\mathcal{M}}\,u(x,t)\; \mathrm{d}x \tag{15}\]  
This integral is solved with the use of the divergence theorem and the application of the cotangent weight scheme [16], which we will recall in a moment. In the end, we obtain the ODE system  
\[\ddot{\mathbf{u}}(t)+k\dot{\mathbf{u}}(t)=L\mathbf{u}(t) \tag{16}\]  
where the \(N\)-dimensional vector \(\mathbf{u}(t)=(u_{1}(t),\dots,u_{N}(t))^{\top}\) will store all functions \(u_{i}(t)\). The cotangent weight scheme will give us the discrete LBO \(L\in\mathbb{R}^{N\times N}\)[17; 18]. This matrix is composed via the sparse matrix representation \(L=D^{-1}W\) with  
\[W_{ij}= \begin{cases}-\sum\limits_{j\in\
u_{i}}w_{ij},&\text{if }x_{i}=x_{j}\\ w_{ij},&\text{if }x_{i}\
eq x_{j}\text{ and }j\in\
u_{i}\\ 0,&\text{else}\end{cases}  \tag{17}\]  
computed with the cotangent formulae  
\[w_{ij}= \begin{cases}\frac{\cot a_{ij}+\cot\beta_{ij}}{2}&\text{if }(x_{i},x_{j}) \in E_{i}\\ \frac{\cot a_{ij}}{2}&\text{if }(x_{i},x_{j})\in E_{b}\end{cases}  \tag{18}\]  
Thereby, \(\
u_{i}\) denotes the neighbourhood of vertexes \(x_{i}\), \(E_{i}\) as the set of interior edges and \(E_{b}\) as the set of boundary edges. Let us mention that in our considered scenarios, \(E_{b}=\emptyset\), since we assume we deal with a closed manifold. The angles \(\alpha_{ij}\) and \(\beta_{ij}\) are opposite to the edge \((x_{i},x_{j})\), and the matrix \(D=\mathrm{diag}(|\Omega_{1}|,\dots,|\Omega_{i}|,\dots,|\Omega_{N}|)\) contains the local cell areas.