Non-Analytic Functions

<< Click to Display Table of Contents >>

Navigation:  Problem Descriptor Reference > The Elements of a Descriptor > Built-in Functions >

Non-Analytic Functions

Previous pageReturn to chapter overviewNext page

The following non-analytic functions are supported in FlexPDE:

 

CEILING(expression, maximum, delta)        

Alternative to the MIN function that has a continuous derivative.

Returns the minimum value of expression and maximum        with a transition of width delta.

See Samples | Usage | Functions | Floor_Ceiling.pde

 

EDGE_DISTANCE(boundary_name)        

Returns the distance traveled by traversing named boundary path boundary_name.

See Samples | Usage | Misc | Edge_Distance.pde

 

FLOOR(expression, minimum, delta)        

Alternative to the MAX function that has a continuous derivative.

Returns the maximum value of expression and minimum        with a transition of width delta.

See Samples | Usage | Functions | Floor_Ceiling.pde

 

GLOBALMAX(arg)
GLOBALMAX(arg, region_name)
GLOBALMAX(arg, region_name, layer_name)

With one argument GLOBALMAX is equal to the largest value of the argument over the problem domain. The search can be restricted to a specific region and layer using the second two arguments. GLOBALMAX is tabulated, and is re-evaluated only when components of the argument change.

See Samples | Usage | Functions | Globalmax.pde and Samples | Usage | Functions | Globalmax_3D.pde

 

GLOBALMAX_X(arg)        
GLOBALMAX_Y(arg)
GLOBALMAX_Z(arg)        
 

Returns the specified coordinate of the associated GLOBALMAX.  Global searches are tabulated by argument expression, and repeated calls to GLOBALMAX and its related coordinates do not cause repeated evaluation.

 

GLOBALMIN(arg)
GLOBALMIN(arg, region_name)
GLOBALMIN(arg, region_name, layer_name)

With one argument GLOBALMIN is equal to the smallest value of the argument over the problem domain. The search can be restricted to a specific region and layer using the second two arguments. GLOBALMIN is tabulated, and is re-evaluated only when components of the argument change.

 

GLOBALMIN_X(arg)
GLOBALMIN_Y(arg)
GLOBALMIN_Z(arg)        

Returns the specified coordinate of the associated GLOBALMIN.  Global searches are tabulated by argument expression, and repeated calls to GLOBALMIN and its related coordinates do not cause repeated evaluation.

 

MAX(arg1,arg2)        

The maximum function requires two arguments. MAX is evaluated on a point by point basis and is equal to the larger of the two arguments at each point.        

 

MIN(arg1,arg2)        

The minimum function requires two arguments. MIN is evaluated on a point by point basis and is equal to the lessor of the two arguments at each point.        

 

MOD(arg1,arg2)        

The modulo function requires two arguments. MOD is evaluated on a point by point basis and is equal to the remainder of (arg1/arg2) at each point. This is a direct implementation of the C function fmod(arg1,arg2) : "Computes the floating-point remainder of the division operation arg1/arg2. The floating-point remainder of the division operation arg1/arg2 calculated by this function is exactly the value arg1 - n*arg2, where n is arg1/arg2 with its fractional part truncated. The returned value has the same sign as arg1 and is less or equal to arg2 in magnitude."

 

RANDOM(arg)        

The random function requires one argument.  The result is a pseudo-random number uniformly distributed in (0,arg).  The only reasonable application of the RANDOM function is in initial values.  Use in other contexts will probably result in convergence failure.        

 

ROUND(arg)        

The round function requires one argument.  The result is an integer following standard rounding behavior : e.g. 1.49 rounds down to 1, 1.5 rounds up to 2.

 

SIGN(arg)        

The sign function requires one argument. SIGN is equal to 1 if the argument is positive and -1 if the argument is negative.        

 

SPACE_ERROR()
SPACE_ERROR(variable)        

The space error function returns the average spatial error over all variables. If a variable name is given, it returns the spatial error for the named variable only. The return is a field value.

 

TIME_ERROR()
TIME_ERROR(variable)

The time error function returns the average time error over all variables. If a variable name is given, it returns the time error for the named variable only. The return is a scalar value.

 

TIMEMAX(arg)        

The time maximum function requires one argument. TIMEMAX is equal to the largest value of the argument over the  time span of the problem. TIMEMAX is tabulated, and is re-evaluated only when components of the argument change.

 

TIMEMAX_T(arg)        

Returns the time at which the associated TIMEMAX of the argument occurs. Time searches are tabulated by argument expression, and repeated calls to TIMEMAX and its related times do not cause repeated evaluation.

 

TIMEMIN(arg)        

The time minimum function requires one argument. TIMEMIN is equal to the smallest value of the argument over the  time span of the problem. TIMEMIN is tabulated, and is re-evaluated only when components of the argument change.

 

TIMEMIN_T(arg)        

Returns the time at which the associated TIMEMIN of the argument occurs. Time searches are tabulated by argument expression, and repeated calls to TIMEMIN and its related times do not cause repeated evaluation.