In this work, a residual-based error estimation developed initially for linear problems  and later extended to nonlinear problems    is employed. It features several advantages. The nonlinear version inherits all the properties of the linear counterpart taking into account both the material and geometrical nonlinearity. Its efficiency does not depend on superconvergent properties, that have been proved only for linear problems, but relies on the a-priori convergence analysis of the finite element method. Contrary to classical error estimators of residual type, the computation of flux jumps and associated flux splitting procedure is avoided. Moreover, the algorithm can be easily applied to problems discretized by general unstructured meshes, even with different element types. This makes it very suitable for application in general nonlinear adaptive analysis. The most significant deficiency of this error estimator is its prohibitively large costs, especially in nonlinear analysis.
The basic idea of residual-based error estimators is to approximate the error by solving a set of local reference low-cost problems. Since the elements of coarse mesh form the most natural partitioning of the original problem the local reference problems are typically related to individual elements of the original mesh. The solution of elementary problems requires proper boundary conditions. This can be accomplished by imposing the flux (traction of the original problem) on the outer boundary and by prescribing homogeneous Dirichlet conditions for the error along the interior (interelement) boundary of each elementary problem. However, the choice of such artificial boundary conditions implies underestimation of the error because the error is generally nonzero along the interelement boundaries. This effect can be alleviated by considering another set of local problems formed by adjacent parts of elements sharing the particular node of the coarse mesh and with boundary not coinciding with the interelement interfaces. In these problems, the homogeneous Dirichlet condition for the error and the original tractions are again applied as boundary conditions. These two sets of local problems are referred to as element patches and nodal patches. The local reference problems are discretized in a compatible way to form a global reference mesh. The resulting approximation of the reference error is then obtained by combining contributions from both sets of problems. The energy norm of the element and nodal patch error can be computed on each element of the reference mesh. It is important to point out, that the resulting approximation of the reference error cannot be gathered simply by summing the contributions from element and nodal patches because these contributions are generally not orthogonal. Therefore, the contributions must be first orthogonalized with respect to the stiffness matrix. The question is what stiffness matrix to employ. For linear problems, it is simply the elastic stiffness matrix. For nonlinear problems, tangent stiffness matrix may be employed providing that it is positive definite. However this is not the case for materials with strain softening. Moreover, when considering the nonlocal regularization, the consistent tangent stiffness is likely to be not available. Also, due to the nonlocal interactions, the tangent stiffness matrix would be different on the same reference element shared by element and nodal patches, which would complicate the error orthogonalization. Therefore the elastic stiffness matrix has been adopted in this study. After the local estimates are assembled to build up the global estimate covering the whole domain by summing the contributions from individual elements of the reference mesh, the global relative error of the solution is assessed.