Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
Ghost interface #1278
base: main
Are you sure you want to change the base?
Ghost interface #1278
Changes from 29 commits
d0a95a8
4d72771
b8c6e37
11db7f3
3786648
cfa63f1
65fc4e4
c61a5a4
4bca580
bf5add2
d548aec
b5ba195
9b693d4
dbfb924
ce0a928
c47c536
a52d1f6
06fd2e2
ba64acb
137c189
cd88e76
0d74a11
53de48d
febd5b1
c9bb0f4
5010b09
39ca690
b83d99a
af2926a
68fb1e9
bea8572
11fbc50
e93e2e9
bdbf825
3582bc2
a4d2b4e
b8c3a67
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
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.
This negates the possibility to deactivate ghost. One could want to call
to deactivate ghost during a specific part of the simulation.
IMHO
would be a better check
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 see your point. But a little question, why should we use
T8_ASSERT
instead ofSC_CHECK_ABORT
?If someone sets the combination 1 and NULL, this can not work.
In the function
t8_forest_set_ghost_ext
we also useSC_CHECK_ABORT
, that was the reason for me to do the same.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.
We want to use
T8_ASSERT
as often as possible, because it does not affect the performance in release mode. In this case aSC_CHECK_ABORT
is also okay, because this function is not called that oftenThere 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 we can find a more suitable name. Yes, this is an interface, but in this case the class defines what the ghost algorithm actually does. Maybe
ghost_strategy
orghost_recipe
?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
ghost_creator
orghost_builder
is a good name. Because the class contains all what is necessary to build the ghost layer and the only function, that you can call from outside isdo_ghost
.If we want to take multiple ghost_algorithms on one forest, the forest will save the handler for them and not longer the ghost_interface class.
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 see where you are going there, but these names suggest that the class builds another object like the
t8_scheme_builder
.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
ghost_definition
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.
Some comments would be nice
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.
step1 and step2 were renamed
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.
Document
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.
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.
In this function we set
forest->ghost_interface = ghost_interface;
and if I make the variableghost_interface
of the function const, I can't write it to the forest, because it expects no const member.