-
Notifications
You must be signed in to change notification settings - Fork 25
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update generated code for DPF 251_test on master (#1641)
* update generated code * Update collection_grpcapi.py
- Loading branch information
1 parent
9e31a5b
commit a36f1f8
Showing
15 changed files
with
570 additions
and
70 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
220 changes: 220 additions & 0 deletions
220
src/ansys/dpf/core/operators/mesh/meshed_edges_extractors.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,220 @@ | ||
""" | ||
meshed_edges_extractors | ||
======================= | ||
Autogenerated DPF operator classes. | ||
""" | ||
|
||
from warnings import warn | ||
from ansys.dpf.core.dpf_operator import Operator | ||
from ansys.dpf.core.inputs import Input, _Inputs | ||
from ansys.dpf.core.outputs import Output, _Outputs | ||
from ansys.dpf.core.operators.specification import PinSpecification, Specification | ||
|
||
|
||
class meshed_edges_extractors(Operator): | ||
"""Build meshed edges from a scoping of points. | ||
Parameters | ||
---------- | ||
mesh : MeshedRegion | ||
mesh_scoping : Scoping | ||
Nodal scoping of nodes that define the | ||
extracted edge. | ||
Examples | ||
-------- | ||
>>> from ansys.dpf import core as dpf | ||
>>> # Instantiate operator | ||
>>> op = dpf.operators.mesh.meshed_edges_extractors() | ||
>>> # Make input connections | ||
>>> my_mesh = dpf.MeshedRegion() | ||
>>> op.inputs.mesh.connect(my_mesh) | ||
>>> my_mesh_scoping = dpf.Scoping() | ||
>>> op.inputs.mesh_scoping.connect(my_mesh_scoping) | ||
>>> # Instantiate operator and connect inputs in one line | ||
>>> op = dpf.operators.mesh.meshed_edges_extractors( | ||
... mesh=my_mesh, | ||
... mesh_scoping=my_mesh_scoping, | ||
... ) | ||
>>> # Get output data | ||
>>> result_mesh = op.outputs.mesh() | ||
""" | ||
|
||
def __init__(self, mesh=None, mesh_scoping=None, config=None, server=None): | ||
super().__init__(name="meshed_edges_extractor", config=config, server=server) | ||
self._inputs = InputsMeshedEdgesExtractors(self) | ||
self._outputs = OutputsMeshedEdgesExtractors(self) | ||
if mesh is not None: | ||
self.inputs.mesh.connect(mesh) | ||
if mesh_scoping is not None: | ||
self.inputs.mesh_scoping.connect(mesh_scoping) | ||
|
||
@staticmethod | ||
def _spec(): | ||
description = """Build meshed edges from a scoping of points.""" | ||
spec = Specification( | ||
description=description, | ||
map_input_pin_spec={ | ||
0: PinSpecification( | ||
name="mesh", | ||
type_names=["abstract_meshed_region"], | ||
optional=False, | ||
document="""""", | ||
), | ||
1: PinSpecification( | ||
name="mesh_scoping", | ||
type_names=["scoping"], | ||
optional=False, | ||
document="""Nodal scoping of nodes that define the | ||
extracted edge.""", | ||
), | ||
}, | ||
map_output_pin_spec={ | ||
0: PinSpecification( | ||
name="mesh", | ||
type_names=["abstract_meshed_region"], | ||
optional=False, | ||
document="""""", | ||
), | ||
}, | ||
) | ||
return spec | ||
|
||
@staticmethod | ||
def default_config(server=None): | ||
"""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.DPFServer, optional | ||
Server with channel connected to the remote or local instance. When | ||
``None``, attempts to use the global server. | ||
""" | ||
return Operator.default_config(name="meshed_edges_extractor", server=server) | ||
|
||
@property | ||
def inputs(self): | ||
"""Enables to connect inputs to the operator | ||
Returns | ||
-------- | ||
inputs : InputsMeshedEdgesExtractors | ||
""" | ||
return super().inputs | ||
|
||
@property | ||
def outputs(self): | ||
"""Enables to get outputs of the operator by evaluating it | ||
Returns | ||
-------- | ||
outputs : OutputsMeshedEdgesExtractors | ||
""" | ||
return super().outputs | ||
|
||
|
||
class InputsMeshedEdgesExtractors(_Inputs): | ||
"""Intermediate class used to connect user inputs to | ||
meshed_edges_extractors operator. | ||
Examples | ||
-------- | ||
>>> from ansys.dpf import core as dpf | ||
>>> op = dpf.operators.mesh.meshed_edges_extractors() | ||
>>> my_mesh = dpf.MeshedRegion() | ||
>>> op.inputs.mesh.connect(my_mesh) | ||
>>> my_mesh_scoping = dpf.Scoping() | ||
>>> op.inputs.mesh_scoping.connect(my_mesh_scoping) | ||
""" | ||
|
||
def __init__(self, op: Operator): | ||
super().__init__(meshed_edges_extractors._spec().inputs, op) | ||
self._mesh = Input(meshed_edges_extractors._spec().input_pin(0), 0, op, -1) | ||
self._inputs.append(self._mesh) | ||
self._mesh_scoping = Input( | ||
meshed_edges_extractors._spec().input_pin(1), 1, op, -1 | ||
) | ||
self._inputs.append(self._mesh_scoping) | ||
|
||
@property | ||
def mesh(self): | ||
"""Allows to connect mesh input to the operator. | ||
Parameters | ||
---------- | ||
my_mesh : MeshedRegion | ||
Examples | ||
-------- | ||
>>> from ansys.dpf import core as dpf | ||
>>> op = dpf.operators.mesh.meshed_edges_extractors() | ||
>>> op.inputs.mesh.connect(my_mesh) | ||
>>> # or | ||
>>> op.inputs.mesh(my_mesh) | ||
""" | ||
return self._mesh | ||
|
||
@property | ||
def mesh_scoping(self): | ||
"""Allows to connect mesh_scoping input to the operator. | ||
Nodal scoping of nodes that define the | ||
extracted edge. | ||
Parameters | ||
---------- | ||
my_mesh_scoping : Scoping | ||
Examples | ||
-------- | ||
>>> from ansys.dpf import core as dpf | ||
>>> op = dpf.operators.mesh.meshed_edges_extractors() | ||
>>> op.inputs.mesh_scoping.connect(my_mesh_scoping) | ||
>>> # or | ||
>>> op.inputs.mesh_scoping(my_mesh_scoping) | ||
""" | ||
return self._mesh_scoping | ||
|
||
|
||
class OutputsMeshedEdgesExtractors(_Outputs): | ||
"""Intermediate class used to get outputs from | ||
meshed_edges_extractors operator. | ||
Examples | ||
-------- | ||
>>> from ansys.dpf import core as dpf | ||
>>> op = dpf.operators.mesh.meshed_edges_extractors() | ||
>>> # Connect inputs : op.inputs. ... | ||
>>> result_mesh = op.outputs.mesh() | ||
""" | ||
|
||
def __init__(self, op: Operator): | ||
super().__init__(meshed_edges_extractors._spec().outputs, op) | ||
self._mesh = Output(meshed_edges_extractors._spec().output_pin(0), 0, op) | ||
self._outputs.append(self._mesh) | ||
|
||
@property | ||
def mesh(self): | ||
"""Allows to get mesh output of the operator | ||
Returns | ||
---------- | ||
my_mesh : MeshedRegion | ||
Examples | ||
-------- | ||
>>> from ansys.dpf import core as dpf | ||
>>> op = dpf.operators.mesh.meshed_edges_extractors() | ||
>>> # Connect inputs : op.inputs. ... | ||
>>> result_mesh = op.outputs.mesh() | ||
""" # noqa: E501 | ||
return self._mesh |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.