fftw.cpp: separate shape and size into methods