splitted_on_property_type

class ansys.dpf.core.operators.scoping.splitted_on_property_type.splitted_on_property_type(mesh_scoping=None, mesh=None, requested_location=None, label1=None, label2=None, config=None, server=None)

Splits a given scoping or the mesh scoping (nodal or elemental) on given properties (elshape and/or material) and returns a scopings container with those splitted scopings.

available inputs:
  • mesh_scoping (Scoping) (optional)

  • mesh (MeshedRegion)

  • requested_location (str)

  • label1 (str) (optional)

  • label2 (str) (optional)

available outputs:
  • mesh_scoping (ScopingsContainer)

Examples

>>> from ansys.dpf import core as dpf
>>> # Instantiate operator
>>> op = dpf.operators.scoping.splitted_on_property_type()
>>> # Make input connections
>>> my_mesh_scoping = dpf.Scoping()
>>> op.inputs.mesh_scoping.connect(my_mesh_scoping)
>>> my_mesh = dpf.MeshedRegion()
>>> op.inputs.mesh.connect(my_mesh)
>>> my_requested_location = str()
>>> op.inputs.requested_location.connect(my_requested_location)
>>> my_label1 = str()
>>> op.inputs.label1.connect(my_label1)
>>> my_label2 = str()
>>> op.inputs.label2.connect(my_label2)
>>> # Instantiate operator and connect inputs in one line
>>> op = dpf.operators.scoping.splitted_on_property_type(mesh_scoping=my_mesh_scoping,mesh=my_mesh,requested_location=my_requested_location,label1=my_label1,label2=my_label2)
>>> # Get output data
>>> result_mesh_scoping = op.outputs.mesh_scoping()
static default_config()

Returns the default config for a given operator. This config can then be changed to the user needs and be used to instantiate the given operator

Parameters
  • name (str) – Name of the operator. For example ‘U’.

  • server (server.DPFServer, optional) – Server with channel connected to the remote or local instance. When None, attempts to use the the global server.

property inputs

Enables to connect inputs to the operator

Returns

inputs

Return type

InputsSplittedOnPropertyType

property outputs

Enables to get outputs of the operator by evaluationg it

Returns

outputs

Return type

OutputsSplittedOnPropertyType

property config

Returns a copy of the current config of the operator. To use the config that you modify, please use operator.config = new_config or create an operator with the new config as a parameter.

Returns

config

Return type

Config

connect(pin, inpt, pin_out=0)

Connect an input on the operator using a pin number.

Parameters

Examples

Compute the minimum of displacement by chaining the 'U' and 'min_max_fc' operators.

>>> from ansys.dpf import core as dpf
>>> from ansys.dpf.core import examples
>>> data_src = dpf.DataSources(examples.multishells_rst)
>>> disp_op = dpf.operators.result.displacement()
>>> disp_op.inputs.data_sources(data_src)
>>> max_fc_op = dpf.operators.min_max.min_max_fc()
>>> max_fc_op.inputs.connect(disp_op.outputs)
>>> max_field = max_fc_op.outputs.field_max()
>>> max_field.data
array([[0.59428386, 0.00201751, 0.0006032 ]])
get_output(pin=0, output_type=None)

Returns the output of the operator on the pin number.

Parameters
  • pin (int, optional) – Number of the output pin.

  • output_type (core.type enum, optional) – The requested type of the output.

run()

Evaluate this operator

class ansys.dpf.core.operators.scoping.splitted_on_property_type.InputsSplittedOnPropertyType(op: ansys.dpf.core.dpf_operator.Operator)

Intermediate class used to connect user inputs to splitted_on_property_type operator

Examples

>>> from ansys.dpf import core as dpf
>>> op = dpf.operators.scoping.splitted_on_property_type()
>>> my_mesh_scoping = dpf.Scoping()
>>> op.inputs.mesh_scoping.connect(my_mesh_scoping)
>>> my_mesh = dpf.MeshedRegion()
>>> op.inputs.mesh.connect(my_mesh)
>>> my_requested_location = str()
>>> op.inputs.requested_location.connect(my_requested_location)
>>> my_label1 = str()
>>> op.inputs.label1.connect(my_label1)
>>> my_label2 = str()
>>> op.inputs.label2.connect(my_label2)
property mesh_scoping

Allows to connect mesh_scoping input to the operator

  • pindoc: Scoping

Parameters

my_mesh_scoping (Scoping,) –

Examples

>>> from ansys.dpf import core as dpf
>>> op = dpf.operators.scoping.splitted_on_property_type()
>>> op.inputs.mesh_scoping.connect(my_mesh_scoping)
>>> #or
>>> op.inputs.mesh_scoping(my_mesh_scoping)
property mesh

Allows to connect mesh input to the operator

  • pindoc: mesh region

Parameters

my_mesh (MeshedRegion,) –

Examples

>>> from ansys.dpf import core as dpf
>>> op = dpf.operators.scoping.splitted_on_property_type()
>>> op.inputs.mesh.connect(my_mesh)
>>> #or
>>> op.inputs.mesh(my_mesh)
property requested_location

Allows to connect requested_location input to the operator

  • pindoc: location (default is elemental)

Parameters

my_requested_location (str,) –

Examples

>>> from ansys.dpf import core as dpf
>>> op = dpf.operators.scoping.splitted_on_property_type()
>>> op.inputs.requested_location.connect(my_requested_location)
>>> #or
>>> op.inputs.requested_location(my_requested_location)
property label1

Allows to connect label1 input to the operator

  • pindoc: properties to apply the filtering ‘mat’ and/or ‘elshape’ (default is ‘elshape)

Parameters

my_label1 (str,) –

Examples

>>> from ansys.dpf import core as dpf
>>> op = dpf.operators.scoping.splitted_on_property_type()
>>> op.inputs.label1.connect(my_label1)
>>> #or
>>> op.inputs.label1(my_label1)
property label2

Allows to connect label2 input to the operator

  • pindoc: properties to apply the filtering ‘mat’ and/or ‘elshape’ (default is ‘elshape)

Parameters

my_label2 (str,) –

Examples

>>> from ansys.dpf import core as dpf
>>> op = dpf.operators.scoping.splitted_on_property_type()
>>> op.inputs.label2.connect(my_label2)
>>> #or
>>> op.inputs.label2(my_label2)
connect(inpt)

Allows you to connect any input (an entity or an operator output) to any input pin of this operator.

The matching input type corresponding to the output is looked for.

Parameters

inpt (str, int, double, Field, FieldsContainer, Scoping, DataSources, MeshedRegion, ScopingsContainer, CyclicSupport, ..., Output, Outputs, Operator) – input of the operator

class ansys.dpf.core.operators.scoping.splitted_on_property_type.OutputsSplittedOnPropertyType(op: ansys.dpf.core.dpf_operator.Operator)

Intermediate class used to get outputs from splitted_on_property_type operator .. rubric:: Examples

>>> from ansys.dpf import core as dpf
>>> op = dpf.operators.scoping.splitted_on_property_type()
>>> # Connect inputs : op.inputs. ...
>>> result_mesh_scoping = op.outputs.mesh_scoping()
property mesh_scoping

Allows to get mesh_scoping output of the operator

  • pindoc: Scoping

Returns

my_mesh_scoping

Return type

ScopingsContainer,

Examples

>>> from ansys.dpf import core as dpf
>>> op = dpf.operators.scoping.splitted_on_property_type()
>>> # Connect inputs : op.inputs. ...
>>> result_mesh_scoping = op.outputs.mesh_scoping()