Code indexing in gitaly is broken and leads to code not being visible to the user. We work on the issue with highest priority.

Skip to content
Snippets Groups Projects
Commit a8ca0d69 authored by kraus's avatar kraus
Browse files

throw an exception when SAAMG is chosen but OPAL isn't configured and built with SAAMG

parent 0b65ecbd
No related branches found
No related tags found
No related merge requests found
...@@ -289,7 +289,7 @@ FieldSolver::FieldSolver(): ...@@ -289,7 +289,7 @@ FieldSolver::FieldSolver():
itsAttr[AMR_MG_NORM] = Attributes::makeString("AMR_MG_NORM", itsAttr[AMR_MG_NORM] = Attributes::makeString("AMR_MG_NORM",
"Norm for convergence criteria", "Norm for convergence criteria",
"LINF"); "LINF");
itsAttr[AMR_MG_VERBOSE] = Attributes::makeBool("AMR_MG_VERBOSE", itsAttr[AMR_MG_VERBOSE] = Attributes::makeBool("AMR_MG_VERBOSE",
"Write solver info in SDDS format (*.solver)", "Write solver info in SDDS format (*.solver)",
false); false);
...@@ -298,7 +298,7 @@ FieldSolver::FieldSolver(): ...@@ -298,7 +298,7 @@ FieldSolver::FieldSolver():
"Rebalancing of Smoothed Aggregation " "Rebalancing of Smoothed Aggregation "
"Preconditioner", "Preconditioner",
false); false);
itsAttr[AMR_MG_REUSE] = Attributes::makeString("AMR_MG_REUSE", itsAttr[AMR_MG_REUSE] = Attributes::makeString("AMR_MG_REUSE",
"Reuse type of Smoothed Aggregation", "Reuse type of Smoothed Aggregation",
"RAP"); "RAP");
...@@ -409,7 +409,7 @@ void FieldSolver::initCartesianFields() { ...@@ -409,7 +409,7 @@ void FieldSolver::initCartesianFields() {
decomp[2] = PARALLEL; decomp[2] = PARALLEL;
} }
// create prototype mesh and layout objects for this problem domain // create prototype mesh and layout objects for this problem domain
#ifdef ENABLE_AMR #ifdef ENABLE_AMR
if ( !isAmrSolverType() ) { if ( !isAmrSolverType() ) {
#endif #endif
...@@ -522,10 +522,8 @@ void FieldSolver::initSolver(PartBunchBase<double, 3> *b) { ...@@ -522,10 +522,8 @@ void FieldSolver::initSolver(PartBunchBase<double, 3> *b) {
Util::toUpper(Attributes::getString(itsAttr[PRECMODE]))); Util::toUpper(Attributes::getString(itsAttr[PRECMODE])));
itsBunch_m->set_meshEnlargement(Attributes::getReal(itsAttr[BBOXINCR]) / 100.0); itsBunch_m->set_meshEnlargement(Attributes::getReal(itsAttr[BBOXINCR]) / 100.0);
#else #else
INFOMSG("SAAMG Solver not enabled! Please build OPAL with -DENABLE_SAAMG_SOLVER=1" << endl); throw OpalException("FieldSolver::initSolver",
INFOMSG("switching to FFT solver..." << endl); "SAAMG Solver not enabled! Please build OPAL with -DENABLE_SAAMG_SOLVER=1");
solver_m = new FFTPoissonSolver(mesh_m, FL_m, greens, bcz);
fsType_m = "FFT";
#endif #endif
} else { } else {
solver_m = 0; solver_m = 0;
...@@ -644,7 +642,7 @@ Inform &FieldSolver::printInfo(Inform &os) const { ...@@ -644,7 +642,7 @@ Inform &FieldSolver::printInfo(Inform &os) const {
#ifdef ENABLE_AMR #ifdef ENABLE_AMR
} }
#endif #endif
if(solver_m) if(solver_m)
os << *solver_m << endl; os << *solver_m << endl;
os << "* ********************************************************************************** " << endl; os << "* ********************************************************************************** " << endl;
...@@ -729,7 +727,7 @@ void FieldSolver::initAmrSolver_m() { ...@@ -729,7 +727,7 @@ void FieldSolver::initAmrSolver_m() {
Attributes::getReal(itsAttr[AMR_MG_NSWEEPS]), Attributes::getReal(itsAttr[AMR_MG_NSWEEPS]),
Attributes::getString(itsAttr[AMR_MG_INTERP]), Attributes::getString(itsAttr[AMR_MG_INTERP]),
Attributes::getString(itsAttr[AMR_MG_NORM])); Attributes::getString(itsAttr[AMR_MG_NORM]));
dynamic_cast<AmrMultiGrid*>(solver_m)->setVerbose( dynamic_cast<AmrMultiGrid*>(solver_m)->setVerbose(
Attributes::getBool(itsAttr[AMR_MG_VERBOSE])); Attributes::getBool(itsAttr[AMR_MG_VERBOSE]));
#else #else
...@@ -741,4 +739,4 @@ void FieldSolver::initAmrSolver_m() { ...@@ -741,4 +739,4 @@ void FieldSolver::initAmrSolver_m() {
throw OpalException("FieldSolver::initAmrSolver_m()", throw OpalException("FieldSolver::initAmrSolver_m()",
"Unknown solver " + fsType + "."); "Unknown solver " + fsType + ".");
} }
#endif #endif
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment