Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow user-defined min/max eig multiplier for Chebyshev smoother #163

Closed
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions src/core/insSetup.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
2 changes: 2 additions & 0 deletions src/core/parReader.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
14 changes: 10 additions & 4 deletions src/libP/solvers/elliptic/src/ellipticMultiGridLevelSetup.c
Original file line number Diff line number Diff line change
Expand Up @@ -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")) {
Expand Down Expand Up @@ -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;

Expand Down