1064 Tags Part I - New syntax for point fields.#1663
Conversation
There was a problem hiding this comment.
Pull request overview
This PR implements the first phase of a new unified Tags template syntax for point field types, addressing issue #1064. The changes refactor how template parameters are passed to point field classes (acceleration, velocity, displacement, mass_inverse) by introducing a specfem::tags::Tags wrapper struct that bundles dimension, medium, and SIMD tags together.
Changes:
- Introduced new
TagMember<bool, UseSIMD>specialization in the tags system to support SIMD flags - Refactored point field class templates to accept a single
Tagstype parameter instead of multiple individual parameters - Updated all usages of point field types across compute implementations, medium physics, boundary conditions, timeschemes, and tests
Reviewed changes
Copilot reviewed 49 out of 49 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| core/specfem/tags.hpp | Added SIMD tag specialization and commented placeholder for future tag aliases |
| core/specfem/point/impl/field.hpp | Refactored base field implementation to use Tags template parameter |
| core/specfem/point/acceleration.hpp | Changed template signature from individual parameters to Tags type |
| core/specfem/point/velocity.hpp | Changed template signature from individual parameters to Tags type |
| core/specfem/point/displacement.hpp | Changed template signature from individual parameters to Tags type |
| core/specfem/point/mass_inverse.hpp | Changed template signature from individual parameters to Tags type |
| core/specfem/element_coupling.hpp | Updated forward declarations and type definitions to use Tags syntax |
| core/specfem/timescheme/newmark.tpp | Updated corrector/predictor phases to use Tags syntax |
| core/specfem/compute/impl/*.tpp | Updated all compute implementations to use new Tags syntax with PointTags alias |
| core/specfem/medium_physics/mass_matrix_component.hpp | Updated return type to use Tags syntax |
| core/specfem/medium/dim2/*/source.hpp | Updated source contribution functions to use Tags syntax |
| core/specfem/medium/dim2/*/mass_matrix.hpp | Updated mass matrix functions to use Tags syntax, reordered template parameters |
| core/specfem/medium/dim2/*/mass_matrix.tpp | Updated implementations to use Tags syntax, reordered template parameters |
| core/specfem/medium/dim3/*/source.hpp | Updated source contribution functions to use Tags syntax |
| core/specfem/medium/dim3/*/mass_matrix.hpp | Updated mass matrix functions to use Tags syntax, reordered template parameters |
| core/specfem/medium/dim3/*/mass_matrix.tpp | Updated implementations to use Tags syntax, reordered template parameters |
| core/specfem/boundary_conditions/stacey/stacey.tpp | Updated boundary condition implementation to use Tags syntax |
| core/specfem/algorithms/coupling_integral.hpp | Updated coupling integral to use Tags syntax |
| tests/unit-tests/medium/source/dim2/*.cpp | Updated test type definitions to use Tags syntax |
| tests/unit-tests/medium/source/dim3/*.cpp | Updated test type definitions to use Tags syntax |
| tests/unit-tests/medium/mass_matrix/dim2/*.cpp | Updated test type definitions to use Tags syntax |
| tests/unit-tests/medium/mass_matrix/dim3/*.cpp | Updated test type definitions to use Tags syntax |
| tests/unit-tests/compute_coupling/*.cpp | Updated test type definitions to use Tags syntax |
| tests/unit-tests/assembly/compute_wavefield/generate_data.hpp | Updated test helper to use Tags syntax, added tags.hpp include |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
|
||
|
|
There was a problem hiding this comment.
Remove extra blank lines to maintain consistent formatting with the corrector_phase_impl function. The corrector phase has no blank lines between the SIMD definition and the type definitions, but the predictor phase has two blank lines.
Description
Update to new Tags syntax for point fields
Issue Number
Adds to #1064
Checklist
Please make sure to check developer documentation on specfem docs.