Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
313 changes: 87 additions & 226 deletions doc/source/_static/dpf_operators.html

Large diffs are not rendered by default.

8 changes: 4 additions & 4 deletions src/ansys/dpf/core/operators/result/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -126,10 +126,6 @@
from .euler_load_buckling import euler_load_buckling
from .euler_nodes import euler_nodes
from .fluid_velocity import fluid_velocity
from .gasket_deformation import gasket_deformation
from .gasket_deformation_X import gasket_deformation_X
from .gasket_deformation_XY import gasket_deformation_XY
from .gasket_deformation_XZ import gasket_deformation_XZ
from .gasket_inelastic_closure import gasket_inelastic_closure
from .gasket_inelastic_closure_X import gasket_inelastic_closure_X
from .gasket_inelastic_closure_XY import gasket_inelastic_closure_XY
Expand All @@ -142,6 +138,10 @@
from .gasket_thermal_closure_X import gasket_thermal_closure_X
from .gasket_thermal_closure_XY import gasket_thermal_closure_XY
from .gasket_thermal_closure_XZ import gasket_thermal_closure_XZ
from .gasket_total_closure import gasket_total_closure
from .gasket_total_closure_X import gasket_total_closure_X
from .gasket_total_closure_XY import gasket_total_closure_XY
from .gasket_total_closure_XZ import gasket_total_closure_XZ
from .global_added_mass import global_added_mass
from .global_added_mass_pct import global_added_mass_pct
from .global_center_mass import global_center_mass
Expand Down
835 changes: 0 additions & 835 deletions src/ansys/dpf/core/operators/result/gasket_deformation.py

This file was deleted.

281 changes: 281 additions & 0 deletions src/ansys/dpf/core/operators/result/gasket_total_closure.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,281 @@
"""
gasket_total_closure

Autogenerated DPF operator classes.
"""

from __future__ import annotations

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
from ansys.dpf.core.config import Config
from ansys.dpf.core.server_types import AnyServerType


class gasket_total_closure(Operator):
r"""computes the gasket total closure (sum of gasket thermal closure and
gasket inelastic closure).


Parameters
----------
fields_container: FieldsContainer, optional
streams_container: StreamsContainer or Stream, optional
data_sources: DataSources

Returns
-------
fields_container: FieldsContainer

Examples
--------
>>> from ansys.dpf import core as dpf

>>> # Instantiate operator
>>> op = dpf.operators.result.gasket_total_closure()

>>> # Make input connections
>>> my_fields_container = dpf.FieldsContainer()
>>> op.inputs.fields_container.connect(my_fields_container)
>>> my_streams_container = dpf.StreamsContainer()
>>> op.inputs.streams_container.connect(my_streams_container)
>>> my_data_sources = dpf.DataSources()
>>> op.inputs.data_sources.connect(my_data_sources)

>>> # Instantiate operator and connect inputs in one line
>>> op = dpf.operators.result.gasket_total_closure(
... fields_container=my_fields_container,
... streams_container=my_streams_container,
... data_sources=my_data_sources,
... )

>>> # Get output data
>>> result_fields_container = op.outputs.fields_container()
"""

def __init__(
self,
fields_container=None,
streams_container=None,
data_sources=None,
config=None,
server=None,
):
super().__init__(name="GKD", config=config, server=server)
self._inputs = InputsGasketTotalClosure(self)
self._outputs = OutputsGasketTotalClosure(self)
if fields_container is not None:
self.inputs.fields_container.connect(fields_container)
if streams_container is not None:
self.inputs.streams_container.connect(streams_container)
if data_sources is not None:
self.inputs.data_sources.connect(data_sources)

@staticmethod
def _spec() -> Specification:
description = r"""computes the gasket total closure (sum of gasket thermal closure and
gasket inelastic closure).
"""
spec = Specification(
description=description,
map_input_pin_spec={
2: PinSpecification(
name="fields_container",
type_names=["fields_container"],
optional=True,
document=r"""""",
),
3: PinSpecification(
name="streams_container",
type_names=["streams_container", "stream"],
optional=True,
document=r"""""",
),
4: PinSpecification(
name="data_sources",
type_names=["data_sources"],
optional=False,
document=r"""""",
),
},
map_output_pin_spec={
0: PinSpecification(
name="fields_container",
type_names=["fields_container"],
optional=False,
document=r"""""",
),
},
)
return spec

