ufpGetNumUdfData()

Get the number of values in the user equation solution.

Syntax

n = ufpGetNumUdfData ( ufpHd, eqnName ) ;

Type

AcuTrace User-Defined Function Particle Routine

Parameters

ufpHd (pointer)
The opaque handle which was passed to the user function.
eqnName (string)
The name of the user equation. If the integer 0 is used instead of a string, the current user equation is used.

Return Value

The return value is the number of values (integer) in the solution for the user equation eqnName.

eqnName should correspond to the qualifier used in the USER_EQUATION command in the trace input file. If the integer 0 is used instead of a string, the number of values in the solution of the current user equation is returned.

Description

This routine returns the size of the user equation solution.

In this example there is a user equation with three values in its solution vector. The definition of this equation in the trace input file could be be written as
USER_EQUATION( "example" ) {
user_function      = "usrExample"
num_variables      = 3
...
}
num_vars would then be set to 3 in the following code segment:
Integer            num_vars ;
num_vars           = ufpGetNumUdfData( ufpHd, "example" ) ;
If the code segment is in usrExample,
num_vars           = ufpGetNumUdfData( ufpHd, 0) ;

would also set num_vars to 3.

Errors

This routine expects valid ufpHd and eqnName as arguments; invalid arguments return an error.