Exemplo n.º 1
0
def test_plot_mesh3c():
    mesh = Mesh()
    mesh.load(domain_mesh)
    mesh.refine_all_elements()
    mesh.refine_all_elements()

    plot_mesh_mpl_simple(mesh.nodes_dict, mesh.elements, plot_nodes=False)
Exemplo n.º 2
0
def test_plot_mesh2():
    mesh = Mesh()
    mesh.load(domain_mesh)
    mesh.refine_element(0)

    view = MeshView("Solution")
    view.show(mesh, lib="mpl", method="simple", show=False)
    plot_mesh_mpl_simple(mesh.nodes_dict, mesh.elements)
    plot_mesh_mpl_simple(mesh.nodes_dict, mesh.elements, plot_nodes=False)
    view.show(mesh, lib="mpl", method="orders", show=False)
    plot_mesh_mpl_orders(mesh.nodes_dict, mesh.elements)
Exemplo n.º 3
0
def test_plot_mesh1a():
    mesh = Mesh()
    mesh.load(domain_mesh)

    view = MeshView("Solution")
    view.show(mesh, lib="mpl", method="simple", show=False)
    plot_mesh_mpl_simple(mesh.nodes, mesh.elements)
    plot_mesh_mpl_simple(mesh.nodes_dict, mesh.elements)
    plot_mesh_mpl_simple(mesh.nodes, mesh.elements, plot_nodes=False)
    plot_mesh_mpl_simple(mesh.nodes_dict, mesh.elements, plot_nodes=False)
Exemplo n.º 4
0
def plot_mesh(mesh, axes=None, plot_nodes=True):
    nodes, elements, boundary, nurbs = mesh
    # remove the element markers
    elements = [x[:-1] for x in elements]
    return plot_mesh_mpl_simple(nodes, elements, axes=axes,
            plot_nodes=plot_nodes)