Added the function 'gridGenerate'.