maxCombinedFields (1d, 2d, 3d)

Computes the maximum value (pressure or energy for example) over the domain. The value is stored in a dynVector.

Data

in (string vector)
Input 1 to N are input nodalArrays on which operations will be performed. Example in = [E, B]
out (string vector)
output dynVector where the result of the operation is stored

Parameters

indVars_name (string vector)
For each input variable an “indVars” array must be defined. So if in = [E, B] then indVars_E and indVars_B must be defined. If indVars_E = [“Ex”,”Ey”,”Ez”] then operations are performed on “Ex”,”Ey” and “Ez” in the expression evaluator.
preExprs (string vector)
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)
exprs (string vector)
Strings must be put in quotes. The strings are evaluated and placed in the output array. Available command are defined by the muParser (http://muparser.sourceforge.net/)
other (variable definition)

In addition, an arbitrary number of constants can be defined that can then be used in evaluating expression in both preExprs and exprs

Also, the updater has predefined variables including x,y,z representing the spatial location of the cell and t the time.

Example

<Updater computeMaxP>
 kind = maxCombinedFields2d
 onGrid = domain

 in = [qnew]
 out = [maxP]
 mi = MI
 mu0 = MU0
 gamma = GAMMA
 k=KB
 indVars_qnew = ["rho","mx","my","mz","en","bx","by","bz","phi"]
 exprs = ["(gamma-1)*(en-(0.5/mu0)*(bx*bx+by*by+bz*bz)-0.5*(mx*mx+my*my+mz*mz)/rho)"]
</Updater>