palabos matrix operation

I have a problem about the palsbos. I need to write a function to operate the MultiScalarField3D object. I need to rotate the MultiScalarField3D matrix by one step in each of the three directions. What I am doing now is to swap the matrix by one for each of the nodes in the MultiScalarField3D object. But it is of low efficiency. Do you know if there is any efficient method?

For example: rotate in the x direction by one step

1 2 3 2 3 1
4 5 6 —> 5 6 4
7 8 9 8 9 7