move mesh initialization out of calculation step