diff --git a/doc/source/_static/dpf_operators.html b/doc/source/_static/dpf_operators.html index e5a1ee6d295..403980accdd 100644 --- a/doc/source/_static/dpf_operators.html +++ b/doc/source/_static/dpf_operators.html @@ -5283,9 +5283,12 @@

Configurating operators

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

Outputs

Configurations

Scripting

Changelog

math: unit convert (fields container)

Description

Converts an input fields container of a given unit to another unit.

Version 0.0.0

Inputs

unit as a string, ex 'm' for meter, 'Pa' for pascal,...

-

Outputs

Configurations

Scripting

Changelog

math: norm (fields container)

Description

Computes the element-wise L2 norm of the field elementary data. This process is applied on each field of the input fields container.

-
Version 0.0.0

Inputs

Lp normalisation type, p = 1, 2, ...n - Default Lp=2

-

Outputs

Configurations

Scripting

Changelog

utility: property field get attribute

Description

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

+

Outputs

FieldsContainer with converted units (inplace operation)

+

Configurations

Scripting

Changelog

math: norm (fields container)

Description

Computes the element-wise L2 norm of the field elementary data. This process is applied on each field of the input fields container.

+
Version 0.0.0

Inputs

FieldsContainer containing fields for norm calculation

+

Lp normalisation type, p = 1, 2, ...n - Default Lp=2

+

Outputs

FieldsContainer with computed norms for each field

+

Configurations

Scripting

Changelog

utility: property field get attribute

Description

Gets a property from an input field/field container. A PropertyFieldin 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

result: element orientations X

Description

Read/compute element euler angles 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.

@@ -5301,9 +5304,10 @@

Configurating operators

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

Outputs

Configurations

Scripting

Changelog

mapping: prepare mapping workflow

Description

Generates a workflow that can map results from a support to another one.

Version 0.0.0

Inputs

Radius size for the RBF filter

-

Outputs

Configurations

Scripting

Changelog

math: sqrt (fields container)

Description

Computes element-wise sqrt(field1).

-
Version 0.0.0

Inputs

field or fields container with only one field is expected

-

Outputs

Configurations

Scripting

Changelog

math: conjugate

Description

Computes element-wise conjugate of field containers containing complex fields.

+

Outputs

Configurations

Scripting

Changelog

math: sqrt (fields container)

Description

Computes element-wise square root function on field data: sqrt(field[i]).

+
Version 0.0.0

Inputs

Field or fields container containing numeric data for square root calculation

+

Outputs

Field with square root values applied element-wise to input data

+

Configurations

Scripting

Changelog

math: conjugate

Description

Computes element-wise conjugate of field containers containing complex fields.

Version 0.0.0

Inputs

Outputs

Configurations

Scripting

Changelog

utility: html doc

Description

Create dpf's html documentation. Only on Windows.

Version 0.1.0

Inputs

default is {working directory}/dataProcessingDoc.html

Generate the documentation depending on exposure level : 0 (default) for public operators, 1 includes hidden operator, 2 includes private operator, 3 includes operator without specifications.

@@ -5343,11 +5347,13 @@

Configurating operators

Configurations

Scripting

Changelog

math: norm (field)

Description

Computes the element-wise Lp norm of the field elementary data. Default Lp=L2

Version 0.0.0

Inputs

field or fields container with only one field is expected

Lp normalisation type, p = 1, 2, ...n - Default Lp=L2

-

Outputs

Configurations

Scripting

Changelog

utility: make label space

Description

Assemble strings and integers to make a label space.

+

Outputs

Scalar field containing the Lp norm values for each element

+

Configurations

Scripting

Changelog

utility: make label space

Description

Assemble strings and integers to make a label space.

Version 0.0.0

Inputs

Used as a base label (extracted from Fields/Scoping Container, or directly from Label Space) that is concatenated with provided values.

-

Outputs

Configurations

Scripting

Changelog

math: sqrt (field)

Description

Computes element-wise sqrt(field1).

-
Version 0.0.0

Inputs

field or fields container with only one field is expected

-

Outputs

Configurations

Scripting

Changelog

math: accumulate min over label

Description

Compute the component-wise sum over all the fields that have the same ID as the label set as input in the fields container and take its opposite. This computation can be incremental. If the input fields container is connected and the operator is run multiple times, the output field will be on all the connected inputs.

+

Outputs

Configurations

Scripting

Changelog

math: sqrt (field)

Description

Computes element-wise square root function on field data: sqrt(field[i]).

+
Version 0.0.0

Inputs

Field or fields container containing numeric data for square root calculation

+

Outputs

Field with square root values applied element-wise to input data

+

Configurations

Scripting

Changelog

math: accumulate min over label

Description

Compute the component-wise sum over all the fields that have the same ID as the label set as input in the fields container and take its opposite. This computation can be incremental. If the input fields container is connected and the operator is run multiple times, the output field will be on all the connected inputs.

Version 0.0.1

Inputs

Label of the fields container where it should operate. If not defined and the input Fields Container has only one Label, the operation will be done over all the fields.

Outputs

Configurations

Scripting

Changelog

result: y plus (y+)

Description

Read Y Plus (y+) 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.

