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

Issue 278 - Refactor of domain folder. #413

Merged
merged 24 commits into from
Jan 22, 2025
Merged

Conversation

Rohit-Kakodkar
Copy link
Collaborator

Description

Sorry for the big PR 😣

This PR refactors the domain folder.

  • Promotes element_types from impl namespace to specfem::compute namespace
    • get_element_on_device functions are now part of element_types
  • Refactor kokkos_kernels so that the functions are using the macros
  • promote boundary conditions from specfem::domain::impl namespace to specfem::boundary_conditions
  • Delete domain folder and its namespace

Issue Number

closes #278

Checklist

Please make sure to check developer documentation on specfem docs.

  • I ran the code through pre-commit to check style
  • My code passes all the integration tests
  • I have added sufficient unittests to test my changes
  • I have added/updated documentation for the changes I am proposing
  • I have updated CMakeLists to ensure my code builds
  • My code builds across all platforms

@lsawade
Copy link
Collaborator

lsawade commented Jan 17, 2025

Sorry for the big PR 😣

LOL this a big boi

Copy link
Collaborator

@icui icui Jan 21, 2025

Choose a reason for hiding this comment

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

How do you decide between using file name include/compute/element_types/element_types.hpp and include/compute/compute_element_types.hpp?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

It should always be element_types/element_types.hpp imho. I initially started naming files compute_xxx.hpp/cpp thinking that compute would be a small struct. Now its grown much more detailed.

@icui
Copy link
Collaborator

icui commented Jan 21, 2025

Looks like there a few filed that are no longer needed in cmake:
src

  • algorithms/interpolate.cpp
  • mesh/mpi_interfaces/mpi_interfaces.cpp
  • parameter_parser/solver/solver.cpp
  • parameter_parser/time_scheme/solver.cpp
  • point/boundaries.cpp
  • source/utilities.cpp
  • source_time_function/utilities.cpp
  • utilities/utilities.cpp

include

  • compute/properties/properties.tpp

@icui
Copy link
Collaborator

icui commented Jan 21, 2025

Otherwise LGTM

Copy link
Collaborator

@lsawade lsawade left a comment

Choose a reason for hiding this comment

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

I have nothing to add to congyue's remarks, except the minor formatting issue.

I think we need a testing hackathon. This behemoth of a PR would be less daunting if we had more coverage (mildly motivated by finding seismogram iterator bug earlier today).

Also, it is wild to me that this PR cuts 2700 lines.

Fifth Floor, Boston,
if not
, write to the Free Software Foundation, Inc., !51 Franklin Street, Fifth Floor,
Boston,
Copy link
Collaborator

Choose a reason for hiding this comment

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

clang-format being a butt

n_element, ngllz, ngllx) {
elements.extent(0), ngllz, ngllx) {

const int nelement = elements.extent(0);
Copy link
Collaborator

Choose a reason for hiding this comment

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

This i nice, no need to loop over all elements no moe

@Rohit-Kakodkar
Copy link
Collaborator Author

I have nothing to add to congyue's remarks, except the minor formatting issue.

I think we need a testing hackathon. This behemoth of a PR would be less daunting if we had more coverage (mildly motivated by finding seismogram iterator bug earlier today).

Also, it is wild to me that this PR cuts 2700 lines.

A testing hackathon or a testing spring would be great in the future. We definitely need some of that.

@Rohit-Kakodkar
Copy link
Collaborator Author

Looks like there a few filed that are no longer needed in cmake: src

  • algorithms/interpolate.cpp
  • mesh/mpi_interfaces/mpi_interfaces.cpp
  • parameter_parser/solver/solver.cpp
  • parameter_parser/time_scheme/solver.cpp
  • point/boundaries.cpp
  • source/utilities.cpp
  • source_time_function/utilities.cpp
  • utilities/utilities.cpp

include

  • compute/properties/properties.tpp

Fixed

@Rohit-Kakodkar Rohit-Kakodkar merged commit e41d8df into issue-228-anisotropy Jan 22, 2025
3 checks passed
@Rohit-Kakodkar Rohit-Kakodkar deleted the issue-278 branch January 22, 2025 04:25
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.

3 participants