@@ -299,26 +299,26 @@ namespace impactx::elements
299299 * @param px particle momentum in x
300300 * @param py particle momentum in y
301301 * @param pt particle momentum in t
302+ * @param idcpu particle global index
303+ * @param refpart reference particle (unused)
302304 * @param sx particle spin x-component
303305 * @param sy particle spin y-component
304306 * @param sz particle spin z-component
305- * @param idcpu particle global index
306- * @param refpart reference particle (unused)
307307 */
308308 template <typename T_Real=amrex::ParticleReal, typename T_IdCpu=uint64_t >
309309 AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE
310310 void operator () (
311- T_Real & AMREX_RESTRICT x,
312- T_Real & AMREX_RESTRICT y,
313- T_Real & AMREX_RESTRICT t,
314- T_Real & AMREX_RESTRICT px,
315- T_Real & AMREX_RESTRICT py,
316- T_Real & AMREX_RESTRICT pt,
311+ [[maybe_unused]] T_Real & AMREX_RESTRICT x,
312+ [[maybe_unused]] T_Real & AMREX_RESTRICT y,
313+ [[maybe_unused]] T_Real & AMREX_RESTRICT t,
314+ [[maybe_unused]] T_Real & AMREX_RESTRICT px,
315+ [[maybe_unused]] T_Real & AMREX_RESTRICT py,
316+ [[maybe_unused]] T_Real & AMREX_RESTRICT pt,
317+ [[maybe_unused]] T_IdCpu & AMREX_RESTRICT idcpu,
318+ [[maybe_unused]] RefPart const & AMREX_RESTRICT refpart,
317319 T_Real & AMREX_RESTRICT sx,
318320 T_Real & AMREX_RESTRICT sy,
319- T_Real & AMREX_RESTRICT sz,
320- T_IdCpu & AMREX_RESTRICT idcpu,
321- [[maybe_unused]] RefPart const & AMREX_RESTRICT refpart
321+ T_Real & AMREX_RESTRICT sz
322322 ) const
323323 {
324324 using namespace amrex ::literals; // for _rt and _prt
@@ -340,11 +340,11 @@ namespace impactx::elements
340340 amrex::ParticleReal const omega = std::sqrt (std::abs (m_k));
341341
342342 // compute trigonometric quantities
343- sin_omega_ds = std::sin (omega*m_slice_ds );
344- cos_omega_ds = std::cos (omega*m_slice_ds );
345- sinh_omega_ds = std::sinh (omega*m_slice_ds );
346- cosh_omega_ds = std::cosh (omega*m_slice_ds );
347-
343+ amrex::ParticleReal const sin_omega_ds = std::sin (omega*slice_ds );
344+ amrex::ParticleReal const cos_omega_ds = std::cos (omega*slice_ds );
345+ amrex::ParticleReal const sinh_omega_ds = std::sinh (omega*slice_ds );
346+ amrex::ParticleReal const cosh_omega_ds = std::cosh (omega*slice_ds );
347+
348348 if (m_k > 0 .0_prt)
349349 {
350350
0 commit comments