## This file is subject to the terms and conditions defined in# file 'LICENSE.txt', which is part of this source code package.#fromMuscat.TypesimportMuscatFloat,MuscatIndeximportMuscat.MeshContainers.ElementsDescriptionasEDfromMuscat.MeshContainers.MeshimportMeshfromMuscat.MeshContainers.Filters.FilterObjectsimportElementFilter,NodeFilterfromMuscat.MeshContainers.Filters.FilterOperatorsimportUnionFilter,IntersectionFilter,DifferenceFilterfromMuscat.MeshContainers.Filters.FilterToolsimportGetFrozenFilter,GetComplementaryFilterfromMuscat.Actions.OpenInParaViewimportOpenInParaViewfromMuscat.IO.XdmfReaderimportReadXdmf,XdmfReaderfromMuscat.IO.XdmfWriterimportWriteMeshToXdmf,XdmfWriterfromMuscat.IO.UniversalReaderimportReadMesh,InitAllReadersfromMuscat.IO.UniversalWriterimportWriteMesh,InitAllWritersfromMuscat.FE.Fields.FEFieldimportFEFieldfromMuscat.FE.Fields.IPFieldimportIPField#from Muscat.FE.Fields.FieldTools importfromMuscat.FE.Spaces.FESpacesimportLagrangeSpaceP1,LagrangeSpaceP2,LagrangeSpaceGeofromMuscat.FE.IntegrationRulesimportLagrangeP1Quadrature,LagrangeP2Quadrature,LagrangeIsoParamQuadraturefromMuscat.FE.DofNumberingimportComputeDofNumberingfromMuscat.FE.IntegrationToolsimportIntegrateField,IntegrateGeneralfromMuscat.FE.IntegrationimportIntegrateGeneralInitAllReaders()InitAllWriters()
[docs]defPlotMesh(mesh:Mesh,using:str="PyVista"):""" Plots a mesh using the specified plotting library. Parameters: mesh (Mesh): The mesh object to be plotted. using (str): The plotting library to use for visualization. Default is "PyVista". Options available are: - "PyVista": Uses the PyVista library for plotting. - "Plotly": Uses the Plotly library for plotting. - "Vtk": Uses the VTK library for plotting. Imports and uses the appropriate PlotMesh function from the Muscat library based on the chosen plotting library. Example: PlotMesh(my_mesh, using="Plotly") """ifusing=="PyVista":fromMuscat.Bridges.PyVistaBridgeimportPlotMeshPlotMesh(mesh)elifusing=="Plotly":fromMuscat.Bridges.PlotlyBridgeimportPlotMeshPlotMesh(mesh)elifusing=="Vtk":fromMuscat.Bridges.vtkBridgeimportPlotMeshPlotMesh(mesh)