Skip to content

Comments

Add user-defined Spin Map#1297

Open
cemitch99 wants to merge 18 commits intoBLAST-ImpactX:developmentfrom
cemitch99:add_user_spin_map
Open

Add user-defined Spin Map#1297
cemitch99 wants to merge 18 commits intoBLAST-ImpactX:developmentfrom
cemitch99:add_user_spin_map

Conversation

@cemitch99
Copy link
Member

@cemitch99 cemitch99 commented Feb 6, 2026

The PR add an element that applies a user-defined spin map to the spin variables (sx, sy, sz)--a functionality that is similar to that of the user-defined LinearMap element. The LinearMap element is also updated for spin support--it leaves spin unaffected.

  • implement element inputs and input parsing
  • implement math for the spin push
  • implement Python bindings (esp. for user-facing input)
  • add C++ benchmark example
  • add Python benchmark example
  • update documentation

@ax3l ax3l added component: elements Elements/external fields component: spin tracking Spin tracking labels Feb 6, 2026
@cemitch99 cemitch99 requested review from ax3l and qianglbl February 6, 2026 22:42
@cemitch99
Copy link
Member Author

The Python bindings for the user-facing inputs, which use SmallMatrix type, need support similar to what we used for the LinearMap element.

@ax3l
Copy link
Member

ax3l commented Feb 24, 2026

Added a type for the 3x6 matrix and 3x1 vector in AMReX-Codes/pyamrex#538 now.

@ax3l ax3l self-assigned this Feb 24, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

component: elements Elements/external fields component: spin tracking Spin tracking

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants