Skip to content

Keep the Reference Particle Small #1423

@ax3l

Description

@ax3l

We copy the reference particle often around, e.g., to GPU, under the assumption that it stays small.

With PR #222 for the symplectic integrator in s-dependent elements (like RFCavity) and now more with #1264 for the equivalent in spin tracking, we introduce small matrices in the reference particle:

        amrex::SmallMatrix<amrex::ParticleReal, 6, 6, amrex::Order::F, 1> map{}; ///< linearized map
        amrex::SmallMatrix<amrex::ParticleReal, 3, 6, amrex::Order::F, 1> spin_coupling{}; ///< linearized spin-orbit coupling matrix
        amrex::SmallMatrix<amrex::ParticleReal, 3, 1, amrex::Order::F, 1> spin_rotation_vector{}; ///< reference spin rotation vector

We need to find a refactoring that makes sure we only "pay" for the allocation & copy & registers of these members when we truly need them.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions