From 8c0687a6cd4a10a79c7a554083a35eda11cc55f0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Max=20L=C3=BCbke?= Date: Wed, 27 Mar 2024 20:11:45 +0000 Subject: [PATCH] Update grid dimensions validation to handle 1D grids --- include/tug/Grid.hpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/include/tug/Grid.hpp b/include/tug/Grid.hpp index dee004a..c4f35ec 100644 --- a/include/tug/Grid.hpp +++ b/include/tug/Grid.hpp @@ -57,9 +57,9 @@ public: */ Grid(int _row, int _col) : row(_row), col(_col), domainRow(_row), domainCol(_col) { - if (row <= 3 || col <= 3) { + if (row <= 1 || col <= 1) { throw std::invalid_argument( - "Given grid dimensions too small. Must each be greater than 3."); + "At least one dimension is 1. Use 1D grid for better results."); } this->dim = 2;