Added constructor with three parameters
Added reading of grid dimensions
p4#: 21155