MeshInfo
#
- class ansys.dpf.core.mesh_info.MeshInfo(generic_data_container=None, mesh_info=None, server=None)#
Hold the information relative to a mesh region.
This class describes the available mesh information.
- Parameters:
server (ansys.dpf.core.server, optional) – Server with the channel connected to the remote or local instance. The default is
None
, in which case an attempt is made to use the global server.generic_data_container (ansys.dpf.core.generic_data_container, optional) – Generic data container that is wrapped into the mesh info.
mesh_info (optional) – Hold the information of the mesh region into a generic data container.
Examples
Explore the mesh info from the model
>>> from ansys.dpf import core as dpf >>> from ansys.dpf.core import examples >>> fluent = examples.fluid_axial_model() >>> model = dpf.Model(fluent) >>> mesh_info = model.metadata.mesh_info
Notes
Class available with server’s version starting at 7.0 (2024 R1 pre0).
Overview#
Create a deep copy of the mesh_info’s data on a given server. |
|
Get property with given name. |
|
Register given property with the given name. |
GenericDataContainer wrapped into the MeshInfo that contains all the relative information of the derived class. |
|
Returns number of nodes in the mesh. |
|
Returns number of faces in the mesh. |
|
Returns number of elements in the mesh. |
|
Return name of properties according to which the mesh can be split by. |
|
Returns available mesh element types. |
|
Return part names of the mesh. |
|
Dictionary of available part IDs to part names. |
|
Return part scoping of the mesh. |
|
Return body names of the mesh. |
|
Return body scoping of the mesh. |
|
Dictionary of available body IDs to body names. |
|
Return zone names of the mesh. |
|
Dictionary of available zone IDs to zone names. |
|
Dictionary of available face zone IDs to face zone names. |
|
Dictionary of available cell zone IDs to cell zone names. |
|
Return zone scoping of the mesh. |
Return a string representation of the MeshInfo instance. |
Import detail#
from ansys.dpf.core.mesh_info import MeshInfo
Property detail#
- property MeshInfo.generic_data_container: ansys.dpf.core.generic_data_container.GenericDataContainer#
GenericDataContainer wrapped into the MeshInfo that contains all the relative information of the derived class.
- property MeshInfo.number_nodes#
Returns number of nodes in the mesh.
- Returns:
number_nodes – Number of nodes of the mesh.
- Return type:
int
- property MeshInfo.number_faces#
Returns number of faces in the mesh.
- Returns:
number_faces – Number of faces of the mesh.
- Return type:
int
- property MeshInfo.number_elements#
Returns number of elements in the mesh.
- Returns:
number_elements – Number of elements of the mesh.
- Return type:
int
- property MeshInfo.splittable_by#
Return name of properties according to which the mesh can be split by.
- Returns:
splittable by which entity – Name of the properties according to which the mesh can be split by.
- Return type:
- property MeshInfo.available_elem_types#
Returns available mesh element types.
- Returns:
available element types – element type available for the mesh.
- Return type:
- property MeshInfo.part_names#
Return part names of the mesh.
- Returns:
part_names – part names of the mesh (if it can be split by parts)
- Return type:
- property MeshInfo.parts: dict#
Dictionary of available part IDs to part names.
- Returns:
parts – Map of part IDs to part names.
.. warning – Currently unavailable for LegacyGrpc servers.
- property MeshInfo.part_scoping#
Return part scoping of the mesh.
- Returns:
part_scoping (Scoping) – part Scoping of the mesh (if it can be split by parts)
.. warning – Currently unavailable for LegacyGrpc servers.
- property MeshInfo.body_names#
Return body names of the mesh.
- Returns:
body_names – body names of the mesh (if it can be split by bodies)
- Return type:
- property MeshInfo.body_scoping#
Return body scoping of the mesh.
- Returns:
body_scoping – body Scoping of the mesh (if it can be split by bodies)
- Return type:
- property MeshInfo.bodies: dict#
Dictionary of available body IDs to body names.
- Returns:
bodies – Map of body IDs to body names.
.. warning – Currently unavailable for LegacyGrpc servers.
- property MeshInfo.zone_names#
Return zone names of the mesh.
- Returns:
zone_names (StringField) – zone_names of the mesh (if it can be split by zones)
.. warning – Currently unavailable for LegacyGrpc servers.
- property MeshInfo.zones: dict#
Dictionary of available zone IDs to zone names.
- Returns:
zones – Map of zone IDs to zone names.
.. warning – Currently unavailable for LegacyGrpc servers.
- property MeshInfo.face_zones: dict#
Dictionary of available face zone IDs to face zone names.
- Returns:
face_zones – Map of face zone IDs to face zone names.
.. warning – Currently unavailable for LegacyGrpc servers.
- property MeshInfo.cell_zones: dict#
Dictionary of available cell zone IDs to cell zone names.
- Returns:
cell_zones – Map of cell zone IDs to cell zone names.
.. warning – Currently unavailable for LegacyGrpc servers.
- property MeshInfo.zone_scoping#
Return zone scoping of the mesh.
- Returns:
zone_scoping (Scoping) – zone Scoping of the mesh (if it can be split by zone)
.. warning – Currently unavailable for LegacyGrpc servers.
Method detail#
- MeshInfo.__str__()#
Return a string representation of the MeshInfo instance.
- Returns:
A string representation of the information about a mesh space.
- Return type:
str
- MeshInfo.deep_copy(server=None)#
Create a deep copy of the mesh_info’s data on a given server.
This method is useful for passing data from one server instance to another.
- Parameters:
server (ansys.dpf.core.server, optional) – Server with the channel connected to the remote or local instance. The default is
None
, in which case an attempt is made to use the global server.- Returns:
mesh_info_copy
- Return type:
- MeshInfo.get_property(property_name)#
Get property with given name.
- Parameters:
property_name (str) – Property name.
- Return type:
Property object instance.
- MeshInfo.set_property(property_name, prop)#
Register given property with the given name.
- Parameters:
property_name (str) – Property name.
prop (Int, String, Float, Field, StringField, GenericDataContainer, Scoping) – object instance.