Skip to content
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 p-refinement from punctures AMR criterion #5796

Merged
merged 1 commit into from
Feb 27, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -39,11 +39,11 @@ std::array<amr::Flag, 3> RefineAtPunctures::impl(
block_logical_coordinates(domain, puncture_positions);
const auto element_logical_coords =
element_logical_coordinates({element_id}, block_logical_coords);
// Split (h-refine) the element if it contains a puncture, else p-refine
// Split (h-refine) the element if it contains a puncture
if (element_logical_coords.find(element_id) != element_logical_coords.end()) {
return make_array<3>(amr::Flag::Split);
} else {
return make_array<3>(amr::Flag::IncreaseResolution);
return make_array<3>(amr::Flag::DoNothing);
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,7 @@
namespace Punctures::AmrCriteria {

/*!
* \brief h-refine (split) elements containing a puncture, and p-refine
* everywhere else.
* \brief h-refine (split) elements containing a puncture
*
* This refinement scheme is expected to yield exponential convergence, despite
* the presence of the C^2 punctures.
Expand All @@ -34,8 +33,7 @@ class RefineAtPunctures : public amr::Criterion {
using options = tmpl::list<>;

static constexpr Options::String help = {
"h-refine (split) elements containing a puncture, and p-refine "
"everywhere else."};
"h-refine (split) elements containing a puncture."};

RefineAtPunctures() = default;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ SPECTRE_TEST_CASE("Unit.Punctures.AmrCriteria.RefineAtPunctures",
{
INFO("Element without puncture");
const ElementId<3> element_id{0, {{{1, 1}, {1, 0}, {1, 0}}}};
const auto expected_flags = make_array<3>(amr::Flag::IncreaseResolution);
const auto expected_flags = make_array<3>(amr::Flag::DoNothing);
auto flags = criterion.evaluate(box, empty_cache, element_id);
CHECK(flags == expected_flags);
}
Expand Down
Loading