-
Notifications
You must be signed in to change notification settings - Fork 10
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
Lanczos tests #132
Lanczos tests #132
Conversation
Adding a stupid check to try to not overreach for eigenvalues. Seem to somewhat work, but completely unclear how robust it is.
@@ -192,7 +192,8 @@ AMGe_host<dim, MeshEvaluator, VectorType>::compute_local_eigenvectors( | |||
{ | |||
boost::property_tree::ptree lanczos_params; | |||
lanczos_params.put("num_eigenpairs", n_eigenvectors); | |||
lanczos_params.put("tolerance", tolerance); | |||
// lanczos_params.put("tolerance", tolerance); | |||
lanczos_params.put("tolerance", 1e-6); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Did you mean to commit that?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, but this is all in progress. I need to put a lot more comments about why I'm doing things this way.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please do so.
// pcout << "Grid complexity : " << hierarchy.grid_complexity() << | ||
// std::endl; pcout << "Operator complexity: " << | ||
// hierarchy.operator_complexity() | ||
// << std::endl; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove do not comment it out.
What is the rational for having/not having these print to the standard output?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'll remove them.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Check with @Rombur. I don't have an opinion on this and I am not sure why it was here in the 1st place.
std::map<std::tuple<std::string, bool, std::string, std::string, bool>, | ||
double> | ||
ref_solution; | ||
// clang-format off |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Readability: Good call !
tt::tolerance(1e-6)); | ||
// (geometry, distortion, reordering, eigensolver, matrix-free) | ||
std::map<std::tuple<std::string, bool, std::string, std::string, bool>, | ||
double> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Readability: I would prefer a string or a scoped enumeration to denote matrix-free mode.
ref_solution[std::make_tuple("hyper_ball" , true , "None" , "lanczos" , false)] = 0.0966058675; | ||
ref_solution[std::make_tuple("hyper_ball" , true , "None" , "lanczos" , true)] = 0.2982453175; | ||
ref_solution[std::make_tuple("hyper_ball" , true , "Reverse Cuthill_McKee" , "lanczos" , false)] = 0.0966058675; | ||
ref_solution[std::make_tuple("hyper_ball" , true , "Reverse Cuthill_McKee" , "lanczos" , true)] = 0.2982453175; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
TL;DR
Would you confirm that you did add convergences rates for Lanczos and that nothing else change? Can you comment on the new gold values? Are they reasonably close to their LAPACK's counterpart?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes. The values are really close but not sure how robust the thing is. Lanczos test now fails, so I may need to play around with things. The whole thing is annoying, but proper fix is unclear.
BOOST_TEST( | ||
conv_rate == | ||
ref_solution[std::make_tuple(mesh, distort_random, reordering)], | ||
tt::tolerance(1e-6)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you comment here? Did we have if (mesh is hyper cube) { expression; } else { same expression; }
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes
@@ -334,6 +340,6 @@ BOOST_AUTO_TEST_CASE(weight_sum, *utf::tolerance(1e-4)) | |||
e[i] = 1.; | |||
e.compress(::dealii::VectorOperation::insert); | |||
restrictor_matrix.vmult(ee, e); | |||
BOOST_TEST(ee.l1_norm() == 1.); | |||
BOOST_TEST(ee.l1_norm() == 1., tt::tolerance(1e-4)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What is the rational for having the floating point comparison manipulation in the BOOST_TEST
macro versus having a decorator for the unit test?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I was not sure that BOOST_AUTO_TEST_CASE
and BOOST_DATA_TEST_CASE
behave the same way, and was too lazy to google. So just replaced with what I know.
@@ -79,6 +79,9 @@ void matrix_market_output_file( | |||
const std::string &filename, | |||
const dealii::TrilinosWrappers::SparseMatrix &matrix); | |||
|
|||
void matrix_market_output_file(const std::string &filename, | |||
const dealii::SparseMatrix<double> &matrix); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please comment on how this gets called with the changes you propose?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It does not, should have been a separate PR for that.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please remove from that PR.
Related to #115 and #114 (comment) |
Superseded by #136. |
No description provided.