Ph.D. thesis: Adaptive solvers for partial differential and differential-algebraic equations