-
Notifications
You must be signed in to change notification settings - Fork 184
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
Remove uses of TimeStepId in interpolation #3592
Remove uses of TimeStepId in interpolation #3592
Conversation
@@ -63,9 +63,7 @@ namespace intrp { | |||
|
|||
namespace InterpolationTarget_detail { | |||
double get_temporal_id_value(double time); | |||
double get_temporal_id_value(const TimeStepId& time_id); | |||
double evaluate_temporal_id_for_expiration(double time); |
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.
@markscheel What are these two functions? Do we need both of 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.
These two functions were added by @moxcodes in #3421 so that certain code would work both for double
and for TimeStepId
, without writing two different versions of that code.
Jordan needed temporal_id to be something different than a double so that self-start would work with #2323 .
If the temporal_id is now always a double, then these two functions should be removed.
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 we should hold off until #3422 is merged so we can see if there's any interaction?
There are some more of these that I missed. |
b72541f
to
fb4ecfe
Compare
Got the rest. |
fb4ecfe
to
c15bd06
Compare
@@ -3,15 +3,7 @@ | |||
|
|||
#include "ParallelAlgorithms/Interpolation/InterpolationTargetDetail.hpp" | |||
|
|||
#include "Time/TimeStepId.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.
Nice, I believe this removes the dependence of ParallelInterpolation
on Time
. Could you double-check, and then remove the dependency from the CMakeLists.txt
?
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.
Yep, looks like that's the last one for the main library. The test library still uses it, though. Squashed directly.
TimeStepId is not a global identifier, so it cannot be used as an ID for the interpolator component.
c15bd06
to
9b914e9
Compare
@markscheel ping |
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.
@@ -37,13 +35,17 @@ namespace intrp { | |||
|
|||
namespace { | |||
|
|||
struct OtherId : db::SimpleTag { |
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 called OtherId
? Why not TimeId
or something that has Time
in it?
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.
The one it is "other" to is called "Time", so using "Time" and "TimeId" as the two IDs seemed rather confusing. I could go with "Time2" or something?
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 at the code again, I believe that the only reason that there are 2 tags in this test is to test that interpolation works with both TimeStepId
and double
. So if interpolation only works with double
, then I think there doesn't need to be a 2nd tag at all.
@@ -25,6 +26,10 @@ class DataVector; | |||
|
|||
namespace { | |||
|
|||
struct OtherId : db::SimpleTag { |
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.
TimeId
? TimeTag
?
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, it looks like some of this may still be needed. I really want to get rid of the non-CCE stuff, though, since using it that way is wrong and it keeps getting copy-pasted to more places.
@@ -37,13 +35,17 @@ namespace intrp { | |||
|
|||
namespace { | |||
|
|||
struct OtherId : db::SimpleTag { |
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.
The one it is "other" to is called "Time", so using "Time" and "TimeId" as the two IDs seemed rather confusing. I could go with "Time2" or something?
Currently, I think the idea is that you are supposed to use doubles instead of TimeStepIds everywhere except in CCE-GH self-start (and interpolation currently works with both doubles and TimeStepIds). But yes it is annoying that people keep using TimeStepIds in most places (probably my fault, because the original version of interpolation used only TimeStepIds and not doubles). |
In addition to needing to figure out CCE, this is on hold until the interactions between the control system and AH finder have been worked out to avoid merge conflicts. |
This would need to be done very differently to work with CCE stuff. I may revisit this at some point, but I think it will be as easy to start from scratch. |
TimeStepId is not a global identifier, so it cannot be used as an ID
for the interpolator component.
Proposed changes
Upgrade instructions
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.Further comments