diff --git a/doc/source/_static/dpf_operators.html b/doc/source/_static/dpf_operators.html index 9a9ef465ec..ca4bfd92d4 100644 --- a/doc/source/_static/dpf_operators.html +++ b/doc/source/_static/dpf_operators.html @@ -5324,7 +5324,16 @@

Configurating operators

Configurations

Scripting

Changelog

math: multiply (complex fields)

Description

Computes multiplication between two field containers containing complex fields.

Version 0.0.0

Inputs

Outputs

Configurations

Scripting

Changelog

utility: merge result infos

Description

Assembles a set of result information into a unique one.

Version 0.0.0

Inputs

A vector of result info containers to merge or result infos from pin 0 to ...

-

Outputs

Configurations

Scripting

Changelog

result: global total mass (LSDyna)

Description

Read Global Total Mass (LSDyna) by calling the readers defined by the datasources.

+

Outputs

Configurations

Scripting

Changelog

result: nodal rotational acceleration Z

Description

Read/compute nodal rotational acceleration Z component of the vector (3rd component) by calling the readers defined by the datasources.

+
Version 0.0.0

Inputs

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.

+

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

+

FieldsContainer already allocated modified inplace

+

result file container allowed to be kept open to cache data

+

result file path container, used if no streams are set

+

if true the field is rotated to global coordinate system (default true)

+

prevents from reading the mesh in the result files

+

if 0 cyclic symmetry is ignored, if 1 cyclic sector is read, if 2 cyclic expansion is done, if 3 cyclic expansion is done and stages are merged (default is 1)

+

Outputs

Configurations

Scripting

Changelog

result: global total mass (LSDyna)

Description

Read Global Total Mass (LSDyna) by calling the readers defined by the datasources.

Version 0.0.0

Supported file types

Inputs

result file container allowed to be kept open to cache data

result file path container, used if no streams are set

(LSDyna) Unit System ID (int), semicolon-separated list of base unit strings (str) or UnitSystem instance

@@ -5528,18 +5537,7 @@

Configurating operators

Outputs

Configurations

Scripting

Changelog

math: * (component-wise field)

Description

Computes component-wise product between two fields of same dimensionality. If one field's scoping has an 'overall' location, then this field's values are applied on the other field entirely. When using a constant or 'work_by_index', you can use 'inplace' to reuse one of the fields.

Version 0.0.0

Inputs

field or fields container with only one field is expected

field or fields container with only one field is expected

-

Outputs

Configurations

Scripting

Changelog

result: stress max_shear

Description

Reads/computes element nodal component stresses, average it on nodes (by default) and computes its invariants. -This operation is independent of the coordinate system unless averaging across elements is requested, in which case a rotation to the global coordinate system is performed.

-
Version 1.0.0

Supported file types

Inputs

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.

-

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

-

FieldsContainer already allocated modified inplace

-

result file container allowed to be kept open to cache data

-

result file path container, used if no streams are set

-

This pin is removed for versions >25.2. An error is raised if connected.

-

prevents from reading the mesh in the result files

-

if 0 cyclic symmetry is ignored, if 1 cyclic sector is read, if 2 cyclic expansion is done, if 3 cyclic expansion is done and stages are merged (default is 1)

-

elemental nodal beam results are read if this pin is set to true (default is false)

-

Outputs

Configurations

Scripting

Changelog

logic: same meshes container?

Description

Checks if two meshes_container are identical.

+

Outputs

Configurations

Scripting

Changelog

logic: same meshes container?

Description

Checks if two meshes_container are identical.

Version 0.0.0

Inputs

Double positive small value. Smallest value which will be considered during the comparison step. All the abs(values) in the field less than this value are considered as null, (default value:1.0e-14).

Double relative tolerance. Maximum tolerance gap between two compared values. Values within relative tolerance are considered identical (v1-v2)/v2 < relativeTol (default is 0.001).

compare auxiliary data (i.e property fields, scopings...). Default value is 'false'.

@@ -5550,7 +5548,18 @@

Configurating operators

Outputs

Configurations

Scripting

Changelog

result: euler nodes

Description

Reads a field made of 3 coordinates and 3 Euler angles (6 dofs) by node from the result file.

Version 0.0.0

Supported file types

Inputs

if true, then the field will only contain the scoping if any rotation is not zero. (default is false).

if true, then the field has ncomp=6 with 3 coordinates and 3 Euler angles, else there is only the Euler angles (default is true).

-

Outputs

Configurations

Scripting

Changelog

result: beam TR shear stress (LSDyna)

Description

Read Beam TR Shear Stress (LSDyna) by calling the readers defined by the datasources.

+

Outputs

Configurations

Scripting

Changelog

result: stress max_shear

Description

Reads/computes element nodal component stresses, average it on nodes (by default) and computes its invariants. +This operation is independent of the coordinate system unless averaging across elements is requested, in which case a rotation to the global coordinate system is performed.

+
Version 1.0.0

Supported file types

Inputs

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.

+

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

+

FieldsContainer already allocated modified inplace

+

result file container allowed to be kept open to cache data

+

result file path container, used if no streams are set

+

This pin is removed for versions >25.2. An error is raised if connected.

+

prevents from reading the mesh in the result files

+

if 0 cyclic symmetry is ignored, if 1 cyclic sector is read, if 2 cyclic expansion is done, if 3 cyclic expansion is done and stages are merged (default is 1)

+

elemental nodal beam results are read if this pin is set to true (default is false)

+

Outputs

Configurations

Scripting

Changelog

result: beam TR shear stress (LSDyna)

Description

Read Beam TR Shear Stress (LSDyna) by calling the readers defined by the datasources.

Version 0.0.0

Supported file types

Inputs

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.

elements scoping required in output.

result file container allowed to be kept open to cache data

@@ -5704,17 +5713,7 @@

Configurating operators

If connected, this pin allows you to extract the result only on the selected shell layer(s). The available values are: 0: Top, 1: Bottom, 2: TopBottom, 3: Mid, 4: TopBottomMid.

Outputs

Configurations

Scripting

Changelog

math: ln (field)

Description

Computes element-wise ln(field[i]).

Version 0.0.0

Inputs

field or fields container with only one field is expected

-

Outputs

Configurations

Scripting

Changelog

mesh: mesh to pyvista

Description

Export a MeshedRegion in the pyVista format.

-
Version 0.0.0

Inputs

Node coordinates. If not set, the node coordinates of the mesh are employed.

-

Export a linear version of the mesh (quadratic surface elements do no include midside nodes). If not set, defaults to true.

-

mesh to export in pyVista format

-

True if the VTK version employed by pyVista is > VTK 9. Default true.

-

Export elements as polyhedrons (cell-face-node representation). Default false.

-

Outputs

Node coordinates double vector

-

Cell connectivity int vector

-

Cell types property int vector

-

If vtk_updated=false, offsets int vector

-

Configurations

Scripting

Changelog

invariant: scalar invariants (field)

Description

Computes the element-wise invariants of a tensor field.

+

Outputs

Configurations

Scripting

Changelog

invariant: scalar invariants (field)

Description

Computes the element-wise invariants of a tensor field.

Version 0.0.0

Inputs

Outputs

stress intensity field

stress equivalent intensity

max shear stress field

@@ -6187,16 +6186,7 @@

Configurating operators

if 0 cyclic symmetry is ignored, if 1 cyclic sector is read, if 2 cyclic expansion is done, if 3 cyclic expansion is done and stages are merged (default is 1)

Outputs

Configurations

Scripting

Changelog

logic: component selector (fields container)

Description

Creates a scalar fields container based on the selected component for each field.

Version 0.0.0

Inputs

one or several component index that will be extracted from the initial field.

-

Outputs

Configurations

Scripting

Changelog

logic: component selector (field)

Description

Creates a scalar/vector field based on the selected component.

-
Version 0.0.0

Inputs

One or several component index that will be extracted from the initial field.

-

Set a default value for components that do not exist.

-

Outputs

Configurations

Scripting

Changelog

scoping: on property

Description

Provides a scoping at a given location based on a given property name and a property number.

-
Version 0.0.0

Inputs

Nodal or Elemental location are expected

-

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"...

-

property_id or vector of property ids

-

If element scoping is requested on a nodal named selection, if inclusive == 1 then all the elements/faces 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

-

Outputs

Scoping

-

Configurations

Scripting

Changelog

result: stress intensity

Description

Reads/computes element nodal component stresses, average it on nodes (by default) and computes its invariants. +

Outputs

Configurations

Scripting

Changelog

result: stress intensity

Description

Reads/computes element nodal component stresses, average it on nodes (by default) and computes its invariants. This operation is independent of the coordinate system unless averaging across elements is requested, in which case a rotation to the global coordinate system is performed.

Version 1.0.0

Supported file types

Inputs

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.

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

@@ -6207,7 +6197,16 @@

Configurating operators

prevents from reading the mesh in the result files

if 0 cyclic symmetry is ignored, if 1 cyclic sector is read, if 2 cyclic expansion is done, if 3 cyclic expansion is done and stages are merged (default is 1)

elemental nodal beam results are read if this pin is set to true (default is false)

-

Outputs

Configurations

Scripting

Changelog

logic: component transformer (field)

Description

Takes the input field and creates a field with overriden value on given components.

+

Outputs

Configurations

Scripting

Changelog

scoping: on property

Description

Provides a scoping at a given location based on a given property name and a property number.

+
Version 0.0.0

Inputs

Nodal or Elemental location are expected

+

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"...

+

property_id or vector of property ids

+

If element scoping is requested on a nodal named selection, if inclusive == 1 then all the elements/faces 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

+

Outputs

Scoping

+

Configurations

Scripting

Changelog

logic: component selector (field)

Description

Creates a scalar/vector field based on the selected component.

+
Version 0.0.0

Inputs

One or several component index that will be extracted from the initial field.

+

Set a default value for components that do not exist.

+

Outputs

Configurations

Scripting

Changelog

logic: component transformer (field)

Description

Takes the input field and creates a field with overriden value on given components.

Version 0.0.0

Inputs

One or several component index that will be modified from the initial field.

Set a default value for components selected.

Outputs

Configurations

Scripting

Changelog

logic: component transformer (fields container)

Description

Takes the input field and creates a field with overriden value on given components.

@@ -6921,10 +6920,10 @@

Configurating operators

Outputs

Configurations

Scripting

Changelog

utility: assemble scalars to vector fc

Description

Takes three scalar fields container and assembles them as a 3D vector fields container.

Version 0.0.0

Inputs

Outputs

Configurations

Scripting

Changelog

utility: assemble scalars to matrix

Description

Take nine scalar fields and assemble them as a 3x3 matrix field. If the 'symmetrical' input is set to true, only six scalar fields are required (xx, yy, zz, xy, xz and yz).

Version 0.0.0

Inputs

Outputs

Configurations

Scripting

Changelog

mesh: from scopings

Description

Extracts multiple meshed region base on a scoping and saved in a MeshesContainer

-
Version 0.0.0

Inputs

if nodal scoping, then the scoping is transposed respecting the inclusive pin

+
Version 0.0.1

Inputs

if nodal scoping, then the scoping is transposed respecting the inclusive pin

if inclusive == 1 then all the elements/faces 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

returns mesh with nodes only (without any elements). Default is false.

-

Outputs

Configurations

Scripting

Changelog

math: make one on component

Description

Takes the input field's scoping and creates a field full of zeros, except for the indexes from pin 1 that will hold 1.0.

+

Outputs

Configurations

Scripting

Changelog

math: make one on component

Description

Takes the input field's scoping and creates a field full of zeros, except for the indexes from pin 1 that will hold 1.0.

Version 0.0.0

Inputs

Outputs

Configurations

Scripting

Changelog

utility: assemble scalars to matrix fc

Description

Take nine scalar fields container and assemble them as a 3x3 matrix fields. If the 'symmetrical' input is set to true, only six field containers are required (xx, yy, zz, xy, xz and yz).

Version 0.0.0

Inputs

Outputs

Configurations

Scripting

Changelog

result: interface contact area (LSDyna)

Description

Read Interface Contact Area (LSDyna) by calling the readers defined by the datasources.

Version 0.0.0

Supported file types

Inputs

result file container allowed to be kept open to cache data

@@ -6953,9 +6952,18 @@

Configurating operators

prevents from reading the mesh in the result files

if 0 cyclic symmetry is ignored, if 1 cyclic sector is read, if 2 cyclic expansion is done, if 3 cyclic expansion is done and stages are merged (default is 1)

elemental nodal beam results are read if this pin is set to true (default is false)

-

Outputs

Configurations

Scripting

Changelog

utility: default value

Description

Default return value from input pin 1 to output pin 0 if there is nothing on input pin 0.

-
Version 0.0.0

Inputs

Outputs

Configurations

Scripting

Changelog

averaging: elemental nodal to nodal elemental (fields container)

Description

Transforms Elemental Nodal fields to Nodal Elemental fields. The result is computed on a given node's scoping.

-
Version 0.0.0

Inputs

Outputs

Configurations

Scripting

Changelog

result: rms velocity

Description

Read RMS Velocity by calling the readers defined by the datasources.

+

Outputs

Configurations

Scripting

Changelog

averaging: elemental nodal to nodal elemental (fields container)

Description

Transforms Elemental Nodal fields to Nodal Elemental fields. The result is computed on a given node's scoping.

+
Version 0.0.0

Inputs

Outputs

Configurations

Scripting

Changelog

result: nodal rotational velocity Z

Description

Read/compute nodal rotational velocity Z component of the vector (3rd component) by calling the readers defined by the datasources.

+
Version 0.0.0

Inputs

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.

+

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

+

FieldsContainer already allocated modified inplace

+

result file container allowed to be kept open to cache data

+

result file path container, used if no streams are set

+

if true the field is rotated to global coordinate system (default true)

+

prevents from reading the mesh in the result files

+

if 0 cyclic symmetry is ignored, if 1 cyclic sector is read, if 2 cyclic expansion is done, if 3 cyclic expansion is done and stages are merged (default is 1)

+

Outputs

Configurations

Scripting

Changelog

utility: default value

Description

Default return value from input pin 1 to output pin 0 if there is nothing on input pin 0.

+
Version 0.0.0

Inputs

Outputs

Configurations

Scripting

Changelog

result: rms velocity

Description

Read RMS Velocity by calling the readers defined by the datasources.

Version 0.0.0

Supported file types

Inputs

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.

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

result file container allowed to be kept open to cache data

@@ -7793,7 +7801,7 @@

Configurating operators

if 0 cyclic symmetry is ignored, if 1 cyclic sector is read, if 2 cyclic expansion is done, if 3 cyclic expansion is done and stages are merged (default is 1)

elemental nodal beam results are read if this pin is set to true (default is false)

Outputs

Configurations

Scripting

Changelog

mesh: mesh provider

Description

Reads a mesh from result files.

-
Version 0.0.0

Supported file types

Inputs

Optional time/frequency set ID of the mesh, supported for adaptative meshes.

+
Version 0.0.0

Supported file types

Inputs

Optional time/frequency set ID of the mesh, supported for adaptative meshes.

result file container allowed to be kept open to cache data

result file path container, used if no streams are set

If 1, cyclic symmetry is ignored. If 2, cyclic expansion is done (default is 1).

@@ -7984,7 +7992,16 @@

Configurating operators

This field contains offset type of beams.

This field contains offset y of beams.

This field contains offset z of beams.

-

Configurations

Scripting

Changelog

result: gasket inelastic closure XZ

Description

Read/compute elemental gasket inelastic closure XZ shear component (02 component) by calling the readers defined by the datasources. Regarding the requested location and the input mesh scoping, the result location can be Nodal/ElementalNodal/Elemental.

+

Configurations

Scripting

Changelog

result: nodal rotational velocity X

Description

Read/compute nodal rotational velocity X component of the vector (1st component) by calling the readers defined by the datasources.

+
Version 0.0.0

Inputs

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.

+

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

+

FieldsContainer already allocated modified inplace

+

result file container allowed to be kept open to cache data

+

result file path container, used if no streams are set

+

if true the field is rotated to global coordinate system (default true)

+

prevents from reading the mesh in the result files

+

if 0 cyclic symmetry is ignored, if 1 cyclic sector is read, if 2 cyclic expansion is done, if 3 cyclic expansion is done and stages are merged (default is 1)

+

Outputs

Configurations

Scripting

Changelog

result: gasket inelastic closure XZ

Description

Read/compute elemental gasket inelastic closure XZ shear component (02 component) by calling the readers defined by the datasources. Regarding the requested location and the input mesh scoping, the result location can be Nodal/ElementalNodal/Elemental.

Version 0.0.0

Supported file types

Inputs

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.

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

FieldsContainer already allocated modified inplace

@@ -8515,7 +8532,12 @@

Configurating operators

prevents from reading the mesh in the result files

if 0 cyclic symmetry is ignored, if 1 cyclic sector is read, if 2 cyclic expansion is done, if 3 cyclic expansion is done and stages are merged (default is 1)

elemental nodal beam results are read if this pin is set to true (default is false)

-

Outputs

Configurations

Scripting

Changelog

result: turbulent dissipation rate (omega)

Description

Read Turbulent Specific Dissipation Rate (omega) by calling the readers defined by the datasources.

+

Outputs

Configurations

Scripting

Changelog

averaging: to elemental (fields container)

Description

Transforms Input fields into Elemental fields using an averaging process. The result is computed on a given element's scoping.

+
Version 0.0.0

Inputs

if it is set to true, Elemental Nodal fields are first averaged on nodes and then averaged on elements (default is false).

+

If true, the data across different shell layers is averaged as well (default is false).

+

For shell/solid mixed fields, group in the same field all solids and shells (false by default). If this pin is true and collapse_shell_layers is false, a shell_layer needs to be specified.

+

0: Top, 1: Bottom, 2: TopBottom, 3: Mid, 4: TopBottomMid. If merge_solid_shell is true, this pin needs to be specified to a value that extracts only one layer (Top, Bottom or Mid).

+

Outputs

Configurations

Scripting

Changelog

result: turbulent dissipation rate (omega)

Description

Read Turbulent Specific Dissipation Rate (omega) by calling the readers defined by the datasources.

Version 0.0.0

Supported file types

Inputs

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.

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

result file container allowed to be kept open to cache data

@@ -8523,12 +8545,7 @@

Configurating operators

prevents from reading the mesh in the result files

region id (integer) or vector of region ids (vector) or region scoping (scoping) of the model (region corresponds to zone for Fluid results or part for LSDyna results).

(for Fluid results only) LabelSpace with combination of zone, phases or species ids

-

Outputs

Configurations

Scripting

Changelog

averaging: to elemental (fields container)

Description

Transforms Input fields into Elemental fields using an averaging process. The result is computed on a given element's scoping.

-
Version 0.0.0

Inputs

if it is set to true, Elemental Nodal fields are first averaged on nodes and then averaged on elements (default is false).

-

If true, the data across different shell layers is averaged as well (default is false).

-

For shell/solid mixed fields, group in the same field all solids and shells (false by default). If this pin is true and collapse_shell_layers is false, a shell_layer needs to be specified.

-

0: Top, 1: Bottom, 2: TopBottom, 3: Mid, 4: TopBottomMid. If merge_solid_shell is true, this pin needs to be specified to a value that extracts only one layer (Top, Bottom or Mid).

-

Outputs

Configurations

Scripting

Changelog

result: plastic strain

Description

Read/compute element nodal component plastic strains by calling the readers defined by the datasources.

+

Outputs

Configurations

Scripting

Changelog

result: plastic strain

Description

Read/compute element nodal component plastic strains by calling the readers defined by the datasources.

  • The 'requested_location' and 'mesh_scoping' inputs are processed to see if they need scoping transposition or result averaging. The resulting output fields have a 'Nodal', 'ElementalNodal' or 'Elemental' location.
  • Once the need for averaging has been detected, the behavior of the combined connection of the 'split_shells' and 'shell_layer' pins is:
  • @@ -8669,12 +8686,7 @@

    Configurating operators

elemental nodal beam results are read if this pin is set to true (default is false)

If true, this pin forces the results to be split by element shape, indicated by the presence of the 'elshape' label in the output. If false, the results for all elements shapes are combined. Default value is false if averaging is not required and true if averaging is required.

If connected, this pin allows you to extract the result only on the selected shell layer(s). The available values are: 0: Top, 1: Bottom, 2: TopBottom, 3: Mid, 4: TopBottomMid.

-

Outputs

Configurations

Scripting

Changelog

scoping: transpose

Description

Transposes the input scoping or scopings container (Elemental/Faces --> Nodal, or Nodal ---> Elemental/Faces), based on the input mesh region.

-
Version 0.0.0

Inputs

Scoping or scopings container (the input type is the output type)

-

if inclusive == 1 then all the elements/faces 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

-

Output scoping location for meshes with nodes, faces and elements. By default, elemental and faces scopings transpose to nodal, and nodal scopings transpose to elemental.

-

Outputs

Scoping or scopings container (the input type is the output type)

-

Configurations

Scripting

Changelog

result: plastic strain X

Description

Read/compute element nodal component plastic strains XX normal component (00 component) by calling the readers defined by the datasources. Regarding the requested location and the input mesh scoping, the result location can be Nodal/ElementalNodal/Elemental.

+

Outputs

Configurations

Scripting

Changelog

result: plastic strain X

Description

Read/compute element nodal component plastic strains XX normal component (00 component) by calling the readers defined by the datasources. Regarding the requested location and the input mesh scoping, the result location can be Nodal/ElementalNodal/Elemental.

Version 0.0.0

Supported file types

Inputs

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.

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

FieldsContainer already allocated modified inplace

@@ -8904,7 +8916,15 @@

Configurating operators

elemental nodal beam results are read if this pin is set to true (default is false)

If true, this pin forces the results to be split by element shape, indicated by the presence of the 'elshape' label in the output. If false, the results for all elements shapes are combined. Default value is false if averaging is not required and true if averaging is required.

If connected, this pin allows you to extract the result only on the selected shell layer(s). The available values are: 0: Top, 1: Bottom, 2: TopBottom, 3: Mid, 4: TopBottomMid.

-

Outputs

Configurations

Scripting

Changelog

result: compute stress von mises

Description

Computes the stress from an elastic strain field. compute_total_strain limitations are applicable for stress computationGet the Von Mises equivalent stress.

+

Outputs

Configurations

Scripting

Changelog

result: nodal rotational acceleration

Description

Read/compute nodal rotational acceleration by calling the readers defined by the datasources.

+
Version 0.0.0

Supported file types

Inputs

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.

+

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 already allocated modified inplace

+

result file container allowed to be kept open to cache data

+

result file path container, used if no streams are set

+

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.

+

prevents from reading the mesh in the result files

+

Outputs

Configurations

Scripting

Changelog

result: compute stress von mises

Description

Computes the stress from an elastic strain field. compute_total_strain limitations are applicable for stress computationGet the Von Mises equivalent stress.

Version 0.0.0

Inputs

The element scoping on which the result is computed.

Needed to get mesh and material ids. Optional if a data_sources have been connected.

Needed to get mesh and material ids. Optional if a streams_container have been connected.

@@ -8993,7 +9013,17 @@

Configurating operators

global mass matrix multiplier

global stiffness matrix multiplier

Outputs

field of modal damping ratio.

-

Configurations

Scripting

Changelog

result: creep strain

Description

Read/compute element nodal component creep strains by calling the readers defined by the datasources.

+

Configurations

Scripting

Changelog

serialization: vtu export

Description

Export DPF data into vtu format.

