def stress_scaling_area(sigma_old, a_old, a_new):
    """ Scale stresses using input area """
    if a_new <= a_old:
        sigma_new = sigma_old * (a_old / (a_old - abs(a_old - a_new)))
        assert sigma_new >= sigma_old, 'ERROR no stress increase: \nt_old ' + str(
            a_old) + ' sigma_old ' + str(sigma_old) + '\nt_new ' + str(a_new
            ) + ' sigma_new ' + str(sigma_new)
    else:
        sigma_new = sigma_old * (a_old / (a_old + 0.5 * abs(a_old - a_new)))
        assert sigma_new <= sigma_old, 'ERROR no stress reduction: \nt_old ' + str(
            a_old) + ' sigma_old ' + str(sigma_old) + '\nt_new ' + str(a_new
            ) + ' sigma_new ' + str(sigma_new)
    return sigma_new
