View#
Visualization methods for meshes, mesh and field containers as well as solid bodies by PyVista.
Base class for plotting a static scene. |
|
|
Provide Visualization methods for |
|
Provide Visualization methods for |
|
Provide Visualization methods for |
|
Provide Visualization methods for a XDMF file generated by |
Detailed API Reference
- class felupe.view.Scene[ソース]#
Base class for plotting a static scene.
- mesh#
A generalized Dataset with the mesh as well as point- and cell-data. This is not an instance of
felupe.Mesh.- Type:
サンプル
>>> import numpy as np >>> import felupe as fem >>> >>> scene = fem.view.Scene() >>> scene.mesh = fem.Cube(n=3).as_unstructured_grid() >>> scene.mesh.point_data["Displacement"] = np.arange(81).reshape(27, 3) / 300 >>> scene.mesh.set_active_scalars(None) >>> >>> scene.plot("Displacement", component=None).show()
参考
felupe.ViewMeshProvide Visualization methods for a mesh with optional given dicts of point- and cell-data items.
felupe.ViewFieldProvide Visualization methods for a field container.
felupe.ViewSolidProvide Visualization methods for a field container or a solid body.
- felupe.ViewMesh(mesh, point_data=None, cell_data=None, cell_type=None)[ソース]#
Provide Visualization methods for
felupe.Meshwith optional given dicts of point- and cell-data items.- パラメータ:
mesh (felupe.Mesh) -- The mesh object.
point_data (dict or None, optional) -- Additional point-data dict (default is None).
cell_data (dict or None, optional) -- Additional cell-data dict (default is None).
cell_type (pyvista.CellType or None, optional) -- Cell-type of PyVista (default is None).
- felupe.mesh#
A generalized Dataset with the mesh as well as point- and cell-data. This is not an instance of
felupe.Mesh.- Type:
サンプル
参考
felupe.view.SceneBase class for plotting a static scene.
felupe.ViewFieldProvide Visualization methods for a field container.
felupe.ViewSolidProvide Visualization methods for a field container or a solid body.
- felupe.ViewField(field, point_data=None, cell_data=None, cell_type=None, project=None)[ソース]#
Provide Visualization methods for
felupe.FieldContainer. The warped (deformed) mesh is created from the values of the first field (displacements). By default, the "Deformation Gradient" tensor, the "Logarithmic Strain" tensor and the "Principal Values of Logarithmic Strain" are evaluated as field-related items of the cell-data dict. Optional items of given point- and cell-data overwrite these default field-related cell-data items.- パラメータ:
field (felupe.FieldContainer) -- The field-container.
point_data (dict or None, optional) -- Additional point-data dict (default is None).
cell_data (dict or None, optional) -- Additional cell-data dict (default is None).
cell_type (pyvista.CellType or None, optional) -- Cell-type of PyVista (default is None).
project (callable or None, optional) -- Callable to project internal cell-data at quadrature-points to mesh-points (default is None). Valid callables are
projectorextrapolate.
- felupe.mesh#
A generalized Dataset with the mesh as well as point- and cell-data. This is not an instance of
felupe.Mesh.- Type:
サンプル
参考
felupe.view.SceneBase class for plotting a static scene.
felupe.ViewMeshProvide Visualization methods for a mesh with optional given dicts of point- and cell-data items.
felupe.ViewSolidProvide Visualization methods for a field container or a solid body.
felupe.projectProject given values at quadrature-points to mesh-points.
- felupe.ViewSolid(field, solid=None, stress_type='Cauchy', point_data=None, cell_data=None, cell_type=None, project=None, **kwargs)[ソース]#
Provide Visualization methods for
felupe.FieldContainerand felupe.SolidBody. The warped (deformed) mesh is created from the values of the first field (displacements). By default, the "Deformation Gradient" tensor, the "Logarithmic Strain" tensor and the "Principal Values of Logarithmic Strain" are evaluated as field-related items of the cell-data dict. Optional items of given point- and cell-data overwrite these default field-related cell-data items.- パラメータ:
field (felupe.FieldContainer) -- The field-container.
solid (felupe.SolidBody or felupe.SolidBodyIncompressible or None, optional) -- A solid body to evaluate the (Cauchy) stress (default is None).
stress_type (str or None, optional) -- The type of stress which is exported, either "Cauchy", "Kirchhoff" or None. If None, the first Piola-Kirchhoff stress (engineering stress in linear elasticity) is used. Default is "Cauchy".
point_data (dict or None, optional) -- Additional point-data dict (default is None).
cell_data (dict or None, optional) -- Additional cell-data dict (default is None).
cell_type (pyvista.CellType or None, optional) -- Cell-type of PyVista (default is None).
project (callable or None, optional) -- Callable to project stress at quadrature-points to mesh-points (default is None). Valid callables are
projectorextrapolate.
- felupe.mesh#
A generalized Dataset with the mesh as well as point- and cell-data. This is not an instance of
felupe.Mesh.- Type:
サンプル
>>> import numpy as np >>> import felupe as fem >>> >>> mesh = fem.Cube(n=3) >>> region = fem.RegionHexahedron(mesh) >>> u = np.sqrt(1 + np.arange(81)).reshape(27, 3) / 100 >>> field = fem.FieldContainer([fem.Field(region, values=u)]) >>> solid = fem.SolidBody(umat=fem.NeoHooke(mu=1, bulk=2), field=field) >>> >>> view = fem.ViewSolid(field, solid, project=fem.project) >>> view.plot("Principal Values of Cauchy Stress").show()
参考
felupe.view.SceneBase class for plotting a static scene.
felupe.ViewMeshProvide Visualization methods for a mesh with optional given dicts of point- and cell-data items.
felupe.ViewFieldProvide Visualization methods for a field container.
felupe.projectProject given values at quadrature-points to mesh-points.
- felupe.ViewXdmf(filename, time=0)[ソース]#
Provide Visualization methods for a XDMF file generated by
Job.evaluate(filename="result.xdmf")(). The warped (deformed) mesh is created from the values of the point-data "Displacement".- パラメータ:
- felupe.mesh#
A generalized Dataset with the mesh as well as point- and cell-data. This is not an instance of
felupe.Mesh.- Type: