<< Click to Display Table of Contents >> ## The VAL and EVAL functions |

There are two ways to evaluate an arbitrary expression at selected coordinates, VAL and EVAL.

value = VAL(expression, x, y )

value = VAL(expression, x, y, z )

The value of expression is computed at the specified coordinates. The coordinates must be constants. The value is computed and stored at each phase of the solution process, allowing efficient reference in many computations.

FlexPDE maintains a "scoreboard" of dependencies and re-evaluates the expression whenever the dependency changes. If the expression depends on a variable, it will also create an implicit coupling between the expression and its point of use, causing the value to be solved simultaneously during the solution phase.

Expression can include derivative terms, but the VAL itself cannot be differentiated.

value = EVAL(expression, x, y )

value = EVAL(expression, x, y, z )

The value of expression is computed at the specified coordinates. The coordinates may be dynamically variable. The value is recomputed at each reference, possibly leading to increased run time.

This form does NOT allow FlexPDE to compute implicit couplings between computation nodes referencing and evaluating the value.

Derivative operators applied to EVAL will be passed through and applied to expression.

Note: The value returned from these functions must be scalar.