Application of the sequential gradient-restoration algorithm to thermal convective instability problems