Cure-induced and thermal stresses in a constrained epoxy resin