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
Add MGSmootherPrecondition::initialize_matrices() #13343
Conversation
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.
OK with me, but I must say that I am surprised that we expose the smoothers as public member variables in this class, which makes this way of initialization possible at all. But I guess it is as you say, one might want to have additional flexibility in the solver.
@@ -467,6 +467,15 @@ class MGSmootherPrecondition : public MGSmoother<VectorType> | |||
const typename PreconditionerType::AdditionalData & | |||
additional_data = typename PreconditionerType::AdditionalData()); | |||
|
|||
/** | |||
* In contrast to the function above, only initialize the matrices. The | |||
* smoothers need to be setup manually by the user in the following. This |
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.
* smoothers need to be setup manually by the user in the following. This | |
* smoothers need to be set up manually by the user as a subsequent step in the code. This |
/** | ||
* In contrast to the function above, only initialize the matrices. The | ||
* smoothers need to be setup manually by the user in the following. This | ||
* is useful if one wants full flexibility in the choice of smoothers. |
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.
Maybe you can explain a bit more how this works: By manually setting the public member variable smoothers
?
9359a70
to
f016c10
Compare
I was also surprised by this. I think a setter function allowing controlled access to the level smoothers would have been a better choice. @kronbichler I have addressed your comments! |
/rebuild |
I would like to setup
MGSmootherPrecondition
level by level, not using theinitialize()
functions, which also initialize the preconditioners. The best would be to have a functioninitialize(const MGLevelObject<MatrixType2> &matrices)
but that conflicts with the function with the same name that takes optionally anAdditonalData
object.