# Power Consumption Comparison of GPU Linear Solvers for Cellular Potts Model Simulations
## 2 Mathematical Background  
This section is devoted to the main details about the model under consideration. The description of the problem, and of the related algorithmic structure, accurately reflects the approach presented in [9]. From a mathematical point of view, the Cellular Potts model for biological systems can be thought of as a discrete-time Markov chain that regulates changes in a spatial lattice. This lattice is composed of a cluster of simply connected pixels whose changes are induced through the values of an energy function \(H\). More precisely, the system's evolution in time is characterized by probabilistic rules, applied to the lattice configuration, which model the interactions between adjacent cells in terms of cell size, cell shape, and the contact perimeter between cells. Formally, let us denote  
\[\tau=0,1,\ldots,N_{\tau}\]  
a sequence of \(N_{\tau}+1\) time steps, and  
\[\Omega=\{1,2,\ldots,N\}^{2}\]  
a two-dimensional square lattice consisting of \((N+1)^{2}\) points \(P=(i,j)\). Assume that \(N_{c}\) distinct cells dispersed throughout the medium cover some regions of \(\Omega\). The configurations of the cells through time are recorded by introducing a sequence of \(N_{\tau}+1\) index matrices \(L^{\tau}\), where the value \(L^{\tau}_{i,j}\in\{0,1,2,\ldots,N_{c}\}\) corresponds to the cell index which is placed by the pixel at position \((i,j)\) at time step \(\tau\). In the usual convention:  
* \(L^{\tau}_{i,j}\) is 0 to indicate that pixel \((i,j)\) is occupied by the medium and not by other cells;
* \(L^{\tau}_{i,j}=k\) for some \(k\in\{1,2,\ldots,N_{c}\}\) to say that pixel \((i,j)\) is part of the \(k\)-th cell. The system's evolution is completely kept in the sequence of matrices \(\{L^{\tau}\}_{\tau=0,1,\ldots,N_{\tau}}\). The transition in state, that is, modifications of the values in \(L^{\tau}\)'s entries as \(\tau\) grows, is conveyed by probabilistic rules involving cellular dynamism, such as proliferation and motility, which require the introduction of a vector field,  
\[f_{P}\in\mathbb{R}^{2},\quad\forall P\in\Omega\]  
representing the direction of cellular movement. That is, \(f_{P}\) models the intended direction of cellular processes attributed to the pixel at \(P\). For example, assuming there is only one cell in the medium, a possible representation of \(L^{\tau}\)s evolution is shown in Figure 1.  
Randomness is introduced at each step by a version of the Metropolis algorithm [11]. Specifically, this is a modified algorithm whose acceptance criterion depends on the values of a peculiar Hamiltonian function \(H\), a measure of the system energy, treating the whole scheme as a random dynamical system. Recalling the description in [9], the computation of \(H\) consists in the following steps: \begin{table}
\begin{tabular}{c l c c c} \hline \hline
**M** & **Solver** & \(N_{\tau}\) **= 3000** & \(N_{\tau}\) **= 6000** & \(N_{\tau}\) **= 9000** \\ \hline
450 & [PERSON] & 182.41 & 348.91 & 523.93 \\  & LU & 135.34 & 278.13 & 464.84 \\  & [PERSON]–[PERSON] & 113.91 & 223.91 & 326.91 \\  & Custom CG & 99.10 & 202.81 & 292.98 \\ \hline
750 & [PERSON] & 315.97 & 650.14 & 902.49 \\  & LU & 244.95 & 516.01 & 706.93 \\  & [PERSON]–[PERSON] & 197.75 & 452.99 & 570.64 \\  & Custom CG & 141.01 & 386.33 & 442.93 \\ \hline
900 & [PERSON] & 450.91 & 991.81 & 1483.83 \\  & LU & 354.94 & 763.19 & 1148.09 \\  & [PERSON]–[PERSON] & 294.46 & 612.01 & 940.93 \\  & Custom CG & 254.91 & 513.92 & 750.56 \\ \hline \hline \end{tabular}
\end{table} 
Table 1: _Cont._1. _Initialization_ (\(\tau=0\)): This first step creates the simulated environment; each lattice site is initialized to either medium or a specific cell. 2. _Modified Metropolis algorithm_ (\(\tau=1,\ldots,N_{\tau}\)): At each time step \(\tau\), the system simulates \(M\geq 1\) attempts for updating an index of one or more pixels. For each trial \(l=1,\ldots,M\), the scheme repeats these procedures: 1. _Pixel selection_: This step selects a random pixel \(P\) and one of its eight neighboring (surrounding) pixels \(Q\); 2.