+
Version 0.0.0

Inputs

directory path

+

vtu base file name, (default is file)

+

mesh

+

Nodal, Face, or Elemental field, fields container (over time), or property field to export. When there is no support available in the exported mesh, that data is ignored.

+

Available are rawbinarycompressed, rawbinary, base64appended, base64inline, ascii, default is (rawbinarycompressed)

+

Whether to export the mesh as a point cloud. Default is False.

+

Whether to also export faces as shell elements when the mesh contains cells. Default is False.

+

List of names of mesh properties to export.

+

Outputs

list of output vtu file path

+

Configurations

Scripting

Changelog

result: creep strain

Description

Read/compute element nodal component creep strains by calling the readers defined by the datasources.

  • The 'requested_location' and 'mesh_scoping' inputs are processed to see if they need scoping transposition or result averaging. The resulting output fields have a 'Nodal', 'ElementalNodal' or 'Elemental' location.
  • Once the need for averaging has been detected, the behavior of the combined connection of the 'split_shells' and 'shell_layer' pins is:
  • @@ -9134,17 +9164,7 @@

    Configurating operators

elemental nodal beam results are read if this pin is set to true (default is false)

If true, this pin forces the results to be split by element shape, indicated by the presence of the 'elshape' label in the output. If false, the results for all elements shapes are combined. Default value is false if averaging is not required and true if averaging is required.

If connected, this pin allows you to extract the result only on the selected shell layer(s). The available values are: 0: Top, 1: Bottom, 2: TopBottom, 3: Mid, 4: TopBottomMid.

-

Outputs

Configurations

Scripting

Changelog

serialization: vtu export

Description

Export DPF data into vtu format.

-
Version 0.0.0

Inputs

directory path

-

vtu base file name, (default is file)

-

mesh

-

Nodal, Face, or Elemental field, fields container (over time), or property field to export. When there is no support available in the exported mesh, that data is ignored.

-

Available are rawbinarycompressed, rawbinary, base64appended, base64inline, ascii, default is (rawbinarycompressed)

-

Whether to export the mesh as a point cloud. Default is False.

-

Whether to also export faces as shell elements when the mesh contains cells. Default is False.

-

List of names of mesh properties to export.

-

Outputs

list of output vtu file path

-

Configurations

Scripting

Changelog

result: creep strain Y

Description

Read/compute element nodal component creep strains YY normal component (11 component) by calling the readers defined by the datasources. Regarding the requested location and the input mesh scoping, the result location can be Nodal/ElementalNodal/Elemental.

+

Outputs

Configurations

Scripting

Changelog

result: creep strain Y

Description

Read/compute element nodal component creep strains YY normal component (11 component) by calling the readers defined by the datasources. Regarding the requested location and the input mesh scoping, the result location can be Nodal/ElementalNodal/Elemental.

Version 0.0.0

Supported file types

Inputs

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.

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

FieldsContainer already allocated modified inplace

@@ -9433,7 +9453,11 @@

Configurating operators

if this pin is set to 0, the classical ERP is computed, 1 the corrected ERP is computed (a mesh of one face has to be given in the pin 1) and 2 the enhanced ERP is computed. Default is 0.

if this pin is set to true, the ERP level in dB is computed

erp reference value. Default is 1E-12

-

Outputs

Configurations

Scripting

Changelog

result: thermal strain Z

Description

Read/compute element nodal component thermal strains ZZ normal component (22 component) by calling the readers defined by the datasources. Regarding the requested location and the input mesh scoping, the result location can be Nodal/ElementalNodal/Elemental.

+

Outputs

Configurations

Scripting

Changelog

compression: quantization fields container

Description

Applies scaling to precision to all the values from fields container input, then rounding to the unit.

+
Version 0.0.0

Inputs

Input fields container

+

Threshold (precision) desired.

+

Outputs

Scaled and rounded fields container

+

Configurations

Scripting

Changelog

result: thermal strain Z

Description

Read/compute element nodal component thermal strains ZZ normal component (22 component) by calling the readers defined by the datasources. Regarding the requested location and the input mesh scoping, the result location can be Nodal/ElementalNodal/Elemental.

Version 0.0.0

Supported file types

Inputs

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.

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

FieldsContainer already allocated modified inplace

@@ -10034,8 +10058,8 @@

Configurating operators

if 0 cyclic symmetry is ignored, if 1 cyclic sector is read, if 2 cyclic expansion is done, if 3 cyclic expansion is done and stages are merged (default is 1)

elemental nodal beam results are read if this pin is set to true (default is false)

Outputs

Configurations

Scripting

Changelog

mesh: split mesh wrt property

Description

Split the input mesh into several meshes based on a given property (material property be default)

-
Version 0.0.0

Inputs

Scoping

-

Outputs

Configurations

Scripting

Changelog

result: element orientations Z

Description

Read/compute element euler angles Z component of the vector (3rd component) by calling the readers defined by the datasources. Regarding the requested location and the input mesh scoping, the result location can be Nodal/ElementalNodal/Elemental.

+
Version 0.0.1

Inputs

Scoping

+

Outputs

Configurations

Scripting

Changelog

result: element orientations Z

Description

Read/compute element euler angles Z component of the vector (3rd component) by calling the readers defined by the datasources. Regarding the requested location and the input mesh scoping, the result location can be Nodal/ElementalNodal/Elemental.

Version 0.0.0

Inputs

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.

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

FieldsContainer already allocated modified inplace

@@ -10187,15 +10211,7 @@

Configurating operators

elemental nodal beam results are read if this pin is set to true (default is false)

If true, this pin forces the results to be split by element shape, indicated by the presence of the 'elshape' label in the output. If false, the results for all elements shapes are combined. Default value is false if averaging is not required and true if averaging is required.

If connected, this pin allows you to extract the result only on the selected shell layer(s). The available values are: 0: Top, 1: Bottom, 2: TopBottom, 3: Mid, 4: TopBottomMid.

-

Outputs

Configurations

Scripting

Changelog

result: cgns result provider

Description

Read/compute names result from result streams.

-
Version 0.0.0

Inputs

