-
Notifications
You must be signed in to change notification settings - Fork 707
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
Better default ctor for MGLevelObject #16979
base: master
Are you sure you want to change the base?
Conversation
*/ | ||
MGLevelObject(const unsigned int minlevel = 0, |
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.
Since no argument is equivalent to template <>
of the previous ctor, the only usage of this function is for default construction.
The general issue is that dealii/include/deal.II/base/mg_level_object.h Lines 300 to 305 in 58cc5c8
which will now return Having the possibility to have an empty |
@peterrum Yeah you are right! And does this one level object have to be initialized? I mean does the If not, I can call |
I am not sure if it is a good idea to have a dummy entry in the vector just to make the rest of the code working. Generally, the issue is that we store inclusive ranges
Personally, I would probably go with the solution to keep the internal vector empty (as suggested in this PR) and add asserts to other functions that indicate that they don't make sense if there are no levels... But let's wait for the opinion of someone else who knows the historical background of this class. |
For one,
will no longer be able to return an What kind of object do you have that cannot have a default constructor? In order to use the |
@bangerth |
Hi @peterrum, seems not much attention to this :-( Maybe I can try adding My argument is that users who use default ctor will, in most cases, reinit it to the MG level after like |
close #16978