added refinement and merging function needed for AMR algorythm
made the refinement process. Need to finish the unrefinement one.