User Function Argument Registration ufarg (Fortran)
This section describes user function argument registration.
Each argument of a Fortran user function which has been initially registered with uffunc is requested with a call in uflib to ufarg:
external func
integer size
call ufarg(func, type, variable, size)
func: a reference to the user function (called func in this case).
type: a character string giving the type of the argument, either of the following:
- ’Cell’ for a cell field
- ’Face’ for a face field
variable: a character string naming the requested argument, which must be a valid Simcenter STAR-CCM+ variable.
size: the storage in bytes required for one element of the variable array. This value is used to ensure that the precision of the user function matches the precision of Simcenter STAR-CCM+. Examples are:
- StarRealSize if variable is a real(StarReal) scalar per element
- 3*CoordRealSize if variable is a real(CoordReal) vector per element
- 2*StarIntSize if variable is a pair of integers per element
The StarReal and CoordReal types define the precision of floating-point variables, together with StarRealSize, CoordRealSize, and StarIntSize, and are defined in the StarReal.f file.
Calls to ufarg must be made in the order the user function requires the arguments.