Derivation of a continuous adjoint topology optimization method applied on heat transfer for incompressible flow