It's a bit weird to me, because the battery symbol is upside down. So I would assume that the positive terminal is on the bottom.
The diode will conduct in the direction of the arrow, so only after the switch is opened.
Edit: A bit more descriptive:
Initially a current is flowing through the inductor in the direction of the arrow.
when the switch is opened, that current keeps flowing, but cannot go through the switch, therefore it will go through the diode. The voltage at the capacitor is zero initially. When the diode starts to conduct, the capacitor is charged (indeed in a sinusoidal wave shape) until the peak value of the sine. The capacitor can not discharge through the diode, so it will stay at the peak level of the sine.
This indeed corresponds to a quarter sine wave (or 90 degrees).
The picture below shows the waveform. The blue line is the voltage over the capacitor, while the red line shows the effect if the diode was left out.
You can clearly see that the diode stops conducting because the capacitor voltage is higher than the inductor voltage from 90 degrees onward.
Finally the green line is the current through the inductor.
Blue = Capacitor voltage
Red = Capacitor voltage in standard tank circuit
Green = Inductor current