-
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
Extrapolate from nearest element #6382
base: develop
Are you sure you want to change the base?
Extrapolate from nearest element #6382
Conversation
f4f44f9
to
3ed9516
Compare
Uses the Lagrange basis in the nearest element to extrapolate into the excision region. This can be unstable when we want to extrapolate far into the excision because we're extrapolating over many logical element sizes. However, it can be useful for extrapolating only very slightly into the excision, e.g. if the excision in the initial data is the apparent horizon and the evolution needs a little space around it to find and track the horizon.
3ed9516
to
482207f
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.
Tests are failing.
@@ -65,10 +65,12 @@ std::optional<double> SphereTransition::original_radius_over_radius( | |||
if ((original_radius + eps_) >= r_min_ and | |||
(original_radius - eps_) <= r_max_) { | |||
return std::optional<double>{original_radius / mag}; | |||
} else if ((a_ > 0.0 and mag > r_max_) or (a_ < 0.0 and mag < r_min_)) { | |||
} else if ((a_ > 0.0 and original_radius > r_max_) or | |||
(a_ < 0.0 and original_radius < r_min_)) { |
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.
Is it easy to add a test for this?
/// @} | ||
|
||
/*! | ||
* \brief Finds the block-logical coordinates of a point in an excision sphere. |
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 isn't showing up in the documentation. Maybe needs an \ingroup
?
if (radial_distance_this_block < 1.) { | ||
continue; | ||
} | ||
// The checks above should leave only 1 valid block, so return that |
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.
Do we need to handle points on extrapolations of block boundaries?
@@ -69,10 +71,32 @@ auto block_logical_coordinates( | |||
const domain::FunctionsOfTimeMap& functions_of_time = {}) | |||
-> std::vector<BlockLogicalCoords<Dim>>; | |||
|
|||
/// \par Extrapolation |
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.
Doxygen does not seem to handle adding combining this with the documentation from the enclosing /// @{
group. Maybe \copydoc
would work?
{{domain::BlockId{4}, | ||
// If the shape map preserved the BL-KS transformation within the | ||
// excision, the result should be -1.5. However, apparently it | ||
// doesn't. |
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.
Is this a bug in the map?
os << "RadialAnchors"; | ||
break; | ||
default: | ||
os << "Unknown"; |
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.
ERROR
for invalid input?
Proposed changes
Uses the Lagrange basis in the nearest element to extrapolate into the excision region. This can be unstable when we want to extrapolate far into the excision because we're extrapolating over many logical element sizes. However, it can be useful for extrapolating only very slightly into the excision, e.g. if the excision in the initial data is the apparent horizon and the evolution needs a little space around it to find and track the horizon.
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