ansys.dpf.core.operators.logic.identical_meshes#

class ansys.dpf.core.operators.logic.identical_meshes(meshA=None, meshB=None, small_value=None, tolerance=None, compare_auxiliary=None, config=None, server=None)#

Bases: ansys.dpf.core.dpf_operator.Operator

Takes two meshes and compares them. Note: When comparing mesh properties, the current behaviour is to verify that the properties in the first mesh (pin 0) are included in the second mesh (pin 1).

Parameters:
  • meshA (MeshedRegion)

  • meshB (MeshedRegion)

  • small_value (float, optional) – define what is a small value for numeric comparison (default value:1.0e-14).

  • tolerance (float, optional) – define the relative tolerance ceil for numeric comparison (default is 0.001).

  • compare_auxiliary (bool) – compare auxiliary data (i.e property fields, scopings…). Default value is ‘false’.

Returns:

are_identical

Return type:

bool

Examples

>>> from ansys.dpf import core as dpf
>>> # Instantiate operator
>>> op = dpf.operators.logic.identical_meshes()
>>> # Make input connections
>>> my_meshA = dpf.MeshedRegion()
>>> op.inputs.meshA.connect(my_meshA)
>>> my_meshB = dpf.MeshedRegion()
>>> op.inputs.meshB.connect(my_meshB)
>>> my_small_value = float()
>>> op.inputs.small_value.connect(my_small_value)
>>> my_tolerance = float()
>>> op.inputs.tolerance.connect(my_tolerance)
>>> my_compare_auxiliary = bool()
>>> op.inputs.compare_auxiliary.connect(my_compare_auxiliary)
>>> # Instantiate operator and connect inputs in one line
>>> op = dpf.operators.logic.identical_meshes(
...     meshA=my_meshA,
...     meshB=my_meshB,
...     small_value=my_small_value,
...     tolerance=my_tolerance,
...     compare_auxiliary=my_compare_auxiliary,
... )
>>> # Get output data
>>> result_are_identical = op.outputs.are_identical()
_inputs#
_outputs#
static _spec() ansys.dpf.core.operators.specification.Specification#
static default_config(server: ansys.dpf.core.server_types.AnyServerType = None) ansys.dpf.core.config.Config#

Returns the default config of the operator.

This config can then be changed to the user needs and be used to instantiate the operator. The Configuration allows to customize how the operation will be processed by the operator.

Parameters:

server – Server with channel connected to the remote or local instance. When None, attempts to use the global server.

Returns:

A new Config instance equivalent to the default config for this operator.

Return type:

config

property inputs: InputsIdenticalMeshes#

Enables to connect inputs to the operator

Returns:

An instance of InputsIdenticalMeshes.

Return type:

inputs

property outputs: OutputsIdenticalMeshes#

Enables to get outputs of the operator by evaluating it

Returns:

An instance of OutputsIdenticalMeshes.

Return type:

outputs