@@ -44,7 +44,6 @@ KOKKOS_INLINE_FUNCTION real FargoFlux(const IdefixArray4D<real> &Vin, int n, int
4444 int som2 = som1-1 ;
4545 if (!haveDomainDecomposition && (som2-sbeg< 0 )) som2 = som2+ds;
4646
47- int sign = (eps>=0 ) ? 1 : -1 ;
4847 real dqm2,dqm1,dqp1,dqp2, q0,qm1, qp1;
4948 #if GEOMETRY == CARTESIAN || GEOMETRY == POLAR
5049 q0 = Vin (n,k,so,i);
@@ -140,11 +139,15 @@ void Fargo::Init(Input &input, DataBlock *data) {
140139 if (input.CheckBlock (" Fargo" )) {
141140 std::string opType = input.Get <std::string>(" Fargo" ," velocity" ,0 );
142141 if (opType.compare (" userdef" )==0 ) {
142+ #if GEOMETRY != SPHERICAL && GEOMETRY != POLAR
143+ IDEFIX_ERROR (" Fargo+userdef is only compatible with SPHERICAL and POLAR geometries" );
144+ #endif
143145 this ->type =userdef;
144146 } else if (opType.compare (" shearingbox" )==0 ) {
145147 this ->type =shearingbox;
146148 #if GEOMETRY != CARTESIAN
147- IDEFIX_ERROR (" Fargo+shearingbox only compatible with cartesian geometry" );
149+ // Actually, this has never really been tested, so assumes it doesn't work...
150+ IDEFIX_ERROR (" Fargo+shearingbox is only compatible with cartesian geometry" );
148151 #endif
149152 } else {
150153 IDEFIX_ERROR (" Unknown fargo velocity in the input file. "
@@ -302,8 +305,8 @@ void Fargo::CheckMaxDisplacement() {
302305 IdefixArray1D<real> xi;
303306 IdefixArray1D<real> xj;
304307 IdefixArray1D<real> dxk;
305- FargoType fargoType = type;
306- real sbS = hydro->sbS ;
308+ [[maybe_unused]] FargoType fargoType = type;
309+ [[maybe_unused]] real sbS = hydro->sbS ;
307310 real invDt = 0 ;
308311
309312 // Get domain size
@@ -360,8 +363,8 @@ void Fargo::AddVelocity(const real t) {
360363 IdefixArray1D<real> x1 = data->x [IDIR];
361364 IdefixArray4D<real> Vc = hydro->Vc ;
362365 IdefixArray2D<real> meanV = this ->meanVelocity ;
363- FargoType fargoType = type;
364- real sbS = hydro->sbS ;
366+ [[maybe_unused]] FargoType fargoType = type;
367+ [[maybe_unused]] real sbS = hydro->sbS ;
365368
366369 idefix_for (" FargoAddVelocity" ,
367370 0 ,data->np_tot [KDIR],
@@ -389,9 +392,9 @@ void Fargo::SubstractVelocity(const real t) {
389392 }
390393 IdefixArray1D<real> x1 = data->x [IDIR];
391394 IdefixArray4D<real> Vc = hydro->Vc ;
392- IdefixArray2D<real> meanV = this ->meanVelocity ;
393- FargoType fargoType = type;
394- real sbS = hydro->sbS ;
395+ [[maybe_unused]] IdefixArray2D<real> meanV = this ->meanVelocity ;
396+ [[maybe_unused]] FargoType fargoType = type;
397+ [[maybe_unused]] real sbS = hydro->sbS ;
395398
396399 idefix_for (" FargoSubstractVelocity" ,
397400 0 ,data->np_tot [KDIR],
@@ -500,8 +503,8 @@ void Fargo::ShiftSolution(const real t, const real dt) {
500503 IdefixArray1D<real> dx3 = data->dx [KDIR];
501504 IdefixArray1D<real> sinx2 = data->sinx2 ;
502505 IdefixArray1D<real> sinx2m = data->sinx2m ;
503- FargoType fargoType = type;
504- real sbS = hydro->sbS ;
506+ [[maybe_unused]] FargoType fargoType = type;
507+ [[maybe_unused]] real sbS = hydro->sbS ;
505508 bool haveDomainDecomposition = this ->haveDomainDecomposition ;
506509 int maxShift = this ->maxShift ;
507510
@@ -785,8 +788,6 @@ void Fargo::ShiftSolution(const real t, const real dt) {
785788 }
786789
787790 // Compute EMF due to the shift via second order reconstruction
788- real dqm, dqp, dq;
789-
790791 #if GEOMETRY == CARTESIAN || GEOMETRY == POLAR
791792 if (eps>=ZERO_F) {
792793 int som1;
0 commit comments