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
Specify temporal_id
for interpolation in interpolation target tags
#3421
Specify temporal_id
for interpolation in interpolation target tags
#3421
Conversation
This reverts commit 439a996.
double get_temporal_id_value(const TimeStepId time_id) noexcept { | ||
return time_id.substep_time().value(); | ||
} | ||
double evaluate_temporal_id_for_expiration(double time) noexcept { | ||
return time; | ||
} | ||
double evaluate_temporal_id_for_expiration(TimeStepId time_id) noexcept { | ||
return time_id.step_time().value(); | ||
} |
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.
const&
const
const&
double get_temporal_id_value(const double time) noexcept; | ||
double get_temporal_id_value(const TimeStepId time_id) noexcept; | ||
double evaluate_temporal_id_for_expiration(const double time) noexcept; | ||
double evaluate_temporal_id_for_expiration(const TimeStepId time_id) noexcept; |
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 const
on the double versions. (The others should change with my previous comment.)
@@ -227,6 +227,7 @@ template <typename PostHorizonFindCallback, typename IsTimeDependent, | |||
struct MockMetavariables { | |||
static constexpr bool use_time_dependent_maps = IsTimeDependent::value; | |||
struct AhA { | |||
using temporal_id = ::Tags::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.
Drop the alias below in MockMetavariables
.
@@ -350,9 +351,7 @@ void test_apparent_horizon(const gsl::not_null<size_t*> test_horizon_called, | |||
// zero iterations. | |||
// Having two temporal_ids tests some logic in the interpolator. | |||
Slab slab(0.0, 1.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.
Delete.
@@ -124,7 +124,7 @@ struct TestSchwarzschildHorizon { | |||
template <typename DbTags, typename Metavariables> |
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 don't think anything except Time/Tags.hpp
should be included from Time
.
@@ -88,6 +88,7 @@ struct mock_gh_worldtube_boundary { | |||
struct test_metavariables { |
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 file is missing several Time
includes. I think Slab
, Tags
, Time
, TimeStepId
.
} else { | ||
(void)temporal_id; | ||
ERROR("Unsupported temporal id type: " << pretty_type::short_name< | ||
typename metavars::InterpolationTargetA::temporal_id::type>()); |
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.
static_assert
?
} else { | ||
(void)temporal_id; | ||
ERROR("Unsupported temporal id type: " | ||
<< pretty_type::short_name<temporal_id_type>()); |
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.
static_assert
?
CHECK(temporal_id == TimeStepId(true, 0, Time(slab, Rational(14, 15)))); | ||
CHECK(temporal_id == TimeStepId(true, 0, Time(slab, Rational(14, 15))) | ||
.substep_time() | ||
.value()); |
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.
14.0 / 15.0
Same elsewhere, drop any unnecessary includes. If you're concerned about roundoff you can switch to integral values or binary fractions.
fixup posted. |
Looks good. Squash. |
62eea1d
to
ae13208
Compare
Squashed. |
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.
only half a review so far; will review changes to tests tomorrow
src/Evolution/Executables/GeneralizedHarmonic/EvolveGeneralizedHarmonicWithHorizon.hpp
Outdated
Show resolved
Hide resolved
src/Evolution/Executables/GeneralizedHarmonic/EvolveGeneralizedHarmonicWithHorizon.hpp
Show resolved
Hide resolved
src/Evolution/Executables/GeneralizedHarmonic/GeneralizedHarmonicBase.hpp
Outdated
Show resolved
Hide resolved
src/Evolution/Executables/GrMhd/GhValenciaDivClean/EvolveGhValenciaDivCleanWithHorizon.hpp
Outdated
Show resolved
Hide resolved
src/Evolution/Executables/GrMhd/GhValenciaDivClean/EvolveGhValenciaDivCleanWithHorizon.hpp
Show resolved
Hide resolved
@kidder I think several of the comments are regarding the |
sure, that is fine |
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've gone through the tests and have no more requested changes
posted a fixup commit and the new commit |
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
c69dda6
to
cb92120
Compare
fixup squashed in. |
@wthrowe you can merge this if you are happy with it |
temporal_id
for interpolation in interpolation target tags
Proposed changes
Apologies to @wthrowe , whose commit I found I needed to revert to make this work.
To construct the coupled CCE-GH system without fairly radical rethinking of the communication pattern, we need to perform interpolation during self-start, and that can only be accomplished unambigously if we use a key for the interpolator maps that distinguishes between self-start stage -- so, a
double
that represents the current time won't work.The control-flow of interpolation during self start will not use dense triggers.
To support the events and dense triggers needed for most use-cases, I've changed the interpolation framework to use a tag specified by the
temporal_id
type alias that must now be specified in the interpolation target tags. For almost all cases, that should be::Tags::Time
, but for interpolation during self start can be::Tags::TimeStepId
.Upgrade instructions
Interpolation target tags must now specify a
temporal_id
. In almost all cases it should beusing temporal_id = ::Tags::Time;
.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.