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

property generic_data_container: GenericDataContainer#

GenericDataContainer wrapped into the MeshInfo that contains all the relative information of the derived class.

Return type:

ansys.dpf.core.generic_data_container.GenericDataContainer

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.

set_property(property_name, prop)#

Register given property with the given name.

Parameters:
property number_faces#

returns: number_faces – Number of faces of the mesh. :rtype: int

property part_names#

returns: part_names – part names of the mesh (if it can be split by parts) :rtype: StringField

property 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 part_scoping#

returns: * part_scoping (Scoping) – part Scoping of the mesh (if it can be split by parts) * .. warning – Currently unavailable for LegacyGrpc servers.

property body_names#

returns: body_names – body names of the mesh (if it can be split by bodies) :rtype: StringField

property body_scoping#

returns: body_scoping – body Scoping of the mesh (if it can be split by bodies) :rtype: Scoping

property zone_names#

returns: * zone_names (StringField) – zone_names of the mesh (if it can be split by zones) * .. warning – Currently unavailable for LegacyGrpc servers.

property 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 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 cell_zones: dict#

Dictionary of available cell zone IDs to face zone names.

Returns:

  • cell_zones – Map of cell zone IDs to face zone names.

  • .. warning – Currently unavailable for LegacyGrpc servers.

property zone_scoping#

returns: * zone_scoping (Scoping) – zone Scoping of the mesh (if it can be split by zone) * .. warning – Currently unavailable for LegacyGrpc servers.

property number_nodes#

returns: number_nodes – Number of nodes of the mesh. :rtype: int

property number_elements#

returns: number_elements – Number of elements of the mesh. :rtype: int

property splittable_by#

returns: splittable by which entity – Name of the properties according to which the mesh can be split by. :rtype: StringField

property available_elem_types#

returns: available element types – element type available for the mesh. :rtype: Scoping