@@ -5360,7 +5366,8 @@

Configurating operators

Outputs

Configurations

Scripting

Changelog

math: +

Description

Computes the sum of two fields. If one field's scoping has 'overall' location, then these field's values are applied on the entire other field. If one of the input field is empty, the remaining is forwarded to the output. When using a constant or 'work_by_index', it's possible to 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: magnetic scalar potential

Description

Read/compute Magnetic Scalar Potential by calling the readers defined by the datasources.

+

Outputs

Field containing the element-wise sum of the two input fields

+

Configurations

Scripting

Changelog

result: magnetic scalar potential

Description

Read/compute Magnetic Scalar Potential 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

@@ -5373,9 +5380,13 @@

Configurating operators

if a Field is set as input, the step ids should be its scoping.

1 is ramped, 2 is stepped, default is 1.

If set to true, the output fields container will always have a new time freq support rescoped to the output time_freq_values (default is false). If set to false, the time freq support is only recreated when time or frequency values are between existing ones.

-

Outputs

Configurations

Scripting

Changelog

math: + (fields container)

Description

Selects all fields with the same label space in the input fields container and add those together. If fields, doubles, or vectors of doubles, are put in input they are added to all the fields.

-
Version 0.0.0

Inputs

Outputs

Configurations

Scripting

Changelog

math: sin (fields container)

Description

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

-
Version 0.0.0

Inputs

Outputs

Configurations

Scripting

Changelog

result: tangential contact force

Description

Read/compute tangential contact force by calling the readers defined by the datasources.

+

Outputs

FieldsContainer with interpolated fields at specified time/frequency values

+

Configurations

Scripting

Changelog

math: + (fields container)

Description

Selects all fields with the same label space in the input fields container and add those together. If fields, doubles, or vectors of doubles, are put in input they are added to all the fields.

+
Version 0.0.0

Inputs

Outputs

FieldsContainer with summed fields by label space

+

Configurations

Scripting

Changelog

math: sin (fields container)

Description

Computes element-wise sine function on field data: sin(field[i]).

+
Version 0.0.0

Inputs

Field containing numeric data for sine calculation

+

Outputs

Field with sine values applied element-wise to input data

+

Configurations

Scripting

Changelog

result: tangential contact force

Description

Read/compute tangential contact force 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

Fields container already allocated modified inplace

@@ -5410,7 +5421,8 @@

Configurating operators

Outputs

Configurations

Scripting

Changelog

math: -

Description

Computes the difference of two fields. 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: plastic strain principal 1

Description

Read/compute element nodal component plastic strains 1st principal component by calling the readers defined by the datasources and computing its eigen values. +

Outputs

Field containing the element-wise difference (fieldA - fieldB)

+

Configurations

Scripting

Changelog

result: plastic strain principal 1

Description

Read/compute element nodal component plastic strains 1st principal component by calling the readers defined by the datasources and computing its eigen values. 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. The off-diagonal strains are first converted from Voigt notation to the standard strain values.

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

@@ -5429,15 +5441,30 @@

Configurating operators

Configurations

Scripting

Changelog

math: - (fields container)

Description

Computes the difference of two fields. 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

scoping: intersect scopings

Description

Intersect 2 scopings and return the intersection and the difference between the intersection and the first scoping.

+

Outputs

Field containing the element-wise difference (fieldA - fieldB)

+

Configurations

Scripting

Changelog

scoping: intersect scopings

Description

Intersect 2 scopings and return the intersection and the difference between the intersection and the first scoping.

Version 0.0.0

Inputs

Outputs

Configurations

Scripting

Changelog

math: ^ (field)

Description

Computes element-wise field[i]^p.

-
Version 0.0.0

Inputs

Outputs

Configurations

Scripting

Changelog

scoping: elements in mesh

Description

Retrieves the elemental scoping of a given input mesh, which contains the element IDs.

-
Version 0.0.0

Inputs

Outputs

Configurations

Scripting

Changelog

math: scale (field)

Description

Scales a field by a constant factor. This factor can be a scalar or a vector, where each value of the vector represents a scaler per component. Number of the components are corresponding to the input field dimensionality

+
Version 0.0.0

Inputs

Field for which to compute power operation

+

Power exponent value

+

Outputs

Field with power operation applied element-wise

+

Configurations

Scripting

Changelog

scoping: elements in mesh

Description

Retrieves the elemental scoping from a mesh, containing all element IDs with elemental location.

+
Version 0.0.0

Inputs

Mesh from which to extract the elemental scoping

+

Outputs

Scoping containing all element IDs in the mesh with 'Elemental' location

+

Configurations

Scripting

Changelog

result: squared l2norm pressure

Description

Read/compute Square of the L2 norm of pressure over element volume 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

math: scale (field)

Description

Scales a field by a constant factor. This factor can be a scalar or a vector, where each value of the vector represents a scaler per component. Number of the components are corresponding to the input field dimensionality

Version 0.0.0

Inputs

field or fields container with only one field is expected

Double/Field/Vector of doubles. When scoped on overall, same value(s) applied on all the data, when scoped elsewhere, corresponding values will be multiplied due to the scoping

