Make the code 3D only
As it is, the code is compiled 3 times for 3 values of dim=1,2,3
We want to remove the templating in order to reduce compiling time and code complexity
As it is, the code is compiled 3 times for 3 values of dim=1,2,3
We want to remove the templating in order to reduce compiling time and code complexity