Skip to content

Commit 8dc442b

Browse files
PProfizigithub-actions[bot]
authored andcommitted
update generated code
1 parent b4975e1 commit 8dc442b

File tree

11 files changed

+551
-1237
lines changed

11 files changed

+551
-1237
lines changed

doc/source/_static/dpf_operators.html

Lines changed: 132 additions & 272 deletions
Large diffs are not rendered by default.

src/ansys/dpf/core/operators/result/__init__.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -126,10 +126,6 @@
126126
from .euler_load_buckling import euler_load_buckling
127127
from .euler_nodes import euler_nodes
128128
from .fluid_velocity import fluid_velocity
129-
from .gasket_deformation import gasket_deformation
130-
from .gasket_deformation_X import gasket_deformation_X
131-
from .gasket_deformation_XY import gasket_deformation_XY
132-
from .gasket_deformation_XZ import gasket_deformation_XZ
133129
from .gasket_inelastic_closure import gasket_inelastic_closure
134130
from .gasket_inelastic_closure_X import gasket_inelastic_closure_X
135131
from .gasket_inelastic_closure_XY import gasket_inelastic_closure_XY
@@ -142,6 +138,10 @@
142138
from .gasket_thermal_closure_X import gasket_thermal_closure_X
143139
from .gasket_thermal_closure_XY import gasket_thermal_closure_XY
144140
from .gasket_thermal_closure_XZ import gasket_thermal_closure_XZ
141+
from .gasket_total_closure import gasket_total_closure
142+
from .gasket_total_closure_X import gasket_total_closure_X
143+
from .gasket_total_closure_XY import gasket_total_closure_XY
144+
from .gasket_total_closure_XZ import gasket_total_closure_XZ
145145
from .global_added_mass import global_added_mass
146146
from .global_added_mass_pct import global_added_mass_pct
147147
from .global_center_mass import global_center_mass

src/ansys/dpf/core/operators/result/gasket_deformation.py

