Performs arithmetic operations specified by a set of user defined expressions. . The expression evaluator checks the user supplied expression for validity and errors on finding undefined expressions.


exprs (string vector, required)
Strings must be put in quotes. The strings are evaluated and placed in the output array. The number of strings must be identical to the number of components in the output array. Available command are defined by the muParser (http://muparser.sourceforge.net/)
preExprs (string vector, optional)
Strings must be put in quotes. The preExprs is used to compute quantities based on indVars that can later be used in the exprs to evaluate the output. Available commands are defined by the muParser (http://muparser.sourceforge.net)
other (strings, optional)
In addition, an arbitrary number of constants can be defined that can then be used in evaluating expression in both preExprs and exprs.


The following code block specificies the initial condition for a magnetized shock tube for a two temperature plasma:

<Function func>
  kind = exprFunc

  pr = 1.0
  pl = 0.1

  rhor = 1.0
  rhol = 0.125
  mu0 = MU0
  gas_gamma = GAMMA

  preExprs = [ \
  "rho = if (x > 0.0, rhol, rhor)", \
  "P = if(x > 0.0, pl, pr)", \
  "bx = 0.75*sqrt(mu0)", \
  "by = if(x>0.0, -1.0*sqrt(mu0), 1.0*sqrt(mu0))", \
  "bz = 0.0",\
  "phi = 0.0",\

  exprs = ["rho", "0.0", "0.0", "0.0", "P/(gas_gamma-1)+(0.5/mu0)*(bx*bx+by*by)","bx","by","bz","phi","0.5*P/(gas_gamma-1)"]