2nd class grid initialization & magne ener function