Skip to content

Conversation

@kidder
Copy link
Member

@kidder kidder commented Mar 15, 2025

Proposed changes

  • Add a function has_boundary that returns whether or not a Topology has a boundary (external or internal) on a Side
  • Use the function to correctly set external boundaries of a Block, and to check that input neighbors are in valid directions

Upgrade instructions

Code review checklist

  • The code is documented and the documentation renders correctly. Run
    make doc to generate the documentation locally into BUILD_DIR/docs/html.
    Then open index.html.
  • The code follows the stylistic and code quality guidelines listed in the
    code review guide.
  • The PR lists upgrade instructions and is labeled bugfix or
    new feature if appropriate.

Further comments

external_boundaries_.emplace(direction);
if (has_boundary_in_this_direction) {
external_boundaries_.emplace(direction);
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You can also assert here that the number of neighbors is 1 for cubes and either 1 or 6 for shells

Copy link
Member Author

@kidder kidder Mar 17, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

no, that is not true in general (e.g. in a modified CylindricalCompactBinaryObject domain)

/// \endcond

namespace domain {
/// \brief Whether or not a Topology has a boundary on a given
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

... side

void test_spherical_shell() {
const Block<3> spherical_shell(
nullptr, 4, DirectionMap<3, BlockNeighbors<3>>{}, "Shell",
std::array{domain::Topology::I1, domain::Topology::S2Colatitude,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would it help to define this array in Topology.hpp as spherical_shell_topology? It will come up more often

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

possibly, though I'm not sure that is the right place to put it. We can discuss it at the next tech call.

kidder added 2 commits March 17, 2025 15:25
Whether or not a boundary exists in a given direction depends on
the Topology.  Also add an ASSERT to check if an input neighbor
is in a direction with a boundary.
@nilsvu nilsvu merged commit 94b29da into sxs-collaboration:develop Mar 18, 2025
24 checks passed
@kidder kidder deleted the has_boundary branch March 26, 2025 20:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants