utility:assemble scalars to matrix
Last update: 31.07.2026Version: 0.0.0
Description
Take nine scalar fields and assemble them as a 3x3 matrix field. If the 'symmetrical' input is set to true, only six scalar fields are required (xx, yy, zz, xy, xz and yz).
Inputs
This table lists the input pins for this operator. Input pins define the data that the operator requires to perform its operation. Some inputs are required, while others are optional and provide additional configuration. Each parameter is detailed in the sections that follow the table.
| Pin number | Name | Status | Expected type(s) |
|---|---|---|---|
| 0 | xx | field |
|
| 1 | yy | field |
|
| 2 | zz | field |
|
| 3 | xy | field |
|
| 4 | yz | field |
|
| 5 | xz | field |
|
| 6 | yx | field |
|
| 7 | zy | field |
|
| 8 | zx | field |
|
| 60 | symmetrical | bool |
xx (Pin 0)
- Required: No
- Expected type(s):
field
yy (Pin 1)
- Required: No
- Expected type(s):
field
zz (Pin 2)
- Required: No
- Expected type(s):
field
xy (Pin 3)
- Required: No
- Expected type(s):
field
yz (Pin 4)
- Required: No
- Expected type(s):
field
xz (Pin 5)
- Required: No
- Expected type(s):
field
yx (Pin 6)
- Required: No
- Expected type(s):
field
zy (Pin 7)
- Required: No
- Expected type(s):
field
zx (Pin 8)
- Required: No
- Expected type(s):
field
symmetrical (Pin 60)
- Required: No
- Expected type(s):
bool
Outputs
This table lists the output pins for this operator. Output pins provide the results of the operator's computation and can be connected to inputs of other operators or retrieved for further processing. Each output is detailed in the sections that follow the table.
| Pin number | Name | Expected type(s) |
|---|---|---|
| 0 | field | field |
field (Pin 0)
- Expected type(s):
field
Configurations
This operator supports configuration options that modify its behavior.
mutex
- Expected type(s):
bool - Default value: false
If this option is set to true, the shared memory is prevented from being simultaneously accessed by multiple threads.
Scripting
This operator can be accessed through scripting interfaces using these identifiers.
Category: utility
Plugin: core
Scripting name: None
Full name: None
Internal name: assemble_scalars_to_matrices
License: None
Examples
These examples demonstrate how to use this operator in different programming environments. Each example shows how to instantiate the operator, connect the required inputs, and retrieve the output.
C++
#include "dpf_api.h"
ansys::dpf::Operator op("assemble_scalars_to_matrices"); // operator instantiation
op.connect(0, my_xx);
op.connect(1, my_yy);
op.connect(2, my_zz);
op.connect(3, my_xy);
op.connect(4, my_yz);
op.connect(5, my_xz);
op.connect(6, my_yx);
op.connect(7, my_zy);
op.connect(8, my_zx);
op.connect(60, my_symmetrical);
ansys::dpf::Field my_field = op.getOutput<ansys::dpf::Field>(0);
CPython
import ansys.dpf.core as dpf
op = dpf.operators.utility.None() # operator instantiation
op.inputs.xx.connect(my_xx)
op.inputs.yy.connect(my_yy)
op.inputs.zz.connect(my_zz)
op.inputs.xy.connect(my_xy)
op.inputs.yz.connect(my_yz)
op.inputs.xz.connect(my_xz)
op.inputs.yx.connect(my_yx)
op.inputs.zy.connect(my_zy)
op.inputs.zx.connect(my_zx)
op.inputs.symmetrical.connect(my_symmetrical)
my_field = op.outputs.field()
IPython
import mech_dpf
import Ans.DataProcessing as dpf
op = dpf.operators.utility.None() # operator instantiation
op.inputs.xx.Connect(my_xx)
op.inputs.yy.Connect(my_yy)
op.inputs.zz.Connect(my_zz)
op.inputs.xy.Connect(my_xy)
op.inputs.yz.Connect(my_yz)
op.inputs.xz.Connect(my_xz)
op.inputs.yx.Connect(my_yx)
op.inputs.zy.Connect(my_zy)
op.inputs.zx.Connect(my_zx)
op.inputs.symmetrical.Connect(my_symmetrical)
my_field = op.outputs.field.GetData()
Changelog
- Version 0.0.0: Initial release.