def visualize(parameters):
    paraview.simple._DisableFirstRenderCameraReset()
    filename = os.path.join(parameters.output_dir, ('%s-domain.xmf' % parameters.sim))
    if (not os.path.isfile(filename)):
        raise IOError(("File '%s' does not exist." % filename))
    dataDomain = XDMFReader(FileNames=[filename])
    RenameSource(('%s-domain' % parameters.sim), dataDomain)
    scene = GetAnimationScene()
    scene.UpdateAnimationUsingDataTimeSteps()
    view = GetActiveViewOrCreate('RenderView')
    domainDisplay = Show(dataDomain, view)
    domainDisplay.Representation = 'Wireframe'
    domainDisplay.AmbientColor = [0.5, 0.5, 0.5]
    dataFaults = []
    for fault in parameters.faults:
        filename = os.path.join(parameters.output_dir, ('%s-%s_info.xmf' % (parameters.sim, fault)))
        if (not os.path.isfile(filename)):
            raise IOError(("File '%s' does not exist." % filename))
        data = XDMFReader(FileNames=[filename])
        RenameSource(('%s-%s' % (parameters.sim, fault)), data)
        dataFaults.append(data)
    groupFaults = GroupDatasets(Input=dataFaults)
    faultDisplay = Show(groupFaults, view)
    faultDisplay.SetRepresentationType('Surface With Edges')
    faultDisplayProperties = GetDisplayProperties(groupFaults, view=view)
    faultDisplayProperties.DiffuseColor = [0.25, 0.25, 1.0]
    glyph = Glyph(Input=groupFaults, GlyphType='Arrow')
    glyph.Vectors = ['POINTS', parameters.field]
    glyph.GlyphMode = 'All Points'
    glyphDisplay = Show(glyph, view)
    glyphDisplay.Representation = 'Surface'
    view.ResetCamera()
    view.Update()
    Render()
def visualize(parameters):
    paraview.simple._DisableFirstRenderCameraReset()
    filename = os.path.join(parameters.output_dir, ('%s-domain.xmf' % parameters.sim))
    if (not os.path.isfile(filename)):
        raise IOError(("File '%s' does not exist." % filename))
    dataDomain = XDMFReader(FileNames=[filename])
    RenameSource(('%s-domain' % parameters.sim), dataDomain)
    scene = GetAnimationScene()
    scene.UpdateAnimationUsingDataTimeSteps()
    view = GetActiveViewOrCreate('RenderView')
    domainDisplay = Show(dataDomain, view)
    domainDisplay.Representation = 'Wireframe'
    domainDisplay.AmbientColor = [0.5, 0.5, 0.5]
    dataFaults = []
    for fault in parameters.faults:
        filename = os.path.join(parameters.output_dir, ('%s-%s_info.xmf' % (parameters.sim, fault)))
        if (not os.path.isfile(filename)):
            raise IOError(("File '%s' does not exist." % filename))
        data = XDMFReader(FileNames=[filename])
        RenameSource(('%s-%s' % (parameters.sim, fault)), data)
        dataFaults.append(data)
    groupFaults = GroupDatasets(Input=dataFaults)
    faultDisplay = Show(groupFaults, view)
    faultDisplay.SetRepresentationType('Surface With Edges')
    faultDisplayProperties = GetDisplayProperties(groupFaults, view=view)
    faultDisplayProperties.DiffuseColor = [0.25, 0.25, 1.0]
    glyph = Glyph(Input=groupFaults, GlyphType='Arrow')
    glyph.Vectors = ['POINTS', parameters.field]
    glyph.GlyphMode = 'All Points'
    glyphDisplay = Show(glyph, view)
    glyphDisplay.Representation = 'Surface'
    view.ResetCamera()
    view.Update()
    Render()