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)
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)
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)
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)