Modeling flow and geomechanics in fractured reservoirs