Exemple #1
0
def appArgs():
    val = (ctypes.c_char_p * 4)()
    (val[0], val[1], val[2], val[3]) = [
        b'Nx=<100>', b'Ny=<100>', b'overlap=<1>', b'generate_random_rhs=<0>'
    ]
    desc = (ctypes.c_char_p * 4)()
    (desc[0], desc[1], desc[2], desc[3]) = [
        b'Number of grid points in the x-direction.',
        b'Number of grid points in the y-direction.',
        b'Number of grid points in the overlap.',
        b'Number of generated random right-hand sides.'
    ]
    hpddm.optionParseInts(opt, args, 4,
                          ctypes.cast(val, ctypes.POINTER(ctypes.c_char_p)),
                          ctypes.cast(desc, ctypes.POINTER(ctypes.c_char_p)))
    (val[0], val[1]) = [b'symmetric_csr=(0|1)', b'nonuniform=(0|1)']
    (desc[0], desc[1]) = [
        b'Assemble symmetric matrices.',
        b'Use a different number of eigenpairs to compute on each subdomain.'
    ]
    hpddm.optionParseArgs(opt, args, 2,
                          ctypes.cast(val, ctypes.POINTER(ctypes.c_char_p)),
                          ctypes.cast(desc, ctypes.POINTER(ctypes.c_char_p)))
    val = None
    desc = None
Exemple #2
0
def appArgs():
    val = (ctypes.c_char_p * 4)()
    (val[0], val[1], val[2], val[3]) = [ b'Nx=<100>', b'Ny=<100>', b'overlap=<1>', b'generate_random_rhs=<0>' ]
    desc = (ctypes.c_char_p * 4)()
    (desc[0], desc[1], desc[2], desc[3]) = [ b'Number of grid points in the x-direction.', b'Number of grid points in the y-direction.', b'Number of grid points in the overlap.', b'Number of generated random right-hand sides.' ]
    hpddm.optionParseInts(opt, args, 4, ctypes.cast(val, ctypes.POINTER(ctypes.c_char_p)), ctypes.cast(desc, ctypes.POINTER(ctypes.c_char_p)))
    (val[0], val[1]) = [ b'symmetric_csr=(0|1)', b'nonuniform=(0|1)' ]
    (desc[0], desc[1]) = [ b'Assemble symmetric matrices.', b'Use a different number of eigenpairs to compute on each subdomain.' ]
    hpddm.optionParseArgs(opt, args, 2, ctypes.cast(val, ctypes.POINTER(ctypes.c_char_p)), ctypes.cast(desc, ctypes.POINTER(ctypes.c_char_p)))
    val = None
    desc = None
Exemple #3
0
def appArgs():
    val = (ctypes.c_char_p * 2)()
    (val[0], val[1]) = [ b'generate_random_rhs=<1>', b'fill_factor=<18>' ]
    desc = (ctypes.c_char_p * 2)()
    (desc[0], desc[1]) =  [ b'Number of generated random right-hand sides.', b'Specifies the fill ratio upper bound (>= 1.0) for ILU.' ]
    hpddm.optionParseInts(opt, args, 2, ctypes.cast(val, ctypes.POINTER(ctypes.c_char_p)), ctypes.cast(desc, ctypes.POINTER(ctypes.c_char_p)))
    val[0] = b'drop_tol=<1.0e-4>'
    desc[0] = b'Drop tolerance (0 <= tol <= 1) for an incomplete LU decomposition.'
    hpddm.optionParseDoubles(opt, args, 1, ctypes.cast(val, ctypes.POINTER(ctypes.c_char_p)), ctypes.cast(desc, ctypes.POINTER(ctypes.c_char_p)))
    val[0] = b'matrix_filename=<input_file>'
    desc[0] = b'Name of the file in which the matrix is stored.'
    hpddm.optionParseArgs(opt, args, 1, ctypes.cast(val, ctypes.POINTER(ctypes.c_char_p)), ctypes.cast(desc, ctypes.POINTER(ctypes.c_char_p)))
    val = None
    desc = None