### 3.5.3. Notes About Autodyn Variables

Do not change variables other than user variables 1 through to 20 because these changes will not be stored to underlying data structures when PUT_ELEM_VAR/PUT_NODE_VAR are called. Variables passed into the material modeling subroutines as arguments can be changed. Calls to GET_ELEM_VAR/GET_NODE_VAR and PUT_ELEM_VAR/PUT_NODE_VAR should not be used in the material user subroutines for materials used to fill ANP and NBS tetrahedra, with the exception of the user erosion subroutine in mdero_user_1.f90. An example of using these calls in mdero_user_1.f90 for NBS tetrahedra is given in Access to Nodal Variables for NBS Tetrahedral Elements.

If GET_ELEM_VAR is called for an element other than the one currently being processed in the solver (or for a shell sublayer that differs from the current one being processed), it will not be possible to tell whether the values in RVL for that element are from the current or the previous computational cycle.

The above methods for retrieving and updating unstructured element or node data require the global `index_elem` or `index_node` as input. For material modeling user subroutines, the index of the current element will be available via

    USE mdstring
    Index_elem = ELEM_NOW

For other cases, there are a number of ways in which one can obtain the internal index for an element: for example, direct access, looping over Parts, looping over a Group. Examples of various types of element/node access are given by example in Unstructured Element Data Access.

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