Skip to content
Merged
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
10 changes: 5 additions & 5 deletions doc/source/_static/dpf_operators.html

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions src/ansys/dpf/core/operators/utility/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
from .extract_time_freq import extract_time_freq
from .fc_get_attribute import fc_get_attribute
from .field import field
from .field_clone_to_shell_layer import field_clone_to_shell_layer
from .field_get_attribute import field_get_attribute
from .field_to_fc import field_to_fc
from .fields_container import fields_container
Expand Down
6 changes: 3 additions & 3 deletions src/ansys/dpf/core/operators/utility/change_shell_layers.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ class change_shell_layers(Operator):
mesh: MeshedRegion or MeshesContainer, optional
Mesh support of the input fields_container, in case it does not have one defined. If the fields_container contains mixed shell/solid results, the mesh is required (either by connecting this pin or in the support).
merge: bool, optional
For shell/solid mixed fields, group in the same field all solids and shells (false by default).
For fields with mixed shell layers (solid/shell elements with heterogeneous shell layers), group all of them in the same field (false by default).

Returns
-------
Expand Down Expand Up @@ -125,7 +125,7 @@ def _spec() -> Specification:
name="merge",
type_names=["bool"],
optional=True,
document=r"""For shell/solid mixed fields, group in the same field all solids and shells (false by default).""",
document=r"""For fields with mixed shell layers (solid/shell elements with heterogeneous shell layers), group all of them in the same field (false by default).""",
),
},
map_output_pin_spec={
Expand Down Expand Up @@ -279,7 +279,7 @@ def mesh(self) -> Input:
def merge(self) -> Input:
r"""Allows to connect merge input to the operator.

For shell/solid mixed fields, group in the same field all solids and shells (false by default).
For fields with mixed shell layers (solid/shell elements with heterogeneous shell layers), group all of them in the same field (false by default).

Returns
-------
Expand Down
35 changes: 22 additions & 13 deletions src/ansys/dpf/core/operators/utility/fc_get_attribute.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,22 +17,22 @@


class fc_get_attribute(Operator):
r"""Uses the FieldsContainer APIs to return a given attribute of the mesh in
input.
r"""Uses the FieldsContainer APIs to return a given attribute of the fields
container in input.


Parameters
----------
fields_container: FieldsContainer
property_name: str
Supported property names are: "label_scoping", "label_values", "time_freq_support", "labels", "field_scoping" .
Supported property names are: "label_scoping", "label_values", "time_freq_support", "labels", "field_scoping" and "field".
property_identifier: str or int, optional
Additional pin for some property : the label name for "label_scoping" or "label_values", the field index (default 0) for "field_scoping".
Additional pin for some property : the label name for "label_scoping" or "label_values", the field index (default 0) for "field_scoping" or "field".

Returns
-------
property: Scoping or TimeFreqSupport or dict
Returns a Scoping for property: "label_scoping", a vector of int for "label_values", a time freq support for "time_freq_support", a vector of string for "labels", a LabelSpace for "field_scoping".
property: Scoping or TimeFreqSupport or dict or Field
Returns a Scoping for property: "label_scoping", a vector of int for "label_values", a time freq support for "time_freq_support", a vector of string for "labels", a LabelSpace for "field_scoping" and a "field" for "field".

Examples
--------
Expand Down Expand Up @@ -82,8 +82,8 @@ def __init__(

@staticmethod
def _spec() -> Specification:
description = r"""Uses the FieldsContainer APIs to return a given attribute of the mesh in
input.
description = r"""Uses the FieldsContainer APIs to return a given attribute of the fields
container in input.
"""
spec = Specification(
description=description,
Expand All @@ -98,13 +98,13 @@ def _spec() -> Specification:
name="property_name",
type_names=["string"],
optional=False,
document=r"""Supported property names are: "label_scoping", "label_values", "time_freq_support", "labels", "field_scoping" .""",
document=r"""Supported property names are: "label_scoping", "label_values", "time_freq_support", "labels", "field_scoping" and "field".""",
),
2: PinSpecification(
name="property_identifier",
type_names=["string", "int32"],
optional=True,
document=r"""Additional pin for some property : the label name for "label_scoping" or "label_values", the field index (default 0) for "field_scoping".""",
document=r"""Additional pin for some property : the label name for "label_scoping" or "label_values", the field index (default 0) for "field_scoping" or "field".""",
),
},
map_output_pin_spec={
Expand All @@ -116,9 +116,10 @@ def _spec() -> Specification:
"time_freq_support",
"vector<string>",
"label_space",
"field",
],
optional=False,
document=r"""Returns a Scoping for property: "label_scoping", a vector of int for "label_values", a time freq support for "time_freq_support", a vector of string for "labels", a LabelSpace for "field_scoping".""",
document=r"""Returns a Scoping for property: "label_scoping", a vector of int for "label_values", a time freq support for "time_freq_support", a vector of string for "labels", a LabelSpace for "field_scoping" and a "field" for "field".""",
),
},
)
Expand Down Expand Up @@ -220,7 +221,7 @@ def fields_container(self) -> Input:
def property_name(self) -> Input:
r"""Allows to connect property_name input to the operator.

Supported property names are: "label_scoping", "label_values", "time_freq_support", "labels", "field_scoping" .
Supported property names are: "label_scoping", "label_values", "time_freq_support", "labels", "field_scoping" and "field".

Returns
-------
Expand All @@ -241,7 +242,7 @@ def property_name(self) -> Input:
def property_identifier(self) -> Input:
r"""Allows to connect property_identifier input to the operator.

Additional pin for some property : the label name for "label_scoping" or "label_values", the field index (default 0) for "field_scoping".
Additional pin for some property : the label name for "label_scoping" or "label_values", the field index (default 0) for "field_scoping" or "field".

Returns
-------
Expand Down Expand Up @@ -313,3 +314,11 @@ def __init__(self, op: Operator):
op,
)
self._outputs.append(self.property_as_label_space)
self.property_as_field = Output(
_modify_output_spec_with_one_type(
fc_get_attribute._spec().output_pin(0), "field"
),
0,
op,
)
self._outputs.append(self.property_as_field)
Loading
Loading