Algebraic operators¶
BOUT++ provides a wide variety of algebraic operators acting on fields.
The algebraic operators are listed in Table 18.
For a completely uptodate list, see the Nonmember functions
part of field2d.hxx,
field3d.hxx,
fieldperp.hxx.
Name 
Description 


Minimum (optionally over all processes) 

Maximum (optionally over all processes) 

\(\mathtt{lhs}^\mathtt{rhs}\) 

\(\sqrt{(f)}\) 

\(f\) 

\(e^f\) 

\(\log(f)\) 

\(\sin(f)\) 

\(\cos(f)\) 

\(\tan(f)\) 

\(\sinh(f)\) 

\(\cosh(f)\) 

\(\tanh(f)\) 

Returns a field with the floor of 

Calculate the amplitude of the Fourier mode in the
zdirection with mode number 

Remove Fourier modes (in the zdirection) with mode
number higher than 

Remove Fourier modes (in the zdirection) with mode
number higher than 

Rotate 

The average in the zdirection of 
These operators take a region
argument, whose values can be 1 (see
Iterating over fields)
RGN_ALL
, which is the whole mesh;RGN_NOBNDRY
, which skips all boundaries;RGN_NOX
, which skips the x boundariesRGN_NOY
, which skips the y boundaries
The default value for the region argument is RGN_ALL
which should work in all
cases. However, the region argument can be used for optimization, to skip
calculations in guard cells if it is known that those results will not be
needed (for example, if no derivatives of the result will be calculated). Since
these operators can be relatively expensive compared to addition, subtraction,
multiplication this can be a useful performance improvement.
 1
More regions may be added in future, for example to act on only subsets of the physical domain.