@staticmethod
def default_config(server: AnyServerType = None) -> 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
-------
config:
A new Config instance equivalent to the default config for this operator.
"""
return Operator.default_config(name="GKD", server=server)

@property
def inputs(self) -> InputsGasketTotalClosure:
"""Enables to connect inputs to the operator

Returns
--------
inputs:
An instance of InputsGasketTotalClosure.
"""
return super().inputs

@property
def outputs(self) -> OutputsGasketTotalClosure:
"""Enables to get outputs of the operator by evaluating it

Returns
--------
outputs:
An instance of OutputsGasketTotalClosure.
"""
return super().outputs


class InputsGasketTotalClosure(_Inputs):
"""Intermediate class used to connect user inputs to
gasket_total_closure operator.

Examples
--------
>>> from ansys.dpf import core as dpf
>>> op = dpf.operators.result.gasket_total_closure()
>>> my_fields_container = dpf.FieldsContainer()
>>> op.inputs.fields_container.connect(my_fields_container)
>>> my_streams_container = dpf.StreamsContainer()
>>> op.inputs.streams_container.connect(my_streams_container)
>>> my_data_sources = dpf.DataSources()
>>> op.inputs.data_sources.connect(my_data_sources)
"""

def __init__(self, op: Operator):
super().__init__(gasket_total_closure._spec().inputs, op)
self._fields_container = Input(
gasket_total_closure._spec().input_pin(2), 2, op, -1
)
self._inputs.append(self._fields_container)
self._streams_container = Input(
gasket_total_closure._spec().input_pin(3), 3, op, -1
)
self._inputs.append(self._streams_container)
self._data_sources = Input(gasket_total_closure._spec().input_pin(4), 4, op, -1)
self._inputs.append(self._data_sources)

@property
def fields_container(self) -> Input:
r"""Allows to connect fields_container input to the operator.

Returns
-------
input:
An Input instance for this pin.

Examples
--------
>>> from ansys.dpf import core as dpf
>>> op = dpf.operators.result.gasket_total_closure()
>>> op.inputs.fields_container.connect(my_fields_container)
>>> # or
>>> op.inputs.fields_container(my_fields_container)
"""
return self._fields_container

@property
def streams_container(self) -> Input:
r"""Allows to connect streams_container input to the operator.

Returns
-------
input:
An Input instance for this pin.

Examples
--------
>>> from ansys.dpf import core as dpf
>>> op = dpf.operators.result.gasket_total_closure()
>>> op.inputs.streams_container.connect(my_streams_container)
>>> # or
>>> op.inputs.streams_container(my_streams_container)
"""
return self._streams_container

@property
def data_sources(self) -> Input:
r"""Allows to connect data_sources input to the operator.

Returns
-------
input:
An Input instance for this pin.

Examples
--------
>>> from ansys.dpf import core as dpf
>>> op = dpf.operators.result.gasket_total_closure()
>>> op.inputs.data_sources.connect(my_data_sources)
>>> # or
>>> op.inputs.data_sources(my_data_sources)
"""
return self._data_sources


class OutputsGasketTotalClosure(_Outputs):
"""Intermediate class used to get outputs from
gasket_total_closure operator.

Examples
--------
>>> from ansys.dpf import core as dpf
>>> op = dpf.operators.result.gasket_total_closure()
>>> # Connect inputs : op.inputs. ...
>>> result_fields_container = op.outputs.fields_container()
"""

def __init__(self, op: Operator):
super().__init__(gasket_total_closure._spec().outputs, op)
self._fields_container = Output(
gasket_total_closure._spec().output_pin(0), 0, op
)
self._outputs.append(self._fields_container)

@property
def fields_container(self) -> Output:
r"""Allows to get fields_container output of the operator

Returns
-------
output:
An Output instance for this pin.

Examples
--------
>>> from ansys.dpf import core as dpf
>>> op = dpf.operators.result.gasket_total_closure()
>>> # Get the output from op.outputs. ...
>>> result_fields_container = op.outputs.fields_container()
"""
return self._fields_container
Loading
Loading