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
Find apparent horizon in distorted frame #4720
Conversation
67d684f
to
be39103
Compare
be39103
to
1acdb28
Compare
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.
You can squash directly
functions_of_time), | ||
InterpolationTarget_detail::evaluate_temporal_id_for_expiration( |
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.
Why is this not InterpolationTarget_detail::get_temporal_id_value
? I know it's used above, but looking at the two functions, they are identical for all types except TimeStepId
. The difference is that get_temporal_id
does TimeStepId.substep_time().value()
while evaluate_temporal_id_for_expiration
does TimeStepId.step_time().value()
. They are different, but does that matter here?
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.
Probably _value
, but first, do you get any failures if you put ASSERT(time_id.substep() == 0, "Interpolating on substep " << time_id);
in both get_temporal_id_*
functions?
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.
@wthrowe all the tests pass if I put those ASSERT
s into both functions. Should evaluate_temporal_id_for_expiration
be removed, and only get_temporal_id_value
used everywhere? (and should I keep the ASSERT?)
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.
So at the moment, the functions always return the same value. I'm not sure I want to guarantee that that will always be true, though. If I remember right, this is only used during self start, which is only used for AdamsBashforth which doesn't have substeps. Predictor-corrector methods will presumably go through a similar infrastructure with substeps, though.
I don't really remember what's going on here. Why are there two of these? The _value
function is presumably to represent the time (or iteration or whatever) to use in maps and such. What is the _expiration
for? My first thought was we needed something monotonic, but it isn't monotonic. (Can these things get some documentation?)
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.
Both of these were added in #3421. It seems that evaluate_temporal_id_for_expiration
was added because previously, VerifyTemporalIdsAndSendPoints.hpp
used pending_id.step_time().value()
. Whereas, get_temporal_id_value
was added because ObserveTimeSeriesOnSurface.hpp
used temporal_id.substep_time().value()
. (take a look at the first commit of that PR)
So we needed one that got the step_time
and the other that got the substep_time
. However, I'm not sure if we need to use one or the other in each circumstance. I agree with @wthrowe that _value
seems to just get the current time, but unclear what _expiration
is actually needed for.
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.
Looking more closely, I don't think any of the uses of step_time()
here are correct. (Uses of step_time()
outside time-related code are usually wrong.) So just get rid of that function and probably rename the other one to get rid of the now-unnecessary disambiguator.
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, I will keep the one using substep_time()
and remove the other one. Should I leave the ASSERT in there?
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 say yes. It's just an ASSERT
so won't affect productions stuff
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.
No. I intend to add valid cases where it will fail.
src/ParallelAlgorithms/Interpolation/InterpolationTargetDetail.hpp
Outdated
Show resolved
Hide resolved
src/ParallelAlgorithms/Interpolation/InterpolationTargetDetail.hpp
Outdated
Show resolved
Hide resolved
src/ParallelAlgorithms/Interpolation/InterpolationTargetDetail.hpp
Outdated
Show resolved
Hide resolved
8dbddde
to
f0bf890
Compare
squashed. |
@wthrowe did you want to look at the part you were involved in discussing for this PR? |
@@ -5,6 +5,7 @@ | |||
|
|||
#include "DataStructures/LinkedMessageId.hpp" | |||
#include "Time/TimeStepId.hpp" | |||
#include "Utilities/ErrorHandling/Assert.hpp" |
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.
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.
Yup still there
It did not include all the maps it needed to. This is a bug fix that should have been done when distorted frame was added to UniformTranslation.
Do this for many classes.
f0bf890
to
a1a300f
Compare
Removed include, rebased and fixed conflict. |
Er, try again? It's still there. |
@@ -5,6 +5,7 @@ | |||
|
|||
#include "DataStructures/LinkedMessageId.hpp" | |||
#include "Time/TimeStepId.hpp" | |||
#include "Utilities/ErrorHandling/Assert.hpp" |
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.
Yup still there
This enables interpolation in the distorted frame.
a1a300f
to
99f42ec
Compare
Instead, use get_temporal_id_value.
99f42ec
to
53e5363
Compare
Hopefully the include is gone now... sorry.. |
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.
Yup! Gone now!
Proposed changes
Two main changes:
Other necessary changes are fixing a bug in UniformTranslation and adding instantiations of the distorted frame in many places.
Code review checklist
make doc
to generate the documentation locally intoBUILD_DIR/docs/html
.Then open
index.html
.code review guide.
bugfix
ornew feature
if appropriate.