igl.cotmatrix(V,F,L) igl.massmatrix(V,F,igl.MASSMATRIX_TYPE_VORONOI,M) igl.invert_diag(M,Minv) # Bi-Laplacian Q = L * (Minv * L); # Zero linear term B = igl.eigen.MatrixXd.Zero(V.rows(),1); Z = igl.eigen.MatrixXd() Z_const = igl.eigen.MatrixXd() # Alternative, short hand mqwf = igl.min_quad_with_fixed_data() # Empty constraints Beq = igl.eigen.MatrixXd() Aeq = igl.eigen.SparseMatrixd() igl.min_quad_with_fixed_precompute(Q,b,Aeq,True,mqwf) igl.min_quad_with_fixed_solve(mqwf,B,bc,Beq,Z) # Constraint forcing difference of two points to be 0 Aeq = igl.eigen.SparseMatrixd(1,V.rows()) # Right hand, right foot Aeq.insert(0,6074,1) Aeq.insert(0,6523,-1) Aeq.makeCompressed()
igl.slice(L, vin, b, L_in_b) # Dirichlet boundary conditions from z-coordinate bc = igl.eigen.MatrixXd() Z = V.col(2) igl.slice(Z, b, bc) # Solve PDE solver = igl.eigen.SimplicialLLTsparse(-L_in_in) Z_in = solver.solve(L_in_b * bc) # slice into solution igl.slice_into(Z_in, vin, Z) # Alternative, short hand mqwf = igl.min_quad_with_fixed_data() # Linear term is 0 B = igl.eigen.MatrixXd() B.setZero(V.rows(), 1) # Empty constraints Beq = igl.eigen.MatrixXd() Aeq = igl.eigen.SparseMatrixd() # Our cotmatrix is _negative_ definite, so flip sign igl.min_quad_with_fixed_precompute(-L, b, Aeq, True, mqwf) igl.min_quad_with_fixed_solve(mqwf, B, bc, Beq, Z) # Pseudo-color based on solution C = igl.eigen.MatrixXd()