Return the array of current history variables.


usrHistsCurr = udfGetUsrHistsCurr( udfHd ) ;


AcuSolve User-Defined Function Basic


The opaque handle (pointer) which was passed to the user function.

Return Value

usrHistsCurr (real)
The return value is an array of current history variables. This array has udfGetNumUsrHists() entries.


This routine returns the array of current history variables. For the first time step, this array is initialized to the array given in the input file. The array may be overwritten in the user function. It is saved at the end of the time step as the "previous" history variables for use during the next time step. The current history variables are also written to the restart file for continuity across restarts. For example,
Real* usrHistsCurr ;                  /* current step history variables */
Real* usrHistsPrev ;                  /* previous step history variables */
udfCheckNumUsrHists( udfHd, 2 ) ;
usrHistsCurr                          = udfGetUsrHistsCurr( udfHd ) ;
usrHistsPrev                          = udfGetUsrHistsPrev( udfHd ) ;
usrHistsCurr[0]                       = usrHistsPrev[0] + 1. ;
usrHistsCurr[1] = usrHistsPrev[1] + 2. ;


This routine expects a valid udfHd.