Lines changed: 0 additions & 835 deletions
This file was deleted.
Lines changed: 281 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,281 @@
1+
"""
2+
gasket_total_closure
3+
4+
Autogenerated DPF operator classes.
5+
"""
6+
7+
from __future__ import annotations
8+
9+
from warnings import warn
10+
from ansys.dpf.core.dpf_operator import Operator
11+
from ansys.dpf.core.inputs import Input, _Inputs
12+
from ansys.dpf.core.outputs import Output, _Outputs
13+
from ansys.dpf.core.operators.specification import PinSpecification, Specification
14+
from ansys.dpf.core.config import Config
15+
from ansys.dpf.core.server_types import AnyServerType
16+
17+
18+
class gasket_total_closure(Operator):
19+
r"""computes the gasket total closure (sum of gasket thermal closure and
20+
gasket inelastic closure).
21+
22+
23+
Parameters
24+
----------
25+
fields_container: FieldsContainer, optional
26+
streams_container: StreamsContainer or Stream, optional
27+
data_sources: DataSources
28+
29+
Returns
30+
-------
31+
fields_container: FieldsContainer
32+
33+
Examples
34+
--------
35+
>>> from ansys.dpf import core as dpf
36+
37+
>>> # Instantiate operator
38+
>>> op = dpf.operators.result.gasket_total_closure()
39+
40+
>>> # Make input connections
41+
>>> my_fields_container = dpf.FieldsContainer()
42+
>>> op.inputs.fields_container.connect(my_fields_container)
43+
>>> my_streams_container = dpf.StreamsContainer()
44+
>>> op.inputs.streams_container.connect(my_streams_container)
45+
>>> my_data_sources = dpf.DataSources()
46+
>>> op.inputs.data_sources.connect(my_data_sources)
47+
48+
>>> # Instantiate operator and connect inputs in one line
49+
>>> op = dpf.operators.result.gasket_total_closure(
50+
... fields_container=my_fields_container,
51+
... streams_container=my_streams_container,
52+
... data_sources=my_data_sources,
53+
... )
54+
55+
>>> # Get output data
56+
>>> result_fields_container = op.outputs.fields_container()
57+
"""
58+
59+
def __init__(
60+
self,
61+
fields_container=None,
62+
streams_container=None,
63+
data_sources=None,
64+
config=None,
65+
server=None,
66+
):
67+
super().__init__(name="GKD", config=config, server=server)
68+
self._inputs = InputsGasketTotalClosure(self)
69+
self._outputs = OutputsGasketTotalClosure(self)
70+
if fields_container is not None:
71+
self.inputs.fields_container.connect(fields_container)
72+
if streams_container is not None:
73+
self.inputs.streams_container.connect(streams_container)
74+
if data_sources is not None:
75+
self.inputs.data_sources.connect(data_sources)
76+
77+
@staticmethod
78+
def _spec() -> Specification:
79+
description = r"""computes the gasket total closure (sum of gasket thermal closure and
80+
gasket inelastic closure).
81+
"""
82+
spec = Specification(
83+
description=description,
84+
map_input_pin_spec={
85+
2: PinSpecification(
86+
name="fields_container",
87+
type_names=["fields_container"],
88+
optional=True,
89+
document=r"""""",
90+
),
91+
3: PinSpecification(
92+
name="streams_container",
93+
type_names=["streams_container", "stream"],
94+
optional=True,
95+
document=r"""""",
96+
),
97+
4: PinSpecification(
98+
name="data_sources",
99+
type_names=["data_sources"],
100+
optional=False,
101+
document=r"""""",
102+
),
103+
},
104+
map_output_pin_spec={
105+
0: PinSpecification(
106+
name="fields_container",
107+
type_names=["fields_container"],
108+
optional=False,
109+
document=r"""""",
110+
),
111+
},
112+
)
113+
return spec
114+
115+
@staticmethod
116+
def default_config(server: AnyServerType = None) -> Config:
117+
"""Returns the default config of the operator.
118+
119+
This config can then be changed to the user needs and be used to
120+
instantiate the operator. The Configuration allows to customize
121+
how the operation will be processed by the operator.
122+
123+
Parameters
124+
----------
125+
server:
126+
Server with channel connected to the remote or local instance. When
127+
``None``, attempts to use the global server.
128+
129+
Returns
130+
-------
131+
config:
132+
A new Config instance equivalent to the default config for this operator.
133+
"""
134+
return Operator.default_config(name="GKD", server=server)
135+
136+
@property
137+
def inputs(self) -> InputsGasketTotalClosure:
138+
"""Enables to connect inputs to the operator
139+
140+
Returns
141+
--------
142+
inputs:
143+
An instance of InputsGasketTotalClosure.
144+
"""
145+
return super().inputs
146+
147+
@property
148+
def outputs(self) -> OutputsGasketTotalClosure:
149+
"""Enables to get outputs of the operator by evaluating it
150+
151+
Returns
152+
--------
153+
outputs:
154+
An instance of OutputsGasketTotalClosure.
155+
"""
156+
return super().outputs
157+
158+
159+
class InputsGasketTotalClosure(_Inputs):
160+
"""Intermediate class used to connect user inputs to
161+
gasket_total_closure operator.
162+
163+
Examples
164+
--------
165+
>>> from ansys.dpf import core as dpf
166+
>>> op = dpf.operators.result.gasket_total_closure()
167+
>>> my_fields_container = dpf.FieldsContainer()
168+
>>> op.inputs.fields_container.connect(my_fields_container)
169+
>>> my_streams_container = dpf.StreamsContainer()
170+
>>> op.inputs.streams_container.connect(my_streams_container)
171+
>>> my_data_sources = dpf.DataSources()
172+
>>> op.inputs.data_sources.connect(my_data_sources)
173+
"""
174+
175+
def __init__(self, op: Operator):
176+
super().__init__(gasket_total_closure._spec().inputs, op)
177+
self._fields_container = Input(
178+
gasket_total_closure._spec().input_pin(2), 2, op, -1
179+
)
180+
self._inputs.append(self._fields_container)
181+
self._streams_container = Input(
182+
gasket_total_closure._spec().input_pin(3), 3, op, -1
183+
)
184+
self._inputs.append(self._streams_container)
185+
self._data_sources = Input(gasket_total_closure._spec().input_pin(4), 4, op, -1)
186+
self._inputs.append(self._data_sources)
187+
188+
@property
189+
def fields_container(self) -> Input:
190+
r"""Allows to connect fields_container input to the operator.
191+
192+
Returns
193+
-------
194+
input:
195+
An Input instance for this pin.
196+
197+
Examples
198+
--------
199+
>>> from ansys.dpf import core as dpf
200+
>>> op = dpf.operators.result.gasket_total_closure()
201+
>>> op.inputs.fields_container.connect(my_fields_container)
202+
>>> # or
203+
>>> op.inputs.fields_container(my_fields_container)
204+
"""
205+
return self._fields_container
206+
207+
@property
208+
def streams_container(self) -> Input:
209+
r"""Allows to connect streams_container input to the operator.
210+
211+
Returns
212+
-------
213+
input:
214+
An Input instance for this pin.
215+
216+
Examples
217+
--------
218+
>>> from ansys.dpf import core as dpf
219+
>>> op = dpf.operators.result.gasket_total_closure()
220+
>>> op.inputs.streams_container.connect(my_streams_container)
221+
>>> # or
222+
>>> op.inputs.streams_container(my_streams_container)
223+
"""
224+
return self._streams_container
225+
226+
@property
227+
def data_sources(self) -> Input:
228+
r"""Allows to connect data_sources input to the operator.
229+
230+
Returns
231+
-------
232+
input:
233+
An Input instance for this pin.
234+
235+
Examples
236+
--------
237+
>>> from ansys.dpf import core as dpf
238+
>>> op = dpf.operators.result.gasket_total_closure()
239+
>>> op.inputs.data_sources.connect(my_data_sources)
240+
>>> # or
241+
>>> op.inputs.data_sources(my_data_sources)
242+
"""
243+
return self._data_sources
244+
245+
246+
class OutputsGasketTotalClosure(_Outputs):
247+
"""Intermediate class used to get outputs from
248+
gasket_total_closure operator.
249+
250+
Examples
251+
--------
252+
>>> from ansys.dpf import core as dpf
253+
>>> op = dpf.operators.result.gasket_total_closure()
254+
>>> # Connect inputs : op.inputs. ...
255+
>>> result_fields_container = op.outputs.fields_container()
256+
"""
257+
258+
def __init__(self, op: Operator):
259+
super().__init__(gasket_total_closure._spec().outputs, op)
260+
self._fields_container = Output(
261+
gasket_total_closure._spec().output_pin(0), 0, op
262+
)
263+
self._outputs.append(self._fields_container)
264+
265+
@property
266+
def fields_container(self) -> Output:
267+
r"""Allows to get fields_container output of the operator
268+
269+
Returns
270+
-------
271+
output:
272+
An Output instance for this pin.
273+
274+
Examples
275+
--------
276+
>>> from ansys.dpf import core as dpf
277+
>>> op = dpf.operators.result.gasket_total_closure()
278+
>>> # Get the output from op.outputs. ...
279+
>>> result_fields_container = op.outputs.fields_container()
280+
"""
281+
return self._fields_container

0 commit comments

Comments
 (0)