ansys.dpf.core.operators.mesh.from_scopings#
- class ansys.dpf.core.operators.mesh.from_scopings(scopings_container=None, inclusive=None, nodes_only=None, mesh=None, config=None, server=None)#
Bases:
ansys.dpf.core.dpf_operator.Operator
Extracts multiple meshed region base on a scoping and saved in a MeshesContainer
- Parameters:
scopings_container (ScopingsContainer) – if nodal 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). Default is false.
mesh (MeshedRegion)
- Returns:
meshes
- Return type:
Examples
>>> from ansys.dpf import core as dpf
>>> # Instantiate operator >>> op = dpf.operators.mesh.from_scopings()
>>> # Make input connections >>> my_scopings_container = dpf.ScopingsContainer() >>> op.inputs.scopings_container.connect(my_scopings_container) >>> 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_scopings( ... scopings_container=my_scopings_container, ... inclusive=my_inclusive, ... nodes_only=my_nodes_only, ... mesh=my_mesh, ... )
>>> # Get output data >>> result_meshes = op.outputs.meshes()
- _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: InputsFromScopings#
Enables to connect inputs to the operator
- Returns:
An instance of InputsFromScopings.
- Return type:
inputs
- property outputs: OutputsFromScopings#
Enables to get outputs of the operator by evaluating it
- Returns:
An instance of OutputsFromScopings.
- Return type:
outputs