Basically I am trying to check if my 1D FDTD code works fine and how to write quantity that is conserved all the way.

In 1D FDTD should we expect that the power is conserved when the pulse is being reflected off a perfect electric conductor boundary PEC ? How to write conservation law for the instantaneous pointing vector?

I am looking not at the energy but at the normalized sum(EE*)(time) (sum (over space) of the E field squared ).

sum(EE*)(time) is function of time.

On the plot is initial E field over E field at time t ( sum(EE*)(time)/sum(sum(EE*)(initial) )

Ylimit[1-1E-10 1+1E-10] Ylimit[1-1E-15 1+1E-15]