Default is false. If set to true, output of scale is made dimensionless

-

Default is 0 use mkl. If set to 1, don't

-

Outputs

Configurations

Scripting

Changelog

result: enthalpy

Description

Read Enthalpy by calling the readers defined by the datasources.

+

Algorithm selection: 0 (default) uses MKL for optimization, 1 uses standard loops

+

Outputs

Field with scaled values (input_field * scale_factor)

+

Configurations

Scripting

Changelog

result: enthalpy

Description

Read Enthalpy 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

@@ -5446,7 +5473,10 @@

Configurating operators

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

math: ^ (fields container)

Description

Computes element-wise field[i]^p.

-
Version 0.0.0

Inputs

Outputs

Configurations

Scripting

Changelog

result: global eroded internal energy (LSDyna)

Description

Read Global Eroded Internal Energy (LSDyna) by calling the readers defined by the datasources.

+
Version 0.0.0

Inputs

Field for which to compute power operation

+

Power exponent value

+

Outputs

Field with power operation applied element-wise

+

Configurations

Scripting

Changelog

result: global eroded internal energy (LSDyna)

Description

Read Global Eroded Internal Energy (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

@@ -5454,8 +5484,9 @@

Configurating operators

Version 0.0.0

Inputs

fields container to be scaled

Double/Vector of doubles/Field/FieldsContainer. When scoped on overall, same value(s) applied on all the data, when scoped elsewhere, corresponding values will be multiplied due to the scoping

Default is false. If set to true, output of scale is made dimensionless

-

Default is 0 use mkl. If set to 1, don't

-

Outputs

Configurations

Scripting

Changelog

result: node orientations X

Description

Read/compute node euler angles X component of the vector (1st component) by calling the readers defined by the datasources.

+

Algorithm selection: 0 (default) uses MKL for optimization, 1 uses standard loops

+

Outputs

FieldsContainer with scaled field values

+

Configurations

Scripting

Changelog

result: node orientations X

Description

Read/compute node euler angles 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

@@ -5473,16 +5504,23 @@

Configurating operators

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

Scalar

-

Outputs

Configurations

Scripting

Changelog

filter: signed high pass (field)

Description

The high pass filter returns all the values above, or equal, in absolute value to the threshold value in input.

+

Outputs

Field with centroid calculation: fieldA*(1-factor) + fieldB*factor

+

Configurations

Scripting

Changelog

filter: signed high pass (field)

Description

The high pass filter returns all the values above, or equal, in absolute value to the threshold value in input.

Version 0.0.0

Inputs

field or fields container with only one field is expected

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

The default is false. If set to true, the complement of the filtered fields container is returned on output pin 1.

Outputs

Configurations

Scripting

Changelog

math: sweeping phase (fields container)

Description

Shifts the phase of all the corresponding real and imaginary fields of a fields container for a given angle (in 2) of a unit (in 4). An output field is computed for each pair of real and imaginary fields in the input fields_container as field_out = real_field*cos(angle) - imaginary_field*sin(angle).

Version 0.0.1

Inputs

String Unit. Supported values: "deg" or "rad". Default: "rad".

Outputs

Configurations

Scripting

Changelog

math: centroid (fields container)

Description

Computes the centroid of all the matching fields of a fields container at a given time or frequency, using fieldOut = field1*(1.-fact)+field2*(fact).

-
Version 0.0.0

Inputs

Outputs

Configurations

Scripting

Changelog

math: ^2 (field)

Description

Computes element-wise field[i]^2.

+
Version 0.0.0

Inputs

FieldsContainer with fields for centroid calculation

+

Time or frequency value for field selection

+

Optional step specification

+

Optional TimeFreqSupport for field resolution

+

Outputs

FieldsContainer with centroid calculation results at specified time/frequency

+

Configurations

Scripting

Changelog

math: ^2 (field)

Description

Computes element-wise field[i]^2.

Version 0.0.0

Inputs

field or fields container with only one field is expected

-

Outputs

Configurations

Scripting

Changelog

result: reaction force Z

Description

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

+

Outputs

Field with squared values applied element-wise to input data

+

Configurations

Scripting

Changelog

result: reaction force Z

Description

Read/compute nodal reaction forces Z component of the vector (3rd component) 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

FieldsContainer already allocated modified inplace

@@ -5504,16 +5542,20 @@

Configurating operators

Version 0.0.0

Inputs

If true, the operator does not throw an error if the label to be removed has more than one entry.

Fields Container with the label to be removed.

Label to be removed from the fields container.

-

Outputs

Configurations

Scripting

Changelog

math: sin (field)

Description

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

-
Version 0.0.0

Inputs

Outputs

Configurations

Scripting

Changelog

math: cos (field)

Description

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

-
Version 0.0.0

Inputs

field or fields container with only one field is expected

-

Outputs

Configurations

Scripting

Changelog

logic: ascending sort

Description

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

+

Outputs

Configurations

Scripting

Changelog

math: sin (field)

Description

Computes element-wise sine function on field data: sin(field[i]).

+
Version 0.0.0

Inputs

Field containing numeric data for sine calculation

+

Outputs

Field with sine values applied element-wise to input data

+

Configurations

Scripting

Changelog

math: cos (field)

Description

Computes element-wise cosine function on field data: cos(field[i]).

+
Version 0.0.0

Inputs

Field or fields container containing numeric data for cosine calculation

+

Outputs

Field with cosine values applied element-wise to input data

+

Configurations

Scripting

Changelog

logic: ascending sort

Description

Sort a field (in 0) in ascending order with an optional component priority table, or a boolean, to enable sort by scoping (in 1). This operator does not 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

math: cos (fields container)

Description

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

-
Version 0.0.0

Inputs

field or fields container with only one field is expected

-

Outputs

Configurations

Scripting

Changelog

result: initial coordinates (LSDyna)

Description

Read/compute Initial Coordinates (LSDyna) by calling the readers defined by the datasources.

+

Outputs

Configurations

Scripting

Changelog

math: cos (fields container)

Description

Computes element-wise cosine function on field data: cos(field[i]).

+
Version 0.0.0

Inputs

Field or fields container containing numeric data for cosine calculation

+

Outputs

Field with cosine values applied element-wise to input data

+

Configurations

Scripting

Changelog

result: initial coordinates (LSDyna)

Description

Read/compute Initial Coordinates (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.

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

@@ -5529,7 +5571,8 @@

Configurating operators

Double

Outputs

Configurations

Scripting

Changelog

math: ^2 (fields container)

Description

Computes element-wise field[i]^2.

Version 0.0.0

Inputs

field or fields container with only one field is expected

-

Outputs

Configurations

Scripting

Changelog

result: mean static pressure

Description

Read Mean Static Pressure by calling the readers defined by the datasources.

+

Outputs

Field with squared values applied element-wise to input data

+

Configurations

Scripting

Changelog

result: mean static pressure

Description

Read Mean Static Pressure 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

@@ -5537,11 +5580,13 @@

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

math: exp (field)

Description

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

-
Version 0.0.0

Inputs

field or fields container with only one field is expected

-

Outputs

Configurations

Scripting

Changelog

math: exp (fields container)

Description

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

-
Version 0.0.0

Inputs

field or fields container with only one field is expected

-

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.

+

Outputs

Configurations

Scripting

Changelog

math: exp (field)

Description

Computes element-wise exponential function on field data: exp(field[i]).

+
Version 0.0.0

Inputs

Field, fields container, or numeric data for exponential calculation

+

Outputs

Field with exponential values applied element-wise to input data

+

Configurations

Scripting

Changelog

math: exp (fields container)

Description

Computes element-wise exponential function on field data: exp(field[i]).

+
Version 0.0.0

Inputs

Field, fields container, or numeric data for exponential calculation

+

Outputs

Field with exponential values applied element-wise to input data

+

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

logic: same meshes container?

Description

Checks if two meshes_container are identical.

@@ -5721,13 +5766,15 @@

Configurating operators

Compute mid nodes (when available) by averaging the neighbour corner nodes. Default: True

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

invariant: scalar invariants (field)

Description

Computes the element-wise invariants of a tensor field.

+

Outputs

Field with natural logarithm values applied element-wise

+

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

Configurations

Scripting

Changelog

math: ln (fields container)

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

math: cross product

Description

Computes the cross product of two vector fields. Fields can have the same location or Elemental Nodal and Nodal locations.

+

Outputs

Field with natural logarithm values applied element-wise

+

Configurations

Scripting

Changelog

math: cross product

Description

Computes the cross product of two vector fields. Fields can have the same location or Elemental Nodal and Nodal locations.

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

math: dot (fields container)

Description

Computes a general notion of inner product between two fields of possibly different dimensionality.

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: nodal moment

Description

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

+

Outputs

Field containing the generalized inner product result

+

Configurations

Scripting

Changelog

result: nodal moment

Description

Read/compute nodal moment 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

Fields container already allocated modified inplace

@@ -5976,7 +6024,8 @@

Configurating operators

Outputs

Configurations

Scripting

Changelog

math: dot

Description

Computes a general notion of inner product between two fields of possibly different dimensionality.

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

math: outer product

Description

Computes the outer product of two vector fields.

+

Outputs

Field containing the generalized inner product result

+

Configurations

Scripting

Changelog

math: outer product

Description

Computes the outer product of two vector 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

math: overall dot

Description

Computes a dot product between two fields (fields are seen like a single large vector) and returns a scalar.

@@ -6016,9 +6065,10 @@

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

math: absolute value by component (field)

Description

Compute the absolute value of each data value of the input field, no norm performed.

-
Version 0.0.0

Inputs

field or fields container with only one field is expected

-

Outputs

Configurations

Scripting

Changelog

result: thermal strain

Description

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

+

Outputs

Configurations

Scripting

Changelog

math: absolute value by component (field)

Description

Computes the absolute value of each data value in the input field component-wise, without performing vector norm operations.

+
Version 0.0.0

Inputs

Field, fields container, or numeric data for which to compute absolute values

+

Outputs

Field with absolute values applied to each component

+

Configurations

Scripting

Changelog

result: thermal strain

Description

Read/compute element nodal component thermal 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:
  • @@ -6168,9 +6218,10 @@

    Configurating operators

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

math: absolute value by component (fields container)

Description

Compute the absolute value of each data value of the input field, no norm performed.

-
Version 0.0.0

Inputs

field or fields container with only one field is expected

-

Outputs

Configurations

Scripting

Changelog

result: stiffness matrix energy

Description

Read/compute element energy associated with the stiffness matrix by calling the readers defined by the datasources.

+

Outputs

Configurations

Scripting

Changelog

math: absolute value by component (fields container)

Description

Computes the absolute value of each data value in the input field component-wise, without performing vector norm operations.

+
Version 0.0.0

Inputs

Field, fields container, or numeric data for which to compute absolute values

+

Outputs

Field with absolute values applied to each component

+

Configurations

Scripting

Changelog

result: stiffness matrix energy

Description

Read/compute element energy associated with the stiffness matrix 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

@@ -6234,7 +6285,7 @@

Configurating operators

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

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

+

ex "mapdl_element_type", "mapdl_element_type_id", "apdl_type_index", "mapdl_type_id", "material", "apdl_section_id", "apdl_real_id", "apdl_esys_id", "apdl_tshape", "shell_axi", "volume_axi"...

property_id 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

@@ -6251,25 +6302,31 @@

Configurating operators

Version 0.0.0

Inputs

Outputs

Configurations

Scripting

Changelog

logic: elementary data selector (fields container)

Description

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

Version 0.0.0

Inputs

one or several elementary data indices that will be extracted from the initial field. For a field with a nature matrix, this extracts the line indices.

For a field with nature matrix, this extracts the column indices.

-

Outputs

Configurations

Scripting

Changelog

utility: convert to scoping

Description

take a int or a vector of int and transform it in a one entity field of location "numeric".

-
Version 0.1.0

Inputs

int or single value scoping or vector of int

-

Define the upper bound to create a scoping that will contain a range from the single value input in pin 0 to the upper bound defined in this pin.

-

Outputs

Configurations

Scripting

Changelog

logic: elementary data selector (field)

Description

Creates a scalar/vector field based on the selected elementary data.

+

Outputs

Configurations

Scripting

Changelog

utility: convert to scoping

Description

Creates a scoping from integer data. Converts single integers, integer vectors, or existing scopings into a properly formatted DPF scoping.

+
Version 0.1.0

Inputs

Integer ID(s) for the scoping: single int, vector of ints, or existing scoping

+

Location string for the scoping (e.g., 'Nodal', 'Elemental'). Default is empty

+

Upper bound for creating a range scoping. Creates IDs from pin 0 value to this upper bound (inclusive)

+

Outputs

Generated scoping with the specified IDs and location

+

Configurations

Scripting

Changelog

logic: elementary data selector (field)

Description

Creates a scalar/vector field based on the selected elementary data.

Version 0.1.0

Inputs

One or several elementary data index that will be extracted from the initial field. For field with nature matrix, this is the line indices to extract.

Set a default value for elementary data that do not exist.

For field with nature matrix, this is the column indices to extract.

-

Outputs

Configurations

Scripting

Changelog

utility: change location

Description

change the location of a field.

-
Version 0.0.0

Inputs

new location of the output field ex 'Nodal', 'ElementalNodal', 'Elemental'...

-

Outputs

Configurations

Scripting

Changelog

utility: extract field

Description

Extracts the fields at the indices defined in the vector (in 1) from the fields container (in 0).

-
Version 0.0.0

Inputs

if a field is in input, it is passed on as an output

-

Default is the first field

-

Outputs

Configurations

Scripting

Changelog

mesh: node coordinates

Description

Returns the node coordinates of the mesh(es) in input.

+

Outputs

Configurations

Scripting

Changelog

utility: change location

Description

Changes the location property of a field without modifying the field data.

+
Version 0.0.0

Inputs

Field whose location will be changed

+

New location string for the field (e.g., 'Nodal', 'ElementalNodal', 'Elemental')

+

Outputs

Field with the updated location property

+

Configurations

Scripting

Changelog

utility: extract field

Description

Extracts the fields at the indices defined in the vector (in 1) from the fields container (in 0). If a single index is provided, returns a field; if multiple indices are provided, returns a fields container.

+
Version 0.0.0

Inputs

Fields container or single field. If a field is provided, it is passed through as output

+

Indices of fields to extract. Default is [0] (first field). Single index returns a field, multiple indices return a fields container

+

Outputs

Extracted field(s). Single index produces a field, multiple indices produce a fields container

+

Configurations

Scripting

Changelog

mesh: node coordinates

Description

Returns the node coordinates of the mesh(es) in input.

Version 0.0.0

Inputs

Outputs

if the input is a meshed region, a field of coordinates is the output, else if the input is a meshes container, a fields container (one field by mesh) is the output

Configurations

Scripting

Changelog

mesh: stl export

Description

export a mesh into a stl file.

Version 0.0.0

Inputs

Outputs

Configurations

Scripting

Changelog

utility: bind support

Description

Ties a support to a field.

Version 0.0.0

Inputs

field or fields container with only one field is expected

-

meshed region or a support of the field

-

Outputs

Configurations

Scripting

Changelog

utility: convert to meshes container

Description

Creates a meshes container containing the mesh provided on pin 0.

+

Meshed region or a support of the field

+

Outputs

Field with the attached support

+

Configurations

Scripting

Changelog

utility: convert to meshes container

Description

Creates a meshes container containing the mesh provided on pin 0.

Version 0.0.0

Inputs

If a meshes container is set in input, it is passed on as an output with the additional label space (if any).

Sets a label space.

Outputs

Configurations

Scripting

Changelog

result: equivalent stress parameter

Description

Read/compute element nodal equivalent stress parameter by calling the readers defined by the datasources.

@@ -6420,14 +6477,15 @@

Configurating operators

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

-

Outputs

Configurations

Scripting

Changelog

utility: convert to field

Description

Create scalar or vector Field.

-
Version 0.0.0

Inputs

Data of the field, default is 0-field. Specify a double to have a field of same value or specify directly the data vector.

-

Unit symbol (m, Hz, kg, ...)

-

Location of the field ex 'Nodal', 'ElementalNodal', 'Elemental'... Default is 'numeric'.

-

Number of field entities. Default is 1 or the size of the scoping in input if specified.

-

Number of field components. Default is 1.

-

Scoping.

-

Outputs

Configurations

Scripting

Changelog

result: beam axial total strain

Description

Read Beam X Axial Total strain by calling the readers defined by the datasources.

+

Outputs

Configurations

Scripting

Changelog

utility: convert to field

Description

Creates a scalar or vector field from numeric data. Converts scalar values or vectors into a DPF field with specified properties.

+
Version 0.0.0

Inputs

Data of the field. Default is 0-field. Specify a double to create a field with uniform values, or a vector for explicit data per entity

+

Unit symbol (m, Hz, kg, ...). Default is dimensionless

+

Location of the field: 'Nodal', 'ElementalNodal', 'Elemental', etc. Default is 'numeric'

+

Number of field entities. Default is 1, or the size of the scoping if provided

+

Number of field components per entity. Default is 1 for scalar, >1 for vector

+

Scoping defining entity IDs and locations. If provided, overrides num_entities

+

Outputs

Generated field with specified data and properties

+

Configurations

Scripting

Changelog

result: beam axial total strain

Description

Read Beam X Axial Total strain by calling the readers defined by the datasources.

Version 0.1.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

@@ -6447,8 +6505,11 @@

Configurating operators

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

Outputs

Configurations

Scripting

Changelog

utility: forward field

Description

Returns the input field or fields container.

Version 0.0.0

Inputs

field or fields container with only one field is expected

-

Outputs

Configurations

Scripting

Changelog

utility: forward fields container

Description

Returns the input field or fields container.

-
Version 0.0.0

Inputs

Outputs

Configurations

Scripting

Changelog

result: electric flux density

Description

Read/compute Electric flux density by calling the readers defined by the datasources.

+

Outputs

Forwarded field (passthrough of input)

+

Configurations

Scripting

Changelog

utility: forward fields container

Description

Returns the input field or fields container.

+
Version 0.0.0

Inputs

FieldsContainer or field to forward

+

Outputs

Forwarded fields container (passthrough of input)

+

Configurations

Scripting

Changelog

result: electric flux density

Description

Read/compute Electric flux density 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:
  • @@ -6785,8 +6846,10 @@

    Configurating operators

Version 0.0.0

Inputs

ex: 'double:1.0', 'int:1', 'vector:1.0;1.0'

Outputs

any output

Configurations

Scripting

Changelog

utility: bind support (fields container)

Description

Ties a support to a fields container.

-
Version 0.0.0

Inputs

Meshed region or a support of the field.

-

Outputs

Configurations

Scripting

Changelog

result: creep strain eqv

Description

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

+
Version 0.0.0

Inputs

Fields container to which the support will be attached

+

Meshed region, support, or time frequency support to attach to the fields container

+

Outputs

Fields container with the attached support

+

Configurations

Scripting

Changelog

result: creep strain eqv

Description

Read/compute element nodal equivalent 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:
  • @@ -6969,8 +7032,10 @@

    Configurating operators

result file path container, used if no streams are set

entity (part for matsum, interface for rcforc) where the result will be scoped

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

-

Outputs

Configurations

Scripting

Changelog

mesh: extract from field

Description

Returns the meshed region contained in the support of the mesh.

-
Version 0.0.0

Inputs

Outputs

Configurations

Scripting

Changelog

result: part internal energy (LSDyna)

Description

Read Part Internal Energy (LSDyna) by calling the readers defined by the datasources.

+

Outputs

Configurations

Scripting

Changelog

mesh: extract from field

Description

Extracts the meshed region from the support of a field.

+
Version 0.0.0

Inputs

Field containing a mesh support

+

Outputs

Meshed region extracted from the field's support

+

Configurations

Scripting

Changelog

result: part internal energy (LSDyna)

Description

Read Part Internal Energy (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

entity (part for matsum, interface for rcforc) where the result will be scoped

@@ -7001,8 +7066,11 @@

Configurating operators

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.

+

Outputs

Configurations

Scripting

Changelog

utility: default value

Description

Returns the value from pin 0 if provided, otherwise returns the default value from pin 1. This operator acts as a fallback mechanism for optional inputs.

+
Version 0.0.0

Inputs

Primary value to return if provided. Can be any type

+

Default value to return if pin 0 is not connected. Must be the same type as pin 0

+

Outputs

Returns primary_value if provided, otherwise default_value

+

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

@@ -7028,7 +7096,7 @@

Configurating operators

If set to true (default) the input label space (scoping location) is suppressed from the output fields container, otherwise, label space is kept.

Outputs

fields_container

Configurations

Scripting

Changelog

result: total strain (LSDyna)

Description

Read/compute Total strain (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.

+
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

@@ -7356,7 +7424,7 @@

Configurating operators

-
Version 0.1.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.1.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

@@ -8249,7 +8317,7 @@

Configurating operators

Version 0.0.0

Inputs

scoping that defines the set of elements to fetch the property values for. If not specified, applied on all the elements of the mesh.

optional if using a dataSources

optional if using a streamsContainer

-

property to read, that can be the following: elements_connectivity, nodes_connectivity, material, element_type, apdl_section_id, apdl_real_id, apdl_esys_id, mapdl_element_type, mapdl_element_type_id, harmonic_index, step, substep, keyopt_i (i = 1 -> 18).

+

property to read, that can be the following: elements_connectivity, nodes_connectivity, material, element_type, apdl_section_id, apdl_real_id, apdl_esys_id, apdl_tshape, mapdl_element_type, mapdl_element_type_id, harmonic_index, step, substep, keyopt_i (i = 1 -> 18).

Outputs

property field

Configurations

Scripting

Changelog

result: gasket total closure XZ

Description

Read/compute elemental gasket total 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

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.

@@ -9497,7 +9565,15 @@

LaTeX

Version 0.0.0

Inputs

0 for string (default), 1 for binary, 2 for binary with chunked output (the output string will be returned in several chunks to prevent string memory overflows).

any input

Outputs

Number of chunks when mode passed to input pin(-1) = 2.

-

Configurations

Scripting

Changelog

result: creep strain Z

Description

Read/compute element nodal component creep 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.

+

Configurations

Scripting

Changelog

result: Output sound power

Description

Read/compute POUT 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: creep strain Z

Description

Read/compute element nodal component creep 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

@@ -9508,7 +9584,8 @@

LaTeX

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: creep strain XY

Description

Read/compute element nodal component creep strains XY shear component (01 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: stress solution to global cs

Description

read Euler angles on elements from the result file and rotate the fields in the fieldsContainer.

+
Version 0.0.0

Inputs

Outputs

Configurations

Scripting

Changelog

result: creep strain XY

Description

Read/compute element nodal component creep strains XY shear component (01 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

@@ -9519,8 +9596,7 @@

LaTeX

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: stress solution to global cs

Description

read Euler angles on elements from the result file and rotate the fields in the fieldsContainer.

-
Version 0.0.0

Inputs

Outputs

Configurations

Scripting

Changelog

result: contact pressure

Description

Read/compute element contact pressure by calling the readers defined by the datasources.

+

Outputs

Configurations

Scripting

Changelog

result: contact pressure

Description

Read/compute element contact pressure 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:
  • @@ -9869,7 +9945,7 @@

    LaTeX

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

result: reaction force

Description

Read/compute nodal reaction forces 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.

+
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

@@ -9936,7 +10012,7 @@

LaTeX

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: element centroids

Description

Read/compute coordinate of the elemental centroids by calling the readers defined by the datasources.

+

Outputs

Configurations

Scripting

Changelog

result: undeformed mesh element centroids

Description

Read/compute coordinate of the undeformed mesh elemental centroids 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

@@ -10398,7 +10474,7 @@

LaTeX

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: node orientations

Description

Read/compute node euler angles 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.

+
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

@@ -11033,7 +11109,16 @@

LaTeX

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 rotation Y

Description

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

+

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: Input sound power

Description

Read/compute PINC 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 rotation Y

Description

Read/compute nodal rotation 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

@@ -11042,8 +11127,7 @@

LaTeX

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 rotation Z

Description

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

+

Outputs

Configurations

Scripting

Changelog

result: nodal rotation Z

Description

Read/compute nodal rotation 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

@@ -11053,7 +11137,7 @@

LaTeX

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.

+
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).

@@ -13736,7 +13820,23 @@

LaTeX

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

Outputs

Configurations

Scripting

Changelog

invariant: segalman von mises eqv (field)

Description

Computes the element-wise Segalman Von-Mises criteria on a tensor field.

Version 0.0.0

Inputs

field or fields container with only one field is expected

-

Outputs

Configurations

Scripting

Changelog

result: joint force reaction

Description

Read/compute joint force reaction by calling the readers defined by the datasources.

+

Outputs

Configurations

Scripting

Changelog

result: Average acoustic energy density in room acoustics

Description

Read/compute AED 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: fluid velocity

Description

Read/compute FV 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: joint force reaction

Description

Read/compute joint force reaction 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

Fields container already allocated modified inplace

@@ -14102,15 +14202,7 @@

LaTeX

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.

Compute mid nodes (when available) by averaging the neighbour corner nodes. Default: True

-

Outputs

Configurations

Scripting

Changelog

result: fluid velocity

Description

Read/compute FV 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

Outputs

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.

+
Version 0.1.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.

Outputs

coordinates in the reference elements

Ids of the elements where each set of reduced coordinates is found

-

Configurations

Scripting

Changelog

scoping: rescope property field

Description

Rescopes a property field on the given scoping. If an ID does not exist in the original property field, the default value (in 2) is used when defined.

+

Configurations

Scripting

Changelog

scoping: rescope property field

Description

Rescopes a property field on the given scoping. If an ID does not exist in the original property field, the default value (in 2) is used when defined.

Version 0.1.0

Inputs

If pin 2 is used, the IDs not found in the property field are added with this default value.

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

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.

+

Outputs

Configurations

Scripting

Changelog

scoping: adapt with scopings container

Description

Rescopes/splits a fields container to correspond to a scopings container. Each field from the input container is rescoped using each scoping from the scopings container, creating a cartesian product of rescoped fields.

+
Version 0.0.0

Inputs

Fields container to rescope, or a single field (which will be converted to a container)

+

Container with target scopings for rescoping operations

+

Whether to keep fields that become empty after rescoping. Default is false.

+

Outputs

Fields container with rescoped fields, combining labels from input fields and scopings

+

Configurations

Scripting

Changelog

scoping: nodes in mesh

Description

Retrieves the nodal scoping from a mesh, containing all node IDs.

+
Version 0.0.0

Inputs

Mesh from which to extract the nodal scoping

+

Outputs

Scoping containing all node IDs in the mesh

+

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.

Version 0.0.0

Inputs

A vector of time/frequency supports to merge or time/frequency supports from pin 0 to ...

@@ -14714,11 +14811,13 @@

LaTeX

Outputs

Configurations

Scripting

Changelog

min_max: phase of max

Description

Evaluates phase of maximum.

Version 0.0.0

Inputs

Should use absolute value.

Phase increment.

-

Outputs

Configurations

Scripting

Changelog

utility: voigt to standard strains

Description

Converts the strain field from Voigt notation into standard format.

-
Version 0.0.0

Inputs

field or fields container with only one field is expected

-

Outputs

Configurations

Scripting

Changelog

utility: voigt to standard strains (fields container)

Description

Converts the strain field from Voigt notation into standard format.

-
Version 0.0.0

Inputs

field or fields container with only one field is expected

-

Outputs

Configurations

Scripting

Changelog

min_max: incremental over field

Description

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

+

Outputs

Configurations

Scripting

Changelog

utility: voigt to standard strains

Description

Converts strain field data from Voigt notation (6-component vector) to standard symmetric matrix format (3x3 tensor).

+
Version 0.0.0

Inputs

Field with strain data in Voigt notation, or fields container containing such a field

+

Outputs

Field with strain data converted to standard 3x3 symmetric matrix format

+

Configurations

Scripting

Changelog

utility: voigt to standard strains (fields container)

Description

Converts strain field data from Voigt notation (6-component vector) to standard symmetric matrix format (3x3 tensor).

+
Version 0.0.0

Inputs

Field with strain data in Voigt notation, or fields container containing such a field

+

Outputs

Field with strain data converted to standard 3x3 symmetric matrix format

+

Configurations

Scripting

Changelog

min_max: incremental over field

Description

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

Version 0.0.0

Inputs

Outputs

Configurations

Scripting

Changelog

logic: same meshes?

Description

Takes two meshes and compares them. Note: When comparing mesh properties, the current behaviour is to verify that the properties in the first mesh (pin 0) are included in the second mesh (pin 1).

Version 0.0.0

Inputs

define what is a small value for numeric comparison (default value:1.0e-14).

define the relative tolerance ceil for numeric comparison (default is 0.001).

@@ -14944,18 +15043,18 @@

LaTeX

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

+
Version 0.2.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.

+
Version 0.0.1

Inputs

data to be weighted in dB units equipped with cumulative ids in the scoping.

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.

if this pin is set to true, each field of the input fields container is defined by time freq scoping and not by ids. Default is false

Outputs

weighted data in dB units.

-

Configurations

Scripting

Changelog

mapping: solid to skin

Description

Maps a field defined on solid elements to a field defined on skin elements. Three cases are possible, based on the solid field data location; (i) Elemental: The values associated with the solid elements are copied according to those underlying the skin, (ii) Nodal: The solid field is rescoped with respect to the nodes of the skin mesh, (iii) ElementalNodal: The values are copied from the solid mesh to the skin mesh for each element face and the nodes associated with it.

+

Configurations

Scripting

Changelog

mapping: solid to skin

Description

Maps a field defined on solid elements to a field defined on skin elements. Three cases are possible, based on the solid field data location; (i) Elemental: The values associated with the solid elements are copied according to those underlying the skin, (ii) Nodal: The solid field is rescoped with respect to the nodes of the skin mesh, (iii) ElementalNodal: The values are copied from the solid mesh to the skin mesh for each element face and the nodes associated with it.

Version 0.2.1

Inputs

field or fields container with only one field is expected

skin mesh region expected

Solid mesh support (optional).

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