Great question - I think the more well-defined your next task is, the easier it's going to be for you to context switch because you don't have to take time to figure out what to work on next. One thing to experiment with is when you're done working for the day, jot down a note of specifically what you want to work on the next time you sit down at your computer. The clearer it is and the less amount of problem solving it requires, the easier it's going to be for you to get back into the flow.