Operational amplifier with reverse diode
The schematic corresponds to a Precision Rectifier. This type of circuit is used as a half-wave rectifier signals whose amplitude is less than the threshold voltage of the diode.
The connection with an operational amplifier, linearizes transfer curve for a diode, making it more ideal. This allows rectify signals from virtually zero.

The diagrams that you have posted, corresponding to half-wave rectifiers. An improved implementation of a precision rectifier is:







simulate this circuit &ndash; Schematic created using CircuitLab

For a full-wave recitifier, the  assembly is:







simulate this circuit

If this circuit you invert the connection of the diodes, you get the output pulses with positive polarity. In the circuit shown, the polarity of the pulse is negative.

Here, you can view a CI that implements a precision rectifier in this manner.