*SetLocalUserFuncname() - GSE

Specifies the local subroutine function name for a general state equation that has continuous states.

Syntax

*SetLocalUserFuncname(varname, local_funcname 
                                      [,local_xx_funcname] 
                                      [,local_xu_funcname] 
                                      [,local_yx_funcname] 
                                      [,local_yu_funcname])

Arguments

varname
The variable name of the state equation.
Data type: variable
local_funcname
The string that refers to a subroutine file having function for states and output (GSESUB).
Data type: string
local_xx_funcname
The string that refers to a subroutine function for the partial derivative (GSEXX) in the specified file.
Data type: string
local_xu_funcname
The string that refers to a subroutine function for the partial derivative (GSEXU) in the specified file.
Data type: string
local_yx_funcname
The string that refers to a subroutine function for the partial derivative (GSEYX) in the specified file.
Data type: string
local_yu_funcname
The string that refers to a subroutine function for the partial derivative (GSEYU) in the specified file.
Data type: string

Example

 *GeneralStateEquation( gse_0, "My Controller", 3, 
u_array, ic_array )
 *SetGeneralStateEquation(gse_0, USER, `USER(500, 
{frc_cont.i.idstring}, {frc_cont.j.idstring})`
)
 *SetContinuousStates( gse_0, 4, STATIC_HOLD )
 *ActionReactionForce(frc_cont, "Control Force", LOA, b_0, 
B_Ground, p_cont, P_Global_Origin )
 *SetForce( frc_cont, EXPR, ARYVAL({gse_0.y_array.idstring}, 2)` 
 *SetLocalUserDLL( gse_0, "mygsesubdll", "dll_xx", 
"dll_xu", 
"dll_yx", 
"dll_yu" )
 *SetLocalUserFuncname( gse_0, "mygsesubfunc", " mygsexxfunc ", 
" mygsexufunc ", " mygseyxfunc ", " mygseyufunc" )

Context

*BeginMdl()

*DefineAnalysis()

*DefineSystem()

*DefineAssembly()

*BeginContext()

Comments

The local function name should be specified in case a function name other than the default is to be used.

The value of the local function name local_funcname is written to the usrsub_fnc_name attribute of the Control_StateEqn statement and the first token in the now deprecated ROUTINE argument for ADAMS.

Values of the local_xx_funcname, local_xu_funcname, local_yx_funcname, and local_yu_funcname function names are written to usrsub_der1_name, usrsub_der2_name, usrsub_der3_name and usrsub_der4_name respectively, in Control_StateEqn for MotionSolve and the remaining tokens in ROUTINE for ADAMS.

GSESUB, GSEXX, GSEXU, GSEYX, and GSEYU are the default function names for state equations with continuous states in MotionSolve. This is also true in the case of the ADAMS ROUTINE argument.