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

MueLu stuff #9330

Merged
merged 3 commits into from
Jun 23, 2021
Merged
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
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ namespace MueLu {
}
}

} else if ( valuestr == "chebyshev" ) {
} else if (( valuestr == "chebyshev" ) || ( valuestr == "mls" )) {
std::string my_name = "\"" + pname + "\"";
mueluss << "<Parameter name=" << my_name << " type=\"string\" value=\"CHEBYSHEV\"/>" << std::endl;

Expand Down Expand Up @@ -163,6 +163,16 @@ namespace MueLu {
else { mueluss << "<Parameter name=\"chebyshev: ratio eigenvalue\" type=\"double\" value=\"20\"/>" << std::endl; adaptingParamList.remove("smoother: Chebyshev alpha",false); }
}

// MLS
if ( valuestr == "mls") {
if ( paramList.isParameter("smoother: MLS polynomial order") ) { mueluss << "<Parameter name=\"chebyshev: degree\" type=\"int\" value=\"" << paramList.get<int>("smoother: MLS polynomial order") << "\"/>" << std::endl; adaptingParamList.remove("smoother: MLS polynomial order",false); }
else if ( paramList.isParameter("smoother: polynomial order") ) { mueluss << "<Parameter name=\"chebyshev: degree\" type=\"int\" value=\"" << paramList.get<int>("smoother: polynomial order") << "\"/>" << std::endl; adaptingParamList.remove("smoother: polynomial order",false); }
else { mueluss << "<Parameter name=\"chebyshev: degree\" type=\"int\" value=\"2\"/>" << std::endl; }
if ( paramList.isParameter("smoother: MLS alpha") ) { mueluss << "<Parameter name=\"chebyshev: ratio eigenvalue\" type=\"double\" value=\"" << paramList.get<double>("smoother: MLS alpha") << "\"/>" << std::endl; adaptingParamList.remove("smoother: MLS alpha",false); }
else if ( paramList.isParameter("smoother: Chebyshev alpha") ) { mueluss << "<Parameter name=\"chebyshev: ratio eigenvalue\" type=\"double\" value=\"" << paramList.get<double>("smoother: Chebyshev alpha") << "\"/>" << std::endl; adaptingParamList.remove("smoother: Chebyshev alpha",false); }
else { mueluss << "<Parameter name=\"chebyshev: ratio eigenvalue\" type=\"double\" value=\"20\"/>" << std::endl; }
}

// parameters for ILU based preconditioners
if ( valuestr == "ifpack") {

Expand Down
2 changes: 1 addition & 1 deletion packages/muelu/test/unit_tests/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ IF (${PACKAGE_NAME}_ENABLE_Belos)
APPEND_SET(SOURCES Smoothers/BelosSmoother.cpp)
ENDIF()

IF (${PACKAGE_NAME}_ENABLE_Stratimikos AND ${PACKAGE_NAME}_ENABLE_Thyra)
IF (${PACKAGE_NAME}_ENABLE_Stratimikos AND ${PACKAGE_NAME}_ENABLE_Tpetra AND ${PACKAGE_NAME}_ENABLE_Thyra)
APPEND_SET(SOURCES Smoothers/StratimikosSmoother.cpp)
ENDIF()

Expand Down
4 changes: 2 additions & 2 deletions packages/muelu/test/unit_tests/RAPShiftFactory.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -381,7 +381,7 @@ namespace MueLuTests {
out << "||X||_2 = " << normX << std::endl;
result1->norm2(normResult1);
result2->norm2(normResult2);
TEST_FLOATING_EQUALITY(normResult1[0], normResult2[0], 1e-12);
TEST_FLOATING_EQUALITY(normResult1[0], normResult2[0], 1e4*Teuchos::ScalarTraits<typename Teuchos::ScalarTraits<SC>::magnitudeType>::eps());

}

Expand Down Expand Up @@ -459,7 +459,7 @@ namespace MueLuTests {
out << "||X||_2 = " << normX << std::endl;
result1->norm2(normResult1);
result2->norm2(normResult2);
TEST_FLOATING_EQUALITY(normResult1[0], normResult2[0], 1e-12);
TEST_FLOATING_EQUALITY(normResult1[0], normResult2[0], 1e4*Teuchos::ScalarTraits<typename Teuchos::ScalarTraits<SC>::magnitudeType>::eps());

}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ namespace MueLuTests {

RCP<const Teuchos::Comm<int> > comm = TestHelpers::Parameters::getDefaultComm();
const typename Teuchos::ScalarTraits<SC>::magnitudeType expectedNorm = 1.2856486930664495771e-01;
TEST_FLOATING_EQUALITY(residualNorms,expectedNorm,1e-12);
TEST_FLOATING_EQUALITY(residualNorms,expectedNorm,1e4*Teuchos::ScalarTraits<typename Teuchos::ScalarTraits<SC>::magnitudeType>::eps());
}

} // Block CG
Expand Down