# From Stress to Shape: Equilibrium of Cloister and Cross Vaults
## 3 Outline of the Method
### Numerical Discretization and Algorithm
Then, the discretized version of Equation (6) is solved parametrically with respect to these boundary values. In the vector notation introduced above, the transverse equilibrium equation reads  
\[(K_{xx,Hj}\hat{f}_{j})(K_{yy,Hh}\hat{F}_{h})+(K_{yy,Hj}\hat{f}_{j})K_{xx,Hh} \hat{F}_{h})-2(K_{xy,Hj}\hat{f}_{j})(K_{xy,Hh}\hat{F}_{h})+\hat{p}_{H}=0 \tag{15}\]  
Figure 2: Approximation of the characteristic function for a generic point \(\mathbf{x}\). where the summation convention on repeated indices is assumed on the lower-case indices \((j,h=1,2,\dots,N)\), whilst the upper-case index \(H(H=1,2,\dots,N_{I})\) is not summed, and \(\mathbf{K}_{xx}\), \(\mathbf{K}_{yy}\), and \(\mathbf{K}_{xy}\) are coefficient matrices computed via the LSM scheme, representing the discrete counterparts of the second derivatives \(\partial^{2}/\partial x_{1}^{2}\), \(\partial^{2}/\partial x_{2}^{2}\), and \(\partial^{2}/\partial x_{1}\partial x_{2}\). Equation (15) can be rewritten in a compact form by factoring out the unknown term \(\mathbf{\hat{f}}\), as  
\[K_{ij}\hat{f}_{j}+\hat{p}_{i}=0, \tag{16}\]  
where  
\[K_{ij}=(K_{yy,Hh}\hat{F}_{h})K_{xx,Hj}+(K_{xx,Hh}\hat{F}_{h})K_{yy,Hj}-2(K_{xy, Hh}\hat{F}_{h})K_{xy,Hj}. \tag{17}\]  
Expression (16) can be also rewritten distinguishing between boundary conditions and domain equations, in the form  
\[\mathbf{K}_{II}\hat{\mathbf{f}}_{I}+\mathbf{K}_{IB}\hat{\mathbf{f}}_{B}+ \mathbf{\hat{p}}_{I}=\mathbf{0},\quad\hat{\mathbf{f}}_{B}=\mathbf{\hat{f}}_{B}, \tag{18}\]  
where \(\mathbf{K}_{II}\) and \(\mathbf{K}_{IB}\) are submatrices of \(\mathbf{K}\) corresponding to rows and columns associated to internal and boundary nodes. Finally, \(\mathbf{\hat{f}}_{B}\) is the vector of the boundary parameters. From Equation (18), \(\mathbf{\hat{f}}_{I}\) can be evaluated as  
\[\mathbf{\hat{f}}_{I}=\mathbf{K}_{II}^{-1}(\mathbf{\hat{p}}_{I}-\mathbf{K}_{IB }\mathbf{\hat{f}}_{B}). \tag{19}\]  
On introducing (19) into a discrete version \(I_{2}\) of the objective function \(I\), we get  
\[I_{2}=\sum_{i=1}^{N_{g}}{(f_{i}-f_{intr,i})^{2}}+\sum_{i=1}^{N_{h}}{(f_{i}-f_{ extr,i})^{2}}. \tag{20}\]  
We then optimize \(I_{2}(\mathbf{\hat{f}}_{I})\) with respect to \(\mathbf{\hat{f}}_{B}\). Notice that it is possible to compute explicitly the gradient of \(I_{2}(f_{I}(f_{B}))\) through the chain rule, in the form  
\[\frac{\partial I_{2}}{\partial f_{B,j}}=\frac{\partial I}{\partial f_{I,h} \partial f_{B,j}} \tag{21}\]  
that is  
\[\frac{\partial I_{2}}{\partial f_{B,j}}= \begin{cases}-2f_{i,h}(K_{II}K_{IB})_{ hj}&f_{i}<f_{i,intr}\quad\text{or}\quad f_{i}>f_{i,extr}\\ \mathbf{0}&\text{otherwise}\end{cases} . \tag{22}\]  
The membrane shape obtained at the end of this minimization process can be compared to the actual geometry of the vault. If the final value of the objective function \(I_{2}\) is zero, the membrane is completely comprised between the intrados and the extrados of the considered vault, and therefore the solution is statically admissible and proves the stability of the vault under the given loads, according to the Safe Theorem of Limit Analysis. In such a case, the degree of safeness of the structure can be assessed by reducing the slenderness of the vault and computing a geometrical safety factor, as proposed by [PERSON] [6].