Many physically interesting models show a quantum phase transition when a single parameter is varied through a critical point, where the ground state and the first excited state become degenerate. When this parameter appears as a coupling constant, these models can be understood as straight-line interpolations between different Hamiltonians $H_{rm I}$ and $H_{rm F}$. For finite-size realizations however, there will usually be a finite energy gap between ground and first excited state. By slowly changing the coupling constant through the point with the minimum energy gap one thereby has an adiabatic algorithm that prepares the ground state of $H_{rm F}$ from the ground state of $H_{rm I}$. The adiabatic theorem implies that in order to obtain a good preparation fidelity the runtime $tau$ should scale with the inverse energy gap and thereby also with the system size. In addition, for open quantum systems not only non-adiabatic but also thermal excitations are likely to occur. It is shown that -- using only local Hamiltonians -- for the 1d quantum Ising model and the cluster model in a transverse field the conventional straight line path can be replaced by a series of straight-line interpolations, along which the fundamental energy gap is always greater than a constant independent on the system size. The results are of interest for adiabatic quantum computation since strong similarities between adiabatic quantum algorithms and quantum phase transitions exist.