Eval
Evaluate expressions in domains from datasets that directly map to a solution.
Syntax
model.result().numerical().create(<ftag>,"Eval");
model.result().numerical(<ftag>).selection(...);
model.result().numerical(<ftag>).set(property,<value>);
model.result().numerical(<ftag>).getData();
model.result().numerical(<ftag>).getData(<expressionIndex>);
model.result().numerical(<ftag>).getImagData();
model.result().numerical(<ftag>).getImagData(<expressionIndex>);
model.result().numerical(<ftag>).isComplex();
model.result().numerical(<ftag>).isComplex(<outersolnum>);
model.result().numerical(<ftag>).getNData();
model.result().numerical(<ftag>).getCoordinates();
model.result().numerical(<ftag>).getElements();
model.result().numerical(<ftag>).getVertexElements();
model.result().numerical(<ftag>).run();
Description
model.result().numerical().create(<ftag>,"Eval") creates an evaluation feature with the name <ftag>.
Eval is a feature made specifically for users of the COMSOL API and does not appear in the COMSOL Multiphysics Desktop. It is used to evaluate results directly on the solution.
result = model.result().numerical(<ftag>).getData() returns the real part of the result, recomputing the feature if necessary. result is a three-dimensional double matrix ordered result[expression][solnum][coordinates].
model.result().numerical(<ftag>).getData(<expressionIndex>) returns the real part of the result for one expression, equivalent to result[expressionIndex].
result = model.result().numerical(<ftag>).getImagData() returns the imaginary part of the result, recomputing the feature if necessary. result is a three-dimensional double matrix ordered result[expression][solnum][coordinates].
model.result().numerical(<ftag>).getImagData(<expressionIndex>) returns the imaginary result for one expression, equivalent to result[expressionIndex].
model.result().numerical(<ftag>).isComplex() returns true if the result is complex. The resulting value is a scalar, which true if any of the expressions in an array is complex valued.
model.result().numerical(<ftag>).isComplex(<outersolnum>) returns true if the result is complex for the given outer solution. <outersolnum> is applicable only for parametric sweep solutions and is the index of each outer parametric solution.
model.result().numerical(<ftag>).getNData() returns the number of points in the data vector.
model.result().numerical(<ftag>).getCoordinates() returns node point coordinates.
model.result().numerical(<ftag>).getElements() returns indices to columns in p of a simplex mesh.
model.result().numerical(<ftag>).getVertexElements() returns indices to mesh elements for each point.
The following properties are available:
none | dataset name
The dataset this feature refers to. Only Solution, Particle, Shell, and Ray datasets are supported.
on | off
linpoint | harmonic | lintotal | lintotalavg | lintotalrms | lintotalpeak
on | off
If pattern is gauss: The Gauss point order.
on | off
auto | integer
off | pprint | ppr
gauss | lagrange
none | material | internal | everywhere | expression
Smoothing settings. With material, smoothing is done inside domains with the same material. With internal, smoothing is done inside geometry domains. With expression, the smoothing is based on the expression in smoothexpr.
The expression to use for smoothing when smooth is set to expression.
manual | none
Threshold value (0-1), if threshold is set to manual.
The unit to use for the expression in expr. If the old unit is not valid when the expression changes, the unit property is reset to default.
See Also
Interp, Global (Numerical), EvalPoint, EvalGlobal