Skip to content

Commit

Permalink
update generated code (#1799)
Browse files Browse the repository at this point in the history
Co-authored-by: rlagha <rlagha@users.noreply.github.com>
  • Loading branch information
pyansys-ci-bot and rlagha authored Oct 9, 2024
1 parent af54fd3 commit e8538dc
Show file tree
Hide file tree
Showing 58 changed files with 818 additions and 3,038 deletions.
8 changes: 4 additions & 4 deletions doc/source/_static/dpf_operators.html

Large diffs are not rendered by default.

48 changes: 47 additions & 1 deletion src/ansys/dpf/core/operators/math/correlation.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,9 @@ class correlation(Operator):
ponderation : Field or FieldsContainer
Field m, optional weighting for correlation
computation.
absoluteValue : bool
If true, correlation factor is
||amb||/(||ama||.||bmb||)
Examples
Expand All @@ -43,12 +46,15 @@ class correlation(Operator):
>>> op.inputs.fieldB.connect(my_fieldB)
>>> my_ponderation = dpf.Field()
>>> op.inputs.ponderation.connect(my_ponderation)
>>> my_absoluteValue = bool()
>>> op.inputs.absoluteValue.connect(my_absoluteValue)
>>> # Instantiate operator and connect inputs in one line
>>> op = dpf.operators.math.correlation(
... fieldA=my_fieldA,
... fieldB=my_fieldB,
... ponderation=my_ponderation,
... absoluteValue=my_absoluteValue,
... )
>>> # Get output data
Expand All @@ -57,7 +63,13 @@ class correlation(Operator):
"""

def __init__(
self, fieldA=None, fieldB=None, ponderation=None, config=None, server=None
self,
fieldA=None,
fieldB=None,
ponderation=None,
absoluteValue=None,
config=None,
server=None,
):
super().__init__(name="correlation", config=config, server=server)
self._inputs = InputsCorrelation(self)
Expand All @@ -68,6 +80,8 @@ def __init__(
self.inputs.fieldB.connect(fieldB)
if ponderation is not None:
self.inputs.ponderation.connect(ponderation)
if absoluteValue is not None:
self.inputs.absoluteValue.connect(absoluteValue)

@staticmethod
def _spec():
Expand Down Expand Up @@ -99,6 +113,13 @@ def _spec():
document="""Field m, optional weighting for correlation
computation.""",
),
3: PinSpecification(
name="absoluteValue",
type_names=["bool"],
optional=False,
document="""If true, correlation factor is
||amb||/(||ama||.||bmb||)""",
),
},
map_output_pin_spec={
0: PinSpecification(
Expand Down Expand Up @@ -170,6 +191,8 @@ class InputsCorrelation(_Inputs):
>>> op.inputs.fieldB.connect(my_fieldB)
>>> my_ponderation = dpf.Field()
>>> op.inputs.ponderation.connect(my_ponderation)
>>> my_absoluteValue = bool()
>>> op.inputs.absoluteValue.connect(my_absoluteValue)
"""

def __init__(self, op: Operator):
Expand All @@ -180,6 +203,8 @@ def __init__(self, op: Operator):
self._inputs.append(self._fieldB)
self._ponderation = Input(correlation._spec().input_pin(2), 2, op, -1)
self._inputs.append(self._ponderation)
self._absoluteValue = Input(correlation._spec().input_pin(3), 3, op, -1)
self._inputs.append(self._absoluteValue)

@property
def fieldA(self):
Expand Down Expand Up @@ -244,6 +269,27 @@ def ponderation(self):
"""
return self._ponderation

@property
def absoluteValue(self):
"""Allows to connect absoluteValue input to the operator.
If true, correlation factor is
||amb||/(||ama||.||bmb||)
Parameters
----------
my_absoluteValue : bool
Examples
--------
>>> from ansys.dpf import core as dpf
>>> op = dpf.operators.math.correlation()
>>> op.inputs.absoluteValue.connect(my_absoluteValue)
>>> # or
>>> op.inputs.absoluteValue(my_absoluteValue)
"""
return self._absoluteValue


class OutputsCorrelation(_Outputs):
"""Intermediate class used to get outputs from
Expand Down
54 changes: 27 additions & 27 deletions src/ansys/dpf/core/operators/mesh/from_scoping.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,24 +15,24 @@ class from_scoping(Operator):
"""Extracts a meshed region from another meshed region based on a
scoping. Regarding the property fields of the meshed region: the
'Elemental', 'Face', and 'Nodal' property fields are scoped to the
elements or nodes of the output mesh, the 'Global' property fields
are transferred from the input mesh to the output mesh without
changes, and the rest of the property fields are not present in
the output mesh.
elements, faces or nodes of the output mesh, the 'Global' property
fields are transferred from the input mesh to the output mesh
without changes, and the rest of the property fields are not
present in the output mesh.
Parameters
----------
scoping : Scoping
If nodal scoping, then the scoping is
If nodal/face scoping, then the scoping is
transposed respecting the inclusive
pin
inclusive : int, optional
If inclusive == 1 then all the elements/faces
adjacent to the nodes ids in input
are added, if inclusive == 0, only
the elements/faces which have all
their nodes in the scoping are
included
adjacent to the nodes/faces ids in
input are added, if inclusive == 0,
only the elements/faces which have
all their nodes/faces in the scoping
are included
nodes_only : bool, optional
Returns mesh with nodes only (without any
elements or property fields). default
Expand Down Expand Up @@ -95,19 +95,19 @@ def _spec():
description = """Extracts a meshed region from another meshed region based on a
scoping. Regarding the property fields of the meshed
region: the 'Elemental', 'Face', and 'Nodal' property
fields are scoped to the elements or nodes of the output
mesh, the 'Global' property fields are transferred from
the input mesh to the output mesh without changes, and the
rest of the property fields are not present in the output
mesh."""
fields are scoped to the elements, faces or nodes of the
output mesh, the 'Global' property fields are transferred
from the input mesh to the output mesh without changes,
and the rest of the property fields are not present in the
output mesh."""
spec = Specification(
description=description,
map_input_pin_spec={
1: PinSpecification(
name="scoping",
type_names=["scoping"],
optional=False,
document="""If nodal scoping, then the scoping is
document="""If nodal/face scoping, then the scoping is
transposed respecting the inclusive
pin""",
),
Expand All @@ -116,11 +116,11 @@ def _spec():
type_names=["int32"],
optional=True,
document="""If inclusive == 1 then all the elements/faces
adjacent to the nodes ids in input
are added, if inclusive == 0, only
the elements/faces which have all
their nodes in the scoping are
included""",
adjacent to the nodes/faces ids in
input are added, if inclusive == 0,
only the elements/faces which have
all their nodes/faces in the scoping
are included""",
),
3: PinSpecification(
name="nodes_only",
Expand Down Expand Up @@ -218,7 +218,7 @@ def __init__(self, op: Operator):
def scoping(self):
"""Allows to connect scoping input to the operator.
If nodal scoping, then the scoping is
If nodal/face scoping, then the scoping is
transposed respecting the inclusive
pin
Expand All @@ -241,11 +241,11 @@ def inclusive(self):
"""Allows to connect inclusive input to the operator.
If inclusive == 1 then all the elements/faces
adjacent to the nodes ids in input
are added, if inclusive == 0, only
the elements/faces which have all
their nodes in the scoping are
included
adjacent to the nodes/faces ids in
input are added, if inclusive == 0,
only the elements/faces which have
all their nodes/faces in the scoping
are included
Parameters
----------
Expand Down
30 changes: 15 additions & 15 deletions src/ansys/dpf/core/operators/mesh/from_scopings.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,11 @@ class from_scopings(Operator):
pin
inclusive : int, optional
If inclusive == 1 then all the elements/faces
adjacent to the nodes ids in input
are added, if inclusive == 0, only
the elements/faces which have all
their nodes in the scoping are
included
adjacent to the nodes/faces ids in
input are added, if inclusive == 0,
only the elements/faces which have
all their nodes/faces in the scoping
are included
nodes_only : bool, optional
Returns mesh with nodes only (without any
elements). default is false.
Expand Down Expand Up @@ -104,11 +104,11 @@ def _spec():
type_names=["int32"],
optional=True,
document="""If inclusive == 1 then all the elements/faces
adjacent to the nodes ids in input
are added, if inclusive == 0, only
the elements/faces which have all
their nodes in the scoping are
included""",
adjacent to the nodes/faces ids in
input are added, if inclusive == 0,
only the elements/faces which have
all their nodes/faces in the scoping
are included""",
),
3: PinSpecification(
name="nodes_only",
Expand Down Expand Up @@ -228,11 +228,11 @@ def inclusive(self):
"""Allows to connect inclusive input to the operator.
If inclusive == 1 then all the elements/faces
adjacent to the nodes ids in input
are added, if inclusive == 0, only
the elements/faces which have all
their nodes in the scoping are
included
adjacent to the nodes/faces ids in
input are added, if inclusive == 0,
only the elements/faces which have
all their nodes/faces in the scoping
are included
Parameters
----------
Expand Down
21 changes: 12 additions & 9 deletions src/ansys/dpf/core/operators/scoping/on_property.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,10 +33,11 @@ class on_property(Operator):
If element scoping is requested on a nodal
named selection, if inclusive == 1
then all the elements/faces adjacent
to the nodes ids in input are added,
if inclusive == 0, only the
to the nodes/faces ids in input are
added, if inclusive == 0, only the
elements/faces which have all their
nodes in the scoping are included
nodes/faces in the scoping are
included
Examples
Expand Down Expand Up @@ -150,10 +151,11 @@ def _spec():
document="""If element scoping is requested on a nodal
named selection, if inclusive == 1
then all the elements/faces adjacent
to the nodes ids in input are added,
if inclusive == 0, only the
to the nodes/faces ids in input are
added, if inclusive == 0, only the
elements/faces which have all their
nodes in the scoping are included""",
nodes/faces in the scoping are
included""",
),
},
map_output_pin_spec={
Expand Down Expand Up @@ -347,10 +349,11 @@ def inclusive(self):
If element scoping is requested on a nodal
named selection, if inclusive == 1
then all the elements/faces adjacent
to the nodes ids in input are added,
if inclusive == 0, only the
to the nodes/faces ids in input are
added, if inclusive == 0, only the
elements/faces which have all their
nodes in the scoping are included
nodes/faces in the scoping are
included
Parameters
----------
Expand Down
30 changes: 15 additions & 15 deletions src/ansys/dpf/core/operators/scoping/transpose.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,11 @@ class transpose(Operator):
meshed_region : MeshedRegion or MeshesContainer
inclusive : int, optional
If inclusive == 1 then all the elements/faces
adjacent to the nodes ids in input
are added, if inclusive == 0, only
the elements/faces which have all
their nodes in the scoping are
included
adjacent to the nodes/faces ids in
input are added, if inclusive == 0,
only the elements/faces which have
all their nodes/faces in the scoping
are included
requested_location : str, optional
Output scoping location for meshes with
nodes, faces and elements. by
Expand Down Expand Up @@ -114,11 +114,11 @@ def _spec():
type_names=["int32"],
optional=True,
document="""If inclusive == 1 then all the elements/faces
adjacent to the nodes ids in input
are added, if inclusive == 0, only
the elements/faces which have all
their nodes in the scoping are
included""",
adjacent to the nodes/faces ids in
input are added, if inclusive == 0,
only the elements/faces which have
all their nodes/faces in the scoping
are included""",
),
9: PinSpecification(
name="requested_location",
Expand Down Expand Up @@ -253,11 +253,11 @@ def inclusive(self):
"""Allows to connect inclusive input to the operator.
If inclusive == 1 then all the elements/faces
adjacent to the nodes ids in input
are added, if inclusive == 0, only
the elements/faces which have all
their nodes in the scoping are
included
adjacent to the nodes/faces ids in
input are added, if inclusive == 0,
only the elements/faces which have
all their nodes/faces in the scoping
are included
Parameters
----------
Expand Down
Binary file modified src/ansys/dpf/gatebin/Ans.Dpf.GrpcClient.dll
Binary file not shown.
Binary file modified src/ansys/dpf/gatebin/DPFClientAPI.dll
Binary file not shown.
Binary file modified src/ansys/dpf/gatebin/libAns.Dpf.GrpcClient.so
Binary file not shown.
Binary file modified src/ansys/dpf/gatebin/libDPFClientAPI.so
Binary file not shown.
18 changes: 4 additions & 14 deletions src/ansys/grpc/dpf/available_result_pb2.py

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit e8538dc

Please sign in to comment.