# 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.

```
USER_EQUATION( "example" ) {
user_function = "usrExample"
num_variables = 3
...
}
```

```
Integer num_vars ;
num_vars = ufpGetNumUdfData( ufpHd, "example" ) ;
```

`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.