cortex.polyutils.Surface.create_biharmonic_solver¶
- Surface.create_biharmonic_solver(boundary_verts, clip_D=0.1)[source]¶
Set up biharmonic equation with Dirichlet boundary conditions on the cortical mesh and precompute Cholesky factorization for solving it. The vertices listed in boundary_verts are considered part of the boundary, and will not be included in the factorization.
To facilitate Cholesky decomposition (which requires a symmetric matrix), the squared Laplace-Beltrami operator is separated into left-hand-side (L2) and right-hand-side (Dinv) parts. If we write the L-B operator as the product of the stiffness matrix (V-W) and the inverse mass matrix (Dinv), the biharmonic problem is as follows (with u denoting non-boundary vertices)
\begin{eqnarray} L^2_{u} \phi &=& -\rho_{u} \\ \left[ D^{-1} (V-W) D^{-1} (V-W) \right]_{u} \phi &=& -\rho_{u} \\ \left[ (V-W) D^{-1} (V-W) \right]_{u} \phi &=& -\left[D \rho\right]_{u} \end{eqnarray}- Parameters:
- boundary_vertslist or ndarray of length V
Indices of vertices that will be part of the Dirichlet boundary.
- Returns:
- lhssparse matrix
Left side of biharmonic problem, (V-W) D^{-1} (V-W)
- rhssparse matrix, dia
Right side of biharmonic problem, D
- Dinvsparse matrix, dia
Inverse mass matrix, D^{-1}
- lhsfaccholesky Factor object
Factorized left side, solves biharmonic problem
- notboundaryndarray, int
Indices of non-boundary vertices