Setting stresses in composites for two different curing modes