diff --git a/src/core/insSetup.cpp b/src/core/insSetup.cpp index 590d7efd1..45543953f 100644 --- a/src/core/insSetup.cpp +++ b/src/core/insSetup.cpp @@ -471,6 +471,8 @@ ins_t* insSetup(MPI_Comm comm, occa::device device, setupAide &options, int buil ins->pOptions.setArgs("DEBUG ENABLE OGS", "1"); ins->pOptions.setArgs("DEBUG ENABLE REDUCTIONS", "1"); ins->pOptions.setArgs("MULTIGRID VARIABLE COEFFICIENT", "FALSE"); + ins->pOptions.setArgs("MIN EIG MULTIPLIER", options.getArgs("PRESSURE MIN EIG MULTIPLIER")); + ins->pOptions.setArgs("MAX EIG MULTIPLIER", options.getArgs("PRESSURE MAX EIG MULTIPLIER")); ins->pSolver = new elliptic_t(); ins->pSolver->blockSolver = 0; diff --git a/src/core/parReader.cpp b/src/core/parReader.cpp index af225bdc8..0eef18298 100644 --- a/src/core/parReader.cpp +++ b/src/core/parReader.cpp @@ -93,6 +93,8 @@ void setDefaultSettings(libParanumal::setupAide &options, string casename, int r options.setArgs("PRESSURE PARALMOND AGGREGATION STRATEGY", "DEFAULT"); options.setArgs("PRESSURE PARALMOND LPSCN ORDERING", "MAX"); options.setArgs("PARALMOND SMOOTH COARSEST", "FALSE"); + options.setArgs("PRESSURE MIN EIG MULTIPLIER", "0.1"); + options.setArgs("PRESSURE MAX EIG MULTIPLIER", "1.1"); } libParanumal::setupAide parRead(std::string &setupFile, MPI_Comm comm) diff --git a/src/libP/solvers/elliptic/src/ellipticMultiGridLevelSetup.c b/src/libP/solvers/elliptic/src/ellipticMultiGridLevelSetup.c index 07f517035..76fe0dbe5 100644 --- a/src/libP/solvers/elliptic/src/ellipticMultiGridLevelSetup.c +++ b/src/libP/solvers/elliptic/src/ellipticMultiGridLevelSetup.c @@ -125,8 +125,11 @@ void MGLevel::setupSmoother(elliptic_t* ellipticBase) ChebyshevIterations = 2; //default to degree 2 //estimate the max eigenvalue of S*A dfloat rho = this->maxEigSmoothAx(); - lambda1 = 1.1 * rho; - lambda0 = rho / 10.; + const double maxEigMultiplier = std::stod(options.getArgs("MAX EIG MULTIPLIER")); + const double minEigMultiplier = std::stod(options.getArgs("MIN EIG MULTIPLIER")); + + lambda1 = maxEigMultiplier * rho; + lambda0 = rho * minEigMultiplier; } if(options.compareArgs("MULTIGRID DOWNWARD SMOOTHER","JACOBI") || options.compareArgs("MULTIGRID UPWARD SMOOTHER","JACOBI")) { @@ -163,8 +166,11 @@ void MGLevel::setupSmoother(elliptic_t* ellipticBase) //estimate the max eigenvalue of S*A dfloat rho = this->maxEigSmoothAx(); - lambda1 = 1.1 * rho; - lambda0 = rho / 10.; + const double maxEigMultiplier = std::stod(options.getArgs("MAX EIG MULTIPLIER")); + const double minEigMultiplier = std::stod(options.getArgs("MIN EIG MULTIPLIER")); + + lambda1 = maxEigMultiplier * rho; + lambda0 = rho * minEigMultiplier; }else { stype = RICHARDSON;