stack_depth#

ScalarReal.stack_depth() int#

Net Fields Calculator stack depth after applying all operations.

Simulates the reverse-Polish operation stack. A well-formed scalar or vector expression resolves to exactly 1.

Returns:
int

Final stack depth after simulating all operations.

Examples

Check that a simple expression resolves to one value.

>>> from ansys.aedt.core.visualization.post.field_calculator_expressions import FieldExpressions
>>> fx = FieldExpressions(calculator=None)
>>> fx.vector("E").magnitude().stack_depth()
1