Inverse modeling of the natural state of geothermal reservoirs using adjoint and direct methods