From f07c49e1d0ba3761f3c79999f9c34653505bdff2 Mon Sep 17 00:00:00 2001 From: Geoffroy Lesur Date: Tue, 9 Jul 2024 15:34:22 +0200 Subject: [PATCH] ensure that Fargo can't be used with too low DIMENSIONS --- src/dataBlock/fargo.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/dataBlock/fargo.cpp b/src/dataBlock/fargo.cpp index e1878d37..a509ef88 100644 --- a/src/dataBlock/fargo.cpp +++ b/src/dataBlock/fargo.cpp @@ -65,6 +65,9 @@ Fargo::Fargo(Input &input, int nmax, DataBlock *data) { } #if GEOMETRY == CARTESIAN || GEOMETRY == POLAR + #if DIMENSIONS < 2 + IDEFIX_ERROR("Fargo should be used with DIMENSIONS >= 2 in Cartesian or Polar geometries"); + #endif // Check if there is a domain decomposition in the intended fargo direction if(data->mygrid->nproc[JDIR]>1) { haveDomainDecomposition = true; @@ -80,6 +83,9 @@ Fargo::Fargo(Input &input, int nmax, DataBlock *data) { this->meanVelocity = IdefixArray2D("FargoVelocity",data->np_tot[KDIR], data->np_tot[IDIR]); #elif GEOMETRY == SPHERICAL + #if DIMENSIONS < 3 + IDEFIX_ERROR("Fargo should be used with DIMENSIONS == 3 in Spherical geometry"); + #endif // Check if there is a domain decomposition in the intended fargo direction if(data->mygrid->nproc[KDIR]>1) { haveDomainDecomposition = true;