예제 #1
0
def steklov_eigen_solver(V, F, *positional_parameters, **keyword_parameters):

    try:
        op.tic()
        op.toc(silent=True)
    except Exception, e:
        op.toc(silent=True)
예제 #2
0
def check_rmatvec(M):
    op.tic()
    M.rmatvec(np.ones(M.shape[1]))
    op.toc()
    return
예제 #3
0
def check_matmat(M):
    op.tic()
    M.matmat(np.ones([M.shape[1], 10]))
    op.toc()
    return
예제 #4
0
        M = opt.s2lo(M_sp, M_sp)

        # by default the rmatvec is undefined.
        L.rmatvec = L.matvec
        H.rmatvec = H.matvec
        K.rmatvec = T.matvec
        T.rmatvec = K.matvec
        M.rmatvec = M.matvec

        if lumped_mass:
            invM = opt.diag2lo(1 / M_sp.data)
        else:
            invM = opt.inv_sparse(M_sp, M_sp)

        print "Finished Assembling Operators."
        output.timings.assemble = op.toc()

        #########################################
        # Preconditioned SLP system
        #########################################

        ########### SLP Preconditioner ###########

        print "Computing SLP Precondition...\n"
        op.tic()

        if natural_density_slp:
            if dense_solve:
                weq = SLA.solve(d(L), M.matvec(np.ones(n)))
            else:
                if not pre: