### 18.5.1. Introduction to Utility Routines for User Functions

The main memory stacks are passed to both user CEL Functions and junction box routines providing you with full access to the CFX MMS, along with some useful MMS utility routines. For details, see CFX Memory Management System (MMS).

To enable easy access to some of the more frequently used data in the MMS, a set of simplified routines that can be called from within user CEL function and/or user junction box subroutines have been provided.

A routine called `USER_GETVAR` provides easy access to gradients on the given locale of a user CEL function. This is documented below.

Locale information can be accessed from within a user CEL function routine using the subroutine. For details, see USER_CALC_INFO.

Scalar mesh information (for example, total numbers of vertices and elements) can be accessed using the USER_GET_MESH_INFO routine. For details, see USER_GET_MESH_INFO. Arrays describing mesh data, such as vertex coordinates and element volumes, are accessed using the USER_GET_MESHDATA routine. For details, see USER_GET_MESHDATA.

Physical data can be accessed using the USER_GET_PHYS_INFO routine. For details, see USER_GET_PHYS_INFO. This includes, for example, information on numbers and types of fluids and solids, and details on physical models, such as turbulence models. This can be used from within both user CEL function routines and user junction box routines.

Equation assembly information can be accessed using the USER_ASSEMBLE_INFO routine. For details, see USER_ASSEMBLE_INFO.

Parallel information can be accessed using the GET_PARALLEL_INFO routine. For details, see GET_PARALLEL_INFO. This can be used from within both user CEL function routines and user junction box routines.

Throughout, arguments to subroutines are listed, for example as follows

    CI CZONE        : Solver Zone Name   (blank for global information only)
    CV CDIR         : Subdirectory name of /USER into which to put info.
    CO CRESLT       : Result = ‘GOOD’, ‘ERR’ or ‘DIR’.

The abbreviations CI, CV, CO refer to input data, modified data, and output data respectively.

Release 18.2 - © ANSYS, Inc. All rights reserved.