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

Boundary component for Klein-Gordon CCE #5683

Merged

Conversation

Sizheng-Ma
Copy link
Contributor

Proposed changes

This PR adds a boundary parallel component KleinGordonH5WorldtubeBoundary for Klein-Gordon CCE. The component has a single initialization action Actions::InitializeWorldtubeBoundary<KleinGordonH5WorldtubeBoundary<Metavariables>>, which initializes two tag lists Metavariables::cce_boundary_communication_tags and Metavariables::klein_gordon_boundary_communication_tags ( the metavariable will be added in the next PR). The third and fourth commits of this PR add the initialization action and the component respectively.

The initialization action is constructed from a base class InitializeWorldtubeBoundaryBase, which currently holds a single tag list. This is fine for the current CCE system since the code treats Metavariables::cce_boundary_communication_tags as one ::Tags::Variables. However, for the upcoming Klein-Gordon CCE system, we want to handle Metavariables::cce_boundary_communication_tags and Metavariables::klein_gordon_boundary_communication_tags separately, so we initialize them as two different chunks of ::Tags::Variables. In the first commit, a tag pack is added to InitializeWorldtubeBoundaryBase for this purpose.

The second commit is a minor change. The function create_fake_time_varying_klein_gordon_data is moved to a new file so that it can be used by other unit tests.

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

Comment on lines 48 to 49
typename BoundaryCommunicationTagsList1,
typename... BoundaryCommunicationTagsList2>
Copy link
Contributor

Choose a reason for hiding this comment

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

With just this commit, this actually adds a Variables tag with an empty list since there are no extra tag lists yet (which is not something we want). I'd recommend something like

template <typename Initializer, typename ManagerTags,
          typename... BoundaryCommunicationTagsList> {
  // other stuff

  simple_tags = tmpl::list<::Tags::Variables<BoundaryCommunicationTagsList>...>;

  // inside apply function
    Initialization::mutate_assign<simple_tags>(make_not_null(&box),
                     Variables<BoundaryCommunicationTagsList>{
        Spectral::Swsh::number_of_swsh_collocation_points(l_max)}...);
};

Not that we'll likely need more than 2 lists, but this also avoids the annoying 1 and 2 suffixes.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Good idea!

Comment on lines 9 to +10
CceComputationTestHelpers.cpp
KleinGordonBoundaryTestHelpers.cpp
Copy link
Contributor

Choose a reason for hiding this comment

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

You need to add the hpp too.

Comment on lines 150 to 144
* - initialization tag
* `Cce::Tags::H5WorldtubeBoundaryDataManager`,
* `Cce::Tags::KleinGordonH5WorldtubeBoundaryDataManager`.
Copy link
Contributor

Choose a reason for hiding this comment

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

We don't have the initialization_tag type alias anymore, it's called simple_tags_from_options now. I know it's incorrect for the other ones as well. Could you please fix those dox in a separate commit?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done!

@Sizheng-Ma Sizheng-Ma force-pushed the worldtube_component_for_kg_cce branch from 4780b66 to bd4de36 Compare January 5, 2024 03:27
Copy link
Contributor

@knelli2 knelli2 left a comment

Choose a reason for hiding this comment

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

Looks good. You can squash

@Sizheng-Ma Sizheng-Ma force-pushed the worldtube_component_for_kg_cce branch from d3ae3b1 to 68b9b20 Compare January 6, 2024 03:06
@Sizheng-Ma
Copy link
Contributor Author

Done!

Copy link
Contributor

@knelli2 knelli2 left a comment

Choose a reason for hiding this comment

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

Test timeouts unrelated.

@knelli2 knelli2 merged commit fa3e302 into sxs-collaboration:develop Jan 8, 2024
20 of 22 checks passed
@Sizheng-Ma Sizheng-Ma deleted the worldtube_component_for_kg_cce branch January 9, 2024 01:40
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