Op-amp and ideal diode problem: determine Vout as a function of Vin
When you have a problem analyzing a circuit like this in a particular state, start by noting the voltages and currents you do know on the schematic, then see if you can figure out what others are from that.  As you figure out more, it should be possible to figure out even more.  Eventually you figure out the whole circuit.

In this example, you want to examine what happens with negative input.  Set the voltage source to -1 V.  That obviously makes the opamp + input also -1 V.  You don't know yet what the opamp output and the diode are doing.  Start by assuming the diode is a open circuit, and see where that goes.  You should be able to see the voltage on the opamp - input from inspection then.  Now you have both opamp inputs, so you should be able to see what the output is doing.  Now you know both ends of the diode.  Is it really reverse biased as we assumed, or is it forward biased and we therefore need to revise our assumption of the opamp - input voltage?  Either way, you get to a stable condition where you know all the voltages and you should be able to see what is going on.