def steklov_eigen_solver(V, F, *positional_parameters, **keyword_parameters): try: op.tic() op.toc(silent=True) except Exception, e: op.toc(silent=True)
def check_rmatvec(M): op.tic() M.rmatvec(np.ones(M.shape[1])) op.toc() return
def check_matmat(M): op.tic() M.matmat(np.ones([M.shape[1], 10])) op.toc() return
print 'top_k: %d\n' % top_k print 'num_iter: %d\n' % num_iter print 'hmat_eps: %f\n' % hmat_eps output = C() output.timings = C() output.V = V output.F = F output.input = input outpre = C() n = V.shape[0] print "Assembling Operators...\n" op.tic() LL, KK, TT, HH, MM = op.symmetrized_boundary_operators( V, F, eps=hmat_eps) #, 'dense') # W = gx.galerkin_weights(V, F) W = galerkin_weights(V, F) if lumped_mass: # using a lumped mass matrix to speed up. print('Lumped mass option is currently unavailable.') assert (False) # M_sp = gx.mass_matrix(V, F) # M_sp = scipy.sparse.csc_matrix((M_sp.data, (M_sp.row, M_sp.col)), shape=M_sp.shape) else: M_sp = mat(MM)