Simulation of nuclear fusion using a one dimensional particle in cell method