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

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
329 changes: 214 additions & 115 deletions doc/source/_static/dpf_operators.html

Large diffs are not rendered by default.

19 changes: 11 additions & 8 deletions src/ansys/dpf/core/operators/math/absolute_value_by_component.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
--------
Expand Down Expand Up @@ -68,8 +69,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,
Expand All @@ -83,15 +84,15 @@ def _spec() -> Specification:
"vector<double>",
],
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={
0: PinSpecification(
name="field",
type_names=["field"],
optional=False,
document=r"""""",
document=r"""Field with absolute values applied to each component""",
),
},
)
Expand Down Expand Up @@ -166,7 +167,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
-------
Expand Down Expand Up @@ -207,6 +208,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:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
--------
Expand Down Expand Up @@ -67,8 +68,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,
Expand All @@ -77,15 +78,15 @@ 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={
0: PinSpecification(
name="fields_container",
type_names=["fields_container"],
optional=False,
document=r"""""",
document=r"""Field with absolute values applied to each component""",
),
},
)
Expand Down Expand Up @@ -160,7 +161,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
-------
Expand Down Expand Up @@ -201,6 +202,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:
Expand Down
5 changes: 4 additions & 1 deletion src/ansys/dpf/core/operators/math/add.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ class add(Operator):
Outputs
-------
field: Field
Field containing the element-wise sum of the two input fields

Examples
--------
Expand Down Expand Up @@ -113,7 +114,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""",
),
},
)
Expand Down Expand Up @@ -252,6 +253,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:
Expand Down
5 changes: 4 additions & 1 deletion src/ansys/dpf/core/operators/math/add_fc.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ class add_fc(Operator):
Outputs
-------
fields_container: FieldsContainer
FieldsContainer with summed fields by label space

Examples
--------
Expand Down Expand Up @@ -109,7 +110,7 @@ def _spec() -> Specification:
name="fields_container",
type_names=["fields_container"],
optional=False,
document=r"""""",
document=r"""FieldsContainer with summed fields by label space""",
),
},
)
Expand Down Expand Up @@ -246,6 +247,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:
Expand Down
5 changes: 4 additions & 1 deletion src/ansys/dpf/core/operators/math/centroid.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ class centroid(Operator):
Outputs
-------
field: Field
Field with centroid calculation: fieldA*(1-factor) + fieldB*factor

Examples
--------
Expand Down Expand Up @@ -110,7 +111,7 @@ def _spec() -> Specification:
name="field",
type_names=["field"],
optional=False,
document=r"""""",
document=r"""Field with centroid calculation: fieldA*(1-factor) + fieldB*factor""",
),
},
)
Expand Down Expand Up @@ -274,6 +275,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:
Expand Down
25 changes: 20 additions & 5 deletions src/ansys/dpf/core/operators/math/centroid_fc.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
--------
Expand Down Expand Up @@ -103,33 +108,33 @@ 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={
0: PinSpecification(
name="fields_container",
type_names=["fields_container"],
optional=False,
document=r"""""",
document=r"""FieldsContainer with centroid calculation results at specified time/frequency""",
),
},
)
Expand Down Expand Up @@ -218,6 +223,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:
Expand All @@ -237,6 +244,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:
Expand All @@ -256,6 +265,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:
Expand All @@ -275,6 +286,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:
Expand Down Expand Up @@ -314,6 +327,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:
Expand Down
15 changes: 9 additions & 6 deletions src/ansys/dpf/core/operators/math/cos.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
--------
Expand Down Expand Up @@ -65,7 +66,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,
Expand All @@ -74,15 +75,15 @@ 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={
0: PinSpecification(
name="field",
type_names=["field"],
optional=False,
document=r"""""",
document=r"""Field with cosine values applied element-wise to input data""",
),
},
)
Expand Down Expand Up @@ -155,7 +156,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
-------
Expand Down Expand Up @@ -194,6 +195,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:
Expand Down
Loading
Loading