.. DO NOT EDIT. .. THIS FILE WAS AUTOMATICALLY GENERATED BY SPHINX-GALLERY. .. TO MAKE CHANGES, EDIT THE SOURCE PYTHON FILE: .. "examples/Meshes/Mesh6_2D.py" .. LINE NUMBERS ARE GIVEN BELOW. .. only:: html .. note:: :class: sphx-glr-download-link-note :ref:`Go to the end ` to download the full example code. .. rst-class:: sphx-glr-example-title .. _sphx_glr_examples_Meshes_Mesh6_2D.py: Mesh6_2D ======== Refined 2D mesh in zones. .. GENERATED FROM PYTHON SOURCE LINES 12-35 .. tab-set:: .. tab-item:: Static Scene .. image-sg:: /examples/Meshes/images/sphx_glr_Mesh6_2D_001.png :alt: Mesh6 2D :srcset: /examples/Meshes/images/sphx_glr_Mesh6_2D_001.png :class: sphx-glr-single-img .. tab-item:: Interactive Scene .. offlineviewer:: /home/docs/checkouts/readthedocs.org/user_builds/easyfea/checkouts/v1.9.0/docs/examples/Meshes/images/sphx_glr_Mesh6_2D_001.vtksz .. tab-set:: .. tab-item:: Static Scene .. image-sg:: /examples/Meshes/images/sphx_glr_Mesh6_2D_002.png :alt: Mesh6 2D :srcset: /examples/Meshes/images/sphx_glr_Mesh6_2D_002.png :class: sphx-glr-single-img .. tab-item:: Interactive Scene .. offlineviewer:: /home/docs/checkouts/readthedocs.org/user_builds/easyfea/checkouts/v1.9.0/docs/examples/Meshes/images/sphx_glr_Mesh6_2D_002.vtksz .. code-block:: Python :lineno-start: 13 from EasyFEA import Display, ElemType, PyVista from EasyFEA.Geoms import Circle, Domain if __name__ == "__main__": Display.Clear() L = 1 meshSize = L / 4 contour = Domain((0, 0), (L, L), meshSize) circle = Circle((L / 2, L / 2), L / 3, meshSize) inclusions = [circle] refine1 = Domain((0, L), (L, L * 0.8), meshSize / 8) refine2 = Circle(circle.center, L / 2, meshSize / 8) refine3 = Circle((0, 0), L / 2, meshSize / 8) refineGeoms = [refine1, refine2, refine3] PyVista.Plot_Geoms([contour, circle, *refineGeoms]).show() mesh = contour.Mesh_2D(inclusions, ElemType.QUAD4, refineGeoms=refineGeoms) PyVista.Plot_Mesh(mesh).show() .. rst-class:: sphx-glr-timing **Total running time of the script:** (0 minutes 0.550 seconds) .. _sphx_glr_download_examples_Meshes_Mesh6_2D.py: .. only:: html .. container:: sphx-glr-footer sphx-glr-footer-example .. container:: sphx-glr-download sphx-glr-download-jupyter :download:`Download Jupyter notebook: Mesh6_2D.ipynb ` .. container:: sphx-glr-download sphx-glr-download-python :download:`Download Python source code: Mesh6_2D.py ` .. container:: sphx-glr-download sphx-glr-download-zip :download:`Download zipped: Mesh6_2D.zip ` .. only:: html .. rst-class:: sphx-glr-signature `Gallery generated by Sphinx-Gallery `_