change in the shape of cylinder

Dear LAMMPS users

During heating of a cylindrical model it changes to a cuboid. Can any one suggest how to retain the shape.

Assuming you are using non-periodic boundaries, that
is what the system wants to do. So you should ask
why it is justified to constrain the system. If you still
want to, you could use fix wall/region with a cylindrical
region to constrain the outer boundary of the system.