ansys.dpf.core.operators.mesh.from_scoping#
- class ansys.dpf.core.operators.mesh.from_scoping(scoping=None, inclusive=None, nodes_only=None, mesh=None, config=None, server=None)#
Bases:
ansys.dpf.core.dpf_operator.Operator
Extracts a meshed region from another meshed region based on a scoping. Regarding the property fields of the meshed region: the ‘Elemental’, ‘Face’, and ‘Nodal’ property fields are scoped to the elements, faces or nodes of the output mesh, the ‘Global’ property fields are transferred from the input mesh to the output mesh without changes, and the rest of the property fields are not present in the output mesh.
- Parameters:
scoping (Scoping) – if nodal/face scoping, then the scoping is transposed respecting the inclusive pin
inclusive (int, optional) – if inclusive == 1 then all the elements/faces adjacent to the nodes/faces ids in input are added, if inclusive == 0, only the elements/faces which have all their nodes/faces in the scoping are included
nodes_only (bool, optional) – returns mesh with nodes only (without any elements or property fields). Default is false.
mesh (MeshedRegion)
- Returns:
mesh
- Return type:
Examples
>>> from ansys.dpf import core as dpf
>>> # Instantiate operator >>> op = dpf.operators.mesh.from_scoping()
>>> # Make input connections >>> my_scoping = dpf.Scoping() >>> op.inputs.scoping.connect(my_scoping) >>> my_inclusive = int() >>> op.inputs.inclusive.connect(my_inclusive) >>> my_nodes_only = bool() >>> op.inputs.nodes_only.connect(my_nodes_only) >>> my_mesh = dpf.MeshedRegion() >>> op.inputs.mesh.connect(my_mesh)
>>> # Instantiate operator and connect inputs in one line >>> op = dpf.operators.mesh.from_scoping( ... scoping=my_scoping, ... inclusive=my_inclusive, ... nodes_only=my_nodes_only, ... mesh=my_mesh, ... )
>>> # Get output data >>> result_mesh = op.outputs.mesh()
- _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: InputsFromScoping#
Enables to connect inputs to the operator
- Returns:
An instance of InputsFromScoping.
- Return type:
inputs
- property outputs: OutputsFromScoping#
Enables to get outputs of the operator by evaluating it
- Returns:
An instance of OutputsFromScoping.
- Return type:
outputs