time/freq (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

-

nodes or elements scoping required in output. The scoping's location indicates whether nodes or elements are asked. Using scopings container enables to split the result fields container in domains

-

result file container allowed to be kept open to cache data

-

result file path container, used if no streams are set

-

name of the result to read. By default the name of the operator is taken.

-

Optional zone name/Id of the mesh.

-

Outputs

Results

-

Configurations

Scripting

Changelog

result: temperature gradient X

Description

Read/compute Temperature Gradient X component of the vector (1st component) by calling the readers defined by the datasources. Regarding the requested location and the input mesh scoping, the result location can be Nodal/ElementalNodal/Elemental.

+

Outputs

Configurations

Scripting

Changelog

result: temperature gradient X

Description

Read/compute Temperature Gradient X component of the vector (1st component) by calling the readers defined by the datasources. Regarding the requested location and the input mesh scoping, the result location can be Nodal/ElementalNodal/Elemental.

Version 0.0.0

Supported file types

Inputs

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.

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

FieldsContainer already allocated modified inplace

@@ -10629,7 +10645,101 @@

Configurating operators

requested location, default is Nodal

if 0 cyclic symmetry is ignored, if 1 cyclic sector is read, if 2 cyclic expansion is done, if 3 cyclic expansion is done and stages are merged (default is 1)

elemental nodal beam results are read if this pin is set to true (default is false)

-

Outputs

Configurations

Scripting

Changelog

result: element nodal forces

Description

Read/compute element nodal forces by calling the readers defined by the datasources.

+

Outputs

Configurations

Scripting

Changelog

logic: descending sort (fields container)

Description

Sort a field (in 0) in descending order, with an optional component priority table or a boolean to enable sort by scoping (in 1). This operator doesn't support multiple elementary data per entity.

+
Version 0.0.0

Inputs

field or fields container with only one field is expected

+

component priority table (vector of int)

+

if true, uses scoping to sort the field (default is false)

+

Outputs

Configurations

Scripting

Changelog

result: nodal rotations

Description

Read/compute nodal rotations by calling the readers defined by the datasources.

+
Version 0.0.0

Supported file types

Inputs

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.

+

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 already allocated modified inplace

+

result file container allowed to be kept open to cache data

+

result file path container, used if no streams are set

+

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.

+

prevents from reading the mesh in the result files

+

Outputs

Configurations

Scripting

Changelog

result: nodal rotations X

Description

Read/compute nodal rotations X component of the vector (1st component) by calling the readers defined by the datasources.

+
Version 0.0.0

Inputs

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.

+

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

+

FieldsContainer already allocated modified inplace

+

result file container allowed to be kept open to cache data

+

result file path container, used if no streams are set

+

if true the field is rotated to global coordinate system (default true)

+

prevents from reading the mesh in the result files

+

if 0 cyclic symmetry is ignored, if 1 cyclic sector is read, if 2 cyclic expansion is done, if 3 cyclic expansion is done and stages are merged (default is 1)

+

Outputs

Configurations

Scripting

Changelog

utility: custom type field get attribute

Description

Gets a property from an input field/field container. A CustomTypeFieldin pin 0, a property name (string) in pin 1 are expected as inputs

+
Version 0.0.0

Inputs

Property to get. Accepted inputs are specific strings namely: 'unit, 'name','time_freq_support', 'scoping' and 'header'.

+

Outputs

Property value that is returned. Accepted Outputs are: Field, PropertyField, CustomTypeField or their containers.

+

Configurations

Scripting

Changelog

utility: merge property fields

Description

Assembles a set of property fields into a unique one.

+
Version 0.0.0

Inputs

If true, merge the input property fields assuming that there is no repetition in their scoping ids. Default is false.

+

Either a property fields container, a vector of property fields to merge or property fields from pin 0 to ...

+

Outputs

Configurations

Scripting

Changelog

metadata: cyclic analysis?

Description

Reads if the model is cyclic from the result file.

+
Version 0.0.0

Supported file types

Inputs

streams (result file container) (optional)

+

If the stream is null, retrieves the file path from the data sources.

+

Outputs

returns 'single_stage' or 'multi_stage' or an empty string for non cyclic model

+

Configurations

Scripting

Changelog

result: nodal rotations Y

Description

Read/compute nodal rotations Y component of the vector (2nd component) by calling the readers defined by the datasources.

+
Version 0.0.0

Inputs

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.

+

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

+

FieldsContainer already allocated modified inplace

+

result file container allowed to be kept open to cache data

+

result file path container, used if no streams are set

+

if true the field is rotated to global coordinate system (default true)

+

prevents from reading the mesh in the result files

+

if 0 cyclic symmetry is ignored, if 1 cyclic sector is read, if 2 cyclic expansion is done, if 3 cyclic expansion is done and stages are merged (default is 1)

+

Outputs

Configurations

Scripting

Changelog

serialization: data tree to txt

Description

Writes a txt file or string from a DataTree

+
Version 0.0.0

Inputs

Outputs

Configurations

Scripting

Changelog

result: nodal rotations Z

Description

Read/compute nodal rotations Z component of the vector (3rd component) by calling the readers defined by the datasources.

+
Version 0.0.0

Inputs

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.

+

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

+

FieldsContainer already allocated modified inplace

+

result file container allowed to be kept open to cache data

+

result file path container, used if no streams are set

+

if true the field is rotated to global coordinate system (default true)

+

prevents from reading the mesh in the result files

+

if 0 cyclic symmetry is ignored, if 1 cyclic sector is read, if 2 cyclic expansion is done, if 3 cyclic expansion is done and stages are merged (default is 1)

+

Outputs

Configurations

Scripting

Changelog

mesh: meshes provider

Description

Reads meshes from result files. Meshes can be spatially or temporally varying.

+
Version 0.0.0

Supported file types

Inputs

Time/frequency set IDs required in output.

+

result file container allowed to be kept open to cache data

+

result file path container, used if no streams are set

+

if 1, cyclic symmetry is ignored. If 2, cyclic expansion is done (default is 1).

+

region id (integer) or vector of region ids (vector) or region scoping (scoping) of the model (region corresponds to zone for Fluid results or part for LSDyna results).

+

Outputs

Configurations

Scripting

Changelog

result: nodal rotational velocity

Description

Read/compute nodal rotational velocity by calling the readers defined by the datasources.

+
Version 0.0.0

Supported file types

Inputs

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.

+

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 already allocated modified inplace

+

result file container allowed to be kept open to cache data

+

result file path container, used if no streams are set

+

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.

+

prevents from reading the mesh in the result files

+

Outputs

Configurations

Scripting

Changelog

result: nodal rotational velocity Y

Description

Read/compute nodal rotational velocity Y component of the vector (2nd component) by calling the readers defined by the datasources.

+
Version 0.0.0

Inputs

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.

+

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

+

FieldsContainer already allocated modified inplace

+

result file container allowed to be kept open to cache data

+

result file path container, used if no streams are set

+

if true the field is rotated to global coordinate system (default true)

+

prevents from reading the mesh in the result files

+

if 0 cyclic symmetry is ignored, if 1 cyclic sector is read, if 2 cyclic expansion is done, if 3 cyclic expansion is done and stages are merged (default is 1)

+

Outputs

Configurations

Scripting

Changelog

averaging: to elemental nodal (fields container)

Description

Transforms fields into Elemental Nodal fields using an averaging process. The result is computed on a given element's scoping.

+
Version 0.0.0

Inputs

Outputs

Configurations

Scripting

Changelog

result: nodal rotational acceleration X

Description

Read/compute nodal rotational acceleration X component of the vector (1st component) by calling the readers defined by the datasources.

+
Version 0.0.0

Inputs

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.

+

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

+

FieldsContainer already allocated modified inplace

+

result file container allowed to be kept open to cache data

+

result file path container, used if no streams are set

+

if true the field is rotated to global coordinate system (default true)

+

prevents from reading the mesh in the result files

+

if 0 cyclic symmetry is ignored, if 1 cyclic sector is read, if 2 cyclic expansion is done, if 3 cyclic expansion is done and stages are merged (default is 1)

+

Outputs

Configurations

Scripting

Changelog

result: nodal rotational acceleration Y

Description

Read/compute nodal rotational acceleration Y component of the vector (2nd component) by calling the readers defined by the datasources.

+
Version 0.0.0

Inputs

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.

+

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

+

FieldsContainer already allocated modified inplace

+

result file container allowed to be kept open to cache data

+

result file path container, used if no streams are set

+

if true the field is rotated to global coordinate system (default true)

+

prevents from reading the mesh in the result files

+

if 0 cyclic symmetry is ignored, if 1 cyclic sector is read, if 2 cyclic expansion is done, if 3 cyclic expansion is done and stages are merged (default is 1)

+

Outputs

Configurations

Scripting

Changelog

metadata: boundary condition provider

Description

Reads boundary conditions from the results files contained in the streams or data sources.

+
Version 0.0.0

Supported file types

Inputs

Outputs

results info

+

Configurations

Scripting

Changelog

result: element nodal forces

Description

Read/compute element nodal forces by calling the readers defined by the datasources.

  • The 'requested_location' and 'mesh_scoping' inputs are processed to see if they need scoping transposition or result averaging. The resulting output fields have a 'Nodal', 'ElementalNodal' or 'Elemental' location.
  • Once the need for averaging has been detected, the behavior of the combined connection of the 'split_shells' and 'shell_layer' pins is:
  • @@ -11638,7 +11748,7 @@

    Configurating operators

    -
Version 0.0.0

Supported file types

Inputs

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.

+
Version 0.0.0

Supported file types

Inputs

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.

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 already allocated modified inplace

result file container allowed to be kept open to cache data

@@ -13918,38 +14028,15 @@

Configurating operators

Key to look for. Must be set for 'file_path' and 'domain_file_path' properties.

Result key to look for. Can be used for 'file_path', 'result_file_name', 'domain_file_path' and 'domain_result_file_name'.

Outputs

Property value.

-

Configurations

Scripting

Changelog

mesh: meshes provider

Description

Reads meshes from result files. Meshes can be spatially or temporally varying.

-
Version 0.0.0

Supported file types

Inputs

Time/frequency set IDs required in output.

-

result file container allowed to be kept open to cache data

-

result file path container, used if no streams are set

-

if 1, cyclic symmetry is ignored. If 2, cyclic expansion is done (default is 1).

-

region id (integer) or vector of region ids (vector) or region scoping (scoping) of the model (region corresponds to zone for Fluid results or part for LSDyna results).

-

Outputs

Configurations

Scripting

Changelog

metadata: mesh selection manager provider

Description

Reads mesh properties from the results files contained in the streams or data sources, and makes those properties available through a mesh selection manager in output.

+

Configurations

Scripting

Changelog

metadata: mesh selection manager provider

Description

Reads mesh properties from the results files contained in the streams or data sources, and makes those properties available through a mesh selection manager in output.

Version 0.0.0

Supported file types

Inputs

streams (result file container) (optional)

If the stream is null, retrieves the file path from the data sources.

Outputs

Configurations

Scripting

Changelog

utility: for each

Description

Allows to write a loop over a chunk of operators.

Version 0.0.0

Inputs

Either the result of the make_iterable_info operator, or the operator that must be incremented.

-

Outputs

Configurations

Scripting

Changelog

metadata: boundary condition provider

Description

Reads boundary conditions from the results files contained in the streams or data sources.

-
Version 0.0.0

Supported file types

Inputs

Outputs

results info

-

Configurations

Scripting

Changelog

utility: custom type field get attribute

Description

Gets a property from an input field/field container. A CustomTypeFieldin pin 0, a property name (string) in pin 1 are expected as inputs

-
Version 0.0.0

Inputs

Property to get. Accepted inputs are specific strings namely: 'unit, 'name','time_freq_support', 'scoping' and 'header'.

-

Outputs

Property value that is returned. Accepted Outputs are: Field, PropertyField, CustomTypeField or their containers.

-

Configurations

Scripting

Changelog

utility: merge property fields

Description

Assembles a set of property fields into a unique one.

-
Version 0.0.0

Inputs

If true, merge the input property fields assuming that there is no repetition in their scoping ids. Default is false.

-

Either a property fields container, a vector of property fields to merge or property fields from pin 0 to ...

-

Outputs

Configurations

Scripting

Changelog

metadata: cyclic analysis?

Description

Reads if the model is cyclic from the result file.

-
Version 0.0.0

Supported file types

Inputs

streams (result file container) (optional)

-

If the stream is null, retrieves the file path from the data sources.

-

Outputs

returns 'single_stage' or 'multi_stage' or an empty string for non cyclic model

-

Configurations

Scripting

Changelog

metadata: material support provider

Description

Reads the material support.

+

Outputs

Configurations

Scripting

Changelog

metadata: material support provider

Description

Reads the material support.

Version 0.0.0

Supported file types

Inputs

Streams result file container (optional).

if the stream is null, get the file path from the data sources.

-

Outputs

Configurations

Scripting

Changelog

scoping: reduce sampling scoping

Description

Take a scoping and remove half of it's content.

-
Version 0.0.0

Inputs

Set the number of time the scoping is reduced (default is 2). Must be integer value above 1.

-

Outputs

Configurations

Scripting

Changelog

scoping: on named selection

Description

provides a scoping at a given location based on a given named selection

-
Version 0.0.0

Inputs

the string is expected to be in upper case

-

If element scoping is requested on a nodal named selection, if Inclusive == 1 then add all the elements adjacent to the nodes.If Inclusive == 0, only the elements which have all their nodes in the named selection are included

-

Outputs

Configurations

Scripting

Changelog

math: accumulation per scoping

Description

This operator calculates the sum and the percentage of total sum of the input fields container for each scoping of the scopings container.

+

Outputs

Configurations

Scripting

Changelog

math: accumulation per scoping

Description

This operator calculates the sum and the percentage of total sum of the input fields container for each scoping of the scopings container.

Version 0.0.0

Inputs

Master scoping. All scopings in the Scopings Container will be intersected with this scoping.

The intersection between the of the first will be used.

Outputs

Configurations

Scripting

Changelog

metadata: real constants provider

Description

Reads real constants from the result files contained in the streams or data sources.

@@ -13987,15 +14074,7 @@

Configurating operators

if given input fields_container has a time_freq_support, output pins 2 and 3 fields_container contains time/freq indices of the minimum and maximum values.

Version 0.0.0

Inputs

Calculate the absolute value of field entities before computing the min/max.

Do calculate amplitude.

-

Outputs

Configurations

Scripting

Changelog

scoping: connectivity ids

Description

Returns the ordered node ids corresponding to the element ids scoping in input. For each element the node ids are its connectivity.

-
Version 0.0.0

Inputs

Elemental scoping

-

the support of the scoping is expected if there is no mesh in input

-

default is true

-

Outputs

same as the input scoping but with ids duplicated to have the same size as nodal output scoping

-

Configurations

Scripting

Changelog

min_max: max over time

Description

Evaluates maximum over time/frequency.

-
Version 0.0.0

Inputs

Should use absolute value.

-

Do calculate amplitude.

-

Outputs

Configurations

Scripting

Changelog

utility: split in for each range

Description

Split a scoping into several pieces so you can iterate it with a for_each loop.

+

Outputs

Configurations

Scripting

Changelog

utility: split in for each range

Description

Split a scoping into several pieces so you can iterate it with a for_each loop.

Version 0.0.0

Inputs

Iterable that can be combined with the one currently generated.

Operator that must be reconnected with the range values.

Outputs

Configurations

Scripting

Changelog

metadata: cyclic support provider

Description

Read the cyclic support (DPF entity containing necessary information for expansions) and expands the mesh.

@@ -14024,7 +14103,13 @@

Configurating operators

0: keep duplicate elements (default), 1: remove duplicate elements

Outputs

Configurations

Scripting

Changelog

result: add rigid body motion (fields container)

Description

Adds a given rigid translation, center and rotation from a displacement field. The rotation is given in terms of rotations angles. Note that the displacement field has to be in the global coordinate system

Version 0.0.0

Inputs

default is the mesh in the support

-

Outputs

Configurations

Scripting

Changelog

result: members in linear compression bending not certified

Description

This operator is a non-certified example of buckling resistance verification for the compression and bending members for Class I, 2 and 3 cross-sections. It is only provided as an example if you want to develop your own compute norm operator. This norm is linear summation of the utilization ratios of compression members and bending members. The results computed by this beta operator have not been certified by ANSYS. ANSYS declines all responsibility for the use of this operator.

+

Outputs

Configurations

Scripting

Changelog

geo: gauss to node (field)

Description

Extrapolating results available at Gauss or quadrature points to nodal points for one field. The available elements are: Linear quadrangle, parabolic quadrangle, linear hexagonal, quadratic hexagonal, linear tetrahedral, and quadratic tetrahedral

+
Version 0.0.0

Inputs

Scoping to integrate on, if not provided, the one from input field is provided.

+

Mesh to integrate on.

+

Outputs

Configurations

Scripting

Changelog

filter: band pass (timefreq)

Description

The band pass filter returns all the values above (but not equal to) the minimum threshold value and below (but not equal to) the maximum threshold value in input.

+
Version 0.0.0

Inputs

A minimum threshold scalar or a field containing one value is expected.

+

A maximum threshold scalar or a field containing one value is expected.

+

Outputs

Configurations

Scripting

Changelog

result: members in linear compression bending not certified

Description

This operator is a non-certified example of buckling resistance verification for the compression and bending members for Class I, 2 and 3 cross-sections. It is only provided as an example if you want to develop your own compute norm operator. This norm is linear summation of the utilization ratios of compression members and bending members. The results computed by this beta operator have not been certified by ANSYS. ANSYS declines all responsibility for the use of this operator.

Version 0.0.0

Inputs

This pin contains field of beam's Yield Strength defined by the user.

This pin contains file csv or field of beam's end condition defined by the user. If no input at this pin found, it would take end conditions value of all beams as 1

result file container allowed to be kept open to cache data.

@@ -14041,13 +14126,7 @@

Configurating operators

Configurations

Scripting

Changelog

invariant: convertnum nod to bcs

Description

Converts a fields container from NOD to BCS ordering.

Version 0.0.0

Inputs

fields_container

Data_sources (must contain the full file).

-

Outputs

Configurations

Scripting

Changelog

geo: gauss to node (field)

Description

Extrapolating results available at Gauss or quadrature points to nodal points for one field. The available elements are: Linear quadrangle, parabolic quadrangle, linear hexagonal, quadratic hexagonal, linear tetrahedral, and quadratic tetrahedral

-
Version 0.0.0

Inputs

Scoping to integrate on, if not provided, the one from input field is provided.

-

Mesh to integrate on.

-

Outputs

Configurations

Scripting

Changelog

filter: band pass (timefreq)

Description

The band pass filter returns all the values above (but not equal to) the minimum threshold value and below (but not equal to) the maximum threshold value in input.

-
Version 0.0.0

Inputs

A minimum threshold scalar or a field containing one value is expected.

-

A maximum threshold scalar or a field containing one value is expected.

-

Outputs

Configurations

Scripting

Changelog

serialization: deserializer

Description

Takes a file generated by the serializer and deserializes it into DPF's entities.

+

Outputs

Configurations

Scripting

Changelog

serialization: deserializer

Description

Takes a file generated by the serializer and deserializes it into DPF's entities.

Version 0.0.0

Inputs

0 for ASCII (default), and 1 for binary

file path

Outputs

number and types of outputs corresponding of the inputs used in the serialization

@@ -14082,7 +14161,12 @@

Configurating operators

1: error as a field or a field container depending on the entry's type.

2: factor used for residual normalization

3: factor used for error norm normalization

-

Configurations

Scripting

Changelog

min_max: incremental over fields container

Description

Compute the component-wise minimum (out 0) and maximum (out 1) over a fields container.

+

Configurations

Scripting

Changelog

scoping: reduce sampling scoping

Description

Take a scoping and remove half of it's content.

+
Version 0.0.0

Inputs

Set the number of time the scoping is reduced (default is 2). Must be integer value above 1.

+

Outputs

Configurations

Scripting

Changelog

scoping: on named selection

Description

provides a scoping at a given location based on a given named selection

+
Version 0.0.0

Inputs

the string is expected to be in upper case

+

If element scoping is requested on a nodal named selection, if Inclusive == 1 then add all the elements adjacent to the nodes.If Inclusive == 0, only the elements which have all their nodes in the named selection are included

+

Outputs

Configurations

Scripting

Changelog

min_max: incremental over fields container

Description

Compute the component-wise minimum (out 0) and maximum (out 1) over a fields container.

Version 0.0.0

Inputs

Outputs

Configurations

Scripting

Changelog

scoping: split on property type

Description

Splits a given scoping or the mesh scoping (nodal or elemental) on given properties (elshape and/or material, since 2025R1 it supports any scalar property field name contained in the mesh property fields) and returns a scopings container with those split scopings.

Version 0.0.0

Inputs

Scoping

mesh region

@@ -14090,7 +14174,20 @@

Configurating operators

set to 0: to have skin elements in their own group, 1: merge skin and solid elements, 2: merge skin and shell elements (default)

properties to apply the filtering 'mat' and/or 'elshape' (since 2025R1 it supports any property name contained in the mesh property fields) (default is 'elshape')

Outputs

Scoping

-

Configurations

Scripting

Changelog

utility: overlap fields

Description

Take two fields and superpose them, the overlapping field will override values of base_field.

+

Configurations

Scripting

Changelog

scoping: connectivity ids

Description

Returns the ordered node ids corresponding to the element ids scoping in input. For each element the node ids are its connectivity.

+
Version 0.0.0

Inputs

Elemental scoping

+

the support of the scoping is expected if there is no mesh in input

+

default is true

+

Outputs

same as the input scoping but with ids duplicated to have the same size as nodal output scoping

+

Configurations

Scripting

Changelog

min_max: max over time

Description

Evaluates maximum over time/frequency.

+
Version 0.0.0

Inputs

Should use absolute value.

+

Do calculate amplitude.

+

Outputs

Configurations

Scripting

Changelog

scoping: transpose

Description

Transposes the input scoping or scopings container (Elemental/Faces --> Nodal, or Nodal ---> Elemental/Faces), based on the input mesh region.

+
Version 0.0.0

Inputs

Scoping or scopings container (the input type is the output type)

+

if inclusive == 1 then all the elements/faces 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

+

Output scoping location for meshes with nodes, faces and elements. By default, elemental and faces scopings transpose to nodal, and nodal scopings transpose to elemental.

+

Outputs

Scoping or scopings container (the input type is the output type)

+

Configurations

Scripting

Changelog

utility: overlap fields

Description

Take two fields and superpose them, the overlapping field will override values of base_field.

Version 0.0.0

Inputs

Outputs

Configurations

Scripting

Changelog

mapping: find reduced coordinates

Description

Finds the elements corresponding to the given coordinates in input and computes their reduced coordinates in those elements.

Version 0.0.0

Inputs

If the first field in input has no mesh in support, then the mesh in this pin is expected (default is false). If a meshes container with several meshes is set, it should be on the same label spaces as the coordinates fields container.

If this pin is set to true, reduced coordinates are computed on the quadratic element if the element is quadratic (more precise but less performant). Default is false.

@@ -14101,7 +14198,8 @@

Configurating operators

Outputs

Configurations

Scripting

Changelog

averaging: elemental nodal to nodal elemental (field)

Description

Transforms an Elemental Nodal field to Nodal Elemental. The result is computed on a given node's scoping.

Version 0.0.0

Inputs

field or fields container with only one field is expected

Outputs

Configurations

Scripting

Changelog

scoping: adapt with scopings container

Description

Rescopes/splits a fields container to correspond to a scopings container.

-
Version 0.0.0

Inputs

Outputs

Configurations

Scripting

Changelog

scoping: nodes in mesh

Description

Retrieves the nodal scoping of a given input mesh, which contains the node IDs.

+
Version 0.0.0

Inputs

Default false.

+

Outputs

Configurations

Scripting

Changelog

scoping: nodes in mesh

Description

Retrieves the nodal scoping of a given input mesh, which contains the node IDs.

Version 0.0.0

Inputs

Outputs

Configurations

Scripting

Changelog

utility: merge any objects

Description

Merges a list of objects having the same data types. Once the data type is found, the merge operation is forwarded to the correct merge Operator.

Version 0.0.0

Inputs

Either a vector of objects (sharing the same data types) or objects from pin 0 to ... to merge. Supported types rely on existing type specific merge operators.

Outputs

Configurations

Scripting

Changelog

utility: merge time freq supports

Description

Assembles a set of time/frequency supports into a unique one.

@@ -14195,10 +14293,10 @@

Configurating operators

Iterable object, generated by make_for_each_range oeprator, that can be combined with the one currently generated.

Operator that must be reconnected with the range values.

Outputs

Configurations

Scripting

Changelog

utility: incremental field

Description

Incrementaly merge the input.

-
Version 0.0.0

Inputs

Outputs

Configurations

Scripting

Changelog

utility: incremental fields container

Description

Incrementaly merge the input.

-
Version 0.0.0

Inputs

Outputs

Configurations

Scripting

Changelog

geo: rotate (fields container)

Description

Apply a transformation (rotation) matrix on all the fields of a fields container.

+
Version 0.0.0

Inputs

Outputs

Configurations

Scripting

Changelog

geo: rotate (fields container)

Description

Apply a transformation (rotation) matrix on all the fields of a fields container.

Version 0.0.0

Inputs

3-3 rotation matrix

-

Outputs

Configurations

Scripting

Changelog

utility: incremental property field

Description

Incrementaly merge the input.

+

Outputs

Configurations

Scripting

Changelog

utility: incremental fields container

Description

Incrementaly merge the input.

+
Version 0.0.0

Inputs

Outputs

Configurations

Scripting

Changelog

utility: incremental property field

Description

Incrementaly merge the input.

Version 0.0.0

Inputs

Outputs

Configurations

Scripting

Changelog

mesh: points from coordinates

Description

Extract a mesh made of points elements. This mesh is made from input meshes coordinates on the input scopings.

Version 0.0.0

Inputs

Outputs

Configurations

Scripting

Changelog

utility: incremental mesh

Description

Incrementaly merge the input.

Version 0.0.0

Inputs

Outputs

Configurations

Scripting

Changelog

utility: incremental concantenate as fields container.

Description

Assemble fields in a fields container.

@@ -14339,8 +14437,7 @@

Configurating operators

Version 0.0.0

Inputs

field or fields container with only one field is expected

3-3 rotation matrix

Outputs

Configurations

Scripting

Changelog

serialization: data tree to json

Description

Writes a json file or string from a DataTree

-
Version 0.0.0

Inputs

Outputs

Configurations

Scripting

Changelog

serialization: data tree to txt

Description

Writes a txt file or string from a DataTree

-
Version 0.0.0

Inputs

Outputs

Configurations

Scripting

Changelog

averaging: nodal difference (fields container)

Description

Transforms Elemental Nodal fields into Nodal fields. Each nodal value is the maximum difference between the unaveraged computed result for all elements that share this particular node. The result is computed on a given node scoping. If the input fields are mixed shell/solid, then the fields are split by element shape and the output fields container has an elshape label.

+
Version 0.0.0

Inputs

Outputs

Configurations

Scripting

Changelog

averaging: nodal difference (fields container)

Description

Transforms Elemental Nodal fields into Nodal fields. Each nodal value is the maximum difference between the unaveraged computed result for all elements that share this particular node. The result is computed on a given node scoping. If the input fields are mixed shell/solid, then the fields are split by element shape and the output fields container has an elshape label.

Version 0.0.0

Inputs

The mesh region in this pin is used to perform the averaging. It is used if there is no fields support.

Average only on these nodes. If it is a scoping container, the label must correspond to the one of the fields containers.

Outputs

Configurations

Scripting

Changelog

serialization: json to data tree

Description

Reads a json file or string to a DataTree

@@ -14352,11 +14449,7 @@

Configurating operators

Version 0.0.0

Inputs

field or fields container with only one field is expected

component priority table (vector of int)

if true, uses scoping to sort the field (default is false)

-

Outputs

Configurations

Scripting

Changelog

logic: descending sort (fields container)

Description

Sort a field (in 0) in descending order, with an optional component priority table or a boolean to enable sort by scoping (in 1). This operator doesn't support multiple elementary data per entity.

-
Version 0.0.0

Inputs

field or fields container with only one field is expected

-

component priority table (vector of int)

-

if true, uses scoping to sort the field (default is false)

-

Outputs

Configurations

Scripting

Changelog

serialization: import symbolic workflow

Description

Reads a file or string holding a Symbolic Workflow and instantiate a WorkFlow with its data.

+

Outputs

Configurations

Scripting

Changelog

serialization: import symbolic workflow

Description

Reads a file or string holding a Symbolic Workflow and instantiate a WorkFlow with its data.

Version 0.0.0

Inputs

-1 is auto-detection, 0 is ASCII format, 1 is binary, 2 is json, default is -1 (auto-detection).

Outputs

Configurations

Scripting

Changelog

filter: filtering max over time workflow

Description

Creates a filtering workflow that will filter results based on a threshold of a selected invariant.

Version 0.0.0

Inputs

Name of the invariant operator to be used to calculate filter (available: eqv_fc, invariants_deriv_fc, invariants_fc).

@@ -14383,8 +14476,7 @@

Configurating operators

Number of desired outputs.

Outputs

Actual number of outputs.

Data sources outputs.

-

Configurations

Scripting

Changelog

averaging: to elemental nodal (fields container)

Description

Transforms fields into Elemental Nodal fields using an averaging process. The result is computed on a given element's scoping.

-
Version 0.0.0

Inputs

Outputs

Configurations

Scripting

Changelog

result: compute stress XY

Description

Computes the stress from an elastic strain field. compute_total_strain limitations are applicable for stress computation Get the XY shear component (01 component).

+

Configurations

Scripting

Changelog

result: compute stress XY

Description

Computes the stress from an elastic strain field. compute_total_strain limitations are applicable for stress computation Get the XY shear component (01 component).

Version 0.0.0

Inputs

The element scoping on which the result is computed.

Needed to get mesh and material ids. Optional if a data_sources have been connected.

Needed to get mesh and material ids. Optional if a streams_container have been connected.

@@ -14477,10 +14569,10 @@

Configurating operators

Version 0.0.0

Inputs

Outputs

first eigen value field

second eigen value field

third eigen value field

-

Configurations

Scripting

Changelog

invariant: von mises eqv (fields container)

Description

Computes the element-wise Von-Mises criteria on all the tensor fields of a fields container.

+

Configurations

Scripting

Changelog

invariant: segalman von mises eqv (fields container)

Description

Computes the element-wise Segalman Von-Mises criteria on all the tensor fields of a fields container.

+
Version 0.0.0

Inputs

Outputs

Configurations

Scripting

Changelog

invariant: von mises eqv (fields container)

Description

Computes the element-wise Von-Mises criteria on all the tensor fields of a fields container.

Version 0.0.0

Inputs

Poisson ratio to be used in equivalent strain calculation.

-

Outputs

Configurations

Scripting

Changelog

invariant: segalman von mises eqv (fields container)

Description

Computes the element-wise Segalman Von-Mises criteria on all the tensor fields of a fields container.

-
Version 0.0.0

Inputs

Outputs

Configurations

Scripting

Changelog

scoping: compute element centroids

Description

Computes the element centroids of the mesh. It also outputs the element measure.

+

Outputs

Configurations

Scripting

Changelog

scoping: compute element centroids

Description

Computes the element centroids of the mesh. It also outputs the element measure.

Version 0.0.0

Inputs

If provided, only the centroids of the elements in the scoping are computed.

Mesh to compute centroids

Outputs

element centroids.

@@ -14509,12 +14601,14 @@

Configurating operators

angle phi in degrees (default value 0.0)

Outputs

FieldsContainer filled in

Configurations

Scripting

Changelog

result: recombine cyclic harmonic indices

Description

Add the fields corresponding to different load steps with the same frequencies to compute the response.

-
Version 0.0.0

Inputs

Outputs

Configurations

Scripting

Changelog

mapping: on coordinates

Description

Evaluates a result on specified coordinates (interpolates results inside elements with shape functions).

-
Version 0.0.0

Inputs

if this pin is set to true, then, a support associated to the fields consisting of points is created

+
Version 0.1.0

Inputs

If the result is constant, it will only copy the first result found.

+

Outputs

Configurations

Scripting

Changelog

mapping: on coordinates

Description

Evaluates a result on specified coordinates (interpolates results inside elements with shape functions).

+
Version 0.1.0

Inputs

if this pin is set to true, then, a support associated to the fields consisting of points is created

if this pin is set to true, then the mapping between the coordinates and the fields is created only on the first field scoping

+

Tolerance used in the iterative algorithm to locate coordinates inside the mesh. Default value: 5e-5.

if the first field in input has no mesh in support, then the mesh in this pin is expected (default is false), if a meshes container with several meshes is set, it should be on the same label spaces as the coordinates fields container

If this pin is set to true, the element search for each coordinate is computed on the quadratic element if the element is quadratic (more precise but less performant). Default is false.

-

Outputs

Configurations

Scripting

Changelog

mapping: scoping on coordinates

Description

Finds the Elemental scoping of a set of coordinates.

+

Outputs

Configurations

Scripting

Changelog

mapping: scoping on coordinates

Description

Finds the Elemental scoping of a set of coordinates.

Version 0.0.0

Inputs

Outputs

Configurations

Scripting

Changelog

filter: abc weightings

Description

Computes ABC-weightings for the amplitude spectrum in dB units.

Version 0.0.0

Inputs

data to be weighted in dB units.

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.

@@ -14551,18 +14645,18 @@

Configurating operators

Version 0.0.0

Inputs

Outputs

Configurations

Scripting

Changelog

mesh: change cs (meshes)

Description

Applies a transformation (rotation and displacement) matrix on a mesh or meshes container.

Version 0.0.0

Inputs

3-3 rotation matrix + 3 translations (X, Y, Z)

Outputs

Configurations

Scripting

Changelog

geo: normals provider nl (nodes, faces, or elements)

Description

Computes the normals on nodes/faces/elements based on integration points (more accurate for non-linear elements) on a skin mesh.

-
Version 0.0.0

Inputs

Skin, face, or shell mesh region.

+
Version 0.0.1

Inputs

Skin, face, or shell mesh region.

Elemental, ElementalNodal, or Nodal scoping. Location derived from this.

If no scoping, specifies location. If scoping is Elemental or ElementalNodal this overrides scoping. Default is Elemental.

-

Outputs

Configurations

Scripting

Changelog

geo: elements volumes over time

Description

Calculates for a mesh, the volume of each element over time for each specified time step.

+

Outputs

Configurations

Scripting

Changelog

geo: elements volumes over time

Description

Calculates for a mesh, the volume of each element over time for each specified time step.

Version 0.0.0

Inputs

Displacement field's container. Must contain the mesh if mesh not specified in input.

Mesh must be defined if the displacement field's container does not contain it, or if there is no displacement.

Outputs

Configurations

Scripting

Changelog

math: window bartlett

Description

Apply bartlett windowing on a given FieldsContainer having time label or a Field located on time. Assume that time sampling is evenly spaced (use time_freq_interpolation before otherwise).

Version 0.0.0

Inputs

Outputs

Configurations

Scripting

Changelog

mesh: from scoping

Description

Extracts a meshed region from another meshed region based on a scoping. Regarding the property fields whose scoping location is 'Elemental', 'Faces', and 'Nodal', they are scoped to the elements, faces or nodes of the output mesh. The ones whose scoping location is 'Global' 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.

-
Version 0.0.0

Inputs

if nodal/face scoping, then the scoping is transposed respecting the inclusive pin

+
Version 0.1.0

Inputs

if nodal/face scoping, then the scoping is transposed respecting the inclusive pin

if inclusive == 1 then all the elements/faces 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

returns mesh with nodes only (without any elements or property fields). Default is false.

-

Outputs

Configurations

Scripting

Changelog

mesh: split field wrt mesh regions

Description

Split the input field or fields container based on the input mesh regions

+

Outputs

Configurations

Scripting

Changelog

mesh: split field wrt mesh regions

Description

Split the input field or fields container based on the input mesh regions

Version 0.0.0

Inputs

body meshes in the mesh controller cannot be mixed shell/solid

Outputs

Configurations

Scripting

Changelog

result: torque

Description

Compute torque of a force based on a 3D point.

Version 0.0.0

Inputs

fields_container

@@ -14925,16 +15019,7 @@

Configurating operators

Supported property names are: "mat", "named_selection", "named_selection_names", "apdl_element_type", "section", "elprops", "keyopt_1" to "keyopt_18".

Retrieves a property at a given index or by name. For example, a named selection's number or a named selection's name.

Outputs

Returns a property field for properties: "mat", "apdl_element_type", "section", "elprops", "keyopt_1" to "keyopt_18" (or any mesh's property field), a scoping for properties:"named_selection", a string field for properties: "named_selection_names".

-

Configurations

Scripting

Changelog

serialization: migrate to vtu

Description

Extract all results from a datasources and exports them into vtu format. All the connected inputs are forwarded to the result providers operators.

-
Version 0.0.0

Inputs

time sets to export, default is all

-

result file container allowed to be kept open to cache data

-

result file path container, used if no streams are set

-

directory path

-

vtu base file name, (default is file)

-

if Operator's names are connected to this Pin, only these results are exported (else all available results are exported)

-

Available are rawbinarycompressed, rawbinary, base64appended, base64inline, ascii, default is (rawbinarycompressed)

-

Outputs

list of output vtu file path

-

Configurations

Scripting

Changelog

result: compute total strain Y

Description

Computes the strain from a displacement field. +

Configurations

Scripting

Changelog

result: compute total strain Y

Description

Computes the strain from a displacement field. Only SOLID185 (B-Bar, Simplified Enhanced Strain, Enhanced Strain formulations), SOLID186 (Full Integration) & SOLID187 elements are supported. Layered elements are not supported. Thermal strains are not supported. @@ -15112,12 +15197,39 @@

Configurating operators

Average the Elemental Nodal result to the requested location.

Field/or fields container containing only the elastic strain field (element nodal).

Outputs

The computed result fields container (elemental nodal).

-

Configurations

Scripting

Changelog

mesh: decimate mesh

Description

Decimate a meshed region

+

Configurations

Scripting

Changelog

serialization: migrate to vtu

Description

Extract all results from a datasources and exports them into vtu format. All the connected inputs are forwarded to the result providers operators.

+
Version 0.0.0

Inputs

time sets to export, default is all

+

result file container allowed to be kept open to cache data

+

result file path container, used if no streams are set

+

directory path

+

vtu base file name, (default is file)

+

if Operator's names are connected to this Pin, only these results are exported (else all available results are exported)

+

Available are rawbinarycompressed, rawbinary, base64appended, base64inline, ascii, default is (rawbinarycompressed)

+

Outputs

list of output vtu file path

+

Configurations

Scripting

Changelog

mesh: mesh to pyvista

Description

Export a MeshedRegion in the pyVista format.

+
Version 0.0.0

Inputs

Node coordinates. If not set, the node coordinates of the mesh are employed.

+

Export a linear version of the mesh (quadratic surface elements do no include midside nodes). If not set, defaults to true.

+

mesh to export in pyVista format

+

True if the VTK version employed by pyVista is > VTK 9. Default true.

+

Export elements as polyhedrons (cell-face-node representation). Default false.

+

Outputs

Node coordinates double vector

+

Cell connectivity int vector

+

Cell types property int vector

+

If vtk_updated=false, offsets int vector

+

Configurations

Scripting

Changelog

mesh: decimate mesh

Description

Decimate a meshed region

Version 0.0.0

Inputs

Mesh to decimate

Target ratio of elements to preserve, the actual number of elements preserved might differ. Default value is 0.5.

Quality measure for the resulting decimated mesh. Lower aggresiveness will provide a higher quality mesh with the tradeoff of higher execution time. Value range is 0 to 150, default is 0.

Outputs

Decimated mesh with triangle elements

-

Configurations

Scripting

Changelog

result: von mises stresses as mechanical workflow

Description

Generates a workflow that computes the equivalent (Von Mises) stresses and averages it to the nodes (by default). For multibody simulations, averaging across bodies can either be activated or deactivated.

+

Configurations

Scripting

Changelog

result: cgns result provider

Description

Read/compute names result from result streams.

+
Version 0.0.0

Inputs

time/freq (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

+

nodes or elements scoping required in output. The scoping's location indicates whether nodes or elements are asked. Using scopings container enables to split the result fields container in domains

+

result file container allowed to be kept open to cache data

+

result file path container, used if no streams are set

+

name of the result to read. By default the name of the operator is taken.

+

Optional zone name/Id of the mesh.

+

Outputs

Results

+

Configurations

Scripting

Changelog

result: von mises stresses as mechanical workflow

Description

Generates a workflow that computes the equivalent (Von Mises) stresses and averages it to the nodes (by default). For multibody simulations, averaging across bodies can either be activated or deactivated.

Version 0.0.0

Inputs

time/freq (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.

nodes or elements scoping required in output.

result file container allowed to be kept open to cache data.

@@ -15137,7 +15249,11 @@

Configurating operators

Poisson ratio to be used in equivalent strain calculation.

if true, cyclic expansion is done. If false, it's ignored.

for multibody simulations, the stresses are averaged across bodies if true or not if false (default).

-

Outputs

Configurations

Scripting

Changelog

compression: apply svd

Description

Computes the coefficients (=U*Sigma) and VT components from SVD.

+

Outputs

Configurations

Scripting

Changelog

compression: quantization field

Description

Applies scaling to precision to all the values from field input, then rounding to the unit.

+
Version 0.0.0

Inputs

Input field

+

Threshold (precision) desired.

+

Outputs

Scaled and rounded field

+

Configurations

Scripting

Changelog

compression: apply svd

Description

Computes the coefficients (=U*Sigma) and VT components from SVD.

Version 0.0.0

Inputs

fields container to be compressed

number of vectors (r) to keep for the future reconstraction of the matrix A, ex. A[m,n]=coef[m,r]VT[r,n], where coef=USigma

threshold (precision) as a double, default value is 1e-7. If both pin1 and pin2 are provided, choose the min r-vectors

diff --git a/src/ansys/dpf/core/operators/compression/__init__.py b/src/ansys/dpf/core/operators/compression/__init__.py index d666415b18..311125f858 100644 --- a/src/ansys/dpf/core/operators/compression/__init__.py +++ b/src/ansys/dpf/core/operators/compression/__init__.py @@ -1,4 +1,6 @@ from .apply_svd import apply_svd from .apply_zfp import apply_zfp from .kmeans_clustering import kmeans_clustering +from .quantization import quantization +from .quantization_fc import quantization_fc from .zfp_decompress import zfp_decompress diff --git a/src/ansys/dpf/core/operators/compression/quantization.py b/src/ansys/dpf/core/operators/compression/quantization.py new file mode 100644 index 0000000000..8a696aa452 --- /dev/null +++ b/src/ansys/dpf/core/operators/compression/quantization.py @@ -0,0 +1,242 @@ +""" +quantization + +Autogenerated DPF operator classes. +""" + +from __future__ import annotations + +from warnings import warn +from ansys.dpf.core.dpf_operator import Operator +from ansys.dpf.core.inputs import Input, _Inputs +from ansys.dpf.core.outputs import Output, _Outputs +from ansys.dpf.core.operators.specification import PinSpecification, Specification +from ansys.dpf.core.config import Config +from ansys.dpf.core.server_types import AnyServerType + + +class quantization(Operator): + r"""Applies scaling to precision to all the values from field input, then + rounding to the unit. + + + Parameters + ---------- + input_field: Field + Input field + threshold: float + Threshold (precision) desired. + + Returns + ------- + output_field: Field + Scaled and rounded field + + Examples + -------- + >>> from ansys.dpf import core as dpf + + >>> # Instantiate operator + >>> op = dpf.operators.compression.quantization() + + >>> # Make input connections + >>> my_input_field = dpf.Field() + >>> op.inputs.input_field.connect(my_input_field) + >>> my_threshold = float() + >>> op.inputs.threshold.connect(my_threshold) + + >>> # Instantiate operator and connect inputs in one line + >>> op = dpf.operators.compression.quantization( + ... input_field=my_input_field, + ... threshold=my_threshold, + ... ) + + >>> # Get output data + >>> result_output_field = op.outputs.output_field() + """ + + def __init__(self, input_field=None, threshold=None, config=None, server=None): + super().__init__(name="quantization", config=config, server=server) + self._inputs = InputsQuantization(self) + self._outputs = OutputsQuantization(self) + if input_field is not None: + self.inputs.input_field.connect(input_field) + if threshold is not None: + self.inputs.threshold.connect(threshold) + + @staticmethod + def _spec() -> Specification: + description = r"""Applies scaling to precision to all the values from field input, then +rounding to the unit. +""" + spec = Specification( + description=description, + map_input_pin_spec={ + 0: PinSpecification( + name="input_field", + type_names=["field"], + optional=False, + document=r"""Input field""", + ), + 1: PinSpecification( + name="threshold", + type_names=["double"], + optional=False, + document=r"""Threshold (precision) desired.""", + ), + }, + map_output_pin_spec={ + 0: PinSpecification( + name="output_field", + type_names=["field"], + optional=False, + document=r"""Scaled and rounded field""", + ), + }, + ) + 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="quantization", server=server) + + @property + def inputs(self) -> InputsQuantization: + """Enables to connect inputs to the operator + + Returns + -------- + inputs: + An instance of InputsQuantization. + """ + return super().inputs + + @property + def outputs(self) -> OutputsQuantization: + """Enables to get outputs of the operator by evaluating it + + Returns + -------- + outputs: + An instance of OutputsQuantization. + """ + return super().outputs + + +class InputsQuantization(_Inputs): + """Intermediate class used to connect user inputs to + quantization operator. + + Examples + -------- + >>> from ansys.dpf import core as dpf + >>> op = dpf.operators.compression.quantization() + >>> my_input_field = dpf.Field() + >>> op.inputs.input_field.connect(my_input_field) + >>> my_threshold = float() + >>> op.inputs.threshold.connect(my_threshold) + """ + + def __init__(self, op: Operator): + super().__init__(quantization._spec().inputs, op) + self._input_field = Input(quantization._spec().input_pin(0), 0, op, -1) + self._inputs.append(self._input_field) + self._threshold = Input(quantization._spec().input_pin(1), 1, op, -1) + self._inputs.append(self._threshold) + + @property + def input_field(self) -> Input: + r"""Allows to connect input_field input to the operator. + + Input field + + Returns + ------- + input: + An Input instance for this pin. + + Examples + -------- + >>> from ansys.dpf import core as dpf + >>> op = dpf.operators.compression.quantization() + >>> op.inputs.input_field.connect(my_input_field) + >>> # or + >>> op.inputs.input_field(my_input_field) + """ + return self._input_field + + @property + def threshold(self) -> Input: + r"""Allows to connect threshold input to the operator. + + Threshold (precision) desired. + + Returns + ------- + input: + An Input instance for this pin. + + Examples + -------- + >>> from ansys.dpf import core as dpf + >>> op = dpf.operators.compression.quantization() + >>> op.inputs.threshold.connect(my_threshold) + >>> # or + >>> op.inputs.threshold(my_threshold) + """ + return self._threshold + + +class OutputsQuantization(_Outputs): + """Intermediate class used to get outputs from + quantization operator. + + Examples + -------- + >>> from ansys.dpf import core as dpf + >>> op = dpf.operators.compression.quantization() + >>> # Connect inputs : op.inputs. ... + >>> result_output_field = op.outputs.output_field() + """ + + def __init__(self, op: Operator): + super().__init__(quantization._spec().outputs, op) + self._output_field = Output(quantization._spec().output_pin(0), 0, op) + self._outputs.append(self._output_field) + + @property + def output_field(self) -> Output: + r"""Allows to get output_field output of the operator + + Scaled and rounded field + + Returns + ------- + output: + An Output instance for this pin. + + Examples + -------- + >>> from ansys.dpf import core as dpf + >>> op = dpf.operators.compression.quantization() + >>> # Get the output from op.outputs. ... + >>> result_output_field = op.outputs.output_field() + """ + return self._output_field diff --git a/src/ansys/dpf/core/operators/compression/quantization_fc.py b/src/ansys/dpf/core/operators/compression/quantization_fc.py new file mode 100644 index 0000000000..8416485d39 --- /dev/null +++ b/src/ansys/dpf/core/operators/compression/quantization_fc.py @@ -0,0 +1,242 @@ +""" +quantization_fc + +Autogenerated DPF operator classes. +""" + +from __future__ import annotations + +from warnings import warn +from ansys.dpf.core.dpf_operator import Operator +from ansys.dpf.core.inputs import Input, _Inputs +from ansys.dpf.core.outputs import Output, _Outputs +from ansys.dpf.core.operators.specification import PinSpecification, Specification +from ansys.dpf.core.config import Config +from ansys.dpf.core.server_types import AnyServerType + + +class quantization_fc(Operator): + r"""Applies scaling to precision to all the values from fields container + input, then rounding to the unit. + + + Parameters + ---------- + input_fc: FieldsContainer + Input fields container + threshold: float or Field or FieldsContainer + Threshold (precision) desired. + + Returns + ------- + output_fc: FieldsContainer + Scaled and rounded fields container + + Examples + -------- + >>> from ansys.dpf import core as dpf + + >>> # Instantiate operator + >>> op = dpf.operators.compression.quantization_fc() + + >>> # Make input connections + >>> my_input_fc = dpf.FieldsContainer() + >>> op.inputs.input_fc.connect(my_input_fc) + >>> my_threshold = float() + >>> op.inputs.threshold.connect(my_threshold) + + >>> # Instantiate operator and connect inputs in one line + >>> op = dpf.operators.compression.quantization_fc( + ... input_fc=my_input_fc, + ... threshold=my_threshold, + ... ) + + >>> # Get output data + >>> result_output_fc = op.outputs.output_fc() + """ + + def __init__(self, input_fc=None, threshold=None, config=None, server=None): + super().__init__(name="quantization_fc", config=config, server=server) + self._inputs = InputsQuantizationFc(self) + self._outputs = OutputsQuantizationFc(self) + if input_fc is not None: + self.inputs.input_fc.connect(input_fc) + if threshold is not None: + self.inputs.threshold.connect(threshold) + + @staticmethod + def _spec() -> Specification: + description = r"""Applies scaling to precision to all the values from fields container +input, then rounding to the unit. +""" + spec = Specification( + description=description, + map_input_pin_spec={ + 0: PinSpecification( + name="input_fc", + type_names=["fields_container"], + optional=False, + document=r"""Input fields container""", + ), + 1: PinSpecification( + name="threshold", + type_names=["double", "field", "fields_container"], + optional=False, + document=r"""Threshold (precision) desired.""", + ), + }, + map_output_pin_spec={ + 0: PinSpecification( + name="output_fc", + type_names=["fields_container"], + optional=False, + document=r"""Scaled and rounded fields container""", + ), + }, + ) + 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="quantization_fc", server=server) + + @property + def inputs(self) -> InputsQuantizationFc: + """Enables to connect inputs to the operator + + Returns + -------- + inputs: + An instance of InputsQuantizationFc. + """ + return super().inputs + + @property + def outputs(self) -> OutputsQuantizationFc: + """Enables to get outputs of the operator by evaluating it + + Returns + -------- + outputs: + An instance of OutputsQuantizationFc. + """ + return super().outputs + + +class InputsQuantizationFc(_Inputs): + """Intermediate class used to connect user inputs to + quantization_fc operator. + + Examples + -------- + >>> from ansys.dpf import core as dpf + >>> op = dpf.operators.compression.quantization_fc() + >>> my_input_fc = dpf.FieldsContainer() + >>> op.inputs.input_fc.connect(my_input_fc) + >>> my_threshold = float() + >>> op.inputs.threshold.connect(my_threshold) + """ + + def __init__(self, op: Operator): + super().__init__(quantization_fc._spec().inputs, op) + self._input_fc = Input(quantization_fc._spec().input_pin(0), 0, op, -1) + self._inputs.append(self._input_fc) + self._threshold = Input(quantization_fc._spec().input_pin(1), 1, op, -1) + self._inputs.append(self._threshold) + + @property + def input_fc(self) -> Input: + r"""Allows to connect input_fc input to the operator. + + Input fields container + + Returns + ------- + input: + An Input instance for this pin. + + Examples + -------- + >>> from ansys.dpf import core as dpf + >>> op = dpf.operators.compression.quantization_fc() + >>> op.inputs.input_fc.connect(my_input_fc) + >>> # or + >>> op.inputs.input_fc(my_input_fc) + """ + return self._input_fc + + @property + def threshold(self) -> Input: + r"""Allows to connect threshold input to the operator. + + Threshold (precision) desired. + + Returns + ------- + input: + An Input instance for this pin. + + Examples + -------- + >>> from ansys.dpf import core as dpf + >>> op = dpf.operators.compression.quantization_fc() + >>> op.inputs.threshold.connect(my_threshold) + >>> # or + >>> op.inputs.threshold(my_threshold) + """ + return self._threshold + + +class OutputsQuantizationFc(_Outputs): + """Intermediate class used to get outputs from + quantization_fc operator. + + Examples + -------- + >>> from ansys.dpf import core as dpf + >>> op = dpf.operators.compression.quantization_fc() + >>> # Connect inputs : op.inputs. ... + >>> result_output_fc = op.outputs.output_fc() + """ + + def __init__(self, op: Operator): + super().__init__(quantization_fc._spec().outputs, op) + self._output_fc = Output(quantization_fc._spec().output_pin(0), 0, op) + self._outputs.append(self._output_fc) + + @property + def output_fc(self) -> Output: + r"""Allows to get output_fc output of the operator + + Scaled and rounded fields container + + Returns + ------- + output: + An Output instance for this pin. + + Examples + -------- + >>> from ansys.dpf import core as dpf + >>> op = dpf.operators.compression.quantization_fc() + >>> # Get the output from op.outputs. ... + >>> result_output_fc = op.outputs.output_fc() + """ + return self._output_fc diff --git a/src/ansys/dpf/core/operators/mapping/on_coordinates.py b/src/ansys/dpf/core/operators/mapping/on_coordinates.py index 295469b539..9e1d8eaf9a 100644 --- a/src/ansys/dpf/core/operators/mapping/on_coordinates.py +++ b/src/ansys/dpf/core/operators/mapping/on_coordinates.py @@ -28,6 +28,8 @@ class on_coordinates(Operator): if this pin is set to true, then, a support associated to the fields consisting of points is created mapping_on_scoping: bool, optional if this pin is set to true, then the mapping between the coordinates and the fields is created only on the first field scoping + tolerance: float, optional + Tolerance used in the iterative algorithm to locate coordinates inside the mesh. Default value: 5e-5. mesh: MeshedRegion or MeshesContainer, optional if the first field in input has no mesh in support, then the mesh in this pin is expected (default is false), if a meshes container with several meshes is set, it should be on the same label spaces as the coordinates fields container use_quadratic_elements: bool, optional @@ -53,6 +55,8 @@ class on_coordinates(Operator): >>> op.inputs.create_support.connect(my_create_support) >>> my_mapping_on_scoping = bool() >>> op.inputs.mapping_on_scoping.connect(my_mapping_on_scoping) + >>> my_tolerance = float() + >>> op.inputs.tolerance.connect(my_tolerance) >>> my_mesh = dpf.MeshedRegion() >>> op.inputs.mesh.connect(my_mesh) >>> my_use_quadratic_elements = bool() @@ -64,6 +68,7 @@ class on_coordinates(Operator): ... coordinates=my_coordinates, ... create_support=my_create_support, ... mapping_on_scoping=my_mapping_on_scoping, + ... tolerance=my_tolerance, ... mesh=my_mesh, ... use_quadratic_elements=my_use_quadratic_elements, ... ) @@ -78,6 +83,7 @@ def __init__( coordinates=None, create_support=None, mapping_on_scoping=None, + tolerance=None, mesh=None, use_quadratic_elements=None, config=None, @@ -94,6 +100,8 @@ def __init__( self.inputs.create_support.connect(create_support) if mapping_on_scoping is not None: self.inputs.mapping_on_scoping.connect(mapping_on_scoping) + if tolerance is not None: + self.inputs.tolerance.connect(tolerance) if mesh is not None: self.inputs.mesh.connect(mesh) if use_quadratic_elements is not None: @@ -136,6 +144,12 @@ def _spec() -> Specification: optional=True, document=r"""if this pin is set to true, then the mapping between the coordinates and the fields is created only on the first field scoping""", ), + 5: PinSpecification( + name="tolerance", + type_names=["double"], + optional=True, + document=r"""Tolerance used in the iterative algorithm to locate coordinates inside the mesh. Default value: 5e-5.""", + ), 7: PinSpecification( name="mesh", type_names=["abstract_meshed_region", "meshes_container"], @@ -220,6 +234,8 @@ class InputsOnCoordinates(_Inputs): >>> op.inputs.create_support.connect(my_create_support) >>> my_mapping_on_scoping = bool() >>> op.inputs.mapping_on_scoping.connect(my_mapping_on_scoping) + >>> my_tolerance = float() + >>> op.inputs.tolerance.connect(my_tolerance) >>> my_mesh = dpf.MeshedRegion() >>> op.inputs.mesh.connect(my_mesh) >>> my_use_quadratic_elements = bool() @@ -236,6 +252,8 @@ def __init__(self, op: Operator): self._inputs.append(self._create_support) self._mapping_on_scoping = Input(on_coordinates._spec().input_pin(3), 3, op, -1) self._inputs.append(self._mapping_on_scoping) + self._tolerance = Input(on_coordinates._spec().input_pin(5), 5, op, -1) + self._inputs.append(self._tolerance) self._mesh = Input(on_coordinates._spec().input_pin(7), 7, op, -1) self._inputs.append(self._mesh) self._use_quadratic_elements = Input( @@ -323,6 +341,27 @@ def mapping_on_scoping(self) -> Input: """ return self._mapping_on_scoping + @property + def tolerance(self) -> Input: + r"""Allows to connect tolerance input to the operator. + + Tolerance used in the iterative algorithm to locate coordinates inside the mesh. Default value: 5e-5. + + Returns + ------- + input: + An Input instance for this pin. + + Examples + -------- + >>> from ansys.dpf import core as dpf + >>> op = dpf.operators.mapping.on_coordinates() + >>> op.inputs.tolerance.connect(my_tolerance) + >>> # or + >>> op.inputs.tolerance(my_tolerance) + """ + return self._tolerance + @property def mesh(self) -> Input: r"""Allows to connect mesh input to the operator. diff --git a/src/ansys/dpf/core/operators/result/__init__.py b/src/ansys/dpf/core/operators/result/__init__.py index 92d81acb06..f6bcf1423e 100644 --- a/src/ansys/dpf/core/operators/result/__init__.py +++ b/src/ansys/dpf/core/operators/result/__init__.py @@ -218,6 +218,18 @@ from .nmisc import nmisc from .nodal_force import nodal_force from .nodal_moment import nodal_moment +from .nodal_rotational_acceleration import nodal_rotational_acceleration +from .nodal_rotational_acceleration_X import nodal_rotational_acceleration_X +from .nodal_rotational_acceleration_Y import nodal_rotational_acceleration_Y +from .nodal_rotational_acceleration_Z import nodal_rotational_acceleration_Z +from .nodal_rotational_velocity import nodal_rotational_velocity +from .nodal_rotational_velocity_X import nodal_rotational_velocity_X +from .nodal_rotational_velocity_Y import nodal_rotational_velocity_Y +from .nodal_rotational_velocity_Z import nodal_rotational_velocity_Z +from .nodal_rotations import nodal_rotations +from .nodal_rotations_X import nodal_rotations_X +from .nodal_rotations_Y import nodal_rotations_Y +from .nodal_rotations_Z import nodal_rotations_Z from .nodal_to_global import nodal_to_global from .normal_contact_force import normal_contact_force from .normal_contact_moment import normal_contact_moment diff --git a/src/ansys/dpf/core/operators/result/nodal_rotational_acceleration.py b/src/ansys/dpf/core/operators/result/nodal_rotational_acceleration.py new file mode 100644 index 0000000000..344ba7de7c --- /dev/null +++ b/src/ansys/dpf/core/operators/result/nodal_rotational_acceleration.py @@ -0,0 +1,463 @@ +""" +nodal_rotational_acceleration + +Autogenerated DPF operator classes. +""" + +from __future__ import annotations + +from warnings import warn +from ansys.dpf.core.dpf_operator import Operator +from ansys.dpf.core.inputs import Input, _Inputs +from ansys.dpf.core.outputs import Output, _Outputs +from ansys.dpf.core.operators.specification import PinSpecification, Specification +from ansys.dpf.core.config import Config +from ansys.dpf.core.server_types import AnyServerType + + +class nodal_rotational_acceleration(Operator): + r"""Read/compute nodal rotational acceleration by calling the readers + defined by the datasources. + + + Parameters + ---------- + 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 + + Returns + ------- + fields_container: FieldsContainer + + Examples + -------- + >>> from ansys.dpf import core as dpf + + >>> # Instantiate operator + >>> op = dpf.operators.result.nodal_rotational_acceleration() + + >>> # 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.nodal_rotational_acceleration( + ... 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="DMG", config=config, server=server) + self._inputs = InputsNodalRotationalAcceleration(self) + self._outputs = OutputsNodalRotationalAcceleration(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 nodal rotational acceleration 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="DMG", server=server) + + @property + def inputs(self) -> InputsNodalRotationalAcceleration: + """Enables to connect inputs to the operator + + Returns + -------- + inputs: + An instance of InputsNodalRotationalAcceleration. + """ + return super().inputs + + @property + def outputs(self) -> OutputsNodalRotationalAcceleration: + """Enables to get outputs of the operator by evaluating it + + Returns + -------- + outputs: + An instance of OutputsNodalRotationalAcceleration. + """ + return super().outputs + + +class InputsNodalRotationalAcceleration(_Inputs): + """Intermediate class used to connect user inputs to + nodal_rotational_acceleration operator. + + Examples + -------- + >>> from ansys.dpf import core as dpf + >>> op = dpf.operators.result.nodal_rotational_acceleration() + >>> 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__(nodal_rotational_acceleration._spec().inputs, op) + self._time_scoping = Input( + nodal_rotational_acceleration._spec().input_pin(0), 0, op, -1 + ) + self._inputs.append(self._time_scoping) + self._mesh_scoping = Input( + nodal_rotational_acceleration._spec().input_pin(1), 1, op, -1 + ) + self._inputs.append(self._mesh_scoping) + self._fields_container = Input( + nodal_rotational_acceleration._spec().input_pin(2), 2, op, -1 + ) + self._inputs.append(self._fields_container) + self._streams_container = Input( + nodal_rotational_acceleration._spec().input_pin(3), 3, op, -1 + ) + self._inputs.append(self._streams_container) + self._data_sources = Input( + nodal_rotational_acceleration._spec().input_pin(4), 4, op, -1 + ) + self._inputs.append(self._data_sources) + self._bool_rotate_to_global = Input( + nodal_rotational_acceleration._spec().input_pin(5), 5, op, -1 + ) + self._inputs.append(self._bool_rotate_to_global) + self._mesh = Input( + nodal_rotational_acceleration._spec().input_pin(7), 7, op, -1 + ) + self._inputs.append(self._mesh) + + @property + def time_scoping(self) -> Input: + 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.nodal_rotational_acceleration() + >>> 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: + 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.nodal_rotational_acceleration() + >>> 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: + 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.nodal_rotational_acceleration() + >>> op.inputs.fields_container.connect(my_fields_container) + >>> # or + >>> op.inputs.fields_container(my_fields_container) + """ + return self._fields_container + + @property + def streams_container(self) -> Input: + r"""Allows to connect streams_container input to the operator. + + 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.nodal_rotational_acceleration() + >>> op.inputs.streams_container.connect(my_streams_container) + >>> # or + >>> op.inputs.streams_container(my_streams_container) + """ + return self._streams_container + + @property + def data_sources(self) -> Input: + r"""Allows to connect data_sources input to the operator. + + 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.nodal_rotational_acceleration() + >>> 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: + 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.nodal_rotational_acceleration() + >>> 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: + 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.nodal_rotational_acceleration() + >>> op.inputs.mesh.connect(my_mesh) + >>> # or + >>> op.inputs.mesh(my_mesh) + """ + return self._mesh + + +class OutputsNodalRotationalAcceleration(_Outputs): + """Intermediate class used to get outputs from + nodal_rotational_acceleration operator. + + Examples + -------- + >>> from ansys.dpf import core as dpf + >>> op = dpf.operators.result.nodal_rotational_acceleration() + >>> # Connect inputs : op.inputs. ... + >>> result_fields_container = op.outputs.fields_container() + """ + + def __init__(self, op: Operator): + super().__init__(nodal_rotational_acceleration._spec().outputs, op) + self._fields_container = Output( + nodal_rotational_acceleration._spec().output_pin(0), 0, op + ) + self._outputs.append(self._fields_container) + + @property + def fields_container(self) -> Output: + r"""Allows to get fields_container output of the operator + + Returns + ------- + output: + An Output instance for this pin. + + Examples + -------- + >>> from ansys.dpf import core as dpf + >>> op = dpf.operators.result.nodal_rotational_acceleration() + >>> # 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/nodal_rotational_acceleration_X.py b/src/ansys/dpf/core/operators/result/nodal_rotational_acceleration_X.py new file mode 100644 index 0000000000..19902c751d --- /dev/null +++ b/src/ansys/dpf/core/operators/result/nodal_rotational_acceleration_X.py @@ -0,0 +1,504 @@ +""" +nodal_rotational_acceleration_X + +Autogenerated DPF operator classes. +""" + +from __future__ import annotations + +from warnings import warn +from ansys.dpf.core.dpf_operator import Operator +from ansys.dpf.core.inputs import Input, _Inputs +from ansys.dpf.core.outputs import Output, _Outputs +from ansys.dpf.core.operators.specification import PinSpecification, Specification +from ansys.dpf.core.config import Config +from ansys.dpf.core.server_types import AnyServerType + + +class nodal_rotational_acceleration_X(Operator): + r"""Read/compute nodal rotational acceleration X component of the vector + (1st component) by calling the readers defined by the datasources. + + + Parameters + ---------- + 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 + FieldsContainer 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) + mesh: MeshedRegion or MeshesContainer, optional + prevents from reading the mesh in the result files + read_cyclic: int, optional + if 0 cyclic symmetry is ignored, if 1 cyclic sector is read, if 2 cyclic expansion is done, if 3 cyclic expansion is done and stages are merged (default is 1) + + Returns + ------- + fields_container: FieldsContainer + + Examples + -------- + >>> from ansys.dpf import core as dpf + + >>> # Instantiate operator + >>> op = dpf.operators.result.nodal_rotational_acceleration_X() + + >>> # 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) + >>> my_read_cyclic = int() + >>> op.inputs.read_cyclic.connect(my_read_cyclic) + + >>> # Instantiate operator and connect inputs in one line + >>> op = dpf.operators.result.nodal_rotational_acceleration_X( + ... 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, + ... read_cyclic=my_read_cyclic, + ... ) + + >>> # 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, + read_cyclic=None, + config=None, + server=None, + ): + super().__init__(name="DMGX", config=config, server=server) + self._inputs = InputsNodalRotationalAccelerationX(self) + self._outputs = OutputsNodalRotationalAccelerationX(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) + if read_cyclic is not None: + self.inputs.read_cyclic.connect(read_cyclic) + + @staticmethod + def _spec() -> Specification: + description = r"""Read/compute nodal rotational acceleration X component of the vector +(1st component) 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"""FieldsContainer 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)""", + ), + 7: PinSpecification( + name="mesh", + type_names=["abstract_meshed_region", "meshes_container"], + optional=True, + document=r"""prevents from reading the mesh in the result files""", + ), + 14: PinSpecification( + name="read_cyclic", + type_names=["enum dataProcessing::ECyclicReading", "int32"], + optional=True, + document=r"""if 0 cyclic symmetry is ignored, if 1 cyclic sector is read, if 2 cyclic expansion is done, if 3 cyclic expansion is done and stages are merged (default is 1)""", + ), + }, + 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="DMGX", server=server) + + @property + def inputs(self) -> InputsNodalRotationalAccelerationX: + """Enables to connect inputs to the operator + + Returns + -------- + inputs: + An instance of InputsNodalRotationalAccelerationX. + """ + return super().inputs + + @property + def outputs(self) -> OutputsNodalRotationalAccelerationX: + """Enables to get outputs of the operator by evaluating it + + Returns + -------- + outputs: + An instance of OutputsNodalRotationalAccelerationX. + """ + return super().outputs + + +class InputsNodalRotationalAccelerationX(_Inputs): + """Intermediate class used to connect user inputs to + nodal_rotational_acceleration_X operator. + + Examples + -------- + >>> from ansys.dpf import core as dpf + >>> op = dpf.operators.result.nodal_rotational_acceleration_X() + >>> 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) + >>> my_read_cyclic = int() + >>> op.inputs.read_cyclic.connect(my_read_cyclic) + """ + + def __init__(self, op: Operator): + super().__init__(nodal_rotational_acceleration_X._spec().inputs, op) + self._time_scoping = Input( + nodal_rotational_acceleration_X._spec().input_pin(0), 0, op, -1 + ) + self._inputs.append(self._time_scoping) + self._mesh_scoping = Input( + nodal_rotational_acceleration_X._spec().input_pin(1), 1, op, -1 + ) + self._inputs.append(self._mesh_scoping) + self._fields_container = Input( + nodal_rotational_acceleration_X._spec().input_pin(2), 2, op, -1 + ) + self._inputs.append(self._fields_container) + self._streams_container = Input( + nodal_rotational_acceleration_X._spec().input_pin(3), 3, op, -1 + ) + self._inputs.append(self._streams_container) + self._data_sources = Input( + nodal_rotational_acceleration_X._spec().input_pin(4), 4, op, -1 + ) + self._inputs.append(self._data_sources) + self._bool_rotate_to_global = Input( + nodal_rotational_acceleration_X._spec().input_pin(5), 5, op, -1 + ) + self._inputs.append(self._bool_rotate_to_global) + self._mesh = Input( + nodal_rotational_acceleration_X._spec().input_pin(7), 7, op, -1 + ) + self._inputs.append(self._mesh) + self._read_cyclic = Input( + nodal_rotational_acceleration_X._spec().input_pin(14), 14, op, -1 + ) + self._inputs.append(self._read_cyclic) + + @property + def time_scoping(self) -> Input: + 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.nodal_rotational_acceleration_X() + >>> 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: + 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.nodal_rotational_acceleration_X() + >>> 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: + r"""Allows to connect fields_container input to the operator. + + FieldsContainer already allocated modified inplace + + Returns + ------- + input: + An Input instance for this pin. + + Examples + -------- + >>> from ansys.dpf import core as dpf + >>> op = dpf.operators.result.nodal_rotational_acceleration_X() + >>> op.inputs.fields_container.connect(my_fields_container) + >>> # or + >>> op.inputs.fields_container(my_fields_container) + """ + return self._fields_container + + @property + def streams_container(self) -> Input: + r"""Allows to connect streams_container input to the operator. + + 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.nodal_rotational_acceleration_X() + >>> op.inputs.streams_container.connect(my_streams_container) + >>> # or + >>> op.inputs.streams_container(my_streams_container) + """ + return self._streams_container + + @property + def data_sources(self) -> Input: + r"""Allows to connect data_sources input to the operator. + + 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.nodal_rotational_acceleration_X() + >>> 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: + r"""Allows to connect bool_rotate_to_global input to the operator. + + if true the field is rotated to global coordinate system (default true) + + Returns + ------- + input: + An Input instance for this pin. + + Examples + -------- + >>> from ansys.dpf import core as dpf + >>> op = dpf.operators.result.nodal_rotational_acceleration_X() + >>> 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: + 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.nodal_rotational_acceleration_X() + >>> op.inputs.mesh.connect(my_mesh) + >>> # or + >>> op.inputs.mesh(my_mesh) + """ + return self._mesh + + @property + def read_cyclic(self) -> Input: + r"""Allows to connect read_cyclic input to the operator. + + if 0 cyclic symmetry is ignored, if 1 cyclic sector is read, if 2 cyclic expansion is done, if 3 cyclic expansion is done and stages are merged (default is 1) + + Returns + ------- + input: + An Input instance for this pin. + + Examples + -------- + >>> from ansys.dpf import core as dpf + >>> op = dpf.operators.result.nodal_rotational_acceleration_X() + >>> op.inputs.read_cyclic.connect(my_read_cyclic) + >>> # or + >>> op.inputs.read_cyclic(my_read_cyclic) + """ + return self._read_cyclic + + +class OutputsNodalRotationalAccelerationX(_Outputs): + """Intermediate class used to get outputs from + nodal_rotational_acceleration_X operator. + + Examples + -------- + >>> from ansys.dpf import core as dpf + >>> op = dpf.operators.result.nodal_rotational_acceleration_X() + >>> # Connect inputs : op.inputs. ... + >>> result_fields_container = op.outputs.fields_container() + """ + + def __init__(self, op: Operator): + super().__init__(nodal_rotational_acceleration_X._spec().outputs, op) + self._fields_container = Output( + nodal_rotational_acceleration_X._spec().output_pin(0), 0, op + ) + self._outputs.append(self._fields_container) + + @property + def fields_container(self) -> Output: + r"""Allows to get fields_container output of the operator + + Returns + ------- + output: + An Output instance for this pin. + + Examples + -------- + >>> from ansys.dpf import core as dpf + >>> op = dpf.operators.result.nodal_rotational_acceleration_X() + >>> # 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/nodal_rotational_acceleration_Y.py b/src/ansys/dpf/core/operators/result/nodal_rotational_acceleration_Y.py new file mode 100644 index 0000000000..24ca35d131 --- /dev/null +++ b/src/ansys/dpf/core/operators/result/nodal_rotational_acceleration_Y.py @@ -0,0 +1,504 @@ +""" +nodal_rotational_acceleration_Y + +Autogenerated DPF operator classes. +""" + +from __future__ import annotations + +from warnings import warn +from ansys.dpf.core.dpf_operator import Operator +from ansys.dpf.core.inputs import Input, _Inputs +from ansys.dpf.core.outputs import Output, _Outputs +from ansys.dpf.core.operators.specification import PinSpecification, Specification +from ansys.dpf.core.config import Config +from ansys.dpf.core.server_types import AnyServerType + + +class nodal_rotational_acceleration_Y(Operator): + r"""Read/compute nodal rotational acceleration Y component of the vector + (2nd component) by calling the readers defined by the datasources. + + + Parameters + ---------- + 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 + FieldsContainer 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) + mesh: MeshedRegion or MeshesContainer, optional + prevents from reading the mesh in the result files + read_cyclic: int, optional + if 0 cyclic symmetry is ignored, if 1 cyclic sector is read, if 2 cyclic expansion is done, if 3 cyclic expansion is done and stages are merged (default is 1) + + Returns + ------- + fields_container: FieldsContainer + + Examples + -------- + >>> from ansys.dpf import core as dpf + + >>> # Instantiate operator + >>> op = dpf.operators.result.nodal_rotational_acceleration_Y() + + >>> # 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) + >>> my_read_cyclic = int() + >>> op.inputs.read_cyclic.connect(my_read_cyclic) + + >>> # Instantiate operator and connect inputs in one line + >>> op = dpf.operators.result.nodal_rotational_acceleration_Y( + ... 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, + ... read_cyclic=my_read_cyclic, + ... ) + + >>> # 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, + read_cyclic=None, + config=None, + server=None, + ): + super().__init__(name="DMGY", config=config, server=server) + self._inputs = InputsNodalRotationalAccelerationY(self) + self._outputs = OutputsNodalRotationalAccelerationY(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) + if read_cyclic is not None: + self.inputs.read_cyclic.connect(read_cyclic) + + @staticmethod + def _spec() -> Specification: + description = r"""Read/compute nodal rotational acceleration Y component of the vector +(2nd component) 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"""FieldsContainer 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)""", + ), + 7: PinSpecification( + name="mesh", + type_names=["abstract_meshed_region", "meshes_container"], + optional=True, + document=r"""prevents from reading the mesh in the result files""", + ), + 14: PinSpecification( + name="read_cyclic", + type_names=["enum dataProcessing::ECyclicReading", "int32"], + optional=True, + document=r"""if 0 cyclic symmetry is ignored, if 1 cyclic sector is read, if 2 cyclic expansion is done, if 3 cyclic expansion is done and stages are merged (default is 1)""", + ), + }, + 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="DMGY", server=server) + + @property + def inputs(self) -> InputsNodalRotationalAccelerationY: + """Enables to connect inputs to the operator + + Returns + -------- + inputs: + An instance of InputsNodalRotationalAccelerationY. + """ + return super().inputs + + @property + def outputs(self) -> OutputsNodalRotationalAccelerationY: + """Enables to get outputs of the operator by evaluating it + + Returns + -------- + outputs: + An instance of OutputsNodalRotationalAccelerationY. + """ + return super().outputs + + +class InputsNodalRotationalAccelerationY(_Inputs): + """Intermediate class used to connect user inputs to + nodal_rotational_acceleration_Y operator. + + Examples + -------- + >>> from ansys.dpf import core as dpf + >>> op = dpf.operators.result.nodal_rotational_acceleration_Y() + >>> 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) + >>> my_read_cyclic = int() + >>> op.inputs.read_cyclic.connect(my_read_cyclic) + """ + + def __init__(self, op: Operator): + super().__init__(nodal_rotational_acceleration_Y._spec().inputs, op) + self._time_scoping = Input( + nodal_rotational_acceleration_Y._spec().input_pin(0), 0, op, -1 + ) + self._inputs.append(self._time_scoping) + self._mesh_scoping = Input( + nodal_rotational_acceleration_Y._spec().input_pin(1), 1, op, -1 + ) + self._inputs.append(self._mesh_scoping) + self._fields_container = Input( + nodal_rotational_acceleration_Y._spec().input_pin(2), 2, op, -1 + ) + self._inputs.append(self._fields_container) + self._streams_container = Input( + nodal_rotational_acceleration_Y._spec().input_pin(3), 3, op, -1 + ) + self._inputs.append(self._streams_container) + self._data_sources = Input( + nodal_rotational_acceleration_Y._spec().input_pin(4), 4, op, -1 + ) + self._inputs.append(self._data_sources) + self._bool_rotate_to_global = Input( + nodal_rotational_acceleration_Y._spec().input_pin(5), 5, op, -1 + ) + self._inputs.append(self._bool_rotate_to_global) + self._mesh = Input( + nodal_rotational_acceleration_Y._spec().input_pin(7), 7, op, -1 + ) + self._inputs.append(self._mesh) + self._read_cyclic = Input( + nodal_rotational_acceleration_Y._spec().input_pin(14), 14, op, -1 + ) + self._inputs.append(self._read_cyclic) + + @property + def time_scoping(self) -> Input: + 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.nodal_rotational_acceleration_Y() + >>> 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: + 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.nodal_rotational_acceleration_Y() + >>> 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: + r"""Allows to connect fields_container input to the operator. + + FieldsContainer already allocated modified inplace + + Returns + ------- + input: + An Input instance for this pin. + + Examples + -------- + >>> from ansys.dpf import core as dpf + >>> op = dpf.operators.result.nodal_rotational_acceleration_Y() + >>> op.inputs.fields_container.connect(my_fields_container) + >>> # or + >>> op.inputs.fields_container(my_fields_container) + """ + return self._fields_container + + @property + def streams_container(self) -> Input: + r"""Allows to connect streams_container input to the operator. + + 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.nodal_rotational_acceleration_Y() + >>> op.inputs.streams_container.connect(my_streams_container) + >>> # or + >>> op.inputs.streams_container(my_streams_container) + """ + return self._streams_container + + @property + def data_sources(self) -> Input: + r"""Allows to connect data_sources input to the operator. + + 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.nodal_rotational_acceleration_Y() + >>> 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: + r"""Allows to connect bool_rotate_to_global input to the operator. + + if true the field is rotated to global coordinate system (default true) + + Returns + ------- + input: + An Input instance for this pin. + + Examples + -------- + >>> from ansys.dpf import core as dpf + >>> op = dpf.operators.result.nodal_rotational_acceleration_Y() + >>> 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: + 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.nodal_rotational_acceleration_Y() + >>> op.inputs.mesh.connect(my_mesh) + >>> # or + >>> op.inputs.mesh(my_mesh) + """ + return self._mesh + + @property + def read_cyclic(self) -> Input: + r"""Allows to connect read_cyclic input to the operator. + + if 0 cyclic symmetry is ignored, if 1 cyclic sector is read, if 2 cyclic expansion is done, if 3 cyclic expansion is done and stages are merged (default is 1) + + Returns + ------- + input: + An Input instance for this pin. + + Examples + -------- + >>> from ansys.dpf import core as dpf + >>> op = dpf.operators.result.nodal_rotational_acceleration_Y() + >>> op.inputs.read_cyclic.connect(my_read_cyclic) + >>> # or + >>> op.inputs.read_cyclic(my_read_cyclic) + """ + return self._read_cyclic + + +class OutputsNodalRotationalAccelerationY(_Outputs): + """Intermediate class used to get outputs from + nodal_rotational_acceleration_Y operator. + + Examples + -------- + >>> from ansys.dpf import core as dpf + >>> op = dpf.operators.result.nodal_rotational_acceleration_Y() + >>> # Connect inputs : op.inputs. ... + >>> result_fields_container = op.outputs.fields_container() + """ + + def __init__(self, op: Operator): + super().__init__(nodal_rotational_acceleration_Y._spec().outputs, op) + self._fields_container = Output( + nodal_rotational_acceleration_Y._spec().output_pin(0), 0, op + ) + self._outputs.append(self._fields_container) + + @property + def fields_container(self) -> Output: + r"""Allows to get fields_container output of the operator + + Returns + ------- + output: + An Output instance for this pin. + + Examples + -------- + >>> from ansys.dpf import core as dpf + >>> op = dpf.operators.result.nodal_rotational_acceleration_Y() + >>> # 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/nodal_rotational_acceleration_Z.py b/src/ansys/dpf/core/operators/result/nodal_rotational_acceleration_Z.py new file mode 100644 index 0000000000..c550092a04 --- /dev/null +++ b/src/ansys/dpf/core/operators/result/nodal_rotational_acceleration_Z.py @@ -0,0 +1,504 @@ +""" +nodal_rotational_acceleration_Z + +Autogenerated DPF operator classes. +""" + +from __future__ import annotations + +from warnings import warn +from ansys.dpf.core.dpf_operator import Operator +from ansys.dpf.core.inputs import Input, _Inputs +from ansys.dpf.core.outputs import Output, _Outputs +from ansys.dpf.core.operators.specification import PinSpecification, Specification +from ansys.dpf.core.config import Config +from ansys.dpf.core.server_types import AnyServerType + + +class nodal_rotational_acceleration_Z(Operator): + r"""Read/compute nodal rotational acceleration Z component of the vector + (3rd component) by calling the readers defined by the datasources. + + + Parameters + ---------- + 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 + FieldsContainer 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) + mesh: MeshedRegion or MeshesContainer, optional + prevents from reading the mesh in the result files + read_cyclic: int, optional + if 0 cyclic symmetry is ignored, if 1 cyclic sector is read, if 2 cyclic expansion is done, if 3 cyclic expansion is done and stages are merged (default is 1) + + Returns + ------- + fields_container: FieldsContainer + + Examples + -------- + >>> from ansys.dpf import core as dpf + + >>> # Instantiate operator + >>> op = dpf.operators.result.nodal_rotational_acceleration_Z() + + >>> # 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) + >>> my_read_cyclic = int() + >>> op.inputs.read_cyclic.connect(my_read_cyclic) + + >>> # Instantiate operator and connect inputs in one line + >>> op = dpf.operators.result.nodal_rotational_acceleration_Z( + ... 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, + ... read_cyclic=my_read_cyclic, + ... ) + + >>> # 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, + read_cyclic=None, + config=None, + server=None, + ): + super().__init__(name="DMGZ", config=config, server=server) + self._inputs = InputsNodalRotationalAccelerationZ(self) + self._outputs = OutputsNodalRotationalAccelerationZ(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) + if read_cyclic is not None: + self.inputs.read_cyclic.connect(read_cyclic) + + @staticmethod + def _spec() -> Specification: + description = r"""Read/compute nodal rotational acceleration Z component of the vector +(3rd component) 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"""FieldsContainer 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)""", + ), + 7: PinSpecification( + name="mesh", + type_names=["abstract_meshed_region", "meshes_container"], + optional=True, + document=r"""prevents from reading the mesh in the result files""", + ), + 14: PinSpecification( + name="read_cyclic", + type_names=["enum dataProcessing::ECyclicReading", "int32"], + optional=True, + document=r"""if 0 cyclic symmetry is ignored, if 1 cyclic sector is read, if 2 cyclic expansion is done, if 3 cyclic expansion is done and stages are merged (default is 1)""", + ), + }, + 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="DMGZ", server=server) + + @property + def inputs(self) -> InputsNodalRotationalAccelerationZ: + """Enables to connect inputs to the operator + + Returns + -------- + inputs: + An instance of InputsNodalRotationalAccelerationZ. + """ + return super().inputs + + @property + def outputs(self) -> OutputsNodalRotationalAccelerationZ: + """Enables to get outputs of the operator by evaluating it + + Returns + -------- + outputs: + An instance of OutputsNodalRotationalAccelerationZ. + """ + return super().outputs + + +class InputsNodalRotationalAccelerationZ(_Inputs): + """Intermediate class used to connect user inputs to + nodal_rotational_acceleration_Z operator. + + Examples + -------- + >>> from ansys.dpf import core as dpf + >>> op = dpf.operators.result.nodal_rotational_acceleration_Z() + >>> 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) + >>> my_read_cyclic = int() + >>> op.inputs.read_cyclic.connect(my_read_cyclic) + """ + + def __init__(self, op: Operator): + super().__init__(nodal_rotational_acceleration_Z._spec().inputs, op) + self._time_scoping = Input( + nodal_rotational_acceleration_Z._spec().input_pin(0), 0, op, -1 + ) + self._inputs.append(self._time_scoping) + self._mesh_scoping = Input( + nodal_rotational_acceleration_Z._spec().input_pin(1), 1, op, -1 + ) + self._inputs.append(self._mesh_scoping) + self._fields_container = Input( + nodal_rotational_acceleration_Z._spec().input_pin(2), 2, op, -1 + ) + self._inputs.append(self._fields_container) + self._streams_container = Input( + nodal_rotational_acceleration_Z._spec().input_pin(3), 3, op, -1 + ) + self._inputs.append(self._streams_container) + self._data_sources = Input( + nodal_rotational_acceleration_Z._spec().input_pin(4), 4, op, -1 + ) + self._inputs.append(self._data_sources) + self._bool_rotate_to_global = Input( + nodal_rotational_acceleration_Z._spec().input_pin(5), 5, op, -1 + ) + self._inputs.append(self._bool_rotate_to_global) + self._mesh = Input( + nodal_rotational_acceleration_Z._spec().input_pin(7), 7, op, -1 + ) + self._inputs.append(self._mesh) + self._read_cyclic = Input( + nodal_rotational_acceleration_Z._spec().input_pin(14), 14, op, -1 + ) + self._inputs.append(self._read_cyclic) + + @property + def time_scoping(self) -> Input: + 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.nodal_rotational_acceleration_Z() + >>> 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: + 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.nodal_rotational_acceleration_Z() + >>> 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: + r"""Allows to connect fields_container input to the operator. + + FieldsContainer already allocated modified inplace + + Returns + ------- + input: + An Input instance for this pin. + + Examples + -------- + >>> from ansys.dpf import core as dpf + >>> op = dpf.operators.result.nodal_rotational_acceleration_Z() + >>> op.inputs.fields_container.connect(my_fields_container) + >>> # or + >>> op.inputs.fields_container(my_fields_container) + """ + return self._fields_container + + @property + def streams_container(self) -> Input: + r"""Allows to connect streams_container input to the operator. + + 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.nodal_rotational_acceleration_Z() + >>> op.inputs.streams_container.connect(my_streams_container) + >>> # or + >>> op.inputs.streams_container(my_streams_container) + """ + return self._streams_container + + @property + def data_sources(self) -> Input: + r"""Allows to connect data_sources input to the operator. + + 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.nodal_rotational_acceleration_Z() + >>> 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: + r"""Allows to connect bool_rotate_to_global input to the operator. + + if true the field is rotated to global coordinate system (default true) + + Returns + ------- + input: + An Input instance for this pin. + + Examples + -------- + >>> from ansys.dpf import core as dpf + >>> op = dpf.operators.result.nodal_rotational_acceleration_Z() + >>> 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: + 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.nodal_rotational_acceleration_Z() + >>> op.inputs.mesh.connect(my_mesh) + >>> # or + >>> op.inputs.mesh(my_mesh) + """ + return self._mesh + + @property + def read_cyclic(self) -> Input: + r"""Allows to connect read_cyclic input to the operator. + + if 0 cyclic symmetry is ignored, if 1 cyclic sector is read, if 2 cyclic expansion is done, if 3 cyclic expansion is done and stages are merged (default is 1) + + Returns + ------- + input: + An Input instance for this pin. + + Examples + -------- + >>> from ansys.dpf import core as dpf + >>> op = dpf.operators.result.nodal_rotational_acceleration_Z() + >>> op.inputs.read_cyclic.connect(my_read_cyclic) + >>> # or + >>> op.inputs.read_cyclic(my_read_cyclic) + """ + return self._read_cyclic + + +class OutputsNodalRotationalAccelerationZ(_Outputs): + """Intermediate class used to get outputs from + nodal_rotational_acceleration_Z operator. + + Examples + -------- + >>> from ansys.dpf import core as dpf + >>> op = dpf.operators.result.nodal_rotational_acceleration_Z() + >>> # Connect inputs : op.inputs. ... + >>> result_fields_container = op.outputs.fields_container() + """ + + def __init__(self, op: Operator): + super().__init__(nodal_rotational_acceleration_Z._spec().outputs, op) + self._fields_container = Output( + nodal_rotational_acceleration_Z._spec().output_pin(0), 0, op + ) + self._outputs.append(self._fields_container) + + @property + def fields_container(self) -> Output: + r"""Allows to get fields_container output of the operator + + Returns + ------- + output: + An Output instance for this pin. + + Examples + -------- + >>> from ansys.dpf import core as dpf + >>> op = dpf.operators.result.nodal_rotational_acceleration_Z() + >>> # 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/nodal_rotational_velocity.py b/src/ansys/dpf/core/operators/result/nodal_rotational_velocity.py new file mode 100644 index 0000000000..b9ee330473 --- /dev/null +++ b/src/ansys/dpf/core/operators/result/nodal_rotational_velocity.py @@ -0,0 +1,461 @@ +""" +nodal_rotational_velocity + +Autogenerated DPF operator classes. +""" + +from __future__ import annotations + +from warnings import warn +from ansys.dpf.core.dpf_operator import Operator +from ansys.dpf.core.inputs import Input, _Inputs +from ansys.dpf.core.outputs import Output, _Outputs +from ansys.dpf.core.operators.specification import PinSpecification, Specification +from ansys.dpf.core.config import Config +from ansys.dpf.core.server_types import AnyServerType + + +class nodal_rotational_velocity(Operator): + r"""Read/compute nodal rotational velocity by calling the readers defined by + the datasources. + + + Parameters + ---------- + 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 + + Returns + ------- + fields_container: FieldsContainer + + Examples + -------- + >>> from ansys.dpf import core as dpf + + >>> # Instantiate operator + >>> op = dpf.operators.result.nodal_rotational_velocity() + + >>> # 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.nodal_rotational_velocity( + ... 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="OMG", config=config, server=server) + self._inputs = InputsNodalRotationalVelocity(self) + self._outputs = OutputsNodalRotationalVelocity(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 nodal rotational velocity 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="OMG", server=server) + + @property + def inputs(self) -> InputsNodalRotationalVelocity: + """Enables to connect inputs to the operator + + Returns + -------- + inputs: + An instance of InputsNodalRotationalVelocity. + """ + return super().inputs + + @property + def outputs(self) -> OutputsNodalRotationalVelocity: + """Enables to get outputs of the operator by evaluating it + + Returns + -------- + outputs: + An instance of OutputsNodalRotationalVelocity. + """ + return super().outputs + + +class InputsNodalRotationalVelocity(_Inputs): + """Intermediate class used to connect user inputs to + nodal_rotational_velocity operator. + + Examples + -------- + >>> from ansys.dpf import core as dpf + >>> op = dpf.operators.result.nodal_rotational_velocity() + >>> 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__(nodal_rotational_velocity._spec().inputs, op) + self._time_scoping = Input( + nodal_rotational_velocity._spec().input_pin(0), 0, op, -1 + ) + self._inputs.append(self._time_scoping) + self._mesh_scoping = Input( + nodal_rotational_velocity._spec().input_pin(1), 1, op, -1 + ) + self._inputs.append(self._mesh_scoping) + self._fields_container = Input( + nodal_rotational_velocity._spec().input_pin(2), 2, op, -1 + ) + self._inputs.append(self._fields_container) + self._streams_container = Input( + nodal_rotational_velocity._spec().input_pin(3), 3, op, -1 + ) + self._inputs.append(self._streams_container) + self._data_sources = Input( + nodal_rotational_velocity._spec().input_pin(4), 4, op, -1 + ) + self._inputs.append(self._data_sources) + self._bool_rotate_to_global = Input( + nodal_rotational_velocity._spec().input_pin(5), 5, op, -1 + ) + self._inputs.append(self._bool_rotate_to_global) + self._mesh = Input(nodal_rotational_velocity._spec().input_pin(7), 7, op, -1) + self._inputs.append(self._mesh) + + @property + def time_scoping(self) -> Input: + 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.nodal_rotational_velocity() + >>> 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: + 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.nodal_rotational_velocity() + >>> 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: + 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.nodal_rotational_velocity() + >>> op.inputs.fields_container.connect(my_fields_container) + >>> # or + >>> op.inputs.fields_container(my_fields_container) + """ + return self._fields_container + + @property + def streams_container(self) -> Input: + r"""Allows to connect streams_container input to the operator. + + 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.nodal_rotational_velocity() + >>> op.inputs.streams_container.connect(my_streams_container) + >>> # or + >>> op.inputs.streams_container(my_streams_container) + """ + return self._streams_container + + @property + def data_sources(self) -> Input: + r"""Allows to connect data_sources input to the operator. + + 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.nodal_rotational_velocity() + >>> 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: + 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.nodal_rotational_velocity() + >>> 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: + 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.nodal_rotational_velocity() + >>> op.inputs.mesh.connect(my_mesh) + >>> # or + >>> op.inputs.mesh(my_mesh) + """ + return self._mesh + + +class OutputsNodalRotationalVelocity(_Outputs): + """Intermediate class used to get outputs from + nodal_rotational_velocity operator. + + Examples + -------- + >>> from ansys.dpf import core as dpf + >>> op = dpf.operators.result.nodal_rotational_velocity() + >>> # Connect inputs : op.inputs. ... + >>> result_fields_container = op.outputs.fields_container() + """ + + def __init__(self, op: Operator): + super().__init__(nodal_rotational_velocity._spec().outputs, op) + self._fields_container = Output( + nodal_rotational_velocity._spec().output_pin(0), 0, op + ) + self._outputs.append(self._fields_container) + + @property + def fields_container(self) -> Output: + r"""Allows to get fields_container output of the operator + + Returns + ------- + output: + An Output instance for this pin. + + Examples + -------- + >>> from ansys.dpf import core as dpf + >>> op = dpf.operators.result.nodal_rotational_velocity() + >>> # 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/nodal_rotational_velocity_X.py b/src/ansys/dpf/core/operators/result/nodal_rotational_velocity_X.py new file mode 100644 index 0000000000..b701ec80de --- /dev/null +++ b/src/ansys/dpf/core/operators/result/nodal_rotational_velocity_X.py @@ -0,0 +1,502 @@ +""" +nodal_rotational_velocity_X + +Autogenerated DPF operator classes. +""" + +from __future__ import annotations + +from warnings import warn +from ansys.dpf.core.dpf_operator import Operator +from ansys.dpf.core.inputs import Input, _Inputs +from ansys.dpf.core.outputs import Output, _Outputs +from ansys.dpf.core.operators.specification import PinSpecification, Specification +from ansys.dpf.core.config import Config +from ansys.dpf.core.server_types import AnyServerType + + +class nodal_rotational_velocity_X(Operator): + r"""Read/compute nodal rotational velocity X component of the vector (1st + component) by calling the readers defined by the datasources. + + + Parameters + ---------- + 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 + FieldsContainer 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) + mesh: MeshedRegion or MeshesContainer, optional + prevents from reading the mesh in the result files + read_cyclic: int, optional + if 0 cyclic symmetry is ignored, if 1 cyclic sector is read, if 2 cyclic expansion is done, if 3 cyclic expansion is done and stages are merged (default is 1) + + Returns + ------- + fields_container: FieldsContainer + + Examples + -------- + >>> from ansys.dpf import core as dpf + + >>> # Instantiate operator + >>> op = dpf.operators.result.nodal_rotational_velocity_X() + + >>> # 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) + >>> my_read_cyclic = int() + >>> op.inputs.read_cyclic.connect(my_read_cyclic) + + >>> # Instantiate operator and connect inputs in one line + >>> op = dpf.operators.result.nodal_rotational_velocity_X( + ... 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, + ... read_cyclic=my_read_cyclic, + ... ) + + >>> # 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, + read_cyclic=None, + config=None, + server=None, + ): + super().__init__(name="OMGX", config=config, server=server) + self._inputs = InputsNodalRotationalVelocityX(self) + self._outputs = OutputsNodalRotationalVelocityX(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) + if read_cyclic is not None: + self.inputs.read_cyclic.connect(read_cyclic) + + @staticmethod + def _spec() -> Specification: + description = r"""Read/compute nodal rotational velocity X component of the vector (1st +component) 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"""FieldsContainer 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)""", + ), + 7: PinSpecification( + name="mesh", + type_names=["abstract_meshed_region", "meshes_container"], + optional=True, + document=r"""prevents from reading the mesh in the result files""", + ), + 14: PinSpecification( + name="read_cyclic", + type_names=["enum dataProcessing::ECyclicReading", "int32"], + optional=True, + document=r"""if 0 cyclic symmetry is ignored, if 1 cyclic sector is read, if 2 cyclic expansion is done, if 3 cyclic expansion is done and stages are merged (default is 1)""", + ), + }, + 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="OMGX", server=server) + + @property + def inputs(self) -> InputsNodalRotationalVelocityX: + """Enables to connect inputs to the operator + + Returns + -------- + inputs: + An instance of InputsNodalRotationalVelocityX. + """ + return super().inputs + + @property + def outputs(self) -> OutputsNodalRotationalVelocityX: + """Enables to get outputs of the operator by evaluating it + + Returns + -------- + outputs: + An instance of OutputsNodalRotationalVelocityX. + """ + return super().outputs + + +class InputsNodalRotationalVelocityX(_Inputs): + """Intermediate class used to connect user inputs to + nodal_rotational_velocity_X operator. + + Examples + -------- + >>> from ansys.dpf import core as dpf + >>> op = dpf.operators.result.nodal_rotational_velocity_X() + >>> 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) + >>> my_read_cyclic = int() + >>> op.inputs.read_cyclic.connect(my_read_cyclic) + """ + + def __init__(self, op: Operator): + super().__init__(nodal_rotational_velocity_X._spec().inputs, op) + self._time_scoping = Input( + nodal_rotational_velocity_X._spec().input_pin(0), 0, op, -1 + ) + self._inputs.append(self._time_scoping) + self._mesh_scoping = Input( + nodal_rotational_velocity_X._spec().input_pin(1), 1, op, -1 + ) + self._inputs.append(self._mesh_scoping) + self._fields_container = Input( + nodal_rotational_velocity_X._spec().input_pin(2), 2, op, -1 + ) + self._inputs.append(self._fields_container) + self._streams_container = Input( + nodal_rotational_velocity_X._spec().input_pin(3), 3, op, -1 + ) + self._inputs.append(self._streams_container) + self._data_sources = Input( + nodal_rotational_velocity_X._spec().input_pin(4), 4, op, -1 + ) + self._inputs.append(self._data_sources) + self._bool_rotate_to_global = Input( + nodal_rotational_velocity_X._spec().input_pin(5), 5, op, -1 + ) + self._inputs.append(self._bool_rotate_to_global) + self._mesh = Input(nodal_rotational_velocity_X._spec().input_pin(7), 7, op, -1) + self._inputs.append(self._mesh) + self._read_cyclic = Input( + nodal_rotational_velocity_X._spec().input_pin(14), 14, op, -1 + ) + self._inputs.append(self._read_cyclic) + + @property + def time_scoping(self) -> Input: + 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.nodal_rotational_velocity_X() + >>> 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: + 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.nodal_rotational_velocity_X() + >>> 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: + r"""Allows to connect fields_container input to the operator. + + FieldsContainer already allocated modified inplace + + Returns + ------- + input: + An Input instance for this pin. + + Examples + -------- + >>> from ansys.dpf import core as dpf + >>> op = dpf.operators.result.nodal_rotational_velocity_X() + >>> op.inputs.fields_container.connect(my_fields_container) + >>> # or + >>> op.inputs.fields_container(my_fields_container) + """ + return self._fields_container + + @property + def streams_container(self) -> Input: + r"""Allows to connect streams_container input to the operator. + + 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.nodal_rotational_velocity_X() + >>> op.inputs.streams_container.connect(my_streams_container) + >>> # or + >>> op.inputs.streams_container(my_streams_container) + """ + return self._streams_container + + @property + def data_sources(self) -> Input: + r"""Allows to connect data_sources input to the operator. + + 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.nodal_rotational_velocity_X() + >>> 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: + r"""Allows to connect bool_rotate_to_global input to the operator. + + if true the field is rotated to global coordinate system (default true) + + Returns + ------- + input: + An Input instance for this pin. + + Examples + -------- + >>> from ansys.dpf import core as dpf + >>> op = dpf.operators.result.nodal_rotational_velocity_X() + >>> 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: + 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.nodal_rotational_velocity_X() + >>> op.inputs.mesh.connect(my_mesh) + >>> # or + >>> op.inputs.mesh(my_mesh) + """ + return self._mesh + + @property + def read_cyclic(self) -> Input: + r"""Allows to connect read_cyclic input to the operator. + + if 0 cyclic symmetry is ignored, if 1 cyclic sector is read, if 2 cyclic expansion is done, if 3 cyclic expansion is done and stages are merged (default is 1) + + Returns + ------- + input: + An Input instance for this pin. + + Examples + -------- + >>> from ansys.dpf import core as dpf + >>> op = dpf.operators.result.nodal_rotational_velocity_X() + >>> op.inputs.read_cyclic.connect(my_read_cyclic) + >>> # or + >>> op.inputs.read_cyclic(my_read_cyclic) + """ + return self._read_cyclic + + +class OutputsNodalRotationalVelocityX(_Outputs): + """Intermediate class used to get outputs from + nodal_rotational_velocity_X operator. + + Examples + -------- + >>> from ansys.dpf import core as dpf + >>> op = dpf.operators.result.nodal_rotational_velocity_X() + >>> # Connect inputs : op.inputs. ... + >>> result_fields_container = op.outputs.fields_container() + """ + + def __init__(self, op: Operator): + super().__init__(nodal_rotational_velocity_X._spec().outputs, op) + self._fields_container = Output( + nodal_rotational_velocity_X._spec().output_pin(0), 0, op + ) + self._outputs.append(self._fields_container) + + @property + def fields_container(self) -> Output: + r"""Allows to get fields_container output of the operator + + Returns + ------- + output: + An Output instance for this pin. + + Examples + -------- + >>> from ansys.dpf import core as dpf + >>> op = dpf.operators.result.nodal_rotational_velocity_X() + >>> # 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/nodal_rotational_velocity_Y.py b/src/ansys/dpf/core/operators/result/nodal_rotational_velocity_Y.py new file mode 100644 index 0000000000..ba172d5cc0 --- /dev/null +++ b/src/ansys/dpf/core/operators/result/nodal_rotational_velocity_Y.py @@ -0,0 +1,502 @@ +""" +nodal_rotational_velocity_Y + +Autogenerated DPF operator classes. +""" + +from __future__ import annotations + +from warnings import warn +from ansys.dpf.core.dpf_operator import Operator +from ansys.dpf.core.inputs import Input, _Inputs +from ansys.dpf.core.outputs import Output, _Outputs +from ansys.dpf.core.operators.specification import PinSpecification, Specification +from ansys.dpf.core.config import Config +from ansys.dpf.core.server_types import AnyServerType + + +class nodal_rotational_velocity_Y(Operator): + r"""Read/compute nodal rotational velocity Y component of the vector (2nd + component) by calling the readers defined by the datasources. + + + Parameters + ---------- + 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 + FieldsContainer 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) + mesh: MeshedRegion or MeshesContainer, optional + prevents from reading the mesh in the result files + read_cyclic: int, optional + if 0 cyclic symmetry is ignored, if 1 cyclic sector is read, if 2 cyclic expansion is done, if 3 cyclic expansion is done and stages are merged (default is 1) + + Returns + ------- + fields_container: FieldsContainer + + Examples + -------- + >>> from ansys.dpf import core as dpf + + >>> # Instantiate operator + >>> op = dpf.operators.result.nodal_rotational_velocity_Y() + + >>> # 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) + >>> my_read_cyclic = int() + >>> op.inputs.read_cyclic.connect(my_read_cyclic) + + >>> # Instantiate operator and connect inputs in one line + >>> op = dpf.operators.result.nodal_rotational_velocity_Y( + ... 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, + ... read_cyclic=my_read_cyclic, + ... ) + + >>> # 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, + read_cyclic=None, + config=None, + server=None, + ): + super().__init__(name="OMGY", config=config, server=server) + self._inputs = InputsNodalRotationalVelocityY(self) + self._outputs = OutputsNodalRotationalVelocityY(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) + if read_cyclic is not None: + self.inputs.read_cyclic.connect(read_cyclic) + + @staticmethod + def _spec() -> Specification: + description = r"""Read/compute nodal rotational velocity Y component of the vector (2nd +component) 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"""FieldsContainer 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)""", + ), + 7: PinSpecification( + name="mesh", + type_names=["abstract_meshed_region", "meshes_container"], + optional=True, + document=r"""prevents from reading the mesh in the result files""", + ), + 14: PinSpecification( + name="read_cyclic", + type_names=["enum dataProcessing::ECyclicReading", "int32"], + optional=True, + document=r"""if 0 cyclic symmetry is ignored, if 1 cyclic sector is read, if 2 cyclic expansion is done, if 3 cyclic expansion is done and stages are merged (default is 1)""", + ), + }, + 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="OMGY", server=server) + + @property + def inputs(self) -> InputsNodalRotationalVelocityY: + """Enables to connect inputs to the operator + + Returns + -------- + inputs: + An instance of InputsNodalRotationalVelocityY. + """ + return super().inputs + + @property + def outputs(self) -> OutputsNodalRotationalVelocityY: + """Enables to get outputs of the operator by evaluating it + + Returns + -------- + outputs: + An instance of OutputsNodalRotationalVelocityY. + """ + return super().outputs + + +class InputsNodalRotationalVelocityY(_Inputs): + """Intermediate class used to connect user inputs to + nodal_rotational_velocity_Y operator. + + Examples + -------- + >>> from ansys.dpf import core as dpf + >>> op = dpf.operators.result.nodal_rotational_velocity_Y() + >>> 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) + >>> my_read_cyclic = int() + >>> op.inputs.read_cyclic.connect(my_read_cyclic) + """ + + def __init__(self, op: Operator): + super().__init__(nodal_rotational_velocity_Y._spec().inputs, op) + self._time_scoping = Input( + nodal_rotational_velocity_Y._spec().input_pin(0), 0, op, -1 + ) + self._inputs.append(self._time_scoping) + self._mesh_scoping = Input( + nodal_rotational_velocity_Y._spec().input_pin(1), 1, op, -1 + ) + self._inputs.append(self._mesh_scoping) + self._fields_container = Input( + nodal_rotational_velocity_Y._spec().input_pin(2), 2, op, -1 + ) + self._inputs.append(self._fields_container) + self._streams_container = Input( + nodal_rotational_velocity_Y._spec().input_pin(3), 3, op, -1 + ) + self._inputs.append(self._streams_container) + self._data_sources = Input( + nodal_rotational_velocity_Y._spec().input_pin(4), 4, op, -1 + ) + self._inputs.append(self._data_sources) + self._bool_rotate_to_global = Input( + nodal_rotational_velocity_Y._spec().input_pin(5), 5, op, -1 + ) + self._inputs.append(self._bool_rotate_to_global) + self._mesh = Input(nodal_rotational_velocity_Y._spec().input_pin(7), 7, op, -1) + self._inputs.append(self._mesh) + self._read_cyclic = Input( + nodal_rotational_velocity_Y._spec().input_pin(14), 14, op, -1 + ) + self._inputs.append(self._read_cyclic) + + @property + def time_scoping(self) -> Input: + 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.nodal_rotational_velocity_Y() + >>> 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: + 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.nodal_rotational_velocity_Y() + >>> 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: + r"""Allows to connect fields_container input to the operator. + + FieldsContainer already allocated modified inplace + + Returns + ------- + input: + An Input instance for this pin. + + Examples + -------- + >>> from ansys.dpf import core as dpf + >>> op = dpf.operators.result.nodal_rotational_velocity_Y() + >>> op.inputs.fields_container.connect(my_fields_container) + >>> # or + >>> op.inputs.fields_container(my_fields_container) + """ + return self._fields_container + + @property + def streams_container(self) -> Input: + r"""Allows to connect streams_container input to the operator. + + 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.nodal_rotational_velocity_Y() + >>> op.inputs.streams_container.connect(my_streams_container) + >>> # or + >>> op.inputs.streams_container(my_streams_container) + """ + return self._streams_container + + @property + def data_sources(self) -> Input: + r"""Allows to connect data_sources input to the operator. + + 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.nodal_rotational_velocity_Y() + >>> 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: + r"""Allows to connect bool_rotate_to_global input to the operator. + + if true the field is rotated to global coordinate system (default true) + + Returns + ------- + input: + An Input instance for this pin. + + Examples + -------- + >>> from ansys.dpf import core as dpf + >>> op = dpf.operators.result.nodal_rotational_velocity_Y() + >>> 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: + 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.nodal_rotational_velocity_Y() + >>> op.inputs.mesh.connect(my_mesh) + >>> # or + >>> op.inputs.mesh(my_mesh) + """ + return self._mesh + + @property + def read_cyclic(self) -> Input: + r"""Allows to connect read_cyclic input to the operator. + + if 0 cyclic symmetry is ignored, if 1 cyclic sector is read, if 2 cyclic expansion is done, if 3 cyclic expansion is done and stages are merged (default is 1) + + Returns + ------- + input: + An Input instance for this pin. + + Examples + -------- + >>> from ansys.dpf import core as dpf + >>> op = dpf.operators.result.nodal_rotational_velocity_Y() + >>> op.inputs.read_cyclic.connect(my_read_cyclic) + >>> # or + >>> op.inputs.read_cyclic(my_read_cyclic) + """ + return self._read_cyclic + + +class OutputsNodalRotationalVelocityY(_Outputs): + """Intermediate class used to get outputs from + nodal_rotational_velocity_Y operator. + + Examples + -------- + >>> from ansys.dpf import core as dpf + >>> op = dpf.operators.result.nodal_rotational_velocity_Y() + >>> # Connect inputs : op.inputs. ... + >>> result_fields_container = op.outputs.fields_container() + """ + + def __init__(self, op: Operator): + super().__init__(nodal_rotational_velocity_Y._spec().outputs, op) + self._fields_container = Output( + nodal_rotational_velocity_Y._spec().output_pin(0), 0, op + ) + self._outputs.append(self._fields_container) + + @property + def fields_container(self) -> Output: + r"""Allows to get fields_container output of the operator + + Returns + ------- + output: + An Output instance for this pin. + + Examples + -------- + >>> from ansys.dpf import core as dpf + >>> op = dpf.operators.result.nodal_rotational_velocity_Y() + >>> # 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/nodal_rotational_velocity_Z.py b/src/ansys/dpf/core/operators/result/nodal_rotational_velocity_Z.py new file mode 100644 index 0000000000..b663774b90 --- /dev/null +++ b/src/ansys/dpf/core/operators/result/nodal_rotational_velocity_Z.py @@ -0,0 +1,502 @@ +""" +nodal_rotational_velocity_Z + +Autogenerated DPF operator classes. +""" + +from __future__ import annotations + +from warnings import warn +from ansys.dpf.core.dpf_operator import Operator +from ansys.dpf.core.inputs import Input, _Inputs +from ansys.dpf.core.outputs import Output, _Outputs +from ansys.dpf.core.operators.specification import PinSpecification, Specification +from ansys.dpf.core.config import Config +from ansys.dpf.core.server_types import AnyServerType + + +class nodal_rotational_velocity_Z(Operator): + r"""Read/compute nodal rotational velocity Z component of the vector (3rd + component) by calling the readers defined by the datasources. + + + Parameters + ---------- + 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 + FieldsContainer 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) + mesh: MeshedRegion or MeshesContainer, optional + prevents from reading the mesh in the result files + read_cyclic: int, optional + if 0 cyclic symmetry is ignored, if 1 cyclic sector is read, if 2 cyclic expansion is done, if 3 cyclic expansion is done and stages are merged (default is 1) + + Returns + ------- + fields_container: FieldsContainer + + Examples + -------- + >>> from ansys.dpf import core as dpf + + >>> # Instantiate operator + >>> op = dpf.operators.result.nodal_rotational_velocity_Z() + + >>> # 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) + >>> my_read_cyclic = int() + >>> op.inputs.read_cyclic.connect(my_read_cyclic) + + >>> # Instantiate operator and connect inputs in one line + >>> op = dpf.operators.result.nodal_rotational_velocity_Z( + ... 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, + ... read_cyclic=my_read_cyclic, + ... ) + + >>> # 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, + read_cyclic=None, + config=None, + server=None, + ): + super().__init__(name="OMGZ", config=config, server=server) + self._inputs = InputsNodalRotationalVelocityZ(self) + self._outputs = OutputsNodalRotationalVelocityZ(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) + if read_cyclic is not None: + self.inputs.read_cyclic.connect(read_cyclic) + + @staticmethod + def _spec() -> Specification: + description = r"""Read/compute nodal rotational velocity Z component of the vector (3rd +component) 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"""FieldsContainer 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)""", + ), + 7: PinSpecification( + name="mesh", + type_names=["abstract_meshed_region", "meshes_container"], + optional=True, + document=r"""prevents from reading the mesh in the result files""", + ), + 14: PinSpecification( + name="read_cyclic", + type_names=["enum dataProcessing::ECyclicReading", "int32"], + optional=True, + document=r"""if 0 cyclic symmetry is ignored, if 1 cyclic sector is read, if 2 cyclic expansion is done, if 3 cyclic expansion is done and stages are merged (default is 1)""", + ), + }, + 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="OMGZ", server=server) + + @property + def inputs(self) -> InputsNodalRotationalVelocityZ: + """Enables to connect inputs to the operator + + Returns + -------- + inputs: + An instance of InputsNodalRotationalVelocityZ. + """ + return super().inputs + + @property + def outputs(self) -> OutputsNodalRotationalVelocityZ: + """Enables to get outputs of the operator by evaluating it + + Returns + -------- + outputs: + An instance of OutputsNodalRotationalVelocityZ. + """ + return super().outputs + + +class InputsNodalRotationalVelocityZ(_Inputs): + """Intermediate class used to connect user inputs to + nodal_rotational_velocity_Z operator. + + Examples + -------- + >>> from ansys.dpf import core as dpf + >>> op = dpf.operators.result.nodal_rotational_velocity_Z() + >>> 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) + >>> my_read_cyclic = int() + >>> op.inputs.read_cyclic.connect(my_read_cyclic) + """ + + def __init__(self, op: Operator): + super().__init__(nodal_rotational_velocity_Z._spec().inputs, op) + self._time_scoping = Input( + nodal_rotational_velocity_Z._spec().input_pin(0), 0, op, -1 + ) + self._inputs.append(self._time_scoping) + self._mesh_scoping = Input( + nodal_rotational_velocity_Z._spec().input_pin(1), 1, op, -1 + ) + self._inputs.append(self._mesh_scoping) + self._fields_container = Input( + nodal_rotational_velocity_Z._spec().input_pin(2), 2, op, -1 + ) + self._inputs.append(self._fields_container) + self._streams_container = Input( + nodal_rotational_velocity_Z._spec().input_pin(3), 3, op, -1 + ) + self._inputs.append(self._streams_container) + self._data_sources = Input( + nodal_rotational_velocity_Z._spec().input_pin(4), 4, op, -1 + ) + self._inputs.append(self._data_sources) + self._bool_rotate_to_global = Input( + nodal_rotational_velocity_Z._spec().input_pin(5), 5, op, -1 + ) + self._inputs.append(self._bool_rotate_to_global) + self._mesh = Input(nodal_rotational_velocity_Z._spec().input_pin(7), 7, op, -1) + self._inputs.append(self._mesh) + self._read_cyclic = Input( + nodal_rotational_velocity_Z._spec().input_pin(14), 14, op, -1 + ) + self._inputs.append(self._read_cyclic) + + @property + def time_scoping(self) -> Input: + 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.nodal_rotational_velocity_Z() + >>> 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: + 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.nodal_rotational_velocity_Z() + >>> 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: + r"""Allows to connect fields_container input to the operator. + + FieldsContainer already allocated modified inplace + + Returns + ------- + input: + An Input instance for this pin. + + Examples + -------- + >>> from ansys.dpf import core as dpf + >>> op = dpf.operators.result.nodal_rotational_velocity_Z() + >>> op.inputs.fields_container.connect(my_fields_container) + >>> # or + >>> op.inputs.fields_container(my_fields_container) + """ + return self._fields_container + + @property + def streams_container(self) -> Input: + r"""Allows to connect streams_container input to the operator. + + 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.nodal_rotational_velocity_Z() + >>> op.inputs.streams_container.connect(my_streams_container) + >>> # or + >>> op.inputs.streams_container(my_streams_container) + """ + return self._streams_container + + @property + def data_sources(self) -> Input: + r"""Allows to connect data_sources input to the operator. + + 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.nodal_rotational_velocity_Z() + >>> 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: + r"""Allows to connect bool_rotate_to_global input to the operator. + + if true the field is rotated to global coordinate system (default true) + + Returns + ------- + input: + An Input instance for this pin. + + Examples + -------- + >>> from ansys.dpf import core as dpf + >>> op = dpf.operators.result.nodal_rotational_velocity_Z() + >>> 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: + 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.nodal_rotational_velocity_Z() + >>> op.inputs.mesh.connect(my_mesh) + >>> # or + >>> op.inputs.mesh(my_mesh) + """ + return self._mesh + + @property + def read_cyclic(self) -> Input: + r"""Allows to connect read_cyclic input to the operator. + + if 0 cyclic symmetry is ignored, if 1 cyclic sector is read, if 2 cyclic expansion is done, if 3 cyclic expansion is done and stages are merged (default is 1) + + Returns + ------- + input: + An Input instance for this pin. + + Examples + -------- + >>> from ansys.dpf import core as dpf + >>> op = dpf.operators.result.nodal_rotational_velocity_Z() + >>> op.inputs.read_cyclic.connect(my_read_cyclic) + >>> # or + >>> op.inputs.read_cyclic(my_read_cyclic) + """ + return self._read_cyclic + + +class OutputsNodalRotationalVelocityZ(_Outputs): + """Intermediate class used to get outputs from + nodal_rotational_velocity_Z operator. + + Examples + -------- + >>> from ansys.dpf import core as dpf + >>> op = dpf.operators.result.nodal_rotational_velocity_Z() + >>> # Connect inputs : op.inputs. ... + >>> result_fields_container = op.outputs.fields_container() + """ + + def __init__(self, op: Operator): + super().__init__(nodal_rotational_velocity_Z._spec().outputs, op) + self._fields_container = Output( + nodal_rotational_velocity_Z._spec().output_pin(0), 0, op + ) + self._outputs.append(self._fields_container) + + @property + def fields_container(self) -> Output: + r"""Allows to get fields_container output of the operator + + Returns + ------- + output: + An Output instance for this pin. + + Examples + -------- + >>> from ansys.dpf import core as dpf + >>> op = dpf.operators.result.nodal_rotational_velocity_Z() + >>> # 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/nodal_rotations.py b/src/ansys/dpf/core/operators/result/nodal_rotations.py new file mode 100644 index 0000000000..3b65c398c9 --- /dev/null +++ b/src/ansys/dpf/core/operators/result/nodal_rotations.py @@ -0,0 +1,449 @@ +""" +nodal_rotations + +Autogenerated DPF operator classes. +""" + +from __future__ import annotations + +from warnings import warn +from ansys.dpf.core.dpf_operator import Operator +from ansys.dpf.core.inputs import Input, _Inputs +from ansys.dpf.core.outputs import Output, _Outputs +from ansys.dpf.core.operators.specification import PinSpecification, Specification +from ansys.dpf.core.config import Config +from ansys.dpf.core.server_types import AnyServerType + + +class nodal_rotations(Operator): + r"""Read/compute nodal rotations by calling the readers defined by the + datasources. + + + Parameters + ---------- + 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 + + Returns + ------- + fields_container: FieldsContainer + + Examples + -------- + >>> from ansys.dpf import core as dpf + + >>> # Instantiate operator + >>> op = dpf.operators.result.nodal_rotations() + + >>> # 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.nodal_rotations( + ... 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="ROT", config=config, server=server) + self._inputs = InputsNodalRotations(self) + self._outputs = OutputsNodalRotations(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 nodal rotations 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="ROT", server=server) + + @property + def inputs(self) -> InputsNodalRotations: + """Enables to connect inputs to the operator + + Returns + -------- + inputs: + An instance of InputsNodalRotations. + """ + return super().inputs + + @property + def outputs(self) -> OutputsNodalRotations: + """Enables to get outputs of the operator by evaluating it + + Returns + -------- + outputs: + An instance of OutputsNodalRotations. + """ + return super().outputs + + +class InputsNodalRotations(_Inputs): + """Intermediate class used to connect user inputs to + nodal_rotations operator. + + Examples + -------- + >>> from ansys.dpf import core as dpf + >>> op = dpf.operators.result.nodal_rotations() + >>> 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__(nodal_rotations._spec().inputs, op) + self._time_scoping = Input(nodal_rotations._spec().input_pin(0), 0, op, -1) + self._inputs.append(self._time_scoping) + self._mesh_scoping = Input(nodal_rotations._spec().input_pin(1), 1, op, -1) + self._inputs.append(self._mesh_scoping) + self._fields_container = Input(nodal_rotations._spec().input_pin(2), 2, op, -1) + self._inputs.append(self._fields_container) + self._streams_container = Input(nodal_rotations._spec().input_pin(3), 3, op, -1) + self._inputs.append(self._streams_container) + self._data_sources = Input(nodal_rotations._spec().input_pin(4), 4, op, -1) + self._inputs.append(self._data_sources) + self._bool_rotate_to_global = Input( + nodal_rotations._spec().input_pin(5), 5, op, -1 + ) + self._inputs.append(self._bool_rotate_to_global) + self._mesh = Input(nodal_rotations._spec().input_pin(7), 7, op, -1) + self._inputs.append(self._mesh) + + @property + def time_scoping(self) -> Input: + 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.nodal_rotations() + >>> 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: + 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.nodal_rotations() + >>> 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: + 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.nodal_rotations() + >>> op.inputs.fields_container.connect(my_fields_container) + >>> # or + >>> op.inputs.fields_container(my_fields_container) + """ + return self._fields_container + + @property + def streams_container(self) -> Input: + r"""Allows to connect streams_container input to the operator. + + 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.nodal_rotations() + >>> op.inputs.streams_container.connect(my_streams_container) + >>> # or + >>> op.inputs.streams_container(my_streams_container) + """ + return self._streams_container + + @property + def data_sources(self) -> Input: + r"""Allows to connect data_sources input to the operator. + + 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.nodal_rotations() + >>> 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: + 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.nodal_rotations() + >>> 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: + 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.nodal_rotations() + >>> op.inputs.mesh.connect(my_mesh) + >>> # or + >>> op.inputs.mesh(my_mesh) + """ + return self._mesh + + +class OutputsNodalRotations(_Outputs): + """Intermediate class used to get outputs from + nodal_rotations operator. + + Examples + -------- + >>> from ansys.dpf import core as dpf + >>> op = dpf.operators.result.nodal_rotations() + >>> # Connect inputs : op.inputs. ... + >>> result_fields_container = op.outputs.fields_container() + """ + + def __init__(self, op: Operator): + super().__init__(nodal_rotations._spec().outputs, op) + self._fields_container = Output(nodal_rotations._spec().output_pin(0), 0, op) + self._outputs.append(self._fields_container) + + @property + def fields_container(self) -> Output: + r"""Allows to get fields_container output of the operator + + Returns + ------- + output: + An Output instance for this pin. + + Examples + -------- + >>> from ansys.dpf import core as dpf + >>> op = dpf.operators.result.nodal_rotations() + >>> # 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/nodal_rotations_X.py b/src/ansys/dpf/core/operators/result/nodal_rotations_X.py new file mode 100644 index 0000000000..a921d5d798 --- /dev/null +++ b/src/ansys/dpf/core/operators/result/nodal_rotations_X.py @@ -0,0 +1,492 @@ +""" +nodal_rotations_X + +Autogenerated DPF operator classes. +""" + +from __future__ import annotations + +from warnings import warn +from ansys.dpf.core.dpf_operator import Operator +from ansys.dpf.core.inputs import Input, _Inputs +from ansys.dpf.core.outputs import Output, _Outputs +from ansys.dpf.core.operators.specification import PinSpecification, Specification +from ansys.dpf.core.config import Config +from ansys.dpf.core.server_types import AnyServerType + + +class nodal_rotations_X(Operator): + r"""Read/compute nodal rotations X component of the vector (1st component) + by calling the readers defined by the datasources. + + + Parameters + ---------- + 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 + FieldsContainer 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) + mesh: MeshedRegion or MeshesContainer, optional + prevents from reading the mesh in the result files + read_cyclic: int, optional + if 0 cyclic symmetry is ignored, if 1 cyclic sector is read, if 2 cyclic expansion is done, if 3 cyclic expansion is done and stages are merged (default is 1) + + Returns + ------- + fields_container: FieldsContainer + + Examples + -------- + >>> from ansys.dpf import core as dpf + + >>> # Instantiate operator + >>> op = dpf.operators.result.nodal_rotations_X() + + >>> # 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) + >>> my_read_cyclic = int() + >>> op.inputs.read_cyclic.connect(my_read_cyclic) + + >>> # Instantiate operator and connect inputs in one line + >>> op = dpf.operators.result.nodal_rotations_X( + ... 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, + ... read_cyclic=my_read_cyclic, + ... ) + + >>> # 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, + read_cyclic=None, + config=None, + server=None, + ): + super().__init__(name="ROTX", config=config, server=server) + self._inputs = InputsNodalRotationsX(self) + self._outputs = OutputsNodalRotationsX(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) + if read_cyclic is not None: + self.inputs.read_cyclic.connect(read_cyclic) + + @staticmethod + def _spec() -> Specification: + description = r"""Read/compute nodal rotations X component of the vector (1st component) +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"""FieldsContainer 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)""", + ), + 7: PinSpecification( + name="mesh", + type_names=["abstract_meshed_region", "meshes_container"], + optional=True, + document=r"""prevents from reading the mesh in the result files""", + ), + 14: PinSpecification( + name="read_cyclic", + type_names=["enum dataProcessing::ECyclicReading", "int32"], + optional=True, + document=r"""if 0 cyclic symmetry is ignored, if 1 cyclic sector is read, if 2 cyclic expansion is done, if 3 cyclic expansion is done and stages are merged (default is 1)""", + ), + }, + 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="ROTX", server=server) + + @property + def inputs(self) -> InputsNodalRotationsX: + """Enables to connect inputs to the operator + + Returns + -------- + inputs: + An instance of InputsNodalRotationsX. + """ + return super().inputs + + @property + def outputs(self) -> OutputsNodalRotationsX: + """Enables to get outputs of the operator by evaluating it + + Returns + -------- + outputs: + An instance of OutputsNodalRotationsX. + """ + return super().outputs + + +class InputsNodalRotationsX(_Inputs): + """Intermediate class used to connect user inputs to + nodal_rotations_X operator. + + Examples + -------- + >>> from ansys.dpf import core as dpf + >>> op = dpf.operators.result.nodal_rotations_X() + >>> 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) + >>> my_read_cyclic = int() + >>> op.inputs.read_cyclic.connect(my_read_cyclic) + """ + + def __init__(self, op: Operator): + super().__init__(nodal_rotations_X._spec().inputs, op) + self._time_scoping = Input(nodal_rotations_X._spec().input_pin(0), 0, op, -1) + self._inputs.append(self._time_scoping) + self._mesh_scoping = Input(nodal_rotations_X._spec().input_pin(1), 1, op, -1) + self._inputs.append(self._mesh_scoping) + self._fields_container = Input( + nodal_rotations_X._spec().input_pin(2), 2, op, -1 + ) + self._inputs.append(self._fields_container) + self._streams_container = Input( + nodal_rotations_X._spec().input_pin(3), 3, op, -1 + ) + self._inputs.append(self._streams_container) + self._data_sources = Input(nodal_rotations_X._spec().input_pin(4), 4, op, -1) + self._inputs.append(self._data_sources) + self._bool_rotate_to_global = Input( + nodal_rotations_X._spec().input_pin(5), 5, op, -1 + ) + self._inputs.append(self._bool_rotate_to_global) + self._mesh = Input(nodal_rotations_X._spec().input_pin(7), 7, op, -1) + self._inputs.append(self._mesh) + self._read_cyclic = Input(nodal_rotations_X._spec().input_pin(14), 14, op, -1) + self._inputs.append(self._read_cyclic) + + @property + def time_scoping(self) -> Input: + 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.nodal_rotations_X() + >>> 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: + 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.nodal_rotations_X() + >>> 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: + r"""Allows to connect fields_container input to the operator. + + FieldsContainer already allocated modified inplace + + Returns + ------- + input: + An Input instance for this pin. + + Examples + -------- + >>> from ansys.dpf import core as dpf + >>> op = dpf.operators.result.nodal_rotations_X() + >>> op.inputs.fields_container.connect(my_fields_container) + >>> # or + >>> op.inputs.fields_container(my_fields_container) + """ + return self._fields_container + + @property + def streams_container(self) -> Input: + r"""Allows to connect streams_container input to the operator. + + 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.nodal_rotations_X() + >>> op.inputs.streams_container.connect(my_streams_container) + >>> # or + >>> op.inputs.streams_container(my_streams_container) + """ + return self._streams_container + + @property + def data_sources(self) -> Input: + r"""Allows to connect data_sources input to the operator. + + 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.nodal_rotations_X() + >>> 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: + r"""Allows to connect bool_rotate_to_global input to the operator. + + if true the field is rotated to global coordinate system (default true) + + Returns + ------- + input: + An Input instance for this pin. + + Examples + -------- + >>> from ansys.dpf import core as dpf + >>> op = dpf.operators.result.nodal_rotations_X() + >>> 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: + 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.nodal_rotations_X() + >>> op.inputs.mesh.connect(my_mesh) + >>> # or + >>> op.inputs.mesh(my_mesh) + """ + return self._mesh + + @property + def read_cyclic(self) -> Input: + r"""Allows to connect read_cyclic input to the operator. + + if 0 cyclic symmetry is ignored, if 1 cyclic sector is read, if 2 cyclic expansion is done, if 3 cyclic expansion is done and stages are merged (default is 1) + + Returns + ------- + input: + An Input instance for this pin. + + Examples + -------- + >>> from ansys.dpf import core as dpf + >>> op = dpf.operators.result.nodal_rotations_X() + >>> op.inputs.read_cyclic.connect(my_read_cyclic) + >>> # or + >>> op.inputs.read_cyclic(my_read_cyclic) + """ + return self._read_cyclic + + +class OutputsNodalRotationsX(_Outputs): + """Intermediate class used to get outputs from + nodal_rotations_X operator. + + Examples + -------- + >>> from ansys.dpf import core as dpf + >>> op = dpf.operators.result.nodal_rotations_X() + >>> # Connect inputs : op.inputs. ... + >>> result_fields_container = op.outputs.fields_container() + """ + + def __init__(self, op: Operator): + super().__init__(nodal_rotations_X._spec().outputs, op) + self._fields_container = Output(nodal_rotations_X._spec().output_pin(0), 0, op) + self._outputs.append(self._fields_container) + + @property + def fields_container(self) -> Output: + r"""Allows to get fields_container output of the operator + + Returns + ------- + output: + An Output instance for this pin. + + Examples + -------- + >>> from ansys.dpf import core as dpf + >>> op = dpf.operators.result.nodal_rotations_X() + >>> # 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/nodal_rotations_Y.py b/src/ansys/dpf/core/operators/result/nodal_rotations_Y.py new file mode 100644 index 0000000000..c6fe946435 --- /dev/null +++ b/src/ansys/dpf/core/operators/result/nodal_rotations_Y.py @@ -0,0 +1,492 @@ +""" +nodal_rotations_Y + +Autogenerated DPF operator classes. +""" + +from __future__ import annotations + +from warnings import warn +from ansys.dpf.core.dpf_operator import Operator +from ansys.dpf.core.inputs import Input, _Inputs +from ansys.dpf.core.outputs import Output, _Outputs +from ansys.dpf.core.operators.specification import PinSpecification, Specification +from ansys.dpf.core.config import Config +from ansys.dpf.core.server_types import AnyServerType + + +class nodal_rotations_Y(Operator): + r"""Read/compute nodal rotations Y component of the vector (2nd component) + by calling the readers defined by the datasources. + + + Parameters + ---------- + 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 + FieldsContainer 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) + mesh: MeshedRegion or MeshesContainer, optional + prevents from reading the mesh in the result files + read_cyclic: int, optional + if 0 cyclic symmetry is ignored, if 1 cyclic sector is read, if 2 cyclic expansion is done, if 3 cyclic expansion is done and stages are merged (default is 1) + + Returns + ------- + fields_container: FieldsContainer + + Examples + -------- + >>> from ansys.dpf import core as dpf + + >>> # Instantiate operator + >>> op = dpf.operators.result.nodal_rotations_Y() + + >>> # 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) + >>> my_read_cyclic = int() + >>> op.inputs.read_cyclic.connect(my_read_cyclic) + + >>> # Instantiate operator and connect inputs in one line + >>> op = dpf.operators.result.nodal_rotations_Y( + ... 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, + ... read_cyclic=my_read_cyclic, + ... ) + + >>> # 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, + read_cyclic=None, + config=None, + server=None, + ): + super().__init__(name="ROTY", config=config, server=server) + self._inputs = InputsNodalRotationsY(self) + self._outputs = OutputsNodalRotationsY(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) + if read_cyclic is not None: + self.inputs.read_cyclic.connect(read_cyclic) + + @staticmethod + def _spec() -> Specification: + description = r"""Read/compute nodal rotations Y component of the vector (2nd component) +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"""FieldsContainer 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)""", + ), + 7: PinSpecification( + name="mesh", + type_names=["abstract_meshed_region", "meshes_container"], + optional=True, + document=r"""prevents from reading the mesh in the result files""", + ), + 14: PinSpecification( + name="read_cyclic", + type_names=["enum dataProcessing::ECyclicReading", "int32"], + optional=True, + document=r"""if 0 cyclic symmetry is ignored, if 1 cyclic sector is read, if 2 cyclic expansion is done, if 3 cyclic expansion is done and stages are merged (default is 1)""", + ), + }, + 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="ROTY", server=server) + + @property + def inputs(self) -> InputsNodalRotationsY: + """Enables to connect inputs to the operator + + Returns + -------- + inputs: + An instance of InputsNodalRotationsY. + """ + return super().inputs + + @property + def outputs(self) -> OutputsNodalRotationsY: + """Enables to get outputs of the operator by evaluating it + + Returns + -------- + outputs: + An instance of OutputsNodalRotationsY. + """ + return super().outputs + + +class InputsNodalRotationsY(_Inputs): + """Intermediate class used to connect user inputs to + nodal_rotations_Y operator. + + Examples + -------- + >>> from ansys.dpf import core as dpf + >>> op = dpf.operators.result.nodal_rotations_Y() + >>> 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) + >>> my_read_cyclic = int() + >>> op.inputs.read_cyclic.connect(my_read_cyclic) + """ + + def __init__(self, op: Operator): + super().__init__(nodal_rotations_Y._spec().inputs, op) + self._time_scoping = Input(nodal_rotations_Y._spec().input_pin(0), 0, op, -1) + self._inputs.append(self._time_scoping) + self._mesh_scoping = Input(nodal_rotations_Y._spec().input_pin(1), 1, op, -1) + self._inputs.append(self._mesh_scoping) + self._fields_container = Input( + nodal_rotations_Y._spec().input_pin(2), 2, op, -1 + ) + self._inputs.append(self._fields_container) + self._streams_container = Input( + nodal_rotations_Y._spec().input_pin(3), 3, op, -1 + ) + self._inputs.append(self._streams_container) + self._data_sources = Input(nodal_rotations_Y._spec().input_pin(4), 4, op, -1) + self._inputs.append(self._data_sources) + self._bool_rotate_to_global = Input( + nodal_rotations_Y._spec().input_pin(5), 5, op, -1 + ) + self._inputs.append(self._bool_rotate_to_global) + self._mesh = Input(nodal_rotations_Y._spec().input_pin(7), 7, op, -1) + self._inputs.append(self._mesh) + self._read_cyclic = Input(nodal_rotations_Y._spec().input_pin(14), 14, op, -1) + self._inputs.append(self._read_cyclic) + + @property + def time_scoping(self) -> Input: + 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.nodal_rotations_Y() + >>> 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: + 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.nodal_rotations_Y() + >>> 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: + r"""Allows to connect fields_container input to the operator. + + FieldsContainer already allocated modified inplace + + Returns + ------- + input: + An Input instance for this pin. + + Examples + -------- + >>> from ansys.dpf import core as dpf + >>> op = dpf.operators.result.nodal_rotations_Y() + >>> op.inputs.fields_container.connect(my_fields_container) + >>> # or + >>> op.inputs.fields_container(my_fields_container) + """ + return self._fields_container + + @property + def streams_container(self) -> Input: + r"""Allows to connect streams_container input to the operator. + + 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.nodal_rotations_Y() + >>> op.inputs.streams_container.connect(my_streams_container) + >>> # or + >>> op.inputs.streams_container(my_streams_container) + """ + return self._streams_container + + @property + def data_sources(self) -> Input: + r"""Allows to connect data_sources input to the operator. + + 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.nodal_rotations_Y() + >>> 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: + r"""Allows to connect bool_rotate_to_global input to the operator. + + if true the field is rotated to global coordinate system (default true) + + Returns + ------- + input: + An Input instance for this pin. + + Examples + -------- + >>> from ansys.dpf import core as dpf + >>> op = dpf.operators.result.nodal_rotations_Y() + >>> 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: + 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.nodal_rotations_Y() + >>> op.inputs.mesh.connect(my_mesh) + >>> # or + >>> op.inputs.mesh(my_mesh) + """ + return self._mesh + + @property + def read_cyclic(self) -> Input: + r"""Allows to connect read_cyclic input to the operator. + + if 0 cyclic symmetry is ignored, if 1 cyclic sector is read, if 2 cyclic expansion is done, if 3 cyclic expansion is done and stages are merged (default is 1) + + Returns + ------- + input: + An Input instance for this pin. + + Examples + -------- + >>> from ansys.dpf import core as dpf + >>> op = dpf.operators.result.nodal_rotations_Y() + >>> op.inputs.read_cyclic.connect(my_read_cyclic) + >>> # or + >>> op.inputs.read_cyclic(my_read_cyclic) + """ + return self._read_cyclic + + +class OutputsNodalRotationsY(_Outputs): + """Intermediate class used to get outputs from + nodal_rotations_Y operator. + + Examples + -------- + >>> from ansys.dpf import core as dpf + >>> op = dpf.operators.result.nodal_rotations_Y() + >>> # Connect inputs : op.inputs. ... + >>> result_fields_container = op.outputs.fields_container() + """ + + def __init__(self, op: Operator): + super().__init__(nodal_rotations_Y._spec().outputs, op) + self._fields_container = Output(nodal_rotations_Y._spec().output_pin(0), 0, op) + self._outputs.append(self._fields_container) + + @property + def fields_container(self) -> Output: + r"""Allows to get fields_container output of the operator + + Returns + ------- + output: + An Output instance for this pin. + + Examples + -------- + >>> from ansys.dpf import core as dpf + >>> op = dpf.operators.result.nodal_rotations_Y() + >>> # 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/nodal_rotations_Z.py b/src/ansys/dpf/core/operators/result/nodal_rotations_Z.py new file mode 100644 index 0000000000..92f1a39564 --- /dev/null +++ b/src/ansys/dpf/core/operators/result/nodal_rotations_Z.py @@ -0,0 +1,492 @@ +""" +nodal_rotations_Z + +Autogenerated DPF operator classes. +""" + +from __future__ import annotations + +from warnings import warn +from ansys.dpf.core.dpf_operator import Operator +from ansys.dpf.core.inputs import Input, _Inputs +from ansys.dpf.core.outputs import Output, _Outputs +from ansys.dpf.core.operators.specification import PinSpecification, Specification +from ansys.dpf.core.config import Config +from ansys.dpf.core.server_types import AnyServerType + + +class nodal_rotations_Z(Operator): + r"""Read/compute nodal rotations Z component of the vector (3rd component) + by calling the readers defined by the datasources. + + + Parameters + ---------- + 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 + FieldsContainer 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) + mesh: MeshedRegion or MeshesContainer, optional + prevents from reading the mesh in the result files + read_cyclic: int, optional + if 0 cyclic symmetry is ignored, if 1 cyclic sector is read, if 2 cyclic expansion is done, if 3 cyclic expansion is done and stages are merged (default is 1) + + Returns + ------- + fields_container: FieldsContainer + + Examples + -------- + >>> from ansys.dpf import core as dpf + + >>> # Instantiate operator + >>> op = dpf.operators.result.nodal_rotations_Z() + + >>> # 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) + >>> my_read_cyclic = int() + >>> op.inputs.read_cyclic.connect(my_read_cyclic) + + >>> # Instantiate operator and connect inputs in one line + >>> op = dpf.operators.result.nodal_rotations_Z( + ... 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, + ... read_cyclic=my_read_cyclic, + ... ) + + >>> # 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, + read_cyclic=None, + config=None, + server=None, + ): + super().__init__(name="ROTZ", config=config, server=server) + self._inputs = InputsNodalRotationsZ(self) + self._outputs = OutputsNodalRotationsZ(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) + if read_cyclic is not None: + self.inputs.read_cyclic.connect(read_cyclic) + + @staticmethod + def _spec() -> Specification: + description = r"""Read/compute nodal rotations Z component of the vector (3rd component) +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"""FieldsContainer 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)""", + ), + 7: PinSpecification( + name="mesh", + type_names=["abstract_meshed_region", "meshes_container"], + optional=True, + document=r"""prevents from reading the mesh in the result files""", + ), + 14: PinSpecification( + name="read_cyclic", + type_names=["enum dataProcessing::ECyclicReading", "int32"], + optional=True, + document=r"""if 0 cyclic symmetry is ignored, if 1 cyclic sector is read, if 2 cyclic expansion is done, if 3 cyclic expansion is done and stages are merged (default is 1)""", + ), + }, + 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="ROTZ", server=server) + + @property + def inputs(self) -> InputsNodalRotationsZ: + """Enables to connect inputs to the operator + + Returns + -------- + inputs: + An instance of InputsNodalRotationsZ. + """ + return super().inputs + + @property + def outputs(self) -> OutputsNodalRotationsZ: + """Enables to get outputs of the operator by evaluating it + + Returns + -------- + outputs: + An instance of OutputsNodalRotationsZ. + """ + return super().outputs + + +class InputsNodalRotationsZ(_Inputs): + """Intermediate class used to connect user inputs to + nodal_rotations_Z operator. + + Examples + -------- + >>> from ansys.dpf import core as dpf + >>> op = dpf.operators.result.nodal_rotations_Z() + >>> 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) + >>> my_read_cyclic = int() + >>> op.inputs.read_cyclic.connect(my_read_cyclic) + """ + + def __init__(self, op: Operator): + super().__init__(nodal_rotations_Z._spec().inputs, op) + self._time_scoping = Input(nodal_rotations_Z._spec().input_pin(0), 0, op, -1) + self._inputs.append(self._time_scoping) + self._mesh_scoping = Input(nodal_rotations_Z._spec().input_pin(1), 1, op, -1) + self._inputs.append(self._mesh_scoping) + self._fields_container = Input( + nodal_rotations_Z._spec().input_pin(2), 2, op, -1 + ) + self._inputs.append(self._fields_container) + self._streams_container = Input( + nodal_rotations_Z._spec().input_pin(3), 3, op, -1 + ) + self._inputs.append(self._streams_container) + self._data_sources = Input(nodal_rotations_Z._spec().input_pin(4), 4, op, -1) + self._inputs.append(self._data_sources) + self._bool_rotate_to_global = Input( + nodal_rotations_Z._spec().input_pin(5), 5, op, -1 + ) + self._inputs.append(self._bool_rotate_to_global) + self._mesh = Input(nodal_rotations_Z._spec().input_pin(7), 7, op, -1) + self._inputs.append(self._mesh) + self._read_cyclic = Input(nodal_rotations_Z._spec().input_pin(14), 14, op, -1) + self._inputs.append(self._read_cyclic) + + @property + def time_scoping(self) -> Input: + 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.nodal_rotations_Z() + >>> 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: + 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.nodal_rotations_Z() + >>> 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: + r"""Allows to connect fields_container input to the operator. + + FieldsContainer already allocated modified inplace + + Returns + ------- + input: + An Input instance for this pin. + + Examples + -------- + >>> from ansys.dpf import core as dpf + >>> op = dpf.operators.result.nodal_rotations_Z() + >>> op.inputs.fields_container.connect(my_fields_container) + >>> # or + >>> op.inputs.fields_container(my_fields_container) + """ + return self._fields_container + + @property + def streams_container(self) -> Input: + r"""Allows to connect streams_container input to the operator. + + 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.nodal_rotations_Z() + >>> op.inputs.streams_container.connect(my_streams_container) + >>> # or + >>> op.inputs.streams_container(my_streams_container) + """ + return self._streams_container + + @property + def data_sources(self) -> Input: + r"""Allows to connect data_sources input to the operator. + + 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.nodal_rotations_Z() + >>> 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: + r"""Allows to connect bool_rotate_to_global input to the operator. + + if true the field is rotated to global coordinate system (default true) + + Returns + ------- + input: + An Input instance for this pin. + + Examples + -------- + >>> from ansys.dpf import core as dpf + >>> op = dpf.operators.result.nodal_rotations_Z() + >>> 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: + 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.nodal_rotations_Z() + >>> op.inputs.mesh.connect(my_mesh) + >>> # or + >>> op.inputs.mesh(my_mesh) + """ + return self._mesh + + @property + def read_cyclic(self) -> Input: + r"""Allows to connect read_cyclic input to the operator. + + if 0 cyclic symmetry is ignored, if 1 cyclic sector is read, if 2 cyclic expansion is done, if 3 cyclic expansion is done and stages are merged (default is 1) + + Returns + ------- + input: + An Input instance for this pin. + + Examples + -------- + >>> from ansys.dpf import core as dpf + >>> op = dpf.operators.result.nodal_rotations_Z() + >>> op.inputs.read_cyclic.connect(my_read_cyclic) + >>> # or + >>> op.inputs.read_cyclic(my_read_cyclic) + """ + return self._read_cyclic + + +class OutputsNodalRotationsZ(_Outputs): + """Intermediate class used to get outputs from + nodal_rotations_Z operator. + + Examples + -------- + >>> from ansys.dpf import core as dpf + >>> op = dpf.operators.result.nodal_rotations_Z() + >>> # Connect inputs : op.inputs. ... + >>> result_fields_container = op.outputs.fields_container() + """ + + def __init__(self, op: Operator): + super().__init__(nodal_rotations_Z._spec().outputs, op) + self._fields_container = Output(nodal_rotations_Z._spec().output_pin(0), 0, op) + self._outputs.append(self._fields_container) + + @property + def fields_container(self) -> Output: + r"""Allows to get fields_container output of the operator + + Returns + ------- + output: + An Output instance for this pin. + + Examples + -------- + >>> from ansys.dpf import core as dpf + >>> op = dpf.operators.result.nodal_rotations_Z() + >>> # 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/recombine_harmonic_indeces_cyclic.py b/src/ansys/dpf/core/operators/result/recombine_harmonic_indeces_cyclic.py index 3a0e4375a6..a7c5b54a51 100644 --- a/src/ansys/dpf/core/operators/result/recombine_harmonic_indeces_cyclic.py +++ b/src/ansys/dpf/core/operators/result/recombine_harmonic_indeces_cyclic.py @@ -23,6 +23,8 @@ class recombine_harmonic_indeces_cyclic(Operator): Parameters ---------- fields_container: FieldsContainer + is_constant: bool, optional + If the result is constant, it will only copy the first result found. Returns ------- @@ -38,17 +40,22 @@ class recombine_harmonic_indeces_cyclic(Operator): >>> # Make input connections >>> my_fields_container = dpf.FieldsContainer() >>> op.inputs.fields_container.connect(my_fields_container) + >>> my_is_constant = bool() + >>> op.inputs.is_constant.connect(my_is_constant) >>> # Instantiate operator and connect inputs in one line >>> op = dpf.operators.result.recombine_harmonic_indeces_cyclic( ... fields_container=my_fields_container, + ... is_constant=my_is_constant, ... ) >>> # Get output data >>> result_fields_container = op.outputs.fields_container() """ - def __init__(self, fields_container=None, config=None, server=None): + def __init__( + self, fields_container=None, is_constant=None, config=None, server=None + ): super().__init__( name="recombine_harmonic_indeces_cyclic", config=config, server=server ) @@ -56,6 +63,8 @@ def __init__(self, fields_container=None, config=None, server=None): self._outputs = OutputsRecombineHarmonicIndecesCyclic(self) if fields_container is not None: self.inputs.fields_container.connect(fields_container) + if is_constant is not None: + self.inputs.is_constant.connect(is_constant) @staticmethod def _spec() -> Specification: @@ -71,6 +80,12 @@ def _spec() -> Specification: optional=False, document=r"""""", ), + 1: PinSpecification( + name="is_constant", + type_names=["bool"], + optional=True, + document=r"""If the result is constant, it will only copy the first result found.""", + ), }, map_output_pin_spec={ 0: PinSpecification( @@ -139,6 +154,8 @@ class InputsRecombineHarmonicIndecesCyclic(_Inputs): >>> op = dpf.operators.result.recombine_harmonic_indeces_cyclic() >>> my_fields_container = dpf.FieldsContainer() >>> op.inputs.fields_container.connect(my_fields_container) + >>> my_is_constant = bool() + >>> op.inputs.is_constant.connect(my_is_constant) """ def __init__(self, op: Operator): @@ -147,6 +164,10 @@ def __init__(self, op: Operator): recombine_harmonic_indeces_cyclic._spec().input_pin(0), 0, op, -1 ) self._inputs.append(self._fields_container) + self._is_constant = Input( + recombine_harmonic_indeces_cyclic._spec().input_pin(1), 1, op, -1 + ) + self._inputs.append(self._is_constant) @property def fields_container(self) -> Input: @@ -167,6 +188,27 @@ def fields_container(self) -> Input: """ return self._fields_container + @property + def is_constant(self) -> Input: + r"""Allows to connect is_constant input to the operator. + + If the result is constant, it will only copy the first result found. + + Returns + ------- + input: + An Input instance for this pin. + + Examples + -------- + >>> from ansys.dpf import core as dpf + >>> op = dpf.operators.result.recombine_harmonic_indeces_cyclic() + >>> op.inputs.is_constant.connect(my_is_constant) + >>> # or + >>> op.inputs.is_constant(my_is_constant) + """ + return self._is_constant + class OutputsRecombineHarmonicIndecesCyclic(_Outputs): """Intermediate class used to get outputs from 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 fd82c035d5..9249413b18 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 @@ -24,6 +24,8 @@ class adapt_with_scopings_container(Operator): ---------- field_or_fields_container: FieldsContainer or Field scopings_container: ScopingsContainer + keep_empty_fields: bool, optional + Default false. Returns ------- @@ -41,11 +43,14 @@ class adapt_with_scopings_container(Operator): >>> op.inputs.field_or_fields_container.connect(my_field_or_fields_container) >>> my_scopings_container = dpf.ScopingsContainer() >>> op.inputs.scopings_container.connect(my_scopings_container) + >>> my_keep_empty_fields = bool() + >>> op.inputs.keep_empty_fields.connect(my_keep_empty_fields) >>> # Instantiate operator and connect inputs in one line >>> op = dpf.operators.scoping.adapt_with_scopings_container( ... field_or_fields_container=my_field_or_fields_container, ... scopings_container=my_scopings_container, + ... keep_empty_fields=my_keep_empty_fields, ... ) >>> # Get output data @@ -56,6 +61,7 @@ def __init__( self, field_or_fields_container=None, scopings_container=None, + keep_empty_fields=None, config=None, server=None, ): @@ -66,6 +72,8 @@ def __init__( self.inputs.field_or_fields_container.connect(field_or_fields_container) if scopings_container is not None: self.inputs.scopings_container.connect(scopings_container) + if keep_empty_fields is not None: + self.inputs.keep_empty_fields.connect(keep_empty_fields) @staticmethod def _spec() -> Specification: @@ -87,6 +95,12 @@ def _spec() -> Specification: optional=False, document=r"""""", ), + 2: PinSpecification( + name="keep_empty_fields", + type_names=["bool"], + optional=True, + document=r"""Default false.""", + ), }, map_output_pin_spec={ 0: PinSpecification( @@ -155,6 +169,8 @@ class InputsAdaptWithScopingsContainer(_Inputs): >>> op.inputs.field_or_fields_container.connect(my_field_or_fields_container) >>> my_scopings_container = dpf.ScopingsContainer() >>> op.inputs.scopings_container.connect(my_scopings_container) + >>> my_keep_empty_fields = bool() + >>> op.inputs.keep_empty_fields.connect(my_keep_empty_fields) """ def __init__(self, op: Operator): @@ -167,6 +183,10 @@ def __init__(self, op: Operator): adapt_with_scopings_container._spec().input_pin(1), 1, op, -1 ) self._inputs.append(self._scopings_container) + self._keep_empty_fields = Input( + adapt_with_scopings_container._spec().input_pin(2), 2, op, -1 + ) + self._inputs.append(self._keep_empty_fields) @property def field_or_fields_container(self) -> Input: @@ -206,6 +226,27 @@ def scopings_container(self) -> Input: """ return self._scopings_container + @property + def keep_empty_fields(self) -> Input: + r"""Allows to connect keep_empty_fields input to the operator. + + Default false. + + Returns + ------- + input: + An Input instance for this pin. + + Examples + -------- + >>> from ansys.dpf import core as dpf + >>> op = dpf.operators.scoping.adapt_with_scopings_container() + >>> op.inputs.keep_empty_fields.connect(my_keep_empty_fields) + >>> # or + >>> op.inputs.keep_empty_fields(my_keep_empty_fields) + """ + return self._keep_empty_fields + class OutputsAdaptWithScopingsContainer(_Outputs): """Intermediate class used to get outputs from diff --git a/src/ansys/dpf/gatebin/Ans.Dpf.GrpcClient.dll b/src/ansys/dpf/gatebin/Ans.Dpf.GrpcClient.dll index 122d55637b..e28165a741 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 d4068efc33..775cd1070c 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/libAns.Dpf.GrpcClient.so b/src/ansys/dpf/gatebin/libAns.Dpf.GrpcClient.so index 9481df9cf4..d4a7de3836 100644 Binary files a/src/ansys/dpf/gatebin/libAns.Dpf.GrpcClient.so and b/src/ansys/dpf/gatebin/libAns.Dpf.GrpcClient.so differ diff --git a/src/ansys/dpf/gatebin/libDPFClientAPI.so b/src/ansys/dpf/gatebin/libDPFClientAPI.so index 2359a4453a..857e3091e2 100644 Binary files a/src/ansys/dpf/gatebin/libDPFClientAPI.so and b/src/ansys/dpf/gatebin/libDPFClientAPI.so differ