Example #1
0
def cmd_current(ctx, current, boundary, drift, name):
    '''
    Make paths through a dark and dangerous dungeon.
    '''
    bres = get_result(ctx, 'boundary', boundary)
    dres = get_result(ctx, 'drift', drift)
    # eg larf.current.dqdt
    cres = config_call(ctx, "current", current, name, parents=[bres, dres])
    save_result(ctx, cres)
Example #2
0
def cmd_drift(ctx, drift, boundary, wires, points, name):
    '''
    Make paths through a dark and dangerous dungeon.
    '''
    bres = get_result(ctx, 'boundary', boundary)
    wres = get_result(ctx, 'wires', wires)
    pres = get_result(ctx, 'points', points)
    # eg larf.rogue.patch
    dres = config_call(ctx, "drift", drift, name, parents=[bres, wres, pres])
    save_result(ctx, dres)
Example #3
0
def cmd_evaluate(ctx, evaluate, boundary, volume, name):
    '''
    Produce grid function coefficients for the boundary conditions at the associated surface.
    '''
    bres = get_result(ctx, 'boundary', boundary)
    vreses = list()
    for vol in volume:
        vres = get_result(ctx, 'volume', vol)
        vreses.append(vres)

    # eg larf.evaluate.scalar
    eres = config_call(ctx, "evaluate", evaluate, name, parents=[bres]+vreses)
    save_result(ctx, eres)
    return
Example #4
0
def cmd_raster(ctx, raster, boundary, name):
    '''
    Evaluate a solution on a grid of points.
    '''
    bres = get_result(ctx, 'boundary', boundary)
    # eg larf.raster.rectilinear
    rres = config_call(ctx, "raster", raster, name, parents=[bres])
    save_result(ctx, rres)
Example #5
0
def cmd_points(ctx, points, wires, name):
    '''
    Generate points, possibly with a wires result as a guide.
    '''
    # eg: larf.points.wires
    wres = get_result(ctx, 'wires', wires)
    res = config_call(ctx, 'points', points, name, 'points', parents=[wres])
    save_result(ctx, res)
Example #6
0
def cmd_boundary(ctx, boundary, surface, name):
    '''
    Produce grid function coefficients for the boundary conditions at the associated surface.
    '''
    sres = get_result(ctx, 'surface', surface)
    # eg larf.boundary.scalar
    bres = config_call(ctx, "boundary", boundary, name, parents=[sres])
    save_result(ctx, bres)
    return
Example #7
0
def cmd_volume(ctx, volume, wires, name):
    '''
    Generate points in a volume.
    '''
    from larf.volume import combine_arrays
    wres = get_result(ctx, 'wires', wires)
    # eg larf.volume.wireplanes
    vres = config_call(ctx, 'volume', volume, name, 'volumes', parents=[wres], combine=combine_arrays)
    save_result(ctx, vres)
    return
Example #8
0
def cmd_surface(ctx, surface, wires, name):
    '''
    Generate surface from wires
    '''
    from larf.surface import combine_arrays
    wres = get_result(ctx, 'wires', wires)
    # eg larf.surface.wireplanes
    sres = config_call(ctx, 'surface', surface, name, 'surfaces', parents=[wres], combine=combine_arrays)
    save_result(ctx, sres)
    return