3D functions
Class Realfunction3d
Generic real 3D function class (real function of three real arguments).
Polymorphic input and output is provided for pointers to objects of this
class.
Polymorphic data format:
function_type
data_for_that_function
The data format depends on the type of function chosen.
Names (for identifying the function type) and formats are defined below.
Class: Realfunction3d_1dproduct
Product of two 1D functions of each of the arguments.
Name: 1dproduct
Data format:
function_of_x
function_of_y
function_of_z
Data is a pair of Realfunction1d
s.
Class: Realfunction3d_2dinterp
Set of functions of two arguments, using the other argument to
interpolate between the functions.
Name: 2dinterp
Data format:
number_of_functions
For each:
r1 f(r2,r3)
i1 i2 i3
Each f(r2,r3)
is a Realfunction2d
.
The control integers i1
, i2
and i3
are used to specify which of x
, y
and z
are used for each of i1
, i2
and i3
.
Each integer corresponds to one of the 3D ordinates:
input integer | 3D ordinate
|
---|
i1 | x
|
i2 | y
|
i3 | z
|
Each possible value of i1
, i2
and i3
corresponds to one of
the mapped ordinates i1
, i2
and i3
:
value of input integer | mapped ordinate
|
---|
0 | r1
|
1 | r2
|
2 | r3
|
For example to define a set of functions f(z,x)
at different
values of y
, the mapping integers would be 1 2 0
.
Class: Realfunction3d_sum
Sum of a set of 3D functions.
Name: sum
.
Data:
number_of_functions
For each:
fi (Realfunction3d)
The function calculated is the sum of the fi
.
Class: Realfunction3d_product
Sum of a set of 3D functions.
Name: product
.
Data:
number_of_functions
For each:
fi (Realfunction3d)
The function calculated is the product of the fi
.
Class: Realfunction3d_offset
General 3D function offset by a constant amount.
Name: offset
.
Data:
x0 y0 z0 (offset in x, y and z directions)
f (Realfunction3d)
The function calculated is f(x-x0,y-y0,z-z0)
.
Class: Realfunction3d_map
General 3D function with general mappings applied to arguments and result.
Name: map
.
Data:
xmap ymap zmap (mapping functions for x, y and z ordinates)
fmap (mapping function for result)
f (Realfunction3d)
The mapping functions are all Realfunction1d
s.
The function calculated is fmap{f[xmap(x),ymap(y),zmap(z)]}
.
This is a fairly general form, but is particularly useful
for changing units or scalings.