You can create a smooth field within each element for any expression by using the gpeval() operator. This operator has, in its most basic version, the syntax
gpeval(integration_order, expression).
The gpeval() operator evaluates an expression at a given set of Gauss points, and creates an approximate smooth field using a least squares fit. If there are state variables stored at Gauss points, as is the case with many nonlinear material models, it is important that you use the correct integration order in the operator in order evaluate those variables accurately. In most cases, when quadratic shape functions are used, this means that the first argument should be
4.