Thermal conductivity of rocks from measurements on fragments and its application to heat-flow determinations