| | | Solid mesh support (optional).
diff --git a/src/ansys/dpf/core/operators/filter/abc_weightings.py b/src/ansys/dpf/core/operators/filter/abc_weightings.py
index de2f5d0d0d8..540f7bb90fd 100644
--- a/src/ansys/dpf/core/operators/filter/abc_weightings.py
+++ b/src/ansys/dpf/core/operators/filter/abc_weightings.py
@@ -26,7 +26,7 @@ class abc_weightings(Operator):
Inputs
------
fields_container: FieldsContainer
- data to be weighted in dB units.
+ data to be weighted in dB units equipped with cumulative ids in the scoping.
weighting_type: int
if this pin is set to 0, the A-weighting is computed, 1 the B-weigting is computed and 2 the C-weightings is computed.
shape_by_tf_scoping: bool
@@ -98,7 +98,7 @@ def _spec() -> Specification:
name="fields_container",
type_names=["fields_container"],
optional=False,
- document=r"""data to be weighted in dB units.""",
+ document=r"""data to be weighted in dB units equipped with cumulative ids in the scoping.""",
),
1: PinSpecification(
name="weighting_type",
@@ -203,7 +203,7 @@ def __init__(self, op: Operator):
def fields_container(self) -> Input[FieldsContainer]:
r"""Allows to connect fields_container input to the operator.
- data to be weighted in dB units.
+ data to be weighted in dB units equipped with cumulative ids in the scoping.
Returns
-------
diff --git a/src/ansys/dpf/core/operators/math/absolute_value_by_component.py b/src/ansys/dpf/core/operators/math/absolute_value_by_component.py
index 1cd6b065590..af698d72cd4 100644
--- a/src/ansys/dpf/core/operators/math/absolute_value_by_component.py
+++ b/src/ansys/dpf/core/operators/math/absolute_value_by_component.py
@@ -21,18 +21,19 @@
class absolute_value_by_component(Operator):
- r"""Compute the absolute value of each data value of the input field, no
- norm performed.
+ r"""Computes the absolute value of each data value in the input field
+ component-wise, without performing vector norm operations.
Inputs
------
field: Field or FieldsContainer or float
- field or fields container with only one field is expected
+ Field, fields container, or numeric data for which to compute absolute values
Outputs
-------
field: Field
+ Field with absolute values applied to each component
Examples
--------
@@ -69,8 +70,8 @@ def __init__(self, field=None, config=None, server=None):
@staticmethod
def _spec() -> Specification:
- description = r"""Compute the absolute value of each data value of the input field, no
-norm performed.
+ description = r"""Computes the absolute value of each data value in the input field
+component-wise, without performing vector norm operations.
"""
spec = Specification(
description=description,
@@ -84,7 +85,7 @@ def _spec() -> Specification:
"vector ",
],
optional=False,
- document=r"""field or fields container with only one field is expected""",
+ document=r"""Field, fields container, or numeric data for which to compute absolute values""",
),
},
map_output_pin_spec={
@@ -92,7 +93,7 @@ def _spec() -> Specification:
name="field",
type_names=["field"],
optional=False,
- document=r"""""",
+ document=r"""Field with absolute values applied to each component""",
),
},
)
@@ -167,7 +168,7 @@ def __init__(self, op: Operator):
def field(self) -> Input[Field | FieldsContainer | float]:
r"""Allows to connect field input to the operator.
- field or fields container with only one field is expected
+ Field, fields container, or numeric data for which to compute absolute values
Returns
-------
@@ -208,6 +209,8 @@ def __init__(self, op: Operator):
def field(self) -> Output[Field]:
r"""Allows to get field output of the operator
+ Field with absolute values applied to each component
+
Returns
-------
output:
diff --git a/src/ansys/dpf/core/operators/math/absolute_value_by_component_fc.py b/src/ansys/dpf/core/operators/math/absolute_value_by_component_fc.py
index 6330c7cb8b1..8911c6580ed 100644
--- a/src/ansys/dpf/core/operators/math/absolute_value_by_component_fc.py
+++ b/src/ansys/dpf/core/operators/math/absolute_value_by_component_fc.py
@@ -20,18 +20,19 @@
class absolute_value_by_component_fc(Operator):
- r"""Compute the absolute value of each data value of the input field, no
- norm performed.
+ r"""Computes the absolute value of each data value in the input field
+ component-wise, without performing vector norm operations.
Inputs
------
fields_container: FieldsContainer
- field or fields container with only one field is expected
+ Field, fields container, or numeric data for which to compute absolute values
Outputs
-------
fields_container: FieldsContainer
+ Field with absolute values applied to each component
Examples
--------
@@ -68,8 +69,8 @@ def __init__(self, fields_container=None, config=None, server=None):
@staticmethod
def _spec() -> Specification:
- description = r"""Compute the absolute value of each data value of the input field, no
-norm performed.
+ description = r"""Computes the absolute value of each data value in the input field
+component-wise, without performing vector norm operations.
"""
spec = Specification(
description=description,
@@ -78,7 +79,7 @@ def _spec() -> Specification:
name="fields_container",
type_names=["fields_container"],
optional=False,
- document=r"""field or fields container with only one field is expected""",
+ document=r"""Field, fields container, or numeric data for which to compute absolute values""",
),
},
map_output_pin_spec={
@@ -86,7 +87,7 @@ def _spec() -> Specification:
name="fields_container",
type_names=["fields_container"],
optional=False,
- document=r"""""",
+ document=r"""Field with absolute values applied to each component""",
),
},
)
@@ -161,7 +162,7 @@ def __init__(self, op: Operator):
def fields_container(self) -> Input[FieldsContainer]:
r"""Allows to connect fields_container input to the operator.
- field or fields container with only one field is expected
+ Field, fields container, or numeric data for which to compute absolute values
Returns
-------
@@ -202,6 +203,8 @@ def __init__(self, op: Operator):
def fields_container(self) -> Output[FieldsContainer]:
r"""Allows to get fields_container output of the operator
+ Field with absolute values applied to each component
+
Returns
-------
output:
diff --git a/src/ansys/dpf/core/operators/math/add.py b/src/ansys/dpf/core/operators/math/add.py
index 4f40cdce4e2..d85a1cc23e8 100644
--- a/src/ansys/dpf/core/operators/math/add.py
+++ b/src/ansys/dpf/core/operators/math/add.py
@@ -38,6 +38,7 @@ class add(Operator):
Outputs
-------
field: Field
+ Field containing the element-wise sum of the two input fields
Examples
--------
@@ -116,7 +117,7 @@ def _spec() -> Specification:
name="field",
type_names=["field"],
optional=False,
- document=r"""""",
+ document=r"""Field containing the element-wise sum of the two input fields""",
),
},
)
@@ -255,6 +256,8 @@ def __init__(self, op: Operator):
def field(self) -> Output[Field]:
r"""Allows to get field output of the operator
+ Field containing the element-wise sum of the two input fields
+
Returns
-------
output:
diff --git a/src/ansys/dpf/core/operators/math/add_fc.py b/src/ansys/dpf/core/operators/math/add_fc.py
index b8746c7de14..75c762ed044 100644
--- a/src/ansys/dpf/core/operators/math/add_fc.py
+++ b/src/ansys/dpf/core/operators/math/add_fc.py
@@ -34,6 +34,7 @@ class add_fc(Operator):
Outputs
-------
fields_container: FieldsContainer
+ FieldsContainer with summed fields by label space
Examples
--------
@@ -112,7 +113,7 @@ def _spec() -> Specification:
name="fields_container",
type_names=["fields_container"],
optional=False,
- document=r"""""",
+ document=r"""FieldsContainer with summed fields by label space""",
),
},
)
@@ -249,6 +250,8 @@ def __init__(self, op: Operator):
def fields_container(self) -> Output[FieldsContainer]:
r"""Allows to get fields_container output of the operator
+ FieldsContainer with summed fields by label space
+
Returns
-------
output:
diff --git a/src/ansys/dpf/core/operators/math/centroid.py b/src/ansys/dpf/core/operators/math/centroid.py
index 65b73f0343f..2bb1ca0fc22 100644
--- a/src/ansys/dpf/core/operators/math/centroid.py
+++ b/src/ansys/dpf/core/operators/math/centroid.py
@@ -37,6 +37,7 @@ class centroid(Operator):
Outputs
-------
field: Field
+ Field with centroid calculation: fieldA*(1-factor) + fieldB*factor
Examples
--------
@@ -113,7 +114,7 @@ def _spec() -> Specification:
name="field",
type_names=["field"],
optional=False,
- document=r"""""",
+ document=r"""Field with centroid calculation: fieldA*(1-factor) + fieldB*factor""",
),
},
)
@@ -277,6 +278,8 @@ def __init__(self, op: Operator):
def field(self) -> Output[Field]:
r"""Allows to get field output of the operator
+ Field with centroid calculation: fieldA*(1-factor) + fieldB*factor
+
Returns
-------
output:
diff --git a/src/ansys/dpf/core/operators/math/centroid_fc.py b/src/ansys/dpf/core/operators/math/centroid_fc.py
index 19cd89a6294..dca711b8429 100644
--- a/src/ansys/dpf/core/operators/math/centroid_fc.py
+++ b/src/ansys/dpf/core/operators/math/centroid_fc.py
@@ -29,13 +29,18 @@ class centroid_fc(Operator):
Inputs
------
fields_container: FieldsContainer
+ FieldsContainer with fields for centroid calculation
time_freq: float
+ Time or frequency value for field selection
step: int, optional
+ Optional step specification
time_freq_support: TimeFreqSupport, optional
+ Optional TimeFreqSupport for field resolution
Outputs
-------
fields_container: FieldsContainer
+ FieldsContainer with centroid calculation results at specified time/frequency
Examples
--------
@@ -106,25 +111,25 @@ def _spec() -> Specification:
name="fields_container",
type_names=["fields_container"],
optional=False,
- document=r"""""",
+ document=r"""FieldsContainer with fields for centroid calculation""",
),
1: PinSpecification(
name="time_freq",
type_names=["double"],
optional=False,
- document=r"""""",
+ document=r"""Time or frequency value for field selection""",
),
2: PinSpecification(
name="step",
type_names=["int32"],
optional=True,
- document=r"""""",
+ document=r"""Optional step specification""",
),
8: PinSpecification(
name="time_freq_support",
type_names=["time_freq_support"],
optional=True,
- document=r"""""",
+ document=r"""Optional TimeFreqSupport for field resolution""",
),
},
map_output_pin_spec={
@@ -132,7 +137,7 @@ def _spec() -> Specification:
name="fields_container",
type_names=["fields_container"],
optional=False,
- document=r"""""",
+ document=r"""FieldsContainer with centroid calculation results at specified time/frequency""",
),
},
)
@@ -221,6 +226,8 @@ def __init__(self, op: Operator):
def fields_container(self) -> Input[FieldsContainer]:
r"""Allows to connect fields_container input to the operator.
+ FieldsContainer with fields for centroid calculation
+
Returns
-------
input:
@@ -240,6 +247,8 @@ def fields_container(self) -> Input[FieldsContainer]:
def time_freq(self) -> Input[float]:
r"""Allows to connect time_freq input to the operator.
+ Time or frequency value for field selection
+
Returns
-------
input:
@@ -259,6 +268,8 @@ def time_freq(self) -> Input[float]:
def step(self) -> Input[int]:
r"""Allows to connect step input to the operator.
+ Optional step specification
+
Returns
-------
input:
@@ -278,6 +289,8 @@ def step(self) -> Input[int]:
def time_freq_support(self) -> Input[TimeFreqSupport]:
r"""Allows to connect time_freq_support input to the operator.
+ Optional TimeFreqSupport for field resolution
+
Returns
-------
input:
@@ -317,6 +330,8 @@ def __init__(self, op: Operator):
def fields_container(self) -> Output[FieldsContainer]:
r"""Allows to get fields_container output of the operator
+ FieldsContainer with centroid calculation results at specified time/frequency
+
Returns
-------
output:
diff --git a/src/ansys/dpf/core/operators/math/cos.py b/src/ansys/dpf/core/operators/math/cos.py
index 6c4aa466823..54fb4b6b497 100644
--- a/src/ansys/dpf/core/operators/math/cos.py
+++ b/src/ansys/dpf/core/operators/math/cos.py
@@ -21,17 +21,18 @@
class cos(Operator):
- r"""Computes element-wise cos(field[i]).
+ r"""Computes element-wise cosine function on field data: cos(field[i]).
Inputs
------
field: Field or FieldsContainer
- field or fields container with only one field is expected
+ Field or fields container containing numeric data for cosine calculation
Outputs
-------
field: Field
+ Field with cosine values applied element-wise to input data
Examples
--------
@@ -68,7 +69,7 @@ def __init__(self, field=None, config=None, server=None):
@staticmethod
def _spec() -> Specification:
- description = r"""Computes element-wise cos(field[i]).
+ description = r"""Computes element-wise cosine function on field data: cos(field[i]).
"""
spec = Specification(
description=description,
@@ -77,7 +78,7 @@ def _spec() -> Specification:
name="field",
type_names=["field", "fields_container"],
optional=False,
- document=r"""field or fields container with only one field is expected""",
+ document=r"""Field or fields container containing numeric data for cosine calculation""",
),
},
map_output_pin_spec={
@@ -85,7 +86,7 @@ def _spec() -> Specification:
name="field",
type_names=["field"],
optional=False,
- document=r"""""",
+ document=r"""Field with cosine values applied element-wise to input data""",
),
},
)
@@ -158,7 +159,7 @@ def __init__(self, op: Operator):
def field(self) -> Input[Field | FieldsContainer]:
r"""Allows to connect field input to the operator.
- field or fields container with only one field is expected
+ Field or fields container containing numeric data for cosine calculation
Returns
-------
@@ -197,6 +198,8 @@ def __init__(self, op: Operator):
def field(self) -> Output[Field]:
r"""Allows to get field output of the operator
+ Field with cosine values applied element-wise to input data
+
Returns
-------
output:
diff --git a/src/ansys/dpf/core/operators/math/cos_fc.py b/src/ansys/dpf/core/operators/math/cos_fc.py
index c5feea0f147..f7377d37822 100644
--- a/src/ansys/dpf/core/operators/math/cos_fc.py
+++ b/src/ansys/dpf/core/operators/math/cos_fc.py
@@ -20,17 +20,18 @@
class cos_fc(Operator):
- r"""Computes element-wise cos(field[i]).
+ r"""Computes element-wise cosine function on field data: cos(field[i]).
Inputs
------
fields_container: FieldsContainer
- field or fields container with only one field is expected
+ Field or fields container containing numeric data for cosine calculation
Outputs
-------
fields_container: FieldsContainer
+ Field with cosine values applied element-wise to input data
Examples
--------
@@ -67,7 +68,7 @@ def __init__(self, fields_container=None, config=None, server=None):
@staticmethod
def _spec() -> Specification:
- description = r"""Computes element-wise cos(field[i]).
+ description = r"""Computes element-wise cosine function on field data: cos(field[i]).
"""
spec = Specification(
description=description,
@@ -76,7 +77,7 @@ def _spec() -> Specification:
name="fields_container",
type_names=["fields_container"],
optional=False,
- document=r"""field or fields container with only one field is expected""",
+ document=r"""Field or fields container containing numeric data for cosine calculation""",
),
},
map_output_pin_spec={
@@ -84,7 +85,7 @@ def _spec() -> Specification:
name="fields_container",
type_names=["fields_container"],
optional=False,
- document=r"""""",
+ document=r"""Field with cosine values applied element-wise to input data""",
),
},
)
@@ -157,7 +158,7 @@ def __init__(self, op: Operator):
def fields_container(self) -> Input[FieldsContainer]:
r"""Allows to connect fields_container input to the operator.
- field or fields container with only one field is expected
+ Field or fields container containing numeric data for cosine calculation
Returns
-------
@@ -198,6 +199,8 @@ def __init__(self, op: Operator):
def fields_container(self) -> Output[FieldsContainer]:
r"""Allows to get fields_container output of the operator
+ Field with cosine values applied element-wise to input data
+
Returns
-------
output:
diff --git a/src/ansys/dpf/core/operators/math/dot.py b/src/ansys/dpf/core/operators/math/dot.py
index 719d1a45074..2f3397e9550 100644
--- a/src/ansys/dpf/core/operators/math/dot.py
+++ b/src/ansys/dpf/core/operators/math/dot.py
@@ -39,6 +39,7 @@ class dot(Operator):
Outputs
-------
field: Field
+ Scalar field containing the dot product values between corresponding vectors
Examples
--------
@@ -108,7 +109,7 @@ def _spec() -> Specification:
name="field",
type_names=["field"],
optional=False,
- document=r"""""",
+ document=r"""Scalar field containing the dot product values between corresponding vectors""",
),
},
)
@@ -247,6 +248,8 @@ def __init__(self, op: Operator):
def field(self) -> Output[Field]:
r"""Allows to get field output of the operator
+ Scalar field containing the dot product values between corresponding vectors
+
Returns
-------
output:
diff --git a/src/ansys/dpf/core/operators/math/exponential.py b/src/ansys/dpf/core/operators/math/exponential.py
index 2f6d3a0acb3..ca5f59ebc99 100644
--- a/src/ansys/dpf/core/operators/math/exponential.py
+++ b/src/ansys/dpf/core/operators/math/exponential.py
@@ -21,17 +21,18 @@
class exponential(Operator):
- r"""Computes element-wise exp(field[i]).
+ r"""Computes element-wise exponential function on field data: exp(field[i]).
Inputs
------
field: Field or FieldsContainer or float
- field or fields container with only one field is expected
+ Field, fields container, or numeric data for exponential calculation
Outputs
-------
field: Field
+ Field with exponential values applied element-wise to input data
Examples
--------
@@ -68,7 +69,7 @@ def __init__(self, field=None, config=None, server=None):
@staticmethod
def _spec() -> Specification:
- description = r"""Computes element-wise exp(field[i]).
+ description = r"""Computes element-wise exponential function on field data: exp(field[i]).
"""
spec = Specification(
description=description,
@@ -82,7 +83,7 @@ def _spec() -> Specification:
"vector",
],
optional=False,
- document=r"""field or fields container with only one field is expected""",
+ document=r"""Field, fields container, or numeric data for exponential calculation""",
),
},
map_output_pin_spec={
@@ -90,7 +91,7 @@ def _spec() -> Specification:
name="field",
type_names=["field"],
optional=False,
- document=r"""""",
+ document=r"""Field with exponential values applied element-wise to input data""",
),
},
)
@@ -163,7 +164,7 @@ def __init__(self, op: Operator):
def field(self) -> Input[Field | FieldsContainer | float]:
r"""Allows to connect field input to the operator.
- field or fields container with only one field is expected
+ Field, fields container, or numeric data for exponential calculation
Returns
-------
@@ -202,6 +203,8 @@ def __init__(self, op: Operator):
def field(self) -> Output[Field]:
r"""Allows to get field output of the operator
+ Field with exponential values applied element-wise to input data
+
Returns
-------
output:
diff --git a/src/ansys/dpf/core/operators/math/exponential_fc.py b/src/ansys/dpf/core/operators/math/exponential_fc.py
index 145a546bc32..585bc7b6fe7 100644
--- a/src/ansys/dpf/core/operators/math/exponential_fc.py
+++ b/src/ansys/dpf/core/operators/math/exponential_fc.py
@@ -20,17 +20,18 @@
class exponential_fc(Operator):
- r"""Computes element-wise exp(field[i]).
+ r"""Computes element-wise exponential function on field data: exp(field[i]).
Inputs
------
fields_container: FieldsContainer
- field or fields container with only one field is expected
+ Field, fields container, or numeric data for exponential calculation
Outputs
-------
fields_container: FieldsContainer
+ Field with exponential values applied element-wise to input data
Examples
--------
@@ -67,7 +68,7 @@ def __init__(self, fields_container=None, config=None, server=None):
@staticmethod
def _spec() -> Specification:
- description = r"""Computes element-wise exp(field[i]).
+ description = r"""Computes element-wise exponential function on field data: exp(field[i]).
"""
spec = Specification(
description=description,
@@ -76,7 +77,7 @@ def _spec() -> Specification:
name="fields_container",
type_names=["fields_container"],
optional=False,
- document=r"""field or fields container with only one field is expected""",
+ document=r"""Field, fields container, or numeric data for exponential calculation""",
),
},
map_output_pin_spec={
@@ -84,7 +85,7 @@ def _spec() -> Specification:
name="fields_container",
type_names=["fields_container"],
optional=False,
- document=r"""""",
+ document=r"""Field with exponential values applied element-wise to input data""",
),
},
)
@@ -157,7 +158,7 @@ def __init__(self, op: Operator):
def fields_container(self) -> Input[FieldsContainer]:
r"""Allows to connect fields_container input to the operator.
- field or fields container with only one field is expected
+ Field, fields container, or numeric data for exponential calculation
Returns
-------
@@ -198,6 +199,8 @@ def __init__(self, op: Operator):
def fields_container(self) -> Output[FieldsContainer]:
r"""Allows to get fields_container output of the operator
+ Field with exponential values applied element-wise to input data
+
Returns
-------
output:
diff --git a/src/ansys/dpf/core/operators/math/generalized_inner_product.py b/src/ansys/dpf/core/operators/math/generalized_inner_product.py
index a3419977a7a..eb7ca6be6bd 100644
--- a/src/ansys/dpf/core/operators/math/generalized_inner_product.py
+++ b/src/ansys/dpf/core/operators/math/generalized_inner_product.py
@@ -35,6 +35,7 @@ class generalized_inner_product(Operator):
Outputs
-------
field: Field
+ Field containing the generalized inner product result
Examples
--------
@@ -110,7 +111,7 @@ def _spec() -> Specification:
name="field",
type_names=["field"],
optional=False,
- document=r"""""",
+ document=r"""Field containing the generalized inner product result""",
),
},
)
@@ -251,6 +252,8 @@ def __init__(self, op: Operator):
def field(self) -> Output[Field]:
r"""Allows to get field output of the operator
+ Field containing the generalized inner product result
+
Returns
-------
output:
diff --git a/src/ansys/dpf/core/operators/math/generalized_inner_product_fc.py b/src/ansys/dpf/core/operators/math/generalized_inner_product_fc.py
index 3a42fb77c23..e3387151c21 100644
--- a/src/ansys/dpf/core/operators/math/generalized_inner_product_fc.py
+++ b/src/ansys/dpf/core/operators/math/generalized_inner_product_fc.py
@@ -35,6 +35,7 @@ class generalized_inner_product_fc(Operator):
Outputs
-------
fields_container: FieldsContainer
+ Field containing the generalized inner product result
Examples
--------
@@ -116,7 +117,7 @@ def _spec() -> Specification:
name="fields_container",
type_names=["fields_container"],
optional=False,
- document=r"""""",
+ document=r"""Field containing the generalized inner product result""",
),
},
)
@@ -259,6 +260,8 @@ def __init__(self, op: Operator):
def fields_container(self) -> Output[FieldsContainer]:
r"""Allows to get fields_container output of the operator
+ Field containing the generalized inner product result
+
Returns
-------
output:
diff --git a/src/ansys/dpf/core/operators/math/invert.py b/src/ansys/dpf/core/operators/math/invert.py
index 5060eefe46d..511be5b51ff 100644
--- a/src/ansys/dpf/core/operators/math/invert.py
+++ b/src/ansys/dpf/core/operators/math/invert.py
@@ -33,6 +33,7 @@ class invert(Operator):
Outputs
-------
field: Field
+ Field with inverse values (1/x) applied element-wise to input data
Examples
--------
@@ -87,7 +88,7 @@ def _spec() -> Specification:
name="field",
type_names=["field"],
optional=False,
- document=r"""""",
+ document=r"""Field with inverse values (1/x) applied element-wise to input data""",
),
},
)
@@ -199,6 +200,8 @@ def __init__(self, op: Operator):
def field(self) -> Output[Field]:
r"""Allows to get field output of the operator
+ Field with inverse values (1/x) applied element-wise to input data
+
Returns
-------
output:
diff --git a/src/ansys/dpf/core/operators/math/invert_fc.py b/src/ansys/dpf/core/operators/math/invert_fc.py
index b38701c009e..b69bdb7c882 100644
--- a/src/ansys/dpf/core/operators/math/invert_fc.py
+++ b/src/ansys/dpf/core/operators/math/invert_fc.py
@@ -32,6 +32,7 @@ class invert_fc(Operator):
Outputs
-------
fields_container: FieldsContainer
+ Field with inverse values (1/x) applied element-wise to input data
Examples
--------
@@ -86,7 +87,7 @@ def _spec() -> Specification:
name="fields_container",
type_names=["fields_container"],
optional=False,
- document=r"""""",
+ document=r"""Field with inverse values (1/x) applied element-wise to input data""",
),
},
)
@@ -200,6 +201,8 @@ def __init__(self, op: Operator):
def fields_container(self) -> Output[FieldsContainer]:
r"""Allows to get fields_container output of the operator
+ Field with inverse values (1/x) applied element-wise to input data
+
Returns
-------
output:
diff --git a/src/ansys/dpf/core/operators/math/ln.py b/src/ansys/dpf/core/operators/math/ln.py
index ac467e6607f..78ddd9840c5 100644
--- a/src/ansys/dpf/core/operators/math/ln.py
+++ b/src/ansys/dpf/core/operators/math/ln.py
@@ -32,6 +32,7 @@ class ln(Operator):
Outputs
-------
field: Field
+ Field with natural logarithm values applied element-wise
Examples
--------
@@ -90,7 +91,7 @@ def _spec() -> Specification:
name="field",
type_names=["field"],
optional=False,
- document=r"""""",
+ document=r"""Field with natural logarithm values applied element-wise""",
),
},
)
@@ -202,6 +203,8 @@ def __init__(self, op: Operator):
def field(self) -> Output[Field]:
r"""Allows to get field output of the operator
+ Field with natural logarithm values applied element-wise
+
Returns
-------
output:
diff --git a/src/ansys/dpf/core/operators/math/ln_fc.py b/src/ansys/dpf/core/operators/math/ln_fc.py
index ac3f5e38d8a..0608b263fd7 100644
--- a/src/ansys/dpf/core/operators/math/ln_fc.py
+++ b/src/ansys/dpf/core/operators/math/ln_fc.py
@@ -31,6 +31,7 @@ class ln_fc(Operator):
Outputs
-------
fields_container: FieldsContainer
+ Field with natural logarithm values applied element-wise
Examples
--------
@@ -84,7 +85,7 @@ def _spec() -> Specification:
name="fields_container",
type_names=["fields_container"],
optional=False,
- document=r"""""",
+ document=r"""Field with natural logarithm values applied element-wise""",
),
},
)
@@ -198,6 +199,8 @@ def __init__(self, op: Operator):
def fields_container(self) -> Output[FieldsContainer]:
r"""Allows to get fields_container output of the operator
+ Field with natural logarithm values applied element-wise
+
Returns
-------
output:
diff --git a/src/ansys/dpf/core/operators/math/minus.py b/src/ansys/dpf/core/operators/math/minus.py
index a0d11f8e66b..213d5dd5d09 100644
--- a/src/ansys/dpf/core/operators/math/minus.py
+++ b/src/ansys/dpf/core/operators/math/minus.py
@@ -37,6 +37,7 @@ class minus(Operator):
Outputs
-------
field: Field
+ Field containing the element-wise difference (fieldA - fieldB)
Examples
--------
@@ -114,7 +115,7 @@ def _spec() -> Specification:
name="field",
type_names=["field"],
optional=False,
- document=r"""""",
+ document=r"""Field containing the element-wise difference (fieldA - fieldB)""",
),
},
)
@@ -253,6 +254,8 @@ def __init__(self, op: Operator):
def field(self) -> Output[Field]:
r"""Allows to get field output of the operator
+ Field containing the element-wise difference (fieldA - fieldB)
+
Returns
-------
output:
diff --git a/src/ansys/dpf/core/operators/math/minus_fc.py b/src/ansys/dpf/core/operators/math/minus_fc.py
index 3425abd0362..90688b0cdb8 100644
--- a/src/ansys/dpf/core/operators/math/minus_fc.py
+++ b/src/ansys/dpf/core/operators/math/minus_fc.py
@@ -37,6 +37,7 @@ class minus_fc(Operator):
Outputs
-------
fields_container: FieldsContainer
+ Field containing the element-wise difference (fieldA - fieldB)
Examples
--------
@@ -120,7 +121,7 @@ def _spec() -> Specification:
name="fields_container",
type_names=["fields_container"],
optional=False,
- document=r"""""",
+ document=r"""Field containing the element-wise difference (fieldA - fieldB)""",
),
},
)
@@ -261,6 +262,8 @@ def __init__(self, op: Operator):
def fields_container(self) -> Output[FieldsContainer]:
r"""Allows to get fields_container output of the operator
+ Field containing the element-wise difference (fieldA - fieldB)
+
Returns
-------
output:
diff --git a/src/ansys/dpf/core/operators/math/norm.py b/src/ansys/dpf/core/operators/math/norm.py
index 3aea7ddbf55..43ee1bf13c3 100644
--- a/src/ansys/dpf/core/operators/math/norm.py
+++ b/src/ansys/dpf/core/operators/math/norm.py
@@ -35,6 +35,7 @@ class norm(Operator):
Outputs
-------
field: Field
+ Scalar field containing the Lp norm values for each element
Examples
--------
@@ -100,7 +101,7 @@ def _spec() -> Specification:
name="field",
type_names=["field"],
optional=False,
- document=r"""""",
+ document=r"""Scalar field containing the Lp norm values for each element""",
),
},
)
@@ -237,6 +238,8 @@ def __init__(self, op: Operator):
def field(self) -> Output[Field]:
r"""Allows to get field output of the operator
+ Scalar field containing the Lp norm values for each element
+
Returns
-------
output:
diff --git a/src/ansys/dpf/core/operators/math/norm_fc.py b/src/ansys/dpf/core/operators/math/norm_fc.py
index aed18ef4ed4..4f900f11992 100644
--- a/src/ansys/dpf/core/operators/math/norm_fc.py
+++ b/src/ansys/dpf/core/operators/math/norm_fc.py
@@ -27,12 +27,14 @@ class norm_fc(Operator):
Inputs
------
fields_container: FieldsContainer
+ FieldsContainer containing fields for norm calculation
scalar_int: int, optional
Lp normalisation type, p = 1, 2, ...n - Default Lp=2
Outputs
-------
fields_container: FieldsContainer
+ FieldsContainer with computed norms for each field
Examples
--------
@@ -86,7 +88,7 @@ def _spec() -> Specification:
name="fields_container",
type_names=["fields_container"],
optional=False,
- document=r"""""",
+ document=r"""FieldsContainer containing fields for norm calculation""",
),
1: PinSpecification(
name="scalar_int",
@@ -100,7 +102,7 @@ def _spec() -> Specification:
name="fields_container",
type_names=["fields_container"],
optional=False,
- document=r"""""",
+ document=r"""FieldsContainer with computed norms for each field""",
),
},
)
@@ -177,6 +179,8 @@ def __init__(self, op: Operator):
def fields_container(self) -> Input[FieldsContainer]:
r"""Allows to connect fields_container input to the operator.
+ FieldsContainer containing fields for norm calculation
+
Returns
-------
input:
@@ -237,6 +241,8 @@ def __init__(self, op: Operator):
def fields_container(self) -> Output[FieldsContainer]:
r"""Allows to get fields_container output of the operator
+ FieldsContainer with computed norms for each field
+
Returns
-------
output:
diff --git a/src/ansys/dpf/core/operators/math/pow.py b/src/ansys/dpf/core/operators/math/pow.py
index 98f0129d727..805aba5b617 100644
--- a/src/ansys/dpf/core/operators/math/pow.py
+++ b/src/ansys/dpf/core/operators/math/pow.py
@@ -26,11 +26,14 @@ class pow(Operator):
Inputs
------
field: Field
+ Field for which to compute power operation
factor: float
+ Power exponent value
Outputs
-------
field: Field
+ Field with power operation applied element-wise
Examples
--------
@@ -81,13 +84,13 @@ def _spec() -> Specification:
name="field",
type_names=["field"],
optional=False,
- document=r"""""",
+ document=r"""Field for which to compute power operation""",
),
1: PinSpecification(
name="factor",
type_names=["double"],
optional=False,
- document=r"""""",
+ document=r"""Power exponent value""",
),
},
map_output_pin_spec={
@@ -95,7 +98,7 @@ def _spec() -> Specification:
name="field",
type_names=["field"],
optional=False,
- document=r"""""",
+ document=r"""Field with power operation applied element-wise""",
),
},
)
@@ -170,6 +173,8 @@ def __init__(self, op: Operator):
def field(self) -> Input[Field]:
r"""Allows to connect field input to the operator.
+ Field for which to compute power operation
+
Returns
-------
input:
@@ -189,6 +194,8 @@ def field(self) -> Input[Field]:
def factor(self) -> Input[float]:
r"""Allows to connect factor input to the operator.
+ Power exponent value
+
Returns
-------
input:
@@ -226,6 +233,8 @@ def __init__(self, op: Operator):
def field(self) -> Output[Field]:
r"""Allows to get field output of the operator
+ Field with power operation applied element-wise
+
Returns
-------
output:
diff --git a/src/ansys/dpf/core/operators/math/pow_fc.py b/src/ansys/dpf/core/operators/math/pow_fc.py
index c9c6a1f4c0e..1d6daf67e53 100644
--- a/src/ansys/dpf/core/operators/math/pow_fc.py
+++ b/src/ansys/dpf/core/operators/math/pow_fc.py
@@ -26,11 +26,14 @@ class pow_fc(Operator):
Inputs
------
fields_container: FieldsContainer
+ Field for which to compute power operation
factor: float
+ Power exponent value
Outputs
-------
fields_container: FieldsContainer
+ Field with power operation applied element-wise
Examples
--------
@@ -81,13 +84,13 @@ def _spec() -> Specification:
name="fields_container",
type_names=["fields_container"],
optional=False,
- document=r"""""",
+ document=r"""Field for which to compute power operation""",
),
1: PinSpecification(
name="factor",
type_names=["double"],
optional=False,
- document=r"""""",
+ document=r"""Power exponent value""",
),
},
map_output_pin_spec={
@@ -95,7 +98,7 @@ def _spec() -> Specification:
name="fields_container",
type_names=["fields_container"],
optional=False,
- document=r"""""",
+ document=r"""Field with power operation applied element-wise""",
),
},
)
@@ -172,6 +175,8 @@ def __init__(self, op: Operator):
def fields_container(self) -> Input[FieldsContainer]:
r"""Allows to connect fields_container input to the operator.
+ Field for which to compute power operation
+
Returns
-------
input:
@@ -191,6 +196,8 @@ def fields_container(self) -> Input[FieldsContainer]:
def factor(self) -> Input[float]:
r"""Allows to connect factor input to the operator.
+ Power exponent value
+
Returns
-------
input:
@@ -230,6 +237,8 @@ def __init__(self, op: Operator):
def fields_container(self) -> Output[FieldsContainer]:
r"""Allows to get fields_container output of the operator
+ Field with power operation applied element-wise
+
Returns
-------
output:
diff --git a/src/ansys/dpf/core/operators/math/scale.py b/src/ansys/dpf/core/operators/math/scale.py
index ee317569d5b..a8d42b3a99a 100644
--- a/src/ansys/dpf/core/operators/math/scale.py
+++ b/src/ansys/dpf/core/operators/math/scale.py
@@ -36,11 +36,12 @@ class scale(Operator):
boolean: bool, optional
Default is false. If set to true, output of scale is made dimensionless
algorithm: int, optional
- Default is 0 use mkl. If set to 1, don't
+ Algorithm selection: 0 (default) uses MKL for optimization, 1 uses standard loops
Outputs
-------
field: Field
+ Field with scaled values (input_field * scale_factor)
Examples
--------
@@ -139,7 +140,7 @@ def _spec() -> Specification:
name="algorithm",
type_names=["int32"],
optional=True,
- document=r"""Default is 0 use mkl. If set to 1, don't""",
+ document=r"""Algorithm selection: 0 (default) uses MKL for optimization, 1 uses standard loops""",
),
},
map_output_pin_spec={
@@ -147,7 +148,7 @@ def _spec() -> Specification:
name="field",
type_names=["field"],
optional=False,
- document=r"""""",
+ document=r"""Field with scaled values (input_field * scale_factor)""",
),
},
)
@@ -297,7 +298,7 @@ def boolean(self) -> Input[bool]:
def algorithm(self) -> Input[int]:
r"""Allows to connect algorithm input to the operator.
- Default is 0 use mkl. If set to 1, don't
+ Algorithm selection: 0 (default) uses MKL for optimization, 1 uses standard loops
Returns
-------
@@ -348,6 +349,8 @@ def __init__(self, op: Operator):
def field(self) -> Output[Field]:
r"""Allows to get field output of the operator
+ Field with scaled values (input_field * scale_factor)
+
Returns
-------
output:
diff --git a/src/ansys/dpf/core/operators/math/scale_fc.py b/src/ansys/dpf/core/operators/math/scale_fc.py
index 2b1131d06a6..e2c1f85ccde 100644
--- a/src/ansys/dpf/core/operators/math/scale_fc.py
+++ b/src/ansys/dpf/core/operators/math/scale_fc.py
@@ -36,11 +36,12 @@ class scale_fc(Operator):
boolean: bool, optional
Default is false. If set to true, output of scale is made dimensionless
algorithm: int, optional
- Default is 0 use mkl. If set to 1, don't
+ Algorithm selection: 0 (default) uses MKL for optimization, 1 uses standard loops
Outputs
-------
fields_container: FieldsContainer
+ FieldsContainer with scaled field values
Examples
--------
@@ -144,7 +145,7 @@ def _spec() -> Specification:
name="algorithm",
type_names=["int32"],
optional=True,
- document=r"""Default is 0 use mkl. If set to 1, don't""",
+ document=r"""Algorithm selection: 0 (default) uses MKL for optimization, 1 uses standard loops""",
),
},
map_output_pin_spec={
@@ -152,7 +153,7 @@ def _spec() -> Specification:
name="fields_container",
type_names=["fields_container"],
optional=False,
- document=r"""""",
+ document=r"""FieldsContainer with scaled field values""",
),
},
)
@@ -302,7 +303,7 @@ def boolean(self) -> Input[bool]:
def algorithm(self) -> Input[int]:
r"""Allows to connect algorithm input to the operator.
- Default is 0 use mkl. If set to 1, don't
+ Algorithm selection: 0 (default) uses MKL for optimization, 1 uses standard loops
Returns
-------
@@ -355,6 +356,8 @@ def __init__(self, op: Operator):
def fields_container(self) -> Output[FieldsContainer]:
r"""Allows to get fields_container output of the operator
+ FieldsContainer with scaled field values
+
Returns
-------
output:
diff --git a/src/ansys/dpf/core/operators/math/sin.py b/src/ansys/dpf/core/operators/math/sin.py
index e9503b1aadd..a162e2756b9 100644
--- a/src/ansys/dpf/core/operators/math/sin.py
+++ b/src/ansys/dpf/core/operators/math/sin.py
@@ -20,16 +20,18 @@
class sin(Operator):
- r"""Computes element-wise sin(field[i]).
+ r"""Computes element-wise sine function on field data: sin(field[i]).
Inputs
------
field: Field
+ Field containing numeric data for sine calculation
Outputs
-------
field: Field
+ Field with sine values applied element-wise to input data
Examples
--------
@@ -66,7 +68,7 @@ def __init__(self, field=None, config=None, server=None):
@staticmethod
def _spec() -> Specification:
- description = r"""Computes element-wise sin(field[i]).
+ description = r"""Computes element-wise sine function on field data: sin(field[i]).
"""
spec = Specification(
description=description,
@@ -75,7 +77,7 @@ def _spec() -> Specification:
name="field",
type_names=["field"],
optional=False,
- document=r"""""",
+ document=r"""Field containing numeric data for sine calculation""",
),
},
map_output_pin_spec={
@@ -83,7 +85,7 @@ def _spec() -> Specification:
name="field",
type_names=["field"],
optional=False,
- document=r"""""",
+ document=r"""Field with sine values applied element-wise to input data""",
),
},
)
@@ -154,6 +156,8 @@ def __init__(self, op: Operator):
def field(self) -> Input[Field]:
r"""Allows to connect field input to the operator.
+ Field containing numeric data for sine calculation
+
Returns
-------
input:
@@ -191,6 +195,8 @@ def __init__(self, op: Operator):
def field(self) -> Output[Field]:
r"""Allows to get field output of the operator
+ Field with sine values applied element-wise to input data
+
Returns
-------
output:
diff --git a/src/ansys/dpf/core/operators/math/sin_fc.py b/src/ansys/dpf/core/operators/math/sin_fc.py
index 28e93203b8d..1612102603c 100644
--- a/src/ansys/dpf/core/operators/math/sin_fc.py
+++ b/src/ansys/dpf/core/operators/math/sin_fc.py
@@ -20,16 +20,18 @@
class sin_fc(Operator):
- r"""Computes element-wise sin(field[i]).
+ r"""Computes element-wise sine function on field data: sin(field[i]).
Inputs
------
fields_container: FieldsContainer
+ Field containing numeric data for sine calculation
Outputs
-------
fields_container: FieldsContainer
+ Field with sine values applied element-wise to input data
Examples
--------
@@ -66,7 +68,7 @@ def __init__(self, fields_container=None, config=None, server=None):
@staticmethod
def _spec() -> Specification:
- description = r"""Computes element-wise sin(field[i]).
+ description = r"""Computes element-wise sine function on field data: sin(field[i]).
"""
spec = Specification(
description=description,
@@ -75,7 +77,7 @@ def _spec() -> Specification:
name="fields_container",
type_names=["fields_container"],
optional=False,
- document=r"""""",
+ document=r"""Field containing numeric data for sine calculation""",
),
},
map_output_pin_spec={
@@ -83,7 +85,7 @@ def _spec() -> Specification:
name="fields_container",
type_names=["fields_container"],
optional=False,
- document=r"""""",
+ document=r"""Field with sine values applied element-wise to input data""",
),
},
)
@@ -156,6 +158,8 @@ def __init__(self, op: Operator):
def fields_container(self) -> Input[FieldsContainer]:
r"""Allows to connect fields_container input to the operator.
+ Field containing numeric data for sine calculation
+
Returns
-------
input:
@@ -195,6 +199,8 @@ def __init__(self, op: Operator):
def fields_container(self) -> Output[FieldsContainer]:
r"""Allows to get fields_container output of the operator
+ Field with sine values applied element-wise to input data
+
Returns
-------
output:
diff --git a/src/ansys/dpf/core/operators/math/sqr.py b/src/ansys/dpf/core/operators/math/sqr.py
index 52e73412893..4b27d1612e4 100644
--- a/src/ansys/dpf/core/operators/math/sqr.py
+++ b/src/ansys/dpf/core/operators/math/sqr.py
@@ -32,6 +32,7 @@ class sqr(Operator):
Outputs
-------
field: Field
+ Field with squared values applied element-wise to input data
Examples
--------
@@ -85,7 +86,7 @@ def _spec() -> Specification:
name="field",
type_names=["field"],
optional=False,
- document=r"""""",
+ document=r"""Field with squared values applied element-wise to input data""",
),
},
)
@@ -197,6 +198,8 @@ def __init__(self, op: Operator):
def field(self) -> Output[Field]:
r"""Allows to get field output of the operator
+ Field with squared values applied element-wise to input data
+
Returns
-------
output:
diff --git a/src/ansys/dpf/core/operators/math/sqr_fc.py b/src/ansys/dpf/core/operators/math/sqr_fc.py
index 5018b27d4d4..b9675274252 100644
--- a/src/ansys/dpf/core/operators/math/sqr_fc.py
+++ b/src/ansys/dpf/core/operators/math/sqr_fc.py
@@ -31,6 +31,7 @@ class sqr_fc(Operator):
Outputs
-------
fields_container: FieldsContainer
+ Field with squared values applied element-wise to input data
Examples
--------
@@ -84,7 +85,7 @@ def _spec() -> Specification:
name="fields_container",
type_names=["fields_container"],
optional=False,
- document=r"""""",
+ document=r"""Field with squared values applied element-wise to input data""",
),
},
)
@@ -198,6 +199,8 @@ def __init__(self, op: Operator):
def fields_container(self) -> Output[FieldsContainer]:
r"""Allows to get fields_container output of the operator
+ Field with squared values applied element-wise to input data
+
Returns
-------
output:
diff --git a/src/ansys/dpf/core/operators/math/sqrt.py b/src/ansys/dpf/core/operators/math/sqrt.py
index b7c279626d9..ab80d1286bd 100644
--- a/src/ansys/dpf/core/operators/math/sqrt.py
+++ b/src/ansys/dpf/core/operators/math/sqrt.py
@@ -21,17 +21,19 @@
class sqrt(Operator):
- r"""Computes element-wise sqrt(field1).
+ r"""Computes element-wise square root function on field data:
+ sqrt(field[i]).
Inputs
------
field: Field or FieldsContainer
- field or fields container with only one field is expected
+ Field or fields container containing numeric data for square root calculation
Outputs
-------
field: Field
+ Field with square root values applied element-wise to input data
Examples
--------
@@ -68,7 +70,8 @@ def __init__(self, field=None, config=None, server=None):
@staticmethod
def _spec() -> Specification:
- description = r"""Computes element-wise sqrt(field1).
+ description = r"""Computes element-wise square root function on field data:
+sqrt(field[i]).
"""
spec = Specification(
description=description,
@@ -77,7 +80,7 @@ def _spec() -> Specification:
name="field",
type_names=["field", "fields_container"],
optional=False,
- document=r"""field or fields container with only one field is expected""",
+ document=r"""Field or fields container containing numeric data for square root calculation""",
),
},
map_output_pin_spec={
@@ -85,7 +88,7 @@ def _spec() -> Specification:
name="field",
type_names=["field"],
optional=False,
- document=r"""""",
+ document=r"""Field with square root values applied element-wise to input data""",
),
},
)
@@ -158,7 +161,7 @@ def __init__(self, op: Operator):
def field(self) -> Input[Field | FieldsContainer]:
r"""Allows to connect field input to the operator.
- field or fields container with only one field is expected
+ Field or fields container containing numeric data for square root calculation
Returns
-------
@@ -197,6 +200,8 @@ def __init__(self, op: Operator):
def field(self) -> Output[Field]:
r"""Allows to get field output of the operator
+ Field with square root values applied element-wise to input data
+
Returns
-------
output:
diff --git a/src/ansys/dpf/core/operators/math/sqrt_fc.py b/src/ansys/dpf/core/operators/math/sqrt_fc.py
index a8ecb7d66b5..a2ee5514b4f 100644
--- a/src/ansys/dpf/core/operators/math/sqrt_fc.py
+++ b/src/ansys/dpf/core/operators/math/sqrt_fc.py
@@ -20,17 +20,19 @@
class sqrt_fc(Operator):
- r"""Computes element-wise sqrt(field1).
+ r"""Computes element-wise square root function on field data:
+ sqrt(field[i]).
Inputs
------
fields_container: FieldsContainer
- field or fields container with only one field is expected
+ Field or fields container containing numeric data for square root calculation
Outputs
-------
fields_container: FieldsContainer
+ Field with square root values applied element-wise to input data
Examples
--------
@@ -67,7 +69,8 @@ def __init__(self, fields_container=None, config=None, server=None):
@staticmethod
def _spec() -> Specification:
- description = r"""Computes element-wise sqrt(field1).
+ description = r"""Computes element-wise square root function on field data:
+sqrt(field[i]).
"""
spec = Specification(
description=description,
@@ -76,7 +79,7 @@ def _spec() -> Specification:
name="fields_container",
type_names=["fields_container"],
optional=False,
- document=r"""field or fields container with only one field is expected""",
+ document=r"""Field or fields container containing numeric data for square root calculation""",
),
},
map_output_pin_spec={
@@ -84,7 +87,7 @@ def _spec() -> Specification:
name="fields_container",
type_names=["fields_container"],
optional=False,
- document=r"""""",
+ document=r"""Field with square root values applied element-wise to input data""",
),
},
)
@@ -157,7 +160,7 @@ def __init__(self, op: Operator):
def fields_container(self) -> Input[FieldsContainer]:
r"""Allows to connect fields_container input to the operator.
- field or fields container with only one field is expected
+ Field or fields container containing numeric data for square root calculation
Returns
-------
@@ -198,6 +201,8 @@ def __init__(self, op: Operator):
def fields_container(self) -> Output[FieldsContainer]:
r"""Allows to get fields_container output of the operator
+ Field with square root values applied element-wise to input data
+
Returns
-------
output:
diff --git a/src/ansys/dpf/core/operators/math/time_freq_interpolation.py b/src/ansys/dpf/core/operators/math/time_freq_interpolation.py
index d511f0167e4..a9c603fdcb0 100644
--- a/src/ansys/dpf/core/operators/math/time_freq_interpolation.py
+++ b/src/ansys/dpf/core/operators/math/time_freq_interpolation.py
@@ -46,6 +46,7 @@ class time_freq_interpolation(Operator):
Outputs
-------
fields_container: FieldsContainer
+ FieldsContainer with interpolated fields at specified time/frequency values
Examples
--------
@@ -169,7 +170,7 @@ def _spec() -> Specification:
name="fields_container",
type_names=["fields_container"],
optional=False,
- document=r"""""",
+ document=r"""FieldsContainer with interpolated fields at specified time/frequency values""",
),
},
)
@@ -414,6 +415,8 @@ def __init__(self, op: Operator):
def fields_container(self) -> Output[FieldsContainer]:
r"""Allows to get fields_container output of the operator
+ FieldsContainer with interpolated fields at specified time/frequency values
+
Returns
-------
output:
diff --git a/src/ansys/dpf/core/operators/math/unit_convert_fc.py b/src/ansys/dpf/core/operators/math/unit_convert_fc.py
index 83e6d942ef3..e609a52b4e8 100644
--- a/src/ansys/dpf/core/operators/math/unit_convert_fc.py
+++ b/src/ansys/dpf/core/operators/math/unit_convert_fc.py
@@ -32,6 +32,7 @@ class unit_convert_fc(Operator):
Outputs
-------
fields_container: FieldsContainer
+ FieldsContainer with converted units (inplace operation)
Examples
--------
@@ -96,7 +97,7 @@ def _spec() -> Specification:
name="fields_container",
type_names=["fields_container"],
optional=False,
- document=r"""""",
+ document=r"""FieldsContainer with converted units (inplace operation)""",
),
},
)
@@ -235,6 +236,8 @@ def __init__(self, op: Operator):
def fields_container(self) -> Output[FieldsContainer]:
r"""Allows to get fields_container output of the operator
+ FieldsContainer with converted units (inplace operation)
+
Returns
-------
output:
diff --git a/src/ansys/dpf/core/operators/mesh/from_field.py b/src/ansys/dpf/core/operators/mesh/from_field.py
index 39916ed9359..c83c8805556 100644
--- a/src/ansys/dpf/core/operators/mesh/from_field.py
+++ b/src/ansys/dpf/core/operators/mesh/from_field.py
@@ -21,16 +21,18 @@
class from_field(Operator):
- r"""Returns the meshed region contained in the support of the mesh.
+ r"""Extracts the meshed region from the support of a field.
Inputs
------
field: Field
+ Field containing a mesh support
Outputs
-------
mesh: MeshedRegion
+ Meshed region extracted from the field's support
Examples
--------
@@ -67,7 +69,7 @@ def __init__(self, field=None, config=None, server=None):
@staticmethod
def _spec() -> Specification:
- description = r"""Returns the meshed region contained in the support of the mesh.
+ description = r"""Extracts the meshed region from the support of a field.
"""
spec = Specification(
description=description,
@@ -76,7 +78,7 @@ def _spec() -> Specification:
name="field",
type_names=["field"],
optional=False,
- document=r"""""",
+ document=r"""Field containing a mesh support""",
),
},
map_output_pin_spec={
@@ -84,7 +86,7 @@ def _spec() -> Specification:
name="mesh",
type_names=["abstract_meshed_region"],
optional=False,
- document=r"""""",
+ document=r"""Meshed region extracted from the field's support""",
),
},
)
@@ -155,6 +157,8 @@ def __init__(self, op: Operator):
def field(self) -> Input[Field]:
r"""Allows to connect field input to the operator.
+ Field containing a mesh support
+
Returns
-------
input:
@@ -194,6 +198,8 @@ def __init__(self, op: Operator):
def mesh(self) -> Output[MeshedRegion]:
r"""Allows to get mesh output of the operator
+ Meshed region extracted from the field's support
+
Returns
-------
output:
diff --git a/src/ansys/dpf/core/operators/metadata/property_field_provider_by_name.py b/src/ansys/dpf/core/operators/metadata/property_field_provider_by_name.py
index f476ef5c93b..6f76ece30f5 100644
--- a/src/ansys/dpf/core/operators/metadata/property_field_provider_by_name.py
+++ b/src/ansys/dpf/core/operators/metadata/property_field_provider_by_name.py
@@ -36,7 +36,7 @@ class property_field_provider_by_name(Operator):
data_sources: DataSources
optional if using a streamsContainer
property_name: str
- property to read, that can be the following: elements_connectivity, nodes_connectivity, material, element_type, apdl_section_id, apdl_real_id, apdl_esys_id, mapdl_element_type, mapdl_element_type_id, harmonic_index, step, substep, keyopt_i (i = 1 -> 18).
+ property to read, that can be the following: elements_connectivity, nodes_connectivity, material, element_type, apdl_section_id, apdl_real_id, apdl_esys_id, apdl_tshape, mapdl_element_type, mapdl_element_type_id, harmonic_index, step, substep, keyopt_i (i = 1 -> 18).
Outputs
-------
@@ -129,7 +129,7 @@ def _spec() -> Specification:
name="property_name",
type_names=["string"],
optional=False,
- document=r"""property to read, that can be the following: elements_connectivity, nodes_connectivity, material, element_type, apdl_section_id, apdl_real_id, apdl_esys_id, mapdl_element_type, mapdl_element_type_id, harmonic_index, step, substep, keyopt_i (i = 1 -> 18).""",
+ document=r"""property to read, that can be the following: elements_connectivity, nodes_connectivity, material, element_type, apdl_section_id, apdl_real_id, apdl_esys_id, apdl_tshape, mapdl_element_type, mapdl_element_type_id, harmonic_index, step, substep, keyopt_i (i = 1 -> 18).""",
),
},
map_output_pin_spec={
@@ -293,7 +293,7 @@ def data_sources(self) -> Input[DataSources]:
def property_name(self) -> Input[str]:
r"""Allows to connect property_name input to the operator.
- property to read, that can be the following: elements_connectivity, nodes_connectivity, material, element_type, apdl_section_id, apdl_real_id, apdl_esys_id, mapdl_element_type, mapdl_element_type_id, harmonic_index, step, substep, keyopt_i (i = 1 -> 18).
+ property to read, that can be the following: elements_connectivity, nodes_connectivity, material, element_type, apdl_section_id, apdl_real_id, apdl_esys_id, apdl_tshape, mapdl_element_type, mapdl_element_type_id, harmonic_index, step, substep, keyopt_i (i = 1 -> 18).
Returns
-------
diff --git a/src/ansys/dpf/core/operators/result/__init__.py b/src/ansys/dpf/core/operators/result/__init__.py
index 5cae26b6e05..f918e343848 100644
--- a/src/ansys/dpf/core/operators/result/__init__.py
+++ b/src/ansys/dpf/core/operators/result/__init__.py
@@ -4,6 +4,7 @@
from .acceleration_Z import acceleration_Z
from .accu_eqv_creep_strain import accu_eqv_creep_strain
from .accu_eqv_plastic_strain import accu_eqv_plastic_strain
+from .acoustic_energy_density import acoustic_energy_density
from .add_rigid_body_motion import add_rigid_body_motion
from .add_rigid_body_motion_fc import add_rigid_body_motion_fc
from .artificial_hourglass_energy import artificial_hourglass_energy
@@ -175,6 +176,7 @@
from .hydrostatic_pressure import hydrostatic_pressure
from .incremental_energy import incremental_energy
from .initial_coordinates import initial_coordinates
+from .input_sound_power import input_sound_power
from .interface_contact_area import interface_contact_area
from .interface_contact_force import interface_contact_force
from .interface_contact_mass import interface_contact_mass
@@ -243,6 +245,7 @@
from .normal_contact_moment import normal_contact_moment
from .num_surface_status_changes import num_surface_status_changes
from .omega import omega
+from .output_sound_power import output_sound_power
from .part_added_mass import part_added_mass
from .part_eroded_internal_energy import part_eroded_internal_energy
from .part_eroded_kinetic_energy import part_eroded_kinetic_energy
@@ -294,6 +297,7 @@
from .smisc import smisc
from .specific_heat import specific_heat
from .spectrum_data import spectrum_data
+from .squared_l2norm_pressure import squared_l2norm_pressure
from .state_variable import state_variable
from .static_pressure import static_pressure
from .stiffness_matrix_energy import stiffness_matrix_energy
diff --git a/src/ansys/dpf/core/operators/result/acoustic_energy_density.py b/src/ansys/dpf/core/operators/result/acoustic_energy_density.py
new file mode 100644
index 00000000000..bc77a371dc8
--- /dev/null
+++ b/src/ansys/dpf/core/operators/result/acoustic_energy_density.py
@@ -0,0 +1,478 @@
+"""
+acoustic_energy_density
+
+Autogenerated DPF operator classes.
+"""
+
+from __future__ import annotations
+from typing import TYPE_CHECKING
+
+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
+
+if TYPE_CHECKING:
+ from ansys.dpf.core.data_sources import DataSources
+ from ansys.dpf.core.field import Field
+ from ansys.dpf.core.fields_container import FieldsContainer
+ from ansys.dpf.core.meshed_region import MeshedRegion
+ from ansys.dpf.core.meshes_container import MeshesContainer
+ from ansys.dpf.core.scoping import Scoping
+ from ansys.dpf.core.scopings_container import ScopingsContainer
+ from ansys.dpf.core.streams_container import StreamsContainer
+
+
+class acoustic_energy_density(Operator):
+ r"""Read/compute AED by calling the readers defined by the datasources.
+
+
+ Inputs
+ ------
+ time_scoping: Scoping or int or float or Field, optional
+ time/freq values (use doubles or field), time/freq set ids (use ints or scoping) or time/freq step ids (use scoping with TimeFreq_steps location) required in output. To specify time/freq values at specific load steps, put a Field (and not a list) in input with a scoping located on "TimeFreq_steps". Linear time freq intrapolation is performed if the values are not in the result files and the data at the max time or freq is taken when time/freqs are higher than available time/freqs in result files. To get all data for all time/freq sets, connect an int with value -1.
+ mesh_scoping: ScopingsContainer or Scoping, optional
+ nodes or elements scoping required in output. The output fields will be scoped on these node or element IDs. To figure out the ordering of the fields data, look at their scoping IDs as they might not be ordered as the input scoping was. The scoping's location indicates whether nodes or elements are asked for. Using scopings container allows you to split the result fields container into domains
+ fields_container: FieldsContainer, optional
+ Fields container already allocated modified inplace
+ streams_container: StreamsContainer, optional
+ result file container allowed to be kept open to cache data
+ data_sources: DataSources
+ result file path container, used if no streams are set
+ bool_rotate_to_global: bool, optional
+ if true the field is rotated to global coordinate system (default true). Please check your results carefully if 'false' is used for Elemental or ElementalNodal results averaged to the Nodes when adjacent elements do not share the same coordinate system, as results may be incorrect.
+ mesh: MeshedRegion or MeshesContainer, optional
+ prevents from reading the mesh in the result files
+
+ Outputs
+ -------
+ fields_container: FieldsContainer
+
+ Examples
+ --------
+ >>> from ansys.dpf import core as dpf
+
+ >>> # Instantiate operator
+ >>> op = dpf.operators.result.acoustic_energy_density()
+
+ >>> # Make input connections
+ >>> my_time_scoping = dpf.Scoping()
+ >>> op.inputs.time_scoping.connect(my_time_scoping)
+ >>> my_mesh_scoping = dpf.ScopingsContainer()
+ >>> op.inputs.mesh_scoping.connect(my_mesh_scoping)
+ >>> 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)
+ >>> my_bool_rotate_to_global = bool()
+ >>> op.inputs.bool_rotate_to_global.connect(my_bool_rotate_to_global)
+ >>> my_mesh = dpf.MeshedRegion()
+ >>> op.inputs.mesh.connect(my_mesh)
+
+ >>> # Instantiate operator and connect inputs in one line
+ >>> op = dpf.operators.result.acoustic_energy_density(
+ ... time_scoping=my_time_scoping,
+ ... mesh_scoping=my_mesh_scoping,
+ ... fields_container=my_fields_container,
+ ... streams_container=my_streams_container,
+ ... data_sources=my_data_sources,
+ ... bool_rotate_to_global=my_bool_rotate_to_global,
+ ... mesh=my_mesh,
+ ... )
+
+ >>> # Get output data
+ >>> result_fields_container = op.outputs.fields_container()
+ """
+
+ def __init__(
+ self,
+ time_scoping=None,
+ mesh_scoping=None,
+ fields_container=None,
+ streams_container=None,
+ data_sources=None,
+ bool_rotate_to_global=None,
+ mesh=None,
+ config=None,
+ server=None,
+ ):
+ super().__init__(
+ name="AED",
+ config=config,
+ server=server,
+ inputs_type=InputsAcousticEnergyDensity,
+ outputs_type=OutputsAcousticEnergyDensity,
+ )
+ self._inputs = InputsAcousticEnergyDensity(self)
+ self._outputs = OutputsAcousticEnergyDensity(self)
+ if time_scoping is not None:
+ self.inputs.time_scoping.connect(time_scoping)
+ if mesh_scoping is not None:
+ self.inputs.mesh_scoping.connect(mesh_scoping)
+ 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)
+ if bool_rotate_to_global is not None:
+ self.inputs.bool_rotate_to_global.connect(bool_rotate_to_global)
+ if mesh is not None:
+ self.inputs.mesh.connect(mesh)
+
+ @staticmethod
+ def _spec() -> Specification:
+ description = r"""Read/compute AED by calling the readers defined by the datasources.
+"""
+ spec = Specification(
+ description=description,
+ map_input_pin_spec={
+ 0: PinSpecification(
+ name="time_scoping",
+ type_names=[
+ "scoping",
+ "int32",
+ "vector",
+ "double",
+ "field",
+ "vector",
+ ],
+ optional=True,
+ document=r"""time/freq values (use doubles or field), time/freq set ids (use ints or scoping) or time/freq step ids (use scoping with TimeFreq_steps location) required in output. To specify time/freq values at specific load steps, put a Field (and not a list) in input with a scoping located on "TimeFreq_steps". Linear time freq intrapolation is performed if the values are not in the result files and the data at the max time or freq is taken when time/freqs are higher than available time/freqs in result files. To get all data for all time/freq sets, connect an int with value -1.""",
+ ),
+ 1: PinSpecification(
+ name="mesh_scoping",
+ type_names=["scopings_container", "scoping"],
+ optional=True,
+ document=r"""nodes or elements scoping required in output. The output fields will be scoped on these node or element IDs. To figure out the ordering of the fields data, look at their scoping IDs as they might not be ordered as the input scoping was. The scoping's location indicates whether nodes or elements are asked for. Using scopings container allows you to split the result fields container into domains""",
+ ),
+ 2: PinSpecification(
+ name="fields_container",
+ type_names=["fields_container"],
+ optional=True,
+ document=r"""Fields container already allocated modified inplace""",
+ ),
+ 3: PinSpecification(
+ name="streams_container",
+ type_names=["streams_container"],
+ optional=True,
+ document=r"""result file container allowed to be kept open to cache data""",
+ ),
+ 4: PinSpecification(
+ name="data_sources",
+ type_names=["data_sources"],
+ optional=False,
+ document=r"""result file path container, used if no streams are set""",
+ ),
+ 5: PinSpecification(
+ name="bool_rotate_to_global",
+ type_names=["bool"],
+ optional=True,
+ document=r"""if true the field is rotated to global coordinate system (default true). Please check your results carefully if 'false' is used for Elemental or ElementalNodal results averaged to the Nodes when adjacent elements do not share the same coordinate system, as results may be incorrect.""",
+ ),
+ 7: PinSpecification(
+ name="mesh",
+ type_names=["abstract_meshed_region", "meshes_container"],
+ optional=True,
+ document=r"""prevents from reading the mesh in the result files""",
+ ),
+ },
+ 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="AED", server=server)
+
+ @property
+ def inputs(self) -> InputsAcousticEnergyDensity:
+ """Enables to connect inputs to the operator
+
+ Returns
+ --------
+ inputs:
+ An instance of InputsAcousticEnergyDensity.
+ """
+ return self._inputs
+
+ @property
+ def outputs(self) -> OutputsAcousticEnergyDensity:
+ """Enables to get outputs of the operator by evaluating it
+
+ Returns
+ --------
+ outputs:
+ An instance of OutputsAcousticEnergyDensity.
+ """
+ return self._outputs
+
+
+class InputsAcousticEnergyDensity(_Inputs):
+ """Intermediate class used to connect user inputs to
+ acoustic_energy_density operator.
+
+ Examples
+ --------
+ >>> from ansys.dpf import core as dpf
+ >>> op = dpf.operators.result.acoustic_energy_density()
+ >>> my_time_scoping = dpf.Scoping()
+ >>> op.inputs.time_scoping.connect(my_time_scoping)
+ >>> my_mesh_scoping = dpf.ScopingsContainer()
+ >>> op.inputs.mesh_scoping.connect(my_mesh_scoping)
+ >>> 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)
+ >>> my_bool_rotate_to_global = bool()
+ >>> op.inputs.bool_rotate_to_global.connect(my_bool_rotate_to_global)
+ >>> my_mesh = dpf.MeshedRegion()
+ >>> op.inputs.mesh.connect(my_mesh)
+ """
+
+ def __init__(self, op: Operator):
+ super().__init__(acoustic_energy_density._spec().inputs, op)
+ self._time_scoping: Input[Scoping | int | float | Field] = Input(
+ acoustic_energy_density._spec().input_pin(0), 0, op, -1
+ )
+ self._inputs.append(self._time_scoping)
+ self._mesh_scoping: Input[ScopingsContainer | Scoping] = Input(
+ acoustic_energy_density._spec().input_pin(1), 1, op, -1
+ )
+ self._inputs.append(self._mesh_scoping)
+ self._fields_container: Input[FieldsContainer] = Input(
+ acoustic_energy_density._spec().input_pin(2), 2, op, -1
+ )
+ self._inputs.append(self._fields_container)
+ self._streams_container: Input[StreamsContainer] = Input(
+ acoustic_energy_density._spec().input_pin(3), 3, op, -1
+ )
+ self._inputs.append(self._streams_container)
+ self._data_sources: Input[DataSources] = Input(
+ acoustic_energy_density._spec().input_pin(4), 4, op, -1
+ )
+ self._inputs.append(self._data_sources)
+ self._bool_rotate_to_global: Input[bool] = Input(
+ acoustic_energy_density._spec().input_pin(5), 5, op, -1
+ )
+ self._inputs.append(self._bool_rotate_to_global)
+ self._mesh: Input[MeshedRegion | MeshesContainer] = Input(
+ acoustic_energy_density._spec().input_pin(7), 7, op, -1
+ )
+ self._inputs.append(self._mesh)
+
+ @property
+ def time_scoping(self) -> Input[Scoping | int | float | Field]:
+ r"""Allows to connect time_scoping input to the operator.
+
+ time/freq values (use doubles or field), time/freq set ids (use ints or scoping) or time/freq step ids (use scoping with TimeFreq_steps location) required in output. To specify time/freq values at specific load steps, put a Field (and not a list) in input with a scoping located on "TimeFreq_steps". Linear time freq intrapolation is performed if the values are not in the result files and the data at the max time or freq is taken when time/freqs are higher than available time/freqs in result files. To get all data for all time/freq sets, connect an int with value -1.
+
+ Returns
+ -------
+ input:
+ An Input instance for this pin.
+
+ Examples
+ --------
+ >>> from ansys.dpf import core as dpf
+ >>> op = dpf.operators.result.acoustic_energy_density()
+ >>> op.inputs.time_scoping.connect(my_time_scoping)
+ >>> # or
+ >>> op.inputs.time_scoping(my_time_scoping)
+ """
+ return self._time_scoping
+
+ @property
+ def mesh_scoping(self) -> Input[ScopingsContainer | Scoping]:
+ r"""Allows to connect mesh_scoping input to the operator.
+
+ nodes or elements scoping required in output. The output fields will be scoped on these node or element IDs. To figure out the ordering of the fields data, look at their scoping IDs as they might not be ordered as the input scoping was. The scoping's location indicates whether nodes or elements are asked for. Using scopings container allows you to split the result fields container into domains
+
+ Returns
+ -------
+ input:
+ An Input instance for this pin.
+
+ Examples
+ --------
+ >>> from ansys.dpf import core as dpf
+ >>> op = dpf.operators.result.acoustic_energy_density()
+ >>> op.inputs.mesh_scoping.connect(my_mesh_scoping)
+ >>> # or
+ >>> op.inputs.mesh_scoping(my_mesh_scoping)
+ """
+ return self._mesh_scoping
+
+ @property
+ def fields_container(self) -> Input[FieldsContainer]:
+ r"""Allows to connect fields_container input to the operator.
+
+ Fields container already allocated modified inplace
+
+ Returns
+ -------
+ input:
+ An Input instance for this pin.
+
+ Examples
+ --------
+ >>> from ansys.dpf import core as dpf
+ >>> op = dpf.operators.result.acoustic_energy_density()
+ >>> 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[StreamsContainer]:
+ r"""Allows to connect streams_container input to the operator.
+
+ result file container allowed to be kept open to cache data
+
+ Returns
+ -------
+ input:
+ An Input instance for this pin.
+
+ Examples
+ --------
+ >>> from ansys.dpf import core as dpf
+ >>> op = dpf.operators.result.acoustic_energy_density()
+ >>> 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[DataSources]:
+ r"""Allows to connect data_sources input to the operator.
+
+ result file path container, used if no streams are set
+
+ Returns
+ -------
+ input:
+ An Input instance for this pin.
+
+ Examples
+ --------
+ >>> from ansys.dpf import core as dpf
+ >>> op = dpf.operators.result.acoustic_energy_density()
+ >>> op.inputs.data_sources.connect(my_data_sources)
+ >>> # or
+ >>> op.inputs.data_sources(my_data_sources)
+ """
+ return self._data_sources
+
+ @property
+ def bool_rotate_to_global(self) -> Input[bool]:
+ r"""Allows to connect bool_rotate_to_global input to the operator.
+
+ if true the field is rotated to global coordinate system (default true). Please check your results carefully if 'false' is used for Elemental or ElementalNodal results averaged to the Nodes when adjacent elements do not share the same coordinate system, as results may be incorrect.
+
+ Returns
+ -------
+ input:
+ An Input instance for this pin.
+
+ Examples
+ --------
+ >>> from ansys.dpf import core as dpf
+ >>> op = dpf.operators.result.acoustic_energy_density()
+ >>> op.inputs.bool_rotate_to_global.connect(my_bool_rotate_to_global)
+ >>> # or
+ >>> op.inputs.bool_rotate_to_global(my_bool_rotate_to_global)
+ """
+ return self._bool_rotate_to_global
+
+ @property
+ def mesh(self) -> Input[MeshedRegion | MeshesContainer]:
+ r"""Allows to connect mesh input to the operator.
+
+ prevents from reading the mesh in the result files
+
+ Returns
+ -------
+ input:
+ An Input instance for this pin.
+
+ Examples
+ --------
+ >>> from ansys.dpf import core as dpf
+ >>> op = dpf.operators.result.acoustic_energy_density()
+ >>> op.inputs.mesh.connect(my_mesh)
+ >>> # or
+ >>> op.inputs.mesh(my_mesh)
+ """
+ return self._mesh
+
+
+class OutputsAcousticEnergyDensity(_Outputs):
+ """Intermediate class used to get outputs from
+ acoustic_energy_density operator.
+
+ Examples
+ --------
+ >>> from ansys.dpf import core as dpf
+ >>> op = dpf.operators.result.acoustic_energy_density()
+ >>> # Connect inputs : op.inputs. ...
+ >>> result_fields_container = op.outputs.fields_container()
+ """
+
+ def __init__(self, op: Operator):
+ super().__init__(acoustic_energy_density._spec().outputs, op)
+ self._fields_container: Output[FieldsContainer] = Output(
+ acoustic_energy_density._spec().output_pin(0), 0, op
+ )
+ self._outputs.append(self._fields_container)
+
+ @property
+ def fields_container(self) -> Output[FieldsContainer]:
+ 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.acoustic_energy_density()
+ >>> # Get the output from op.outputs. ...
+ >>> result_fields_container = op.outputs.fields_container()
+ """
+ return self._fields_container
diff --git a/src/ansys/dpf/core/operators/result/element_centroids.py b/src/ansys/dpf/core/operators/result/element_centroids.py
index 826130ddd20..62d891fabab 100644
--- a/src/ansys/dpf/core/operators/result/element_centroids.py
+++ b/src/ansys/dpf/core/operators/result/element_centroids.py
@@ -27,8 +27,8 @@
class element_centroids(Operator):
- r"""Read/compute coordinate of the elemental centroids by calling the
- readers defined by the datasources.
+ r"""Read/compute coordinate of the undeformed mesh elemental centroids by
+ calling the readers defined by the datasources.
Inputs
@@ -128,8 +128,8 @@ def __init__(
@staticmethod
def _spec() -> Specification:
- description = r"""Read/compute coordinate of the elemental centroids by calling the
-readers defined by the datasources.
+ description = r"""Read/compute coordinate of the undeformed mesh elemental centroids by
+calling the readers defined by the datasources.
"""
spec = Specification(
description=description,
diff --git a/src/ansys/dpf/core/operators/result/input_sound_power.py b/src/ansys/dpf/core/operators/result/input_sound_power.py
new file mode 100644
index 00000000000..78198e46634
--- /dev/null
+++ b/src/ansys/dpf/core/operators/result/input_sound_power.py
@@ -0,0 +1,478 @@
+"""
+input_sound_power
+
+Autogenerated DPF operator classes.
+"""
+
+from __future__ import annotations
+from typing import TYPE_CHECKING
+
+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
+
+if TYPE_CHECKING:
+ from ansys.dpf.core.data_sources import DataSources
+ from ansys.dpf.core.field import Field
+ from ansys.dpf.core.fields_container import FieldsContainer
+ from ansys.dpf.core.meshed_region import MeshedRegion
+ from ansys.dpf.core.meshes_container import MeshesContainer
+ from ansys.dpf.core.scoping import Scoping
+ from ansys.dpf.core.scopings_container import ScopingsContainer
+ from ansys.dpf.core.streams_container import StreamsContainer
+
+
+class input_sound_power(Operator):
+ r"""Read/compute PINC by calling the readers defined by the datasources.
+
+
+ Inputs
+ ------
+ time_scoping: Scoping or int or float or Field, optional
+ time/freq values (use doubles or field), time/freq set ids (use ints or scoping) or time/freq step ids (use scoping with TimeFreq_steps location) required in output. To specify time/freq values at specific load steps, put a Field (and not a list) in input with a scoping located on "TimeFreq_steps". Linear time freq intrapolation is performed if the values are not in the result files and the data at the max time or freq is taken when time/freqs are higher than available time/freqs in result files. To get all data for all time/freq sets, connect an int with value -1.
+ mesh_scoping: ScopingsContainer or Scoping, optional
+ nodes or elements scoping required in output. The output fields will be scoped on these node or element IDs. To figure out the ordering of the fields data, look at their scoping IDs as they might not be ordered as the input scoping was. The scoping's location indicates whether nodes or elements are asked for. Using scopings container allows you to split the result fields container into domains
+ fields_container: FieldsContainer, optional
+ Fields container already allocated modified inplace
+ streams_container: StreamsContainer, optional
+ result file container allowed to be kept open to cache data
+ data_sources: DataSources
+ result file path container, used if no streams are set
+ bool_rotate_to_global: bool, optional
+ if true the field is rotated to global coordinate system (default true). Please check your results carefully if 'false' is used for Elemental or ElementalNodal results averaged to the Nodes when adjacent elements do not share the same coordinate system, as results may be incorrect.
+ mesh: MeshedRegion or MeshesContainer, optional
+ prevents from reading the mesh in the result files
+
+ Outputs
+ -------
+ fields_container: FieldsContainer
+
+ Examples
+ --------
+ >>> from ansys.dpf import core as dpf
+
+ >>> # Instantiate operator
+ >>> op = dpf.operators.result.input_sound_power()
+
+ >>> # Make input connections
+ >>> my_time_scoping = dpf.Scoping()
+ >>> op.inputs.time_scoping.connect(my_time_scoping)
+ >>> my_mesh_scoping = dpf.ScopingsContainer()
+ >>> op.inputs.mesh_scoping.connect(my_mesh_scoping)
+ >>> 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)
+ >>> my_bool_rotate_to_global = bool()
+ >>> op.inputs.bool_rotate_to_global.connect(my_bool_rotate_to_global)
+ >>> my_mesh = dpf.MeshedRegion()
+ >>> op.inputs.mesh.connect(my_mesh)
+
+ >>> # Instantiate operator and connect inputs in one line
+ >>> op = dpf.operators.result.input_sound_power(
+ ... time_scoping=my_time_scoping,
+ ... mesh_scoping=my_mesh_scoping,
+ ... fields_container=my_fields_container,
+ ... streams_container=my_streams_container,
+ ... data_sources=my_data_sources,
+ ... bool_rotate_to_global=my_bool_rotate_to_global,
+ ... mesh=my_mesh,
+ ... )
+
+ >>> # Get output data
+ >>> result_fields_container = op.outputs.fields_container()
+ """
+
+ def __init__(
+ self,
+ time_scoping=None,
+ mesh_scoping=None,
+ fields_container=None,
+ streams_container=None,
+ data_sources=None,
+ bool_rotate_to_global=None,
+ mesh=None,
+ config=None,
+ server=None,
+ ):
+ super().__init__(
+ name="PINC",
+ config=config,
+ server=server,
+ inputs_type=InputsInputSoundPower,
+ outputs_type=OutputsInputSoundPower,
+ )
+ self._inputs = InputsInputSoundPower(self)
+ self._outputs = OutputsInputSoundPower(self)
+ if time_scoping is not None:
+ self.inputs.time_scoping.connect(time_scoping)
+ if mesh_scoping is not None:
+ self.inputs.mesh_scoping.connect(mesh_scoping)
+ 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)
+ if bool_rotate_to_global is not None:
+ self.inputs.bool_rotate_to_global.connect(bool_rotate_to_global)
+ if mesh is not None:
+ self.inputs.mesh.connect(mesh)
+
+ @staticmethod
+ def _spec() -> Specification:
+ description = r"""Read/compute PINC by calling the readers defined by the datasources.
+"""
+ spec = Specification(
+ description=description,
+ map_input_pin_spec={
+ 0: PinSpecification(
+ name="time_scoping",
+ type_names=[
+ "scoping",
+ "int32",
+ "vector",
+ "double",
+ "field",
+ "vector",
+ ],
+ optional=True,
+ document=r"""time/freq values (use doubles or field), time/freq set ids (use ints or scoping) or time/freq step ids (use scoping with TimeFreq_steps location) required in output. To specify time/freq values at specific load steps, put a Field (and not a list) in input with a scoping located on "TimeFreq_steps". Linear time freq intrapolation is performed if the values are not in the result files and the data at the max time or freq is taken when time/freqs are higher than available time/freqs in result files. To get all data for all time/freq sets, connect an int with value -1.""",
+ ),
+ 1: PinSpecification(
+ name="mesh_scoping",
+ type_names=["scopings_container", "scoping"],
+ optional=True,
+ document=r"""nodes or elements scoping required in output. The output fields will be scoped on these node or element IDs. To figure out the ordering of the fields data, look at their scoping IDs as they might not be ordered as the input scoping was. The scoping's location indicates whether nodes or elements are asked for. Using scopings container allows you to split the result fields container into domains""",
+ ),
+ 2: PinSpecification(
+ name="fields_container",
+ type_names=["fields_container"],
+ optional=True,
+ document=r"""Fields container already allocated modified inplace""",
+ ),
+ 3: PinSpecification(
+ name="streams_container",
+ type_names=["streams_container"],
+ optional=True,
+ document=r"""result file container allowed to be kept open to cache data""",
+ ),
+ 4: PinSpecification(
+ name="data_sources",
+ type_names=["data_sources"],
+ optional=False,
+ document=r"""result file path container, used if no streams are set""",
+ ),
+ 5: PinSpecification(
+ name="bool_rotate_to_global",
+ type_names=["bool"],
+ optional=True,
+ document=r"""if true the field is rotated to global coordinate system (default true). Please check your results carefully if 'false' is used for Elemental or ElementalNodal results averaged to the Nodes when adjacent elements do not share the same coordinate system, as results may be incorrect.""",
+ ),
+ 7: PinSpecification(
+ name="mesh",
+ type_names=["abstract_meshed_region", "meshes_container"],
+ optional=True,
+ document=r"""prevents from reading the mesh in the result files""",
+ ),
+ },
+ 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="PINC", server=server)
+
+ @property
+ def inputs(self) -> InputsInputSoundPower:
+ """Enables to connect inputs to the operator
+
+ Returns
+ --------
+ inputs:
+ An instance of InputsInputSoundPower.
+ """
+ return self._inputs
+
+ @property
+ def outputs(self) -> OutputsInputSoundPower:
+ """Enables to get outputs of the operator by evaluating it
+
+ Returns
+ --------
+ outputs:
+ An instance of OutputsInputSoundPower.
+ """
+ return self._outputs
+
+
+class InputsInputSoundPower(_Inputs):
+ """Intermediate class used to connect user inputs to
+ input_sound_power operator.
+
+ Examples
+ --------
+ >>> from ansys.dpf import core as dpf
+ >>> op = dpf.operators.result.input_sound_power()
+ >>> my_time_scoping = dpf.Scoping()
+ >>> op.inputs.time_scoping.connect(my_time_scoping)
+ >>> my_mesh_scoping = dpf.ScopingsContainer()
+ >>> op.inputs.mesh_scoping.connect(my_mesh_scoping)
+ >>> 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)
+ >>> my_bool_rotate_to_global = bool()
+ >>> op.inputs.bool_rotate_to_global.connect(my_bool_rotate_to_global)
+ >>> my_mesh = dpf.MeshedRegion()
+ >>> op.inputs.mesh.connect(my_mesh)
+ """
+
+ def __init__(self, op: Operator):
+ super().__init__(input_sound_power._spec().inputs, op)
+ self._time_scoping: Input[Scoping | int | float | Field] = Input(
+ input_sound_power._spec().input_pin(0), 0, op, -1
+ )
+ self._inputs.append(self._time_scoping)
+ self._mesh_scoping: Input[ScopingsContainer | Scoping] = Input(
+ input_sound_power._spec().input_pin(1), 1, op, -1
+ )
+ self._inputs.append(self._mesh_scoping)
+ self._fields_container: Input[FieldsContainer] = Input(
+ input_sound_power._spec().input_pin(2), 2, op, -1
+ )
+ self._inputs.append(self._fields_container)
+ self._streams_container: Input[StreamsContainer] = Input(
+ input_sound_power._spec().input_pin(3), 3, op, -1
+ )
+ self._inputs.append(self._streams_container)
+ self._data_sources: Input[DataSources] = Input(
+ input_sound_power._spec().input_pin(4), 4, op, -1
+ )
+ self._inputs.append(self._data_sources)
+ self._bool_rotate_to_global: Input[bool] = Input(
+ input_sound_power._spec().input_pin(5), 5, op, -1
+ )
+ self._inputs.append(self._bool_rotate_to_global)
+ self._mesh: Input[MeshedRegion | MeshesContainer] = Input(
+ input_sound_power._spec().input_pin(7), 7, op, -1
+ )
+ self._inputs.append(self._mesh)
+
+ @property
+ def time_scoping(self) -> Input[Scoping | int | float | Field]:
+ r"""Allows to connect time_scoping input to the operator.
+
+ time/freq values (use doubles or field), time/freq set ids (use ints or scoping) or time/freq step ids (use scoping with TimeFreq_steps location) required in output. To specify time/freq values at specific load steps, put a Field (and not a list) in input with a scoping located on "TimeFreq_steps". Linear time freq intrapolation is performed if the values are not in the result files and the data at the max time or freq is taken when time/freqs are higher than available time/freqs in result files. To get all data for all time/freq sets, connect an int with value -1.
+
+ Returns
+ -------
+ input:
+ An Input instance for this pin.
+
+ Examples
+ --------
+ >>> from ansys.dpf import core as dpf
+ >>> op = dpf.operators.result.input_sound_power()
+ >>> op.inputs.time_scoping.connect(my_time_scoping)
+ >>> # or
+ >>> op.inputs.time_scoping(my_time_scoping)
+ """
+ return self._time_scoping
+
+ @property
+ def mesh_scoping(self) -> Input[ScopingsContainer | Scoping]:
+ r"""Allows to connect mesh_scoping input to the operator.
+
+ nodes or elements scoping required in output. The output fields will be scoped on these node or element IDs. To figure out the ordering of the fields data, look at their scoping IDs as they might not be ordered as the input scoping was. The scoping's location indicates whether nodes or elements are asked for. Using scopings container allows you to split the result fields container into domains
+
+ Returns
+ -------
+ input:
+ An Input instance for this pin.
+
+ Examples
+ --------
+ >>> from ansys.dpf import core as dpf
+ >>> op = dpf.operators.result.input_sound_power()
+ >>> op.inputs.mesh_scoping.connect(my_mesh_scoping)
+ >>> # or
+ >>> op.inputs.mesh_scoping(my_mesh_scoping)
+ """
+ return self._mesh_scoping
+
+ @property
+ def fields_container(self) -> Input[FieldsContainer]:
+ r"""Allows to connect fields_container input to the operator.
+
+ Fields container already allocated modified inplace
+
+ Returns
+ -------
+ input:
+ An Input instance for this pin.
+
+ Examples
+ --------
+ >>> from ansys.dpf import core as dpf
+ >>> op = dpf.operators.result.input_sound_power()
+ >>> 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[StreamsContainer]:
+ r"""Allows to connect streams_container input to the operator.
+
+ result file container allowed to be kept open to cache data
+
+ Returns
+ -------
+ input:
+ An Input instance for this pin.
+
+ Examples
+ --------
+ >>> from ansys.dpf import core as dpf
+ >>> op = dpf.operators.result.input_sound_power()
+ >>> 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[DataSources]:
+ r"""Allows to connect data_sources input to the operator.
+
+ result file path container, used if no streams are set
+
+ Returns
+ -------
+ input:
+ An Input instance for this pin.
+
+ Examples
+ --------
+ >>> from ansys.dpf import core as dpf
+ >>> op = dpf.operators.result.input_sound_power()
+ >>> op.inputs.data_sources.connect(my_data_sources)
+ >>> # or
+ >>> op.inputs.data_sources(my_data_sources)
+ """
+ return self._data_sources
+
+ @property
+ def bool_rotate_to_global(self) -> Input[bool]:
+ r"""Allows to connect bool_rotate_to_global input to the operator.
+
+ if true the field is rotated to global coordinate system (default true). Please check your results carefully if 'false' is used for Elemental or ElementalNodal results averaged to the Nodes when adjacent elements do not share the same coordinate system, as results may be incorrect.
+
+ Returns
+ -------
+ input:
+ An Input instance for this pin.
+
+ Examples
+ --------
+ >>> from ansys.dpf import core as dpf
+ >>> op = dpf.operators.result.input_sound_power()
+ >>> op.inputs.bool_rotate_to_global.connect(my_bool_rotate_to_global)
+ >>> # or
+ >>> op.inputs.bool_rotate_to_global(my_bool_rotate_to_global)
+ """
+ return self._bool_rotate_to_global
+
+ @property
+ def mesh(self) -> Input[MeshedRegion | MeshesContainer]:
+ r"""Allows to connect mesh input to the operator.
+
+ prevents from reading the mesh in the result files
+
+ Returns
+ -------
+ input:
+ An Input instance for this pin.
+
+ Examples
+ --------
+ >>> from ansys.dpf import core as dpf
+ >>> op = dpf.operators.result.input_sound_power()
+ >>> op.inputs.mesh.connect(my_mesh)
+ >>> # or
+ >>> op.inputs.mesh(my_mesh)
+ """
+ return self._mesh
+
+
+class OutputsInputSoundPower(_Outputs):
+ """Intermediate class used to get outputs from
+ input_sound_power operator.
+
+ Examples
+ --------
+ >>> from ansys.dpf import core as dpf
+ >>> op = dpf.operators.result.input_sound_power()
+ >>> # Connect inputs : op.inputs. ...
+ >>> result_fields_container = op.outputs.fields_container()
+ """
+
+ def __init__(self, op: Operator):
+ super().__init__(input_sound_power._spec().outputs, op)
+ self._fields_container: Output[FieldsContainer] = Output(
+ input_sound_power._spec().output_pin(0), 0, op
+ )
+ self._outputs.append(self._fields_container)
+
+ @property
+ def fields_container(self) -> Output[FieldsContainer]:
+ 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.input_sound_power()
+ >>> # Get the output from op.outputs. ...
+ >>> result_fields_container = op.outputs.fields_container()
+ """
+ return self._fields_container
diff --git a/src/ansys/dpf/core/operators/result/output_sound_power.py b/src/ansys/dpf/core/operators/result/output_sound_power.py
new file mode 100644
index 00000000000..441c752580d
--- /dev/null
+++ b/src/ansys/dpf/core/operators/result/output_sound_power.py
@@ -0,0 +1,478 @@
+"""
+output_sound_power
+
+Autogenerated DPF operator classes.
+"""
+
+from __future__ import annotations
+from typing import TYPE_CHECKING
+
+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
+
+if TYPE_CHECKING:
+ from ansys.dpf.core.data_sources import DataSources
+ from ansys.dpf.core.field import Field
+ from ansys.dpf.core.fields_container import FieldsContainer
+ from ansys.dpf.core.meshed_region import MeshedRegion
+ from ansys.dpf.core.meshes_container import MeshesContainer
+ from ansys.dpf.core.scoping import Scoping
+ from ansys.dpf.core.scopings_container import ScopingsContainer
+ from ansys.dpf.core.streams_container import StreamsContainer
+
+
+class output_sound_power(Operator):
+ r"""Read/compute POUT by calling the readers defined by the datasources.
+
+
+ Inputs
+ ------
+ time_scoping: Scoping or int or float or Field, optional
+ time/freq values (use doubles or field), time/freq set ids (use ints or scoping) or time/freq step ids (use scoping with TimeFreq_steps location) required in output. To specify time/freq values at specific load steps, put a Field (and not a list) in input with a scoping located on "TimeFreq_steps". Linear time freq intrapolation is performed if the values are not in the result files and the data at the max time or freq is taken when time/freqs are higher than available time/freqs in result files. To get all data for all time/freq sets, connect an int with value -1.
+ mesh_scoping: ScopingsContainer or Scoping, optional
+ nodes or elements scoping required in output. The output fields will be scoped on these node or element IDs. To figure out the ordering of the fields data, look at their scoping IDs as they might not be ordered as the input scoping was. The scoping's location indicates whether nodes or elements are asked for. Using scopings container allows you to split the result fields container into domains
+ fields_container: FieldsContainer, optional
+ Fields container already allocated modified inplace
+ streams_container: StreamsContainer, optional
+ result file container allowed to be kept open to cache data
+ data_sources: DataSources
+ result file path container, used if no streams are set
+ bool_rotate_to_global: bool, optional
+ if true the field is rotated to global coordinate system (default true). Please check your results carefully if 'false' is used for Elemental or ElementalNodal results averaged to the Nodes when adjacent elements do not share the same coordinate system, as results may be incorrect.
+ mesh: MeshedRegion or MeshesContainer, optional
+ prevents from reading the mesh in the result files
+
+ Outputs
+ -------
+ fields_container: FieldsContainer
+
+ Examples
+ --------
+ >>> from ansys.dpf import core as dpf
+
+ >>> # Instantiate operator
+ >>> op = dpf.operators.result.output_sound_power()
+
+ >>> # Make input connections
+ >>> my_time_scoping = dpf.Scoping()
+ >>> op.inputs.time_scoping.connect(my_time_scoping)
+ >>> my_mesh_scoping = dpf.ScopingsContainer()
+ >>> op.inputs.mesh_scoping.connect(my_mesh_scoping)
+ >>> 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)
+ >>> my_bool_rotate_to_global = bool()
+ >>> op.inputs.bool_rotate_to_global.connect(my_bool_rotate_to_global)
+ >>> my_mesh = dpf.MeshedRegion()
+ >>> op.inputs.mesh.connect(my_mesh)
+
+ >>> # Instantiate operator and connect inputs in one line
+ >>> op = dpf.operators.result.output_sound_power(
+ ... time_scoping=my_time_scoping,
+ ... mesh_scoping=my_mesh_scoping,
+ ... fields_container=my_fields_container,
+ ... streams_container=my_streams_container,
+ ... data_sources=my_data_sources,
+ ... bool_rotate_to_global=my_bool_rotate_to_global,
+ ... mesh=my_mesh,
+ ... )
+
+ >>> # Get output data
+ >>> result_fields_container = op.outputs.fields_container()
+ """
+
+ def __init__(
+ self,
+ time_scoping=None,
+ mesh_scoping=None,
+ fields_container=None,
+ streams_container=None,
+ data_sources=None,
+ bool_rotate_to_global=None,
+ mesh=None,
+ config=None,
+ server=None,
+ ):
+ super().__init__(
+ name="POUT",
+ config=config,
+ server=server,
+ inputs_type=InputsOutputSoundPower,
+ outputs_type=OutputsOutputSoundPower,
+ )
+ self._inputs = InputsOutputSoundPower(self)
+ self._outputs = OutputsOutputSoundPower(self)
+ if time_scoping is not None:
+ self.inputs.time_scoping.connect(time_scoping)
+ if mesh_scoping is not None:
+ self.inputs.mesh_scoping.connect(mesh_scoping)
+ 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)
+ if bool_rotate_to_global is not None:
+ self.inputs.bool_rotate_to_global.connect(bool_rotate_to_global)
+ if mesh is not None:
+ self.inputs.mesh.connect(mesh)
+
+ @staticmethod
+ def _spec() -> Specification:
+ description = r"""Read/compute POUT by calling the readers defined by the datasources.
+"""
+ spec = Specification(
+ description=description,
+ map_input_pin_spec={
+ 0: PinSpecification(
+ name="time_scoping",
+ type_names=[
+ "scoping",
+ "int32",
+ "vector",
+ "double",
+ "field",
+ "vector",
+ ],
+ optional=True,
+ document=r"""time/freq values (use doubles or field), time/freq set ids (use ints or scoping) or time/freq step ids (use scoping with TimeFreq_steps location) required in output. To specify time/freq values at specific load steps, put a Field (and not a list) in input with a scoping located on "TimeFreq_steps". Linear time freq intrapolation is performed if the values are not in the result files and the data at the max time or freq is taken when time/freqs are higher than available time/freqs in result files. To get all data for all time/freq sets, connect an int with value -1.""",
+ ),
+ 1: PinSpecification(
+ name="mesh_scoping",
+ type_names=["scopings_container", "scoping"],
+ optional=True,
+ document=r"""nodes or elements scoping required in output. The output fields will be scoped on these node or element IDs. To figure out the ordering of the fields data, look at their scoping IDs as they might not be ordered as the input scoping was. The scoping's location indicates whether nodes or elements are asked for. Using scopings container allows you to split the result fields container into domains""",
+ ),
+ 2: PinSpecification(
+ name="fields_container",
+ type_names=["fields_container"],
+ optional=True,
+ document=r"""Fields container already allocated modified inplace""",
+ ),
+ 3: PinSpecification(
+ name="streams_container",
+ type_names=["streams_container"],
+ optional=True,
+ document=r"""result file container allowed to be kept open to cache data""",
+ ),
+ 4: PinSpecification(
+ name="data_sources",
+ type_names=["data_sources"],
+ optional=False,
+ document=r"""result file path container, used if no streams are set""",
+ ),
+ 5: PinSpecification(
+ name="bool_rotate_to_global",
+ type_names=["bool"],
+ optional=True,
+ document=r"""if true the field is rotated to global coordinate system (default true). Please check your results carefully if 'false' is used for Elemental or ElementalNodal results averaged to the Nodes when adjacent elements do not share the same coordinate system, as results may be incorrect.""",
+ ),
+ 7: PinSpecification(
+ name="mesh",
+ type_names=["abstract_meshed_region", "meshes_container"],
+ optional=True,
+ document=r"""prevents from reading the mesh in the result files""",
+ ),
+ },
+ 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="POUT", server=server)
+
+ @property
+ def inputs(self) -> InputsOutputSoundPower:
+ """Enables to connect inputs to the operator
+
+ Returns
+ --------
+ inputs:
+ An instance of InputsOutputSoundPower.
+ """
+ return self._inputs
+
+ @property
+ def outputs(self) -> OutputsOutputSoundPower:
+ """Enables to get outputs of the operator by evaluating it
+
+ Returns
+ --------
+ outputs:
+ An instance of OutputsOutputSoundPower.
+ """
+ return self._outputs
+
+
+class InputsOutputSoundPower(_Inputs):
+ """Intermediate class used to connect user inputs to
+ output_sound_power operator.
+
+ Examples
+ --------
+ >>> from ansys.dpf import core as dpf
+ >>> op = dpf.operators.result.output_sound_power()
+ >>> my_time_scoping = dpf.Scoping()
+ >>> op.inputs.time_scoping.connect(my_time_scoping)
+ >>> my_mesh_scoping = dpf.ScopingsContainer()
+ >>> op.inputs.mesh_scoping.connect(my_mesh_scoping)
+ >>> 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)
+ >>> my_bool_rotate_to_global = bool()
+ >>> op.inputs.bool_rotate_to_global.connect(my_bool_rotate_to_global)
+ >>> my_mesh = dpf.MeshedRegion()
+ >>> op.inputs.mesh.connect(my_mesh)
+ """
+
+ def __init__(self, op: Operator):
+ super().__init__(output_sound_power._spec().inputs, op)
+ self._time_scoping: Input[Scoping | int | float | Field] = Input(
+ output_sound_power._spec().input_pin(0), 0, op, -1
+ )
+ self._inputs.append(self._time_scoping)
+ self._mesh_scoping: Input[ScopingsContainer | Scoping] = Input(
+ output_sound_power._spec().input_pin(1), 1, op, -1
+ )
+ self._inputs.append(self._mesh_scoping)
+ self._fields_container: Input[FieldsContainer] = Input(
+ output_sound_power._spec().input_pin(2), 2, op, -1
+ )
+ self._inputs.append(self._fields_container)
+ self._streams_container: Input[StreamsContainer] = Input(
+ output_sound_power._spec().input_pin(3), 3, op, -1
+ )
+ self._inputs.append(self._streams_container)
+ self._data_sources: Input[DataSources] = Input(
+ output_sound_power._spec().input_pin(4), 4, op, -1
+ )
+ self._inputs.append(self._data_sources)
+ self._bool_rotate_to_global: Input[bool] = Input(
+ output_sound_power._spec().input_pin(5), 5, op, -1
+ )
+ self._inputs.append(self._bool_rotate_to_global)
+ self._mesh: Input[MeshedRegion | MeshesContainer] = Input(
+ output_sound_power._spec().input_pin(7), 7, op, -1
+ )
+ self._inputs.append(self._mesh)
+
+ @property
+ def time_scoping(self) -> Input[Scoping | int | float | Field]:
+ r"""Allows to connect time_scoping input to the operator.
+
+ time/freq values (use doubles or field), time/freq set ids (use ints or scoping) or time/freq step ids (use scoping with TimeFreq_steps location) required in output. To specify time/freq values at specific load steps, put a Field (and not a list) in input with a scoping located on "TimeFreq_steps". Linear time freq intrapolation is performed if the values are not in the result files and the data at the max time or freq is taken when time/freqs are higher than available time/freqs in result files. To get all data for all time/freq sets, connect an int with value -1.
+
+ Returns
+ -------
+ input:
+ An Input instance for this pin.
+
+ Examples
+ --------
+ >>> from ansys.dpf import core as dpf
+ >>> op = dpf.operators.result.output_sound_power()
+ >>> op.inputs.time_scoping.connect(my_time_scoping)
+ >>> # or
+ >>> op.inputs.time_scoping(my_time_scoping)
+ """
+ return self._time_scoping
+
+ @property
+ def mesh_scoping(self) -> Input[ScopingsContainer | Scoping]:
+ r"""Allows to connect mesh_scoping input to the operator.
+
+ nodes or elements scoping required in output. The output fields will be scoped on these node or element IDs. To figure out the ordering of the fields data, look at their scoping IDs as they might not be ordered as the input scoping was. The scoping's location indicates whether nodes or elements are asked for. Using scopings container allows you to split the result fields container into domains
+
+ Returns
+ -------
+ input:
+ An Input instance for this pin.
+
+ Examples
+ --------
+ >>> from ansys.dpf import core as dpf
+ >>> op = dpf.operators.result.output_sound_power()
+ >>> op.inputs.mesh_scoping.connect(my_mesh_scoping)
+ >>> # or
+ >>> op.inputs.mesh_scoping(my_mesh_scoping)
+ """
+ return self._mesh_scoping
+
+ @property
+ def fields_container(self) -> Input[FieldsContainer]:
+ r"""Allows to connect fields_container input to the operator.
+
+ Fields container already allocated modified inplace
+
+ Returns
+ -------
+ input:
+ An Input instance for this pin.
+
+ Examples
+ --------
+ >>> from ansys.dpf import core as dpf
+ >>> op = dpf.operators.result.output_sound_power()
+ >>> 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[StreamsContainer]:
+ r"""Allows to connect streams_container input to the operator.
+
+ result file container allowed to be kept open to cache data
+
+ Returns
+ -------
+ input:
+ An Input instance for this pin.
+
+ Examples
+ --------
+ >>> from ansys.dpf import core as dpf
+ >>> op = dpf.operators.result.output_sound_power()
+ >>> 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[DataSources]:
+ r"""Allows to connect data_sources input to the operator.
+
+ result file path container, used if no streams are set
+
+ Returns
+ -------
+ input:
+ An Input instance for this pin.
+
+ Examples
+ --------
+ >>> from ansys.dpf import core as dpf
+ >>> op = dpf.operators.result.output_sound_power()
+ >>> op.inputs.data_sources.connect(my_data_sources)
+ >>> # or
+ >>> op.inputs.data_sources(my_data_sources)
+ """
+ return self._data_sources
+
+ @property
+ def bool_rotate_to_global(self) -> Input[bool]:
+ r"""Allows to connect bool_rotate_to_global input to the operator.
+
+ if true the field is rotated to global coordinate system (default true). Please check your results carefully if 'false' is used for Elemental or ElementalNodal results averaged to the Nodes when adjacent elements do not share the same coordinate system, as results may be incorrect.
+
+ Returns
+ -------
+ input:
+ An Input instance for this pin.
+
+ Examples
+ --------
+ >>> from ansys.dpf import core as dpf
+ >>> op = dpf.operators.result.output_sound_power()
+ >>> op.inputs.bool_rotate_to_global.connect(my_bool_rotate_to_global)
+ >>> # or
+ >>> op.inputs.bool_rotate_to_global(my_bool_rotate_to_global)
+ """
+ return self._bool_rotate_to_global
+
+ @property
+ def mesh(self) -> Input[MeshedRegion | MeshesContainer]:
+ r"""Allows to connect mesh input to the operator.
+
+ prevents from reading the mesh in the result files
+
+ Returns
+ -------
+ input:
+ An Input instance for this pin.
+
+ Examples
+ --------
+ >>> from ansys.dpf import core as dpf
+ >>> op = dpf.operators.result.output_sound_power()
+ >>> op.inputs.mesh.connect(my_mesh)
+ >>> # or
+ >>> op.inputs.mesh(my_mesh)
+ """
+ return self._mesh
+
+
+class OutputsOutputSoundPower(_Outputs):
+ """Intermediate class used to get outputs from
+ output_sound_power operator.
+
+ Examples
+ --------
+ >>> from ansys.dpf import core as dpf
+ >>> op = dpf.operators.result.output_sound_power()
+ >>> # Connect inputs : op.inputs. ...
+ >>> result_fields_container = op.outputs.fields_container()
+ """
+
+ def __init__(self, op: Operator):
+ super().__init__(output_sound_power._spec().outputs, op)
+ self._fields_container: Output[FieldsContainer] = Output(
+ output_sound_power._spec().output_pin(0), 0, op
+ )
+ self._outputs.append(self._fields_container)
+
+ @property
+ def fields_container(self) -> Output[FieldsContainer]:
+ 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.output_sound_power()
+ >>> # Get the output from op.outputs. ...
+ >>> result_fields_container = op.outputs.fields_container()
+ """
+ return self._fields_container
diff --git a/src/ansys/dpf/core/operators/result/squared_l2norm_pressure.py b/src/ansys/dpf/core/operators/result/squared_l2norm_pressure.py
new file mode 100644
index 00000000000..9e07413ae5b
--- /dev/null
+++ b/src/ansys/dpf/core/operators/result/squared_l2norm_pressure.py
@@ -0,0 +1,480 @@
+"""
+squared_l2norm_pressure
+
+Autogenerated DPF operator classes.
+"""
+
+from __future__ import annotations
+from typing import TYPE_CHECKING
+
+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
+
+if TYPE_CHECKING:
+ from ansys.dpf.core.data_sources import DataSources
+ from ansys.dpf.core.field import Field
+ from ansys.dpf.core.fields_container import FieldsContainer
+ from ansys.dpf.core.meshed_region import MeshedRegion
+ from ansys.dpf.core.meshes_container import MeshesContainer
+ from ansys.dpf.core.scoping import Scoping
+ from ansys.dpf.core.scopings_container import ScopingsContainer
+ from ansys.dpf.core.streams_container import StreamsContainer
+
+
+class squared_l2norm_pressure(Operator):
+ r"""Read/compute Square of the L2 norm of pressure over element volume by
+ calling the readers defined by the datasources.
+
+
+ Inputs
+ ------
+ time_scoping: Scoping or int or float or Field, optional
+ time/freq values (use doubles or field), time/freq set ids (use ints or scoping) or time/freq step ids (use scoping with TimeFreq_steps location) required in output. To specify time/freq values at specific load steps, put a Field (and not a list) in input with a scoping located on "TimeFreq_steps". Linear time freq intrapolation is performed if the values are not in the result files and the data at the max time or freq is taken when time/freqs are higher than available time/freqs in result files. To get all data for all time/freq sets, connect an int with value -1.
+ mesh_scoping: ScopingsContainer or Scoping, optional
+ nodes or elements scoping required in output. The output fields will be scoped on these node or element IDs. To figure out the ordering of the fields data, look at their scoping IDs as they might not be ordered as the input scoping was. The scoping's location indicates whether nodes or elements are asked for. Using scopings container allows you to split the result fields container into domains
+ fields_container: FieldsContainer, optional
+ Fields container already allocated modified inplace
+ streams_container: StreamsContainer, optional
+ result file container allowed to be kept open to cache data
+ data_sources: DataSources
+ result file path container, used if no streams are set
+ bool_rotate_to_global: bool, optional
+ if true the field is rotated to global coordinate system (default true). Please check your results carefully if 'false' is used for Elemental or ElementalNodal results averaged to the Nodes when adjacent elements do not share the same coordinate system, as results may be incorrect.
+ mesh: MeshedRegion or MeshesContainer, optional
+ prevents from reading the mesh in the result files
+
+ Outputs
+ -------
+ fields_container: FieldsContainer
+
+ Examples
+ --------
+ >>> from ansys.dpf import core as dpf
+
+ >>> # Instantiate operator
+ >>> op = dpf.operators.result.squared_l2norm_pressure()
+
+ >>> # Make input connections
+ >>> my_time_scoping = dpf.Scoping()
+ >>> op.inputs.time_scoping.connect(my_time_scoping)
+ >>> my_mesh_scoping = dpf.ScopingsContainer()
+ >>> op.inputs.mesh_scoping.connect(my_mesh_scoping)
+ >>> 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)
+ >>> my_bool_rotate_to_global = bool()
+ >>> op.inputs.bool_rotate_to_global.connect(my_bool_rotate_to_global)
+ >>> my_mesh = dpf.MeshedRegion()
+ >>> op.inputs.mesh.connect(my_mesh)
+
+ >>> # Instantiate operator and connect inputs in one line
+ >>> op = dpf.operators.result.squared_l2norm_pressure(
+ ... time_scoping=my_time_scoping,
+ ... mesh_scoping=my_mesh_scoping,
+ ... fields_container=my_fields_container,
+ ... streams_container=my_streams_container,
+ ... data_sources=my_data_sources,
+ ... bool_rotate_to_global=my_bool_rotate_to_global,
+ ... mesh=my_mesh,
+ ... )
+
+ >>> # Get output data
+ >>> result_fields_container = op.outputs.fields_container()
+ """
+
+ def __init__(
+ self,
+ time_scoping=None,
+ mesh_scoping=None,
+ fields_container=None,
+ streams_container=None,
+ data_sources=None,
+ bool_rotate_to_global=None,
+ mesh=None,
+ config=None,
+ server=None,
+ ):
+ super().__init__(
+ name="PL2",
+ config=config,
+ server=server,
+ inputs_type=InputsSquaredL2NormPressure,
+ outputs_type=OutputsSquaredL2NormPressure,
+ )
+ self._inputs = InputsSquaredL2NormPressure(self)
+ self._outputs = OutputsSquaredL2NormPressure(self)
+ if time_scoping is not None:
+ self.inputs.time_scoping.connect(time_scoping)
+ if mesh_scoping is not None:
+ self.inputs.mesh_scoping.connect(mesh_scoping)
+ 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)
+ if bool_rotate_to_global is not None:
+ self.inputs.bool_rotate_to_global.connect(bool_rotate_to_global)
+ if mesh is not None:
+ self.inputs.mesh.connect(mesh)
+
+ @staticmethod
+ def _spec() -> Specification:
+ description = r"""Read/compute Square of the L2 norm of pressure over element volume by
+calling the readers defined by the datasources.
+"""
+ spec = Specification(
+ description=description,
+ map_input_pin_spec={
+ 0: PinSpecification(
+ name="time_scoping",
+ type_names=[
+ "scoping",
+ "int32",
+ "vector",
+ "double",
+ "field",
+ "vector",
+ ],
+ optional=True,
+ document=r"""time/freq values (use doubles or field), time/freq set ids (use ints or scoping) or time/freq step ids (use scoping with TimeFreq_steps location) required in output. To specify time/freq values at specific load steps, put a Field (and not a list) in input with a scoping located on "TimeFreq_steps". Linear time freq intrapolation is performed if the values are not in the result files and the data at the max time or freq is taken when time/freqs are higher than available time/freqs in result files. To get all data for all time/freq sets, connect an int with value -1.""",
+ ),
+ 1: PinSpecification(
+ name="mesh_scoping",
+ type_names=["scopings_container", "scoping"],
+ optional=True,
+ document=r"""nodes or elements scoping required in output. The output fields will be scoped on these node or element IDs. To figure out the ordering of the fields data, look at their scoping IDs as they might not be ordered as the input scoping was. The scoping's location indicates whether nodes or elements are asked for. Using scopings container allows you to split the result fields container into domains""",
+ ),
+ 2: PinSpecification(
+ name="fields_container",
+ type_names=["fields_container"],
+ optional=True,
+ document=r"""Fields container already allocated modified inplace""",
+ ),
+ 3: PinSpecification(
+ name="streams_container",
+ type_names=["streams_container"],
+ optional=True,
+ document=r"""result file container allowed to be kept open to cache data""",
+ ),
+ 4: PinSpecification(
+ name="data_sources",
+ type_names=["data_sources"],
+ optional=False,
+ document=r"""result file path container, used if no streams are set""",
+ ),
+ 5: PinSpecification(
+ name="bool_rotate_to_global",
+ type_names=["bool"],
+ optional=True,
+ document=r"""if true the field is rotated to global coordinate system (default true). Please check your results carefully if 'false' is used for Elemental or ElementalNodal results averaged to the Nodes when adjacent elements do not share the same coordinate system, as results may be incorrect.""",
+ ),
+ 7: PinSpecification(
+ name="mesh",
+ type_names=["abstract_meshed_region", "meshes_container"],
+ optional=True,
+ document=r"""prevents from reading the mesh in the result files""",
+ ),
+ },
+ 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="PL2", server=server)
+
+ @property
+ def inputs(self) -> InputsSquaredL2NormPressure:
+ """Enables to connect inputs to the operator
+
+ Returns
+ --------
+ inputs:
+ An instance of InputsSquaredL2NormPressure.
+ """
+ return self._inputs
+
+ @property
+ def outputs(self) -> OutputsSquaredL2NormPressure:
+ """Enables to get outputs of the operator by evaluating it
+
+ Returns
+ --------
+ outputs:
+ An instance of OutputsSquaredL2NormPressure.
+ """
+ return self._outputs
+
+
+class InputsSquaredL2NormPressure(_Inputs):
+ """Intermediate class used to connect user inputs to
+ squared_l2norm_pressure operator.
+
+ Examples
+ --------
+ >>> from ansys.dpf import core as dpf
+ >>> op = dpf.operators.result.squared_l2norm_pressure()
+ >>> my_time_scoping = dpf.Scoping()
+ >>> op.inputs.time_scoping.connect(my_time_scoping)
+ >>> my_mesh_scoping = dpf.ScopingsContainer()
+ >>> op.inputs.mesh_scoping.connect(my_mesh_scoping)
+ >>> 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)
+ >>> my_bool_rotate_to_global = bool()
+ >>> op.inputs.bool_rotate_to_global.connect(my_bool_rotate_to_global)
+ >>> my_mesh = dpf.MeshedRegion()
+ >>> op.inputs.mesh.connect(my_mesh)
+ """
+
+ def __init__(self, op: Operator):
+ super().__init__(squared_l2norm_pressure._spec().inputs, op)
+ self._time_scoping: Input[Scoping | int | float | Field] = Input(
+ squared_l2norm_pressure._spec().input_pin(0), 0, op, -1
+ )
+ self._inputs.append(self._time_scoping)
+ self._mesh_scoping: Input[ScopingsContainer | Scoping] = Input(
+ squared_l2norm_pressure._spec().input_pin(1), 1, op, -1
+ )
+ self._inputs.append(self._mesh_scoping)
+ self._fields_container: Input[FieldsContainer] = Input(
+ squared_l2norm_pressure._spec().input_pin(2), 2, op, -1
+ )
+ self._inputs.append(self._fields_container)
+ self._streams_container: Input[StreamsContainer] = Input(
+ squared_l2norm_pressure._spec().input_pin(3), 3, op, -1
+ )
+ self._inputs.append(self._streams_container)
+ self._data_sources: Input[DataSources] = Input(
+ squared_l2norm_pressure._spec().input_pin(4), 4, op, -1
+ )
+ self._inputs.append(self._data_sources)
+ self._bool_rotate_to_global: Input[bool] = Input(
+ squared_l2norm_pressure._spec().input_pin(5), 5, op, -1
+ )
+ self._inputs.append(self._bool_rotate_to_global)
+ self._mesh: Input[MeshedRegion | MeshesContainer] = Input(
+ squared_l2norm_pressure._spec().input_pin(7), 7, op, -1
+ )
+ self._inputs.append(self._mesh)
+
+ @property
+ def time_scoping(self) -> Input[Scoping | int | float | Field]:
+ r"""Allows to connect time_scoping input to the operator.
+
+ time/freq values (use doubles or field), time/freq set ids (use ints or scoping) or time/freq step ids (use scoping with TimeFreq_steps location) required in output. To specify time/freq values at specific load steps, put a Field (and not a list) in input with a scoping located on "TimeFreq_steps". Linear time freq intrapolation is performed if the values are not in the result files and the data at the max time or freq is taken when time/freqs are higher than available time/freqs in result files. To get all data for all time/freq sets, connect an int with value -1.
+
+ Returns
+ -------
+ input:
+ An Input instance for this pin.
+
+ Examples
+ --------
+ >>> from ansys.dpf import core as dpf
+ >>> op = dpf.operators.result.squared_l2norm_pressure()
+ >>> op.inputs.time_scoping.connect(my_time_scoping)
+ >>> # or
+ >>> op.inputs.time_scoping(my_time_scoping)
+ """
+ return self._time_scoping
+
+ @property
+ def mesh_scoping(self) -> Input[ScopingsContainer | Scoping]:
+ r"""Allows to connect mesh_scoping input to the operator.
+
+ nodes or elements scoping required in output. The output fields will be scoped on these node or element IDs. To figure out the ordering of the fields data, look at their scoping IDs as they might not be ordered as the input scoping was. The scoping's location indicates whether nodes or elements are asked for. Using scopings container allows you to split the result fields container into domains
+
+ Returns
+ -------
+ input:
+ An Input instance for this pin.
+
+ Examples
+ --------
+ >>> from ansys.dpf import core as dpf
+ >>> op = dpf.operators.result.squared_l2norm_pressure()
+ >>> op.inputs.mesh_scoping.connect(my_mesh_scoping)
+ >>> # or
+ >>> op.inputs.mesh_scoping(my_mesh_scoping)
+ """
+ return self._mesh_scoping
+
+ @property
+ def fields_container(self) -> Input[FieldsContainer]:
+ r"""Allows to connect fields_container input to the operator.
+
+ Fields container already allocated modified inplace
+
+ Returns
+ -------
+ input:
+ An Input instance for this pin.
+
+ Examples
+ --------
+ >>> from ansys.dpf import core as dpf
+ >>> op = dpf.operators.result.squared_l2norm_pressure()
+ >>> 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[StreamsContainer]:
+ r"""Allows to connect streams_container input to the operator.
+
+ result file container allowed to be kept open to cache data
+
+ Returns
+ -------
+ input:
+ An Input instance for this pin.
+
+ Examples
+ --------
+ >>> from ansys.dpf import core as dpf
+ >>> op = dpf.operators.result.squared_l2norm_pressure()
+ >>> 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[DataSources]:
+ r"""Allows to connect data_sources input to the operator.
+
+ result file path container, used if no streams are set
+
+ Returns
+ -------
+ input:
+ An Input instance for this pin.
+
+ Examples
+ --------
+ >>> from ansys.dpf import core as dpf
+ >>> op = dpf.operators.result.squared_l2norm_pressure()
+ >>> op.inputs.data_sources.connect(my_data_sources)
+ >>> # or
+ >>> op.inputs.data_sources(my_data_sources)
+ """
+ return self._data_sources
+
+ @property
+ def bool_rotate_to_global(self) -> Input[bool]:
+ r"""Allows to connect bool_rotate_to_global input to the operator.
+
+ if true the field is rotated to global coordinate system (default true). Please check your results carefully if 'false' is used for Elemental or ElementalNodal results averaged to the Nodes when adjacent elements do not share the same coordinate system, as results may be incorrect.
+
+ Returns
+ -------
+ input:
+ An Input instance for this pin.
+
+ Examples
+ --------
+ >>> from ansys.dpf import core as dpf
+ >>> op = dpf.operators.result.squared_l2norm_pressure()
+ >>> op.inputs.bool_rotate_to_global.connect(my_bool_rotate_to_global)
+ >>> # or
+ >>> op.inputs.bool_rotate_to_global(my_bool_rotate_to_global)
+ """
+ return self._bool_rotate_to_global
+
+ @property
+ def mesh(self) -> Input[MeshedRegion | MeshesContainer]:
+ r"""Allows to connect mesh input to the operator.
+
+ prevents from reading the mesh in the result files
+
+ Returns
+ -------
+ input:
+ An Input instance for this pin.
+
+ Examples
+ --------
+ >>> from ansys.dpf import core as dpf
+ >>> op = dpf.operators.result.squared_l2norm_pressure()
+ >>> op.inputs.mesh.connect(my_mesh)
+ >>> # or
+ >>> op.inputs.mesh(my_mesh)
+ """
+ return self._mesh
+
+
+class OutputsSquaredL2NormPressure(_Outputs):
+ """Intermediate class used to get outputs from
+ squared_l2norm_pressure operator.
+
+ Examples
+ --------
+ >>> from ansys.dpf import core as dpf
+ >>> op = dpf.operators.result.squared_l2norm_pressure()
+ >>> # Connect inputs : op.inputs. ...
+ >>> result_fields_container = op.outputs.fields_container()
+ """
+
+ def __init__(self, op: Operator):
+ super().__init__(squared_l2norm_pressure._spec().outputs, op)
+ self._fields_container: Output[FieldsContainer] = Output(
+ squared_l2norm_pressure._spec().output_pin(0), 0, op
+ )
+ self._outputs.append(self._fields_container)
+
+ @property
+ def fields_container(self) -> Output[FieldsContainer]:
+ 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.squared_l2norm_pressure()
+ >>> # Get the output from op.outputs. ...
+ >>> result_fields_container = op.outputs.fields_container()
+ """
+ return self._fields_container
diff --git a/src/ansys/dpf/core/operators/scoping/adapt_with_scopings_container.py b/src/ansys/dpf/core/operators/scoping/adapt_with_scopings_container.py
index a19a8310b00..b4a82d06ccb 100644
--- a/src/ansys/dpf/core/operators/scoping/adapt_with_scopings_container.py
+++ b/src/ansys/dpf/core/operators/scoping/adapt_with_scopings_container.py
@@ -23,19 +23,24 @@
class adapt_with_scopings_container(Operator):
r"""Rescopes/splits a fields container to correspond to a scopings
- container.
+ container. Each field from the input container is rescoped using each
+ scoping from the scopings container, creating a cartesian product of
+ rescoped fields.
Inputs
------
field_or_fields_container: FieldsContainer or Field
+ Fields container to rescope, or a single field (which will be converted to a container)
scopings_container: ScopingsContainer
+ Container with target scopings for rescoping operations
keep_empty_fields: bool, optional
- Default false.
+ Whether to keep fields that become empty after rescoping. Default is false.
Outputs
-------
fields_container: FieldsContainer
+ Fields container with rescoped fields, combining labels from input fields and scopings
Examples
--------
@@ -90,7 +95,9 @@ def __init__(
@staticmethod
def _spec() -> Specification:
description = r"""Rescopes/splits a fields container to correspond to a scopings
-container.
+container. Each field from the input container is rescoped using each
+scoping from the scopings container, creating a cartesian product of
+rescoped fields.
"""
spec = Specification(
description=description,
@@ -99,19 +106,19 @@ def _spec() -> Specification:
name="field_or_fields_container",
type_names=["fields_container", "field"],
optional=False,
- document=r"""""",
+ document=r"""Fields container to rescope, or a single field (which will be converted to a container)""",
),
1: PinSpecification(
name="scopings_container",
type_names=["scopings_container"],
optional=False,
- document=r"""""",
+ document=r"""Container with target scopings for rescoping operations""",
),
2: PinSpecification(
name="keep_empty_fields",
type_names=["bool"],
optional=True,
- document=r"""Default false.""",
+ document=r"""Whether to keep fields that become empty after rescoping. Default is false.""",
),
},
map_output_pin_spec={
@@ -119,7 +126,7 @@ def _spec() -> Specification:
name="fields_container",
type_names=["fields_container"],
optional=False,
- document=r"""""",
+ document=r"""Fields container with rescoped fields, combining labels from input fields and scopings""",
),
},
)
@@ -204,6 +211,8 @@ def __init__(self, op: Operator):
def field_or_fields_container(self) -> Input[FieldsContainer | Field]:
r"""Allows to connect field_or_fields_container input to the operator.
+ Fields container to rescope, or a single field (which will be converted to a container)
+
Returns
-------
input:
@@ -223,6 +232,8 @@ def field_or_fields_container(self) -> Input[FieldsContainer | Field]:
def scopings_container(self) -> Input[ScopingsContainer]:
r"""Allows to connect scopings_container input to the operator.
+ Container with target scopings for rescoping operations
+
Returns
-------
input:
@@ -242,7 +253,7 @@ def scopings_container(self) -> Input[ScopingsContainer]:
def keep_empty_fields(self) -> Input[bool]:
r"""Allows to connect keep_empty_fields input to the operator.
- Default false.
+ Whether to keep fields that become empty after rescoping. Default is false.
Returns
-------
@@ -283,6 +294,8 @@ def __init__(self, op: Operator):
def fields_container(self) -> Output[FieldsContainer]:
r"""Allows to get fields_container output of the operator
+ Fields container with rescoped fields, combining labels from input fields and scopings
+
Returns
-------
output:
diff --git a/src/ansys/dpf/core/operators/scoping/change_fc.py b/src/ansys/dpf/core/operators/scoping/change_fc.py
index 7a05b293a49..8927e1a1868 100644
--- a/src/ansys/dpf/core/operators/scoping/change_fc.py
+++ b/src/ansys/dpf/core/operators/scoping/change_fc.py
@@ -29,11 +29,14 @@ class change_fc(Operator):
Inputs
------
field_or_fields_container: FieldsContainer or Field
+ Field or fields container to rescope
scopings_container: ScopingsContainer
+ Scopings container for rescoping operation
Outputs
-------
fields_container: FieldsContainer
+ FieldsContainer rescoped according to scopings container (DEPRECATED - use adapt with scopings container)
Examples
--------
@@ -91,13 +94,13 @@ def _spec() -> Specification:
name="field_or_fields_container",
type_names=["fields_container", "field"],
optional=False,
- document=r"""""",
+ document=r"""Field or fields container to rescope""",
),
1: PinSpecification(
name="scopings_container",
type_names=["scopings_container"],
optional=False,
- document=r"""""",
+ document=r"""Scopings container for rescoping operation""",
),
},
map_output_pin_spec={
@@ -105,7 +108,7 @@ def _spec() -> Specification:
name="fields_container",
type_names=["fields_container"],
optional=False,
- document=r"""""",
+ document=r"""FieldsContainer rescoped according to scopings container (DEPRECATED - use adapt with scopings container)""",
),
},
)
@@ -184,6 +187,8 @@ def __init__(self, op: Operator):
def field_or_fields_container(self) -> Input[FieldsContainer | Field]:
r"""Allows to connect field_or_fields_container input to the operator.
+ Field or fields container to rescope
+
Returns
-------
input:
@@ -203,6 +208,8 @@ def field_or_fields_container(self) -> Input[FieldsContainer | Field]:
def scopings_container(self) -> Input[ScopingsContainer]:
r"""Allows to connect scopings_container input to the operator.
+ Scopings container for rescoping operation
+
Returns
-------
input:
@@ -242,6 +249,8 @@ def __init__(self, op: Operator):
def fields_container(self) -> Output[FieldsContainer]:
r"""Allows to get fields_container output of the operator
+ FieldsContainer rescoped according to scopings container (DEPRECATED - use adapt with scopings container)
+
Returns
-------
output:
diff --git a/src/ansys/dpf/core/operators/scoping/elemental_from_mesh.py b/src/ansys/dpf/core/operators/scoping/elemental_from_mesh.py
index ef82a7abd3f..dda3a65ed6c 100644
--- a/src/ansys/dpf/core/operators/scoping/elemental_from_mesh.py
+++ b/src/ansys/dpf/core/operators/scoping/elemental_from_mesh.py
@@ -21,17 +21,19 @@
class elemental_from_mesh(Operator):
- r"""Retrieves the elemental scoping of a given input mesh, which contains
- the element IDs.
+ r"""Retrieves the elemental scoping from a mesh, containing all element IDs
+ with elemental location.
Inputs
------
mesh: MeshedRegion
+ Mesh from which to extract the elemental scoping
Outputs
-------
mesh_scoping: Scoping
+ Scoping containing all element IDs in the mesh with 'Elemental' location
Examples
--------
@@ -68,8 +70,8 @@ def __init__(self, mesh=None, config=None, server=None):
@staticmethod
def _spec() -> Specification:
- description = r"""Retrieves the elemental scoping of a given input mesh, which contains
-the element IDs.
+ description = r"""Retrieves the elemental scoping from a mesh, containing all element IDs
+with elemental location.
"""
spec = Specification(
description=description,
@@ -78,7 +80,7 @@ def _spec() -> Specification:
name="mesh",
type_names=["abstract_meshed_region"],
optional=False,
- document=r"""""",
+ document=r"""Mesh from which to extract the elemental scoping""",
),
},
map_output_pin_spec={
@@ -86,7 +88,7 @@ def _spec() -> Specification:
name="mesh_scoping",
type_names=["scoping"],
optional=False,
- document=r"""""",
+ document=r"""Scoping containing all element IDs in the mesh with 'Elemental' location""",
),
},
)
@@ -159,6 +161,8 @@ def __init__(self, op: Operator):
def mesh(self) -> Input[MeshedRegion]:
r"""Allows to connect mesh input to the operator.
+ Mesh from which to extract the elemental scoping
+
Returns
-------
input:
@@ -198,6 +202,8 @@ def __init__(self, op: Operator):
def mesh_scoping(self) -> Output[Scoping]:
r"""Allows to get mesh_scoping output of the operator
+ Scoping containing all element IDs in the mesh with 'Elemental' location
+
Returns
-------
output:
diff --git a/src/ansys/dpf/core/operators/scoping/nodal_from_mesh.py b/src/ansys/dpf/core/operators/scoping/nodal_from_mesh.py
index 2012b7e2fcf..ce76728edba 100644
--- a/src/ansys/dpf/core/operators/scoping/nodal_from_mesh.py
+++ b/src/ansys/dpf/core/operators/scoping/nodal_from_mesh.py
@@ -21,17 +21,18 @@
class nodal_from_mesh(Operator):
- r"""Retrieves the nodal scoping of a given input mesh, which contains the
- node IDs.
+ r"""Retrieves the nodal scoping from a mesh, containing all node IDs.
Inputs
------
mesh: MeshedRegion
+ Mesh from which to extract the nodal scoping
Outputs
-------
mesh_scoping: Scoping
+ Scoping containing all node IDs in the mesh
Examples
--------
@@ -68,8 +69,7 @@ def __init__(self, mesh=None, config=None, server=None):
@staticmethod
def _spec() -> Specification:
- description = r"""Retrieves the nodal scoping of a given input mesh, which contains the
-node IDs.
+ description = r"""Retrieves the nodal scoping from a mesh, containing all node IDs.
"""
spec = Specification(
description=description,
@@ -78,7 +78,7 @@ def _spec() -> Specification:
name="mesh",
type_names=["abstract_meshed_region"],
optional=False,
- document=r"""""",
+ document=r"""Mesh from which to extract the nodal scoping""",
),
},
map_output_pin_spec={
@@ -86,7 +86,7 @@ def _spec() -> Specification:
name="mesh_scoping",
type_names=["scoping"],
optional=False,
- document=r"""""",
+ document=r"""Scoping containing all node IDs in the mesh""",
),
},
)
@@ -159,6 +159,8 @@ def __init__(self, op: Operator):
def mesh(self) -> Input[MeshedRegion]:
r"""Allows to connect mesh input to the operator.
+ Mesh from which to extract the nodal scoping
+
Returns
-------
input:
@@ -198,6 +200,8 @@ def __init__(self, op: Operator):
def mesh_scoping(self) -> Output[Scoping]:
r"""Allows to get mesh_scoping output of the operator
+ Scoping containing all node IDs in the mesh
+
Returns
-------
output:
diff --git a/src/ansys/dpf/core/operators/scoping/on_property.py b/src/ansys/dpf/core/operators/scoping/on_property.py
index 5f25ac41dfc..392edfb79a0 100644
--- a/src/ansys/dpf/core/operators/scoping/on_property.py
+++ b/src/ansys/dpf/core/operators/scoping/on_property.py
@@ -31,7 +31,7 @@ class on_property(Operator):
requested_location: str
Nodal or Elemental location are expected
property_name: str
- ex "mapdl_element_type", "mapdl_element_type_id", "apdl_type_index", "mapdl_type_id", "material", "apdl_section_id", "apdl_real_id", "apdl_esys_id", "shell_axi", "volume_axi"...
+ ex "mapdl_element_type", "mapdl_element_type_id", "apdl_type_index", "mapdl_type_id", "material", "apdl_section_id", "apdl_real_id", "apdl_esys_id", "apdl_tshape", "shell_axi", "volume_axi"...
property_id: int
property_id or vector of property ids
streams_container: StreamsContainer, optional
@@ -130,7 +130,7 @@ def _spec() -> Specification:
name="property_name",
type_names=["string"],
optional=False,
- document=r"""ex "mapdl_element_type", "mapdl_element_type_id", "apdl_type_index", "mapdl_type_id", "material", "apdl_section_id", "apdl_real_id", "apdl_esys_id", "shell_axi", "volume_axi"...""",
+ document=r"""ex "mapdl_element_type", "mapdl_element_type_id", "apdl_type_index", "mapdl_type_id", "material", "apdl_section_id", "apdl_real_id", "apdl_esys_id", "apdl_tshape", "shell_axi", "volume_axi"...""",
),
2: PinSpecification(
name="property_id",
@@ -284,7 +284,7 @@ def requested_location(self) -> Input[str]:
def property_name(self) -> Input[str]:
r"""Allows to connect property_name input to the operator.
- ex "mapdl_element_type", "mapdl_element_type_id", "apdl_type_index", "mapdl_type_id", "material", "apdl_section_id", "apdl_real_id", "apdl_esys_id", "shell_axi", "volume_axi"...
+ ex "mapdl_element_type", "mapdl_element_type_id", "apdl_type_index", "mapdl_type_id", "material", "apdl_section_id", "apdl_real_id", "apdl_esys_id", "apdl_tshape", "shell_axi", "volume_axi"...
Returns
-------
diff --git a/src/ansys/dpf/core/operators/utility/bind_support.py b/src/ansys/dpf/core/operators/utility/bind_support.py
index 2be37bc116c..98fdf7fa485 100644
--- a/src/ansys/dpf/core/operators/utility/bind_support.py
+++ b/src/ansys/dpf/core/operators/utility/bind_support.py
@@ -30,11 +30,12 @@ class bind_support(Operator):
field: Field or FieldsContainer
field or fields container with only one field is expected
support: MeshedRegion or AbstractFieldSupport
- meshed region or a support of the field
+ Meshed region or a support of the field
Outputs
-------
field: Field
+ Field with the attached support
Examples
--------
@@ -91,7 +92,7 @@ def _spec() -> Specification:
name="support",
type_names=["abstract_meshed_region", "abstract_field_support"],
optional=False,
- document=r"""meshed region or a support of the field""",
+ document=r"""Meshed region or a support of the field""",
),
},
map_output_pin_spec={
@@ -99,7 +100,7 @@ def _spec() -> Specification:
name="field",
type_names=["field"],
optional=False,
- document=r"""""",
+ document=r"""Field with the attached support""",
),
},
)
@@ -199,7 +200,7 @@ def field(self) -> Input[Field | FieldsContainer]:
def support(self) -> Input[MeshedRegion]:
r"""Allows to connect support input to the operator.
- meshed region or a support of the field
+ Meshed region or a support of the field
Returns
-------
@@ -238,6 +239,8 @@ def __init__(self, op: Operator):
def field(self) -> Output[Field]:
r"""Allows to get field output of the operator
+ Field with the attached support
+
Returns
-------
output:
diff --git a/src/ansys/dpf/core/operators/utility/bind_support_fc.py b/src/ansys/dpf/core/operators/utility/bind_support_fc.py
index 1570b361025..6ad3836d426 100644
--- a/src/ansys/dpf/core/operators/utility/bind_support_fc.py
+++ b/src/ansys/dpf/core/operators/utility/bind_support_fc.py
@@ -28,12 +28,14 @@ class bind_support_fc(Operator):
Inputs
------
fields_container: FieldsContainer
+ Fields container to which the support will be attached
support: MeshedRegion or AbstractFieldSupport or TimeFreqSupport
- Meshed region or a support of the field.
+ Meshed region, support, or time frequency support to attach to the fields container
Outputs
-------
fields_container: FieldsContainer
+ Fields container with the attached support
Examples
--------
@@ -84,7 +86,7 @@ def _spec() -> Specification:
name="fields_container",
type_names=["fields_container"],
optional=False,
- document=r"""""",
+ document=r"""Fields container to which the support will be attached""",
),
1: PinSpecification(
name="support",
@@ -94,7 +96,7 @@ def _spec() -> Specification:
"time_freq_support",
],
optional=False,
- document=r"""Meshed region or a support of the field.""",
+ document=r"""Meshed region, support, or time frequency support to attach to the fields container""",
),
},
map_output_pin_spec={
@@ -102,7 +104,7 @@ def _spec() -> Specification:
name="fields_container",
type_names=["fields_container"],
optional=False,
- document=r"""""",
+ document=r"""Fields container with the attached support""",
),
},
)
@@ -181,6 +183,8 @@ def __init__(self, op: Operator):
def fields_container(self) -> Input[FieldsContainer]:
r"""Allows to connect fields_container input to the operator.
+ Fields container to which the support will be attached
+
Returns
-------
input:
@@ -200,7 +204,7 @@ def fields_container(self) -> Input[FieldsContainer]:
def support(self) -> Input[MeshedRegion | TimeFreqSupport]:
r"""Allows to connect support input to the operator.
- Meshed region or a support of the field.
+ Meshed region, support, or time frequency support to attach to the fields container
Returns
-------
@@ -241,6 +245,8 @@ def __init__(self, op: Operator):
def fields_container(self) -> Output[FieldsContainer]:
r"""Allows to get fields_container output of the operator
+ Fields container with the attached support
+
Returns
-------
output:
diff --git a/src/ansys/dpf/core/operators/utility/change_location.py b/src/ansys/dpf/core/operators/utility/change_location.py
index c0df4b0b291..b9820630010 100644
--- a/src/ansys/dpf/core/operators/utility/change_location.py
+++ b/src/ansys/dpf/core/operators/utility/change_location.py
@@ -20,18 +20,21 @@
class change_location(Operator):
- r"""change the location of a field.
+ r"""Changes the location property of a field without modifying the field
+ data.
Inputs
------
field: Field
+ Field whose location will be changed
new_location: str
- new location of the output field ex 'Nodal', 'ElementalNodal', 'Elemental'...
+ New location string for the field (e.g., 'Nodal', 'ElementalNodal', 'Elemental')
Outputs
-------
field: Field
+ Field with the updated location property
Examples
--------
@@ -73,7 +76,8 @@ def __init__(self, field=None, new_location=None, config=None, server=None):
@staticmethod
def _spec() -> Specification:
- description = r"""change the location of a field.
+ description = r"""Changes the location property of a field without modifying the field
+data.
"""
spec = Specification(
description=description,
@@ -82,13 +86,13 @@ def _spec() -> Specification:
name="field",
type_names=["field"],
optional=False,
- document=r"""""",
+ document=r"""Field whose location will be changed""",
),
1: PinSpecification(
name="new_location",
type_names=["string"],
optional=False,
- document=r"""new location of the output field ex 'Nodal', 'ElementalNodal', 'Elemental'...""",
+ document=r"""New location string for the field (e.g., 'Nodal', 'ElementalNodal', 'Elemental')""",
),
},
map_output_pin_spec={
@@ -96,7 +100,7 @@ def _spec() -> Specification:
name="field",
type_names=["field"],
optional=False,
- document=r"""""",
+ document=r"""Field with the updated location property""",
),
},
)
@@ -175,6 +179,8 @@ def __init__(self, op: Operator):
def field(self) -> Input[Field]:
r"""Allows to connect field input to the operator.
+ Field whose location will be changed
+
Returns
-------
input:
@@ -194,7 +200,7 @@ def field(self) -> Input[Field]:
def new_location(self) -> Input[str]:
r"""Allows to connect new_location input to the operator.
- new location of the output field ex 'Nodal', 'ElementalNodal', 'Elemental'...
+ New location string for the field (e.g., 'Nodal', 'ElementalNodal', 'Elemental')
Returns
-------
@@ -235,6 +241,8 @@ def __init__(self, op: Operator):
def field(self) -> Output[Field]:
r"""Allows to get field output of the operator
+ Field with the updated location property
+
Returns
-------
output:
diff --git a/src/ansys/dpf/core/operators/utility/default_value.py b/src/ansys/dpf/core/operators/utility/default_value.py
index 71274f20936..157778cdbdf 100644
--- a/src/ansys/dpf/core/operators/utility/default_value.py
+++ b/src/ansys/dpf/core/operators/utility/default_value.py
@@ -16,18 +16,22 @@
class default_value(Operator):
- r"""Default return value from input pin 1 to output pin 0 if there is
- nothing on input pin 0.
+ r"""Returns the value from pin 0 if provided, otherwise returns the default
+ value from pin 1. This operator acts as a fallback mechanism for
+ optional inputs.
Inputs
------
forced_value: optional
+ Primary value to return if provided. Can be any type
default_value:
+ Default value to return if pin 0 is not connected. Must be the same type as pin 0
Outputs
-------
output:
+ Returns primary_value if provided, otherwise default_value
Examples
--------
@@ -69,8 +73,9 @@ def __init__(self, forced_value=None, default_value=None, config=None, server=No
@staticmethod
def _spec() -> Specification:
- description = r"""Default return value from input pin 1 to output pin 0 if there is
-nothing on input pin 0.
+ description = r"""Returns the value from pin 0 if provided, otherwise returns the default
+value from pin 1. This operator acts as a fallback mechanism for
+optional inputs.
"""
spec = Specification(
description=description,
@@ -79,20 +84,20 @@ def _spec() -> Specification:
name="forced_value",
type_names=["any"],
optional=True,
- document=r"""""",
+ document=r"""Primary value to return if provided. Can be any type""",
),
1: PinSpecification(
name="default_value",
type_names=["any"],
optional=False,
- document=r"""""",
+ document=r"""Default value to return if pin 0 is not connected. Must be the same type as pin 0""",
),
},
map_output_pin_spec={
0: PinSpecification(
name="output",
optional=False,
- document=r"""""",
+ document=r"""Returns primary_value if provided, otherwise default_value""",
),
},
)
@@ -169,6 +174,8 @@ def __init__(self, op: Operator):
def forced_value(self) -> Input:
r"""Allows to connect forced_value input to the operator.
+ Primary value to return if provided. Can be any type
+
Returns
-------
input:
@@ -188,6 +195,8 @@ def forced_value(self) -> Input:
def default_value(self) -> Input:
r"""Allows to connect default_value input to the operator.
+ Default value to return if pin 0 is not connected. Must be the same type as pin 0
+
Returns
-------
input:
@@ -225,6 +234,8 @@ def __init__(self, op: Operator):
def output(self) -> Output:
r"""Allows to get output output of the operator
+ Returns primary_value if provided, otherwise default_value
+
Returns
-------
output:
diff --git a/src/ansys/dpf/core/operators/utility/extract_field.py b/src/ansys/dpf/core/operators/utility/extract_field.py
index b390d74b366..3b2f5cd1001 100644
--- a/src/ansys/dpf/core/operators/utility/extract_field.py
+++ b/src/ansys/dpf/core/operators/utility/extract_field.py
@@ -22,19 +22,21 @@
class extract_field(Operator):
r"""Extracts the fields at the indices defined in the vector (in 1) from the
- fields container (in 0).
+ fields container (in 0). If a single index is provided, returns a field;
+ if multiple indices are provided, returns a fields container.
Inputs
------
fields_container: Field or FieldsContainer
- if a field is in input, it is passed on as an output
+ Fields container or single field. If a field is provided, it is passed through as output
indices: optional
- Default is the first field
+ Indices of fields to extract. Default is [0] (first field). Single index returns a field, multiple indices return a fields container
Outputs
-------
field: Field
+ Extracted field(s). Single index produces a field, multiple indices produce a fields container
Examples
--------
@@ -77,7 +79,8 @@ def __init__(self, fields_container=None, indices=None, config=None, server=None
@staticmethod
def _spec() -> Specification:
description = r"""Extracts the fields at the indices defined in the vector (in 1) from the
-fields container (in 0).
+fields container (in 0). If a single index is provided, returns a field;
+if multiple indices are provided, returns a fields container.
"""
spec = Specification(
description=description,
@@ -86,13 +89,13 @@ def _spec() -> Specification:
name="fields_container",
type_names=["field", "fields_container"],
optional=False,
- document=r"""if a field is in input, it is passed on as an output""",
+ document=r"""Fields container or single field. If a field is provided, it is passed through as output""",
),
1: PinSpecification(
name="indices",
type_names=["vector"],
optional=True,
- document=r"""Default is the first field""",
+ document=r"""Indices of fields to extract. Default is [0] (first field). Single index returns a field, multiple indices return a fields container""",
),
},
map_output_pin_spec={
@@ -100,7 +103,7 @@ def _spec() -> Specification:
name="field",
type_names=["field"],
optional=False,
- document=r"""""",
+ document=r"""Extracted field(s). Single index produces a field, multiple indices produce a fields container""",
),
},
)
@@ -177,7 +180,7 @@ def __init__(self, op: Operator):
def fields_container(self) -> Input[Field | FieldsContainer]:
r"""Allows to connect fields_container input to the operator.
- if a field is in input, it is passed on as an output
+ Fields container or single field. If a field is provided, it is passed through as output
Returns
-------
@@ -198,7 +201,7 @@ def fields_container(self) -> Input[Field | FieldsContainer]:
def indices(self) -> Input:
r"""Allows to connect indices input to the operator.
- Default is the first field
+ Indices of fields to extract. Default is [0] (first field). Single index returns a field, multiple indices return a fields container
Returns
-------
@@ -237,6 +240,8 @@ def __init__(self, op: Operator):
def field(self) -> Output[Field]:
r"""Allows to get field output of the operator
+ Extracted field(s). Single index produces a field, multiple indices produce a fields container
+
Returns
-------
output:
diff --git a/src/ansys/dpf/core/operators/utility/forward_field.py b/src/ansys/dpf/core/operators/utility/forward_field.py
index f622a34581e..627aa9643f0 100644
--- a/src/ansys/dpf/core/operators/utility/forward_field.py
+++ b/src/ansys/dpf/core/operators/utility/forward_field.py
@@ -32,6 +32,7 @@ class forward_field(Operator):
Outputs
-------
field: Field
+ Forwarded field (passthrough of input)
Examples
--------
@@ -85,7 +86,7 @@ def _spec() -> Specification:
name="field",
type_names=["field"],
optional=False,
- document=r"""""",
+ document=r"""Forwarded field (passthrough of input)""",
),
},
)
@@ -197,6 +198,8 @@ def __init__(self, op: Operator):
def field(self) -> Output[Field]:
r"""Allows to get field output of the operator
+ Forwarded field (passthrough of input)
+
Returns
-------
output:
diff --git a/src/ansys/dpf/core/operators/utility/forward_fields_container.py b/src/ansys/dpf/core/operators/utility/forward_fields_container.py
index a862825915a..f6ee32fc12e 100644
--- a/src/ansys/dpf/core/operators/utility/forward_fields_container.py
+++ b/src/ansys/dpf/core/operators/utility/forward_fields_container.py
@@ -27,10 +27,12 @@ class forward_fields_container(Operator):
Inputs
------
fields: FieldsContainer or Field
+ FieldsContainer or field to forward
Outputs
-------
fields_container: FieldsContainer
+ Forwarded fields container (passthrough of input)
Examples
--------
@@ -76,7 +78,7 @@ def _spec() -> Specification:
name="fields",
type_names=["fields_container", "field"],
optional=False,
- document=r"""""",
+ document=r"""FieldsContainer or field to forward""",
),
},
map_output_pin_spec={
@@ -84,7 +86,7 @@ def _spec() -> Specification:
name="fields_container",
type_names=["fields_container"],
optional=False,
- document=r"""""",
+ document=r"""Forwarded fields container (passthrough of input)""",
),
},
)
@@ -157,6 +159,8 @@ def __init__(self, op: Operator):
def fields(self) -> Input[FieldsContainer | Field]:
r"""Allows to connect fields input to the operator.
+ FieldsContainer or field to forward
+
Returns
-------
input:
@@ -196,6 +200,8 @@ def __init__(self, op: Operator):
def fields_container(self) -> Output[FieldsContainer]:
r"""Allows to get fields_container output of the operator
+ Forwarded fields container (passthrough of input)
+
Returns
-------
output:
diff --git a/src/ansys/dpf/core/operators/utility/ints_to_scoping.py b/src/ansys/dpf/core/operators/utility/ints_to_scoping.py
index d3fb4f6cad1..eacec9d45fa 100644
--- a/src/ansys/dpf/core/operators/utility/ints_to_scoping.py
+++ b/src/ansys/dpf/core/operators/utility/ints_to_scoping.py
@@ -20,21 +20,23 @@
class ints_to_scoping(Operator):
- r"""take a int or a vector of int and transform it in a one entity field of
- location “numeric”.
+ r"""Creates a scoping from integer data. Converts single integers, integer
+ vectors, or existing scopings into a properly formatted DPF scoping.
Inputs
------
- int_or_vector_int: int or Scoping
- int or single value scoping or vector of int
+ ids: int or Scoping
+ Integer ID(s) for the scoping: single int, vector of ints, or existing scoping
location: str, optional
+ Location string for the scoping (e.g., 'Nodal', 'Elemental'). Default is empty
upper_bound: int or Scoping, optional
- Define the upper bound to create a scoping that will contain a range from the single value input in pin 0 to the upper bound defined in this pin.
+ Upper bound for creating a range scoping. Creates IDs from pin 0 value to this upper bound (inclusive)
Outputs
-------
scoping: Scoping
+ Generated scoping with the specified IDs and location
Examples
--------
@@ -44,8 +46,8 @@ class ints_to_scoping(Operator):
>>> op = dpf.operators.utility.ints_to_scoping()
>>> # Make input connections
- >>> my_int_or_vector_int = int()
- >>> op.inputs.int_or_vector_int.connect(my_int_or_vector_int)
+ >>> my_ids = int()
+ >>> op.inputs.ids.connect(my_ids)
>>> my_location = str()
>>> op.inputs.location.connect(my_location)
>>> my_upper_bound = int()
@@ -53,7 +55,7 @@ class ints_to_scoping(Operator):
>>> # Instantiate operator and connect inputs in one line
>>> op = dpf.operators.utility.ints_to_scoping(
- ... int_or_vector_int=my_int_or_vector_int,
+ ... ids=my_ids,
... location=my_location,
... upper_bound=my_upper_bound,
... )
@@ -64,11 +66,12 @@ class ints_to_scoping(Operator):
def __init__(
self,
- int_or_vector_int=None,
+ ids=None,
location=None,
upper_bound=None,
config=None,
server=None,
+ int_or_vector_int=None,
):
super().__init__(
name="scopingify",
@@ -79,8 +82,15 @@ def __init__(
)
self._inputs = InputsIntsToScoping(self)
self._outputs = OutputsIntsToScoping(self)
- if int_or_vector_int is not None:
- self.inputs.int_or_vector_int.connect(int_or_vector_int)
+ if ids is not None:
+ self.inputs.ids.connect(ids)
+ elif int_or_vector_int is not None:
+ warn(
+ DeprecationWarning(
+ f'Operator ints_to_scoping: Input name "int_or_vector_int" is deprecated in favor of "ids".'
+ )
+ )
+ self.inputs.ids.connect(int_or_vector_int)
if location is not None:
self.inputs.location.connect(location)
if upper_bound is not None:
@@ -88,29 +98,30 @@ def __init__(
@staticmethod
def _spec() -> Specification:
- description = r"""take a int or a vector of int and transform it in a one entity field of
-location “numeric”.
+ description = r"""Creates a scoping from integer data. Converts single integers, integer
+vectors, or existing scopings into a properly formatted DPF scoping.
"""
spec = Specification(
description=description,
map_input_pin_spec={
0: PinSpecification(
- name="int_or_vector_int",
+ name="ids",
type_names=["int32", "vector", "scoping"],
optional=False,
- document=r"""int or single value scoping or vector of int""",
+ document=r"""Integer ID(s) for the scoping: single int, vector of ints, or existing scoping""",
+ aliases=["int_or_vector_int"],
),
1: PinSpecification(
name="location",
type_names=["string"],
optional=True,
- document=r"""""",
+ document=r"""Location string for the scoping (e.g., 'Nodal', 'Elemental'). Default is empty""",
),
2: PinSpecification(
name="upper_bound",
type_names=["int32", "scoping"],
optional=True,
- document=r"""Define the upper bound to create a scoping that will contain a range from the single value input in pin 0 to the upper bound defined in this pin.""",
+ document=r"""Upper bound for creating a range scoping. Creates IDs from pin 0 value to this upper bound (inclusive)""",
),
},
map_output_pin_spec={
@@ -118,7 +129,7 @@ def _spec() -> Specification:
name="scoping",
type_names=["scoping"],
optional=False,
- document=r"""""",
+ document=r"""Generated scoping with the specified IDs and location""",
),
},
)
@@ -176,8 +187,8 @@ class InputsIntsToScoping(_Inputs):
--------
>>> from ansys.dpf import core as dpf
>>> op = dpf.operators.utility.ints_to_scoping()
- >>> my_int_or_vector_int = int()
- >>> op.inputs.int_or_vector_int.connect(my_int_or_vector_int)
+ >>> my_ids = int()
+ >>> op.inputs.ids.connect(my_ids)
>>> my_location = str()
>>> op.inputs.location.connect(my_location)
>>> my_upper_bound = int()
@@ -186,10 +197,10 @@ class InputsIntsToScoping(_Inputs):
def __init__(self, op: Operator):
super().__init__(ints_to_scoping._spec().inputs, op)
- self._int_or_vector_int: Input[int | Scoping] = Input(
+ self._ids: Input[int | Scoping] = Input(
ints_to_scoping._spec().input_pin(0), 0, op, -1
)
- self._inputs.append(self._int_or_vector_int)
+ self._inputs.append(self._ids)
self._location: Input[str] = Input(
ints_to_scoping._spec().input_pin(1), 1, op, -1
)
@@ -200,10 +211,10 @@ def __init__(self, op: Operator):
self._inputs.append(self._upper_bound)
@property
- def int_or_vector_int(self) -> Input[int | Scoping]:
- r"""Allows to connect int_or_vector_int input to the operator.
+ def ids(self) -> Input[int | Scoping]:
+ r"""Allows to connect ids input to the operator.
- int or single value scoping or vector of int
+ Integer ID(s) for the scoping: single int, vector of ints, or existing scoping
Returns
-------
@@ -214,16 +225,18 @@ def int_or_vector_int(self) -> Input[int | Scoping]:
--------
>>> from ansys.dpf import core as dpf
>>> op = dpf.operators.utility.ints_to_scoping()
- >>> op.inputs.int_or_vector_int.connect(my_int_or_vector_int)
+ >>> op.inputs.ids.connect(my_ids)
>>> # or
- >>> op.inputs.int_or_vector_int(my_int_or_vector_int)
+ >>> op.inputs.ids(my_ids)
"""
- return self._int_or_vector_int
+ return self._ids
@property
def location(self) -> Input[str]:
r"""Allows to connect location input to the operator.
+ Location string for the scoping (e.g., 'Nodal', 'Elemental'). Default is empty
+
Returns
-------
input:
@@ -243,7 +256,7 @@ def location(self) -> Input[str]:
def upper_bound(self) -> Input[int | Scoping]:
r"""Allows to connect upper_bound input to the operator.
- Define the upper bound to create a scoping that will contain a range from the single value input in pin 0 to the upper bound defined in this pin.
+ Upper bound for creating a range scoping. Creates IDs from pin 0 value to this upper bound (inclusive)
Returns
-------
@@ -260,6 +273,18 @@ def upper_bound(self) -> Input[int | Scoping]:
"""
return self._upper_bound
+ def __getattr__(self, name):
+ if name in ["int_or_vector_int"]:
+ warn(
+ DeprecationWarning(
+ f'Operator ints_to_scoping: Input name "{name}" is deprecated in favor of "ids".'
+ )
+ )
+ return self.ids
+ raise AttributeError(
+ f"'{self.__class__.__name__}' object has no attribute '{name}'."
+ )
+
class OutputsIntsToScoping(_Outputs):
"""Intermediate class used to get outputs from
@@ -284,6 +309,8 @@ def __init__(self, op: Operator):
def scoping(self) -> Output[Scoping]:
r"""Allows to get scoping output of the operator
+ Generated scoping with the specified IDs and location
+
Returns
-------
output:
diff --git a/src/ansys/dpf/core/operators/utility/scalars_to_field.py b/src/ansys/dpf/core/operators/utility/scalars_to_field.py
index d824731bb5a..f5bc9bb0bb6 100644
--- a/src/ansys/dpf/core/operators/utility/scalars_to_field.py
+++ b/src/ansys/dpf/core/operators/utility/scalars_to_field.py
@@ -21,27 +21,29 @@
class scalars_to_field(Operator):
- r"""Create scalar or vector Field.
+ r"""Creates a scalar or vector field from numeric data. Converts scalar
+ values or vectors into a DPF field with specified properties.
Inputs
------
double_or_vector_double: float, optional
- Data of the field, default is 0-field. Specify a double to have a field of same value or specify directly the data vector.
+ Data of the field. Default is 0-field. Specify a double to create a field with uniform values, or a vector for explicit data per entity
unit: str, optional
- Unit symbol (m, Hz, kg, ...)
+ Unit symbol (m, Hz, kg, ...). Default is dimensionless
location: str, optional
- Location of the field ex 'Nodal', 'ElementalNodal', 'Elemental'... Default is 'numeric'.
- num_entity: int, optional
- Number of field entities. Default is 1 or the size of the scoping in input if specified.
- num_comp: int, optional
- Number of field components. Default is 1.
+ Location of the field: 'Nodal', 'ElementalNodal', 'Elemental', etc. Default is 'numeric'
+ num_entities: int, optional
+ Number of field entities. Default is 1, or the size of the scoping if provided
+ num_components: int, optional
+ Number of field components per entity. Default is 1 for scalar, >1 for vector
scoping: Scoping, optional
- Scoping.
+ Scoping defining entity IDs and locations. If provided, overrides num_entities
Outputs
-------
field: Field
+ Generated field with specified data and properties
Examples
--------
@@ -57,10 +59,10 @@ class scalars_to_field(Operator):
>>> op.inputs.unit.connect(my_unit)
>>> my_location = str()
>>> op.inputs.location.connect(my_location)
- >>> my_num_entity = int()
- >>> op.inputs.num_entity.connect(my_num_entity)
- >>> my_num_comp = int()
- >>> op.inputs.num_comp.connect(my_num_comp)
+ >>> my_num_entities = int()
+ >>> op.inputs.num_entities.connect(my_num_entities)
+ >>> my_num_components = int()
+ >>> op.inputs.num_components.connect(my_num_components)
>>> my_scoping = dpf.Scoping()
>>> op.inputs.scoping.connect(my_scoping)
@@ -69,8 +71,8 @@ class scalars_to_field(Operator):
... double_or_vector_double=my_double_or_vector_double,
... unit=my_unit,
... location=my_location,
- ... num_entity=my_num_entity,
- ... num_comp=my_num_comp,
+ ... num_entities=my_num_entities,
+ ... num_components=my_num_components,
... scoping=my_scoping,
... )
@@ -83,11 +85,13 @@ def __init__(
double_or_vector_double=None,
unit=None,
location=None,
- num_entity=None,
- num_comp=None,
+ num_entities=None,
+ num_components=None,
scoping=None,
config=None,
server=None,
+ num_entity=None,
+ num_comp=None,
):
super().__init__(
name="fieldify",
@@ -104,16 +108,31 @@ def __init__(
self.inputs.unit.connect(unit)
if location is not None:
self.inputs.location.connect(location)
- if num_entity is not None:
- self.inputs.num_entity.connect(num_entity)
- if num_comp is not None:
- self.inputs.num_comp.connect(num_comp)
+ if num_entities is not None:
+ self.inputs.num_entities.connect(num_entities)
+ elif num_entity is not None:
+ warn(
+ DeprecationWarning(
+ f'Operator scalars_to_field: Input name "num_entity" is deprecated in favor of "num_entities".'
+ )
+ )
+ self.inputs.num_entities.connect(num_entity)
+ if num_components is not None:
+ self.inputs.num_components.connect(num_components)
+ elif num_comp is not None:
+ warn(
+ DeprecationWarning(
+ f'Operator scalars_to_field: Input name "num_comp" is deprecated in favor of "num_components".'
+ )
+ )
+ self.inputs.num_components.connect(num_comp)
if scoping is not None:
self.inputs.scoping.connect(scoping)
@staticmethod
def _spec() -> Specification:
- description = r"""Create scalar or vector Field.
+ description = r"""Creates a scalar or vector field from numeric data. Converts scalar
+values or vectors into a DPF field with specified properties.
"""
spec = Specification(
description=description,
@@ -122,37 +141,39 @@ def _spec() -> Specification:
name="double_or_vector_double",
type_names=["double", "vector"],
optional=True,
- document=r"""Data of the field, default is 0-field. Specify a double to have a field of same value or specify directly the data vector.""",
+ document=r"""Data of the field. Default is 0-field. Specify a double to create a field with uniform values, or a vector for explicit data per entity""",
),
1: PinSpecification(
name="unit",
type_names=["string"],
optional=True,
- document=r"""Unit symbol (m, Hz, kg, ...)""",
+ document=r"""Unit symbol (m, Hz, kg, ...). Default is dimensionless""",
),
2: PinSpecification(
name="location",
type_names=["string"],
optional=True,
- document=r"""Location of the field ex 'Nodal', 'ElementalNodal', 'Elemental'... Default is 'numeric'. """,
+ document=r"""Location of the field: 'Nodal', 'ElementalNodal', 'Elemental', etc. Default is 'numeric'""",
),
3: PinSpecification(
- name="num_entity",
+ name="num_entities",
type_names=["int32"],
optional=True,
- document=r"""Number of field entities. Default is 1 or the size of the scoping in input if specified.""",
+ document=r"""Number of field entities. Default is 1, or the size of the scoping if provided""",
+ aliases=["num_entity"],
),
4: PinSpecification(
- name="num_comp",
+ name="num_components",
type_names=["int32"],
optional=True,
- document=r"""Number of field components. Default is 1.""",
+ document=r"""Number of field components per entity. Default is 1 for scalar, >1 for vector""",
+ aliases=["num_comp"],
),
5: PinSpecification(
name="scoping",
type_names=["scoping"],
optional=True,
- document=r"""Scoping.""",
+ document=r"""Scoping defining entity IDs and locations. If provided, overrides num_entities""",
),
},
map_output_pin_spec={
@@ -160,7 +181,7 @@ def _spec() -> Specification:
name="field",
type_names=["field"],
optional=False,
- document=r"""""",
+ document=r"""Generated field with specified data and properties""",
),
},
)
@@ -224,10 +245,10 @@ class InputsScalarsToField(_Inputs):
>>> op.inputs.unit.connect(my_unit)
>>> my_location = str()
>>> op.inputs.location.connect(my_location)
- >>> my_num_entity = int()
- >>> op.inputs.num_entity.connect(my_num_entity)
- >>> my_num_comp = int()
- >>> op.inputs.num_comp.connect(my_num_comp)
+ >>> my_num_entities = int()
+ >>> op.inputs.num_entities.connect(my_num_entities)
+ >>> my_num_components = int()
+ >>> op.inputs.num_components.connect(my_num_components)
>>> my_scoping = dpf.Scoping()
>>> op.inputs.scoping.connect(my_scoping)
"""
@@ -244,14 +265,14 @@ def __init__(self, op: Operator):
scalars_to_field._spec().input_pin(2), 2, op, -1
)
self._inputs.append(self._location)
- self._num_entity: Input[int] = Input(
+ self._num_entities: Input[int] = Input(
scalars_to_field._spec().input_pin(3), 3, op, -1
)
- self._inputs.append(self._num_entity)
- self._num_comp: Input[int] = Input(
+ self._inputs.append(self._num_entities)
+ self._num_components: Input[int] = Input(
scalars_to_field._spec().input_pin(4), 4, op, -1
)
- self._inputs.append(self._num_comp)
+ self._inputs.append(self._num_components)
self._scoping: Input[Scoping] = Input(
scalars_to_field._spec().input_pin(5), 5, op, -1
)
@@ -261,7 +282,7 @@ def __init__(self, op: Operator):
def double_or_vector_double(self) -> Input[float]:
r"""Allows to connect double_or_vector_double input to the operator.
- Data of the field, default is 0-field. Specify a double to have a field of same value or specify directly the data vector.
+ Data of the field. Default is 0-field. Specify a double to create a field with uniform values, or a vector for explicit data per entity
Returns
-------
@@ -282,7 +303,7 @@ def double_or_vector_double(self) -> Input[float]:
def unit(self) -> Input[str]:
r"""Allows to connect unit input to the operator.
- Unit symbol (m, Hz, kg, ...)
+ Unit symbol (m, Hz, kg, ...). Default is dimensionless
Returns
-------
@@ -303,7 +324,7 @@ def unit(self) -> Input[str]:
def location(self) -> Input[str]:
r"""Allows to connect location input to the operator.
- Location of the field ex 'Nodal', 'ElementalNodal', 'Elemental'... Default is 'numeric'.
+ Location of the field: 'Nodal', 'ElementalNodal', 'Elemental', etc. Default is 'numeric'
Returns
-------
@@ -321,10 +342,10 @@ def location(self) -> Input[str]:
return self._location
@property
- def num_entity(self) -> Input[int]:
- r"""Allows to connect num_entity input to the operator.
+ def num_entities(self) -> Input[int]:
+ r"""Allows to connect num_entities input to the operator.
- Number of field entities. Default is 1 or the size of the scoping in input if specified.
+ Number of field entities. Default is 1, or the size of the scoping if provided
Returns
-------
@@ -335,17 +356,17 @@ def num_entity(self) -> Input[int]:
--------
>>> from ansys.dpf import core as dpf
>>> op = dpf.operators.utility.scalars_to_field()
- >>> op.inputs.num_entity.connect(my_num_entity)
+ >>> op.inputs.num_entities.connect(my_num_entities)
>>> # or
- >>> op.inputs.num_entity(my_num_entity)
+ >>> op.inputs.num_entities(my_num_entities)
"""
- return self._num_entity
+ return self._num_entities
@property
- def num_comp(self) -> Input[int]:
- r"""Allows to connect num_comp input to the operator.
+ def num_components(self) -> Input[int]:
+ r"""Allows to connect num_components input to the operator.
- Number of field components. Default is 1.
+ Number of field components per entity. Default is 1 for scalar, >1 for vector
Returns
-------
@@ -356,17 +377,17 @@ def num_comp(self) -> Input[int]:
--------
>>> from ansys.dpf import core as dpf
>>> op = dpf.operators.utility.scalars_to_field()
- >>> op.inputs.num_comp.connect(my_num_comp)
+ >>> op.inputs.num_components.connect(my_num_components)
>>> # or
- >>> op.inputs.num_comp(my_num_comp)
+ >>> op.inputs.num_components(my_num_components)
"""
- return self._num_comp
+ return self._num_components
@property
def scoping(self) -> Input[Scoping]:
r"""Allows to connect scoping input to the operator.
- Scoping.
+ Scoping defining entity IDs and locations. If provided, overrides num_entities
Returns
-------
@@ -383,6 +404,25 @@ def scoping(self) -> Input[Scoping]:
"""
return self._scoping
+ def __getattr__(self, name):
+ if name in ["num_entity"]:
+ warn(
+ DeprecationWarning(
+ f'Operator scalars_to_field: Input name "{name}" is deprecated in favor of "num_entities".'
+ )
+ )
+ return self.num_entities
+ if name in ["num_comp"]:
+ warn(
+ DeprecationWarning(
+ f'Operator scalars_to_field: Input name "{name}" is deprecated in favor of "num_components".'
+ )
+ )
+ return self.num_components
+ raise AttributeError(
+ f"'{self.__class__.__name__}' object has no attribute '{name}'."
+ )
+
class OutputsScalarsToField(_Outputs):
"""Intermediate class used to get outputs from
@@ -407,6 +447,8 @@ def __init__(self, op: Operator):
def field(self) -> Output[Field]:
r"""Allows to get field output of the operator
+ Generated field with specified data and properties
+
Returns
-------
output:
diff --git a/src/ansys/dpf/core/operators/utility/strain_from_voigt.py b/src/ansys/dpf/core/operators/utility/strain_from_voigt.py
index 4b105683fb6..2b695e57990 100644
--- a/src/ansys/dpf/core/operators/utility/strain_from_voigt.py
+++ b/src/ansys/dpf/core/operators/utility/strain_from_voigt.py
@@ -21,17 +21,19 @@
class strain_from_voigt(Operator):
- r"""Converts the strain field from Voigt notation into standard format.
+ r"""Converts strain field data from Voigt notation (6-component vector) to
+ standard symmetric matrix format (3x3 tensor).
Inputs
------
- field: Field or FieldsContainer
- field or fields container with only one field is expected
+ strain_field: Field or FieldsContainer
+ Field with strain data in Voigt notation, or fields container containing such a field
Outputs
-------
field: Field
+ Field with strain data converted to standard 3x3 symmetric matrix format
Examples
--------
@@ -41,19 +43,25 @@ class strain_from_voigt(Operator):
>>> op = dpf.operators.utility.strain_from_voigt()
>>> # Make input connections
- >>> my_field = dpf.Field()
- >>> op.inputs.field.connect(my_field)
+ >>> my_strain_field = dpf.Field()
+ >>> op.inputs.strain_field.connect(my_strain_field)
>>> # Instantiate operator and connect inputs in one line
>>> op = dpf.operators.utility.strain_from_voigt(
- ... field=my_field,
+ ... strain_field=my_strain_field,
... )
>>> # Get output data
>>> result_field = op.outputs.field()
"""
- def __init__(self, field=None, config=None, server=None):
+ def __init__(
+ self,
+ strain_field=None,
+ config=None,
+ server=None,
+ field=None,
+ ):
super().__init__(
name="strain_from_voigt",
config=config,
@@ -63,21 +71,30 @@ def __init__(self, field=None, config=None, server=None):
)
self._inputs = InputsStrainFromVoigt(self)
self._outputs = OutputsStrainFromVoigt(self)
- if field is not None:
- self.inputs.field.connect(field)
+ if strain_field is not None:
+ self.inputs.strain_field.connect(strain_field)
+ elif field is not None:
+ warn(
+ DeprecationWarning(
+ f'Operator strain_from_voigt: Input name "field" is deprecated in favor of "strain_field".'
+ )
+ )
+ self.inputs.strain_field.connect(field)
@staticmethod
def _spec() -> Specification:
- description = r"""Converts the strain field from Voigt notation into standard format.
+ description = r"""Converts strain field data from Voigt notation (6-component vector) to
+standard symmetric matrix format (3x3 tensor).
"""
spec = Specification(
description=description,
map_input_pin_spec={
0: PinSpecification(
- name="field",
+ name="strain_field",
type_names=["field", "fields_container"],
optional=False,
- document=r"""field or fields container with only one field is expected""",
+ document=r"""Field with strain data in Voigt notation, or fields container containing such a field""",
+ aliases=["field"],
),
},
map_output_pin_spec={
@@ -85,7 +102,7 @@ def _spec() -> Specification:
name="field",
type_names=["field"],
optional=False,
- document=r"""""",
+ document=r"""Field with strain data converted to standard 3x3 symmetric matrix format""",
),
},
)
@@ -143,22 +160,22 @@ class InputsStrainFromVoigt(_Inputs):
--------
>>> from ansys.dpf import core as dpf
>>> op = dpf.operators.utility.strain_from_voigt()
- >>> my_field = dpf.Field()
- >>> op.inputs.field.connect(my_field)
+ >>> my_strain_field = dpf.Field()
+ >>> op.inputs.strain_field.connect(my_strain_field)
"""
def __init__(self, op: Operator):
super().__init__(strain_from_voigt._spec().inputs, op)
- self._field: Input[Field | FieldsContainer] = Input(
+ self._strain_field: Input[Field | FieldsContainer] = Input(
strain_from_voigt._spec().input_pin(0), 0, op, -1
)
- self._inputs.append(self._field)
+ self._inputs.append(self._strain_field)
@property
- def field(self) -> Input[Field | FieldsContainer]:
- r"""Allows to connect field input to the operator.
+ def strain_field(self) -> Input[Field | FieldsContainer]:
+ r"""Allows to connect strain_field input to the operator.
- field or fields container with only one field is expected
+ Field with strain data in Voigt notation, or fields container containing such a field
Returns
-------
@@ -169,11 +186,23 @@ def field(self) -> Input[Field | FieldsContainer]:
--------
>>> from ansys.dpf import core as dpf
>>> op = dpf.operators.utility.strain_from_voigt()
- >>> op.inputs.field.connect(my_field)
+ >>> op.inputs.strain_field.connect(my_strain_field)
>>> # or
- >>> op.inputs.field(my_field)
+ >>> op.inputs.strain_field(my_strain_field)
"""
- return self._field
+ return self._strain_field
+
+ def __getattr__(self, name):
+ if name in ["field"]:
+ warn(
+ DeprecationWarning(
+ f'Operator strain_from_voigt: Input name "{name}" is deprecated in favor of "strain_field".'
+ )
+ )
+ return self.strain_field
+ raise AttributeError(
+ f"'{self.__class__.__name__}' object has no attribute '{name}'."
+ )
class OutputsStrainFromVoigt(_Outputs):
@@ -199,6 +228,8 @@ def __init__(self, op: Operator):
def field(self) -> Output[Field]:
r"""Allows to get field output of the operator
+ Field with strain data converted to standard 3x3 symmetric matrix format
+
Returns
-------
output:
diff --git a/src/ansys/dpf/core/operators/utility/strain_from_voigt_fc.py b/src/ansys/dpf/core/operators/utility/strain_from_voigt_fc.py
index a257a5445c5..1c7d726055d 100644
--- a/src/ansys/dpf/core/operators/utility/strain_from_voigt_fc.py
+++ b/src/ansys/dpf/core/operators/utility/strain_from_voigt_fc.py
@@ -20,17 +20,19 @@
class strain_from_voigt_fc(Operator):
- r"""Converts the strain field from Voigt notation into standard format.
+ r"""Converts strain field data from Voigt notation (6-component vector) to
+ standard symmetric matrix format (3x3 tensor).
Inputs
------
fields_container: FieldsContainer
- field or fields container with only one field is expected
+ Field with strain data in Voigt notation, or fields container containing such a field
Outputs
-------
fields_container: FieldsContainer
+ Field with strain data converted to standard 3x3 symmetric matrix format
Examples
--------
@@ -52,7 +54,13 @@ class strain_from_voigt_fc(Operator):
>>> result_fields_container = op.outputs.fields_container()
"""
- def __init__(self, fields_container=None, config=None, server=None):
+ def __init__(
+ self,
+ fields_container=None,
+ config=None,
+ server=None,
+ field=None,
+ ):
super().__init__(
name="strain_from_voigt_fc",
config=config,
@@ -64,10 +72,18 @@ def __init__(self, fields_container=None, config=None, server=None):
self._outputs = OutputsStrainFromVoigtFc(self)
if fields_container is not None:
self.inputs.fields_container.connect(fields_container)
+ elif field is not None:
+ warn(
+ DeprecationWarning(
+ f'Operator strain_from_voigt_fc: Input name "field" is deprecated in favor of "fields_container".'
+ )
+ )
+ self.inputs.fields_container.connect(field)
@staticmethod
def _spec() -> Specification:
- description = r"""Converts the strain field from Voigt notation into standard format.
+ description = r"""Converts strain field data from Voigt notation (6-component vector) to
+standard symmetric matrix format (3x3 tensor).
"""
spec = Specification(
description=description,
@@ -76,7 +92,8 @@ def _spec() -> Specification:
name="fields_container",
type_names=["fields_container"],
optional=False,
- document=r"""field or fields container with only one field is expected""",
+ document=r"""Field with strain data in Voigt notation, or fields container containing such a field""",
+ aliases=["field"],
),
},
map_output_pin_spec={
@@ -84,7 +101,7 @@ def _spec() -> Specification:
name="fields_container",
type_names=["fields_container"],
optional=False,
- document=r"""""",
+ document=r"""Field with strain data converted to standard 3x3 symmetric matrix format""",
),
},
)
@@ -157,7 +174,7 @@ def __init__(self, op: Operator):
def fields_container(self) -> Input[FieldsContainer]:
r"""Allows to connect fields_container input to the operator.
- field or fields container with only one field is expected
+ Field with strain data in Voigt notation, or fields container containing such a field
Returns
-------
@@ -174,6 +191,18 @@ def fields_container(self) -> Input[FieldsContainer]:
"""
return self._fields_container
+ def __getattr__(self, name):
+ if name in ["field"]:
+ warn(
+ DeprecationWarning(
+ f'Operator strain_from_voigt_fc: Input name "{name}" is deprecated in favor of "fields_container".'
+ )
+ )
+ return self.fields_container
+ raise AttributeError(
+ f"'{self.__class__.__name__}' object has no attribute '{name}'."
+ )
+
class OutputsStrainFromVoigtFc(_Outputs):
"""Intermediate class used to get outputs from
@@ -198,6 +227,8 @@ def __init__(self, op: Operator):
def fields_container(self) -> Output[FieldsContainer]:
r"""Allows to get fields_container output of the operator
+ Field with strain data converted to standard 3x3 symmetric matrix format
+
Returns
-------
output:
diff --git a/src/ansys/dpf/gatebin/Ans.Dpf.GrpcClient.dll b/src/ansys/dpf/gatebin/Ans.Dpf.GrpcClient.dll
index 455e700d7af..e881e576bac 100644
Binary files a/src/ansys/dpf/gatebin/Ans.Dpf.GrpcClient.dll and b/src/ansys/dpf/gatebin/Ans.Dpf.GrpcClient.dll differ
diff --git a/src/ansys/dpf/gatebin/DPFClientAPI.dll b/src/ansys/dpf/gatebin/DPFClientAPI.dll
index 03176ff7a0f..34ceca18b65 100644
Binary files a/src/ansys/dpf/gatebin/DPFClientAPI.dll and b/src/ansys/dpf/gatebin/DPFClientAPI.dll differ
diff --git a/src/ansys/dpf/gatebin/_version.py b/src/ansys/dpf/gatebin/_version.py
deleted file mode 100644
index 1cc3e5ccfe0..00000000000
--- a/src/ansys/dpf/gatebin/_version.py
+++ /dev/null
@@ -1,6 +0,0 @@
-"""Version for ansys-dpf-gatebin"""
-# major, minor, patch
-version_info = 0, 8, "0.dev0"
-
-# Nice string for the version
-__version__ = ".".join(map(str, version_info))
\ No newline at end of file
diff --git a/src/ansys/dpf/gatebin/libAns.Dpf.GrpcClient.so b/src/ansys/dpf/gatebin/libAns.Dpf.GrpcClient.so
index 4a3ccb4879c..faf201105dc 100644
Binary files a/src/ansys/dpf/gatebin/libAns.Dpf.GrpcClient.so and b/src/ansys/dpf/gatebin/libAns.Dpf.GrpcClient.so differ
|