Does the heat produced in an inductor affected by the total current in the resistance in the circuit? The energy stored in an inductor depends on the inductance of the inductor and the current flowing through it. But, assume that the switch is opened. Then, does the heat generated in the inductor dependent on the total resistance in the circuit or just the resistance of the inducor?

 A: When the switch is opened, the inductor energy is dissipated over time via the internal inductor resistance and the external parallel resistance.
The stored energy is radiated away as heat, heating both the inductor and the external parallel resistor.
If the external resistance is much larger than the internal inductor resistance, the majority of the stored energy will be dissipated by the external resistor (in the limit of zero inductor resistance, all the energy is dissipated by the external resistor).
Conversely, if the internal resistance is much larger, the majority of the energy will be dissipated by the inductor (in the limit of zero external resistance, all the energy is dissipated by the internal inductor resistance).
A: Well this is another one of many questions found at this site, where loose terminology and lack of pedantic rigor, lead to a lot of wasted time and energy.
I view the OP's circuit, as consisting of an INDUCTANCE  "L" in series with a RESISTANCE "R" , paralleled by a second RESISTANCE "R" ,with a battery and switch connected across those elements.
As drawn, the battery serves no function with the switch open, and Rajath describes no procedure being followed.   So no information can be discerned about what might be happening.
But if at any time the switch should be closed, then a current   E/R will flow in the parallel resistance, and it will dissipate E^2/R Watts of power while the switch is closed, which will presumably appear as EM radiation , at some indeterminate spectrum, since we know nothing of the nature of that circuit element (R), but could consist of what we colloquially refer to as "heat" or possibly "light" or both.
At the time the switch is closed, the other path through the LR series combination, will experience a step Voltage of -E at the inductance/resistance junction followed by an exponential current rise from zero to E/R with a time constant of L/R, so the current will reach 99% (roughly) of E/R in 5L/R seconds.    From then on, the resistance "R" in series with the inductance will do the same thing as the other resistance, assuming they are similar elements.     The Inductance "L" dissipates no power and generates no "heat", but during the initial current transient, the inductance will radiate EM radiation according to Maxwell's equations.
If subsequently the switch is opened, then the current in the INDUCTANCE,   (E/R) will flow through the two resistances in series to produce a step Voltage 2E across the inductance, and the current will decay exponentially from E/R down to zero, with a time constant L/2R reaching 1% of E/R in a time of 5L/2R seconds (roughly).    The INDUCTANCE will presumably radiate EM radiation during the current transient, but the spectrum will be different because the transient period is twice as long as the turn on transient.
But of course, if we are not talking about ideal circuit elements, but some actual "inductor" that might have an internal Resistance "R", then the physical locations of the various emanations could be different.
Just another reason, why OPs should specify their questions more rigorously.    In an exam situation, one should expect to get credit only for their answer to the question asked.
A: It depends on the total resistance (including the winding resistance of the inductor, not shown in your circuit).  Once the switch is opened, no current flows through the battery, so the battery does not affect the rest of the circuit then, after the switch is opened.  Basically at that time, when the switch is opened, there is just the initial current condition (of the current in the inductor at time the switch is opened) and that current then just goes through the winding resistance of the inductor (not shown in your circuit) as well as the two resistors R in series (effective resistance 2R).
I recommend that simulate your circuit by downloading LtSpice at:
http://www.linear.com/designtools/software/#LTspice
To model the "heat" of the inductor, you need to define the winding resistance of the inductor.  In your model circuit, there does not appear to be any winding resistance (meaning that is negligible compared to the resistors R), so there - in this case - is no difference in the heat generated by the inductor.  The inductor actually removes energy from its environment as it discharges the magnetic field that surrounds it, having a cooling effect in your circuit model!
