ufpGetNumUsrVals()
Return the number of user values supplied in the input file.
Syntax
nUsrVals = ufpGetNumUsrVals ( ufpHd ) ;
Type
AcuSolve User-Defined Function Basic Routine
Parameters
- ufpHd (pointer)
- The opaque handle which was passed to the user function.
Return Value
The number of user values given in the input file is returned as an integer.
Description
This routine returns the number of user values supplied in the input file. It is useful for
determining that the correct number of parameters was supplied. It is also useful when
the number of parameters is not know a priori. For
example,
Integer nUsrVals ;
Real x, y ;
Real usrVals[2] ;
nUsrVals = ufpGetNumUsrVals( ufpHd ) ;
if ( nUsrVals != 2 ) {
printf( "nUsrVals does not equal 2\n" ) ;
exit( 0 ) ;
}
usrVals = ufpGetUsrVals( ufpHd ) ;
x = usrVals[0] ;
y = usrVals[1] ;
Errors
This routine expects a valid ufpHd.