-
Notifications
You must be signed in to change notification settings - Fork 191
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 several common time dependent options #6113
Add several common time dependent options #6113
Conversation
3f4b04b
to
84404e6
Compare
"acceleration."}; | ||
}; | ||
|
||
struct InitialValuesOuterBoundary { |
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.
Question: why doesn't "FromVolumeFile" just copy the FoT altogether, instead of essentially recreating it from values and derivatives?
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 originally I didn't do this because I was lazy and I just read in the last FoT in the volume file rather than finding the correct observation ID. However, now that I think about it, there's likely a real issue.
Imagine a scenario where I'm writing volume data at simulation 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.
Oh so the FoT in the volume data can be wrong? That sounds like a bug that we have to fix. It also affects interpolation of the volume data.
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 not wrong. If you write volume data at
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 currently retrieve the FoTs from the DataBox when volume data is written by the observer nodegroup, which is is not guaranteed to be close to the time the time step was taken. Is that ok?
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.
What I understood from a meeting discussion :
Currently we write the serialized functions of time at the end of the observation chain, eg in ContributeVolumeDataToWriter
right before we call volume_file.write_volume_data()
. This means the functions of time can have data from later than necessary in them. That is, if we write at
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 that's fine and we can merge it. Would another possible implementation be to just copy the FoT object from the volume data and add a function that drops future data from it? If that has the same effect then it seems a lot more robust to me and avoids a lot of code in this PR (since it just uses the copy constructor). Again, if the decision is that this is more work than to maintain the new code in this PR then fine with me.
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 feature was historically intentionally omitted from the FoT's because the situation described above is the only case where you should legitimately be dropping times. We figured it would be safer to not allow dropping them because doing so would almost always be a bug.
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 wouldn't a function like get_clone_until_time(t)
be a good implementation of 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.
That could work, but I'd have to think about it more carefully. It does get around the issue for why we originally didn't allow a drop()
function.
84404e6
to
0f7b30d
Compare
@nilsvu I think we'll want to get this series of PRs in so we have the flexibility of initializing the FoTs |
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
}; | ||
|
||
struct DecayTimescale { | ||
using type = Options::Auto<double, Options::AutoLabel::None>; |
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.
What should this option be when continuing an evolution from volume data? Generally, there are lots of choices to make for all these options, but when I continue an evolution from volume data I just want to specify "FromVolumeFile" for the whole thing, don't I?
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.
It should be None
. Yeah the way it is now probably isn't ideal. Yes just specifying "FromVolumeFile" would be nice, except that'd basically mean moving the "FromVolumeFile" part up a level and adding a separate "ExpansionMap" class for it.
I could change this from None
to Auto
so it's at least the same as the other options so when you are specifying that you want to continue from volume data, you just say Auto
for everything else.
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.
@nilsvu Went ahead and made this Auto
and just added a note in the help string about it
"option."}; | ||
}; | ||
|
||
struct DecayTimescale { |
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.
Same for this one
0f7b30d
to
3fb9a18
Compare
3fb9a18
to
012cd8f
Compare
@nilsvu Rebased |
Proposed changes
Second PR in the series to revamp the time dependent options of the Sphere and BCO domain creators.
This PR adds common options for the
These common options were designed so that different function of time types (
PiecewisePolynomial
orSettleToConst
) could be chosen at runtime.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
Depends on and includes #6109