Skip to content

Comments

1064 Tags Part I - New syntax for point fields.#1663

Open
icui wants to merge 1 commit into1064-tagsfrom
1064-medium
Open

1064 Tags Part I - New syntax for point fields.#1663
icui wants to merge 1 commit into1064-tagsfrom
1064-medium

Conversation

@icui
Copy link
Collaborator

@icui icui commented Feb 19, 2026

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.

  • I ran the code through pre-commit to check style
  • THE DOCUMENTATION BUILDS WITHOUT WARNINGS/ERRORS
  • I have added labels to the PR (see right hand side of the PR page)
  • 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

@icui icui requested review from Copilot and lsawade February 19, 2026 15:39
@icui icui marked this pull request as ready for review February 19, 2026 15:39
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

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 Tags type 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.

Comment on lines +81 to +82


Copy link

Copilot AI Feb 19, 2026

Choose a reason for hiding this comment

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

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.

Copilot uses AI. Check for mistakes.
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.

LGTM

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