Evolution of residual stresses in three-dimensionally constrained epoxy resins