mirror of
https://git.gfz-potsdam.de/naaice/tug.git
synced 2025-12-15 18:38:23 +01:00
Update grid dimensions validation to handle 1D grids
This commit is contained in:
parent
1679dc84d2
commit
8c0687a6cd
@ -57,9 +57,9 @@ public:
|
|||||||
*/
|
*/
|
||||||
Grid(int _row, int _col)
|
Grid(int _row, int _col)
|
||||||
: row(_row), col(_col), domainRow(_row), domainCol(_col) {
|
: row(_row), col(_col), domainRow(_row), domainCol(_col) {
|
||||||
if (row <= 3 || col <= 3) {
|
if (row <= 1 || col <= 1) {
|
||||||
throw std::invalid_argument(
|
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;
|
this->dim = 2;
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user