@@ -91,20 +91,21 @@ namespace impactx::elements
9191 void compute_constants (RefPart const & refpart)
9292 {
9393 using namespace amrex ::literals; // for _rt and _prt
94+ using amrex::Math::powi;
9495
9596 Alignment::compute_constants (refpart);
9697
9798 // length of the current slice
9899 amrex::ParticleReal const slice_ds = m_ds / nslice ();
99100
100101 // find beta*gamma^2, beta
101- amrex::ParticleReal const betgam2 = amrex::Math:: powi<2 >(refpart.pt ) - 1_prt;
102+ amrex::ParticleReal const betgam2 = powi<2 >(refpart.pt ) - 1_prt;
102103 amrex::ParticleReal const bet = refpart.beta ();
103104 amrex::ParticleReal const ibetgam2 = 1_prt / betgam2;
104- amrex::ParticleReal const b2rc2 = amrex::Math:: powi<2 >(bet) * amrex::Math:: powi<2 >(m_rc);
105+ amrex::ParticleReal const b2rc2 = powi<2 >(bet) * powi<2 >(m_rc);
105106
106107 // update horizontal and longitudinal phase space variables
107- amrex::ParticleReal const gx = m_k + amrex::Math:: powi<-2 >(m_rc);
108+ amrex::ParticleReal const gx = m_k + powi<-2 >(m_rc);
108109 amrex::ParticleReal const omega_x = std::sqrt (std::abs (gx));
109110
110111 // update vertical phase space variables
@@ -212,6 +213,7 @@ namespace impactx::elements
212213 void operator () (RefPart & AMREX_RESTRICT refpart) const
213214 {
214215 using namespace amrex ::literals; // for _rt and _prt
216+ using amrex::Math::powi;
215217
216218 // assign input reference particle values
217219 amrex::ParticleReal const x = refpart.x ;
@@ -229,7 +231,7 @@ namespace impactx::elements
229231
230232 // assign intermediate parameter
231233 amrex::ParticleReal const theta = slice_ds/m_rc;
232- amrex::ParticleReal const B = std::sqrt (amrex::Math:: powi<2 >(pt)-1 .0_prt)/m_rc;
234+ amrex::ParticleReal const B = std::sqrt (powi<2 >(pt)-1 .0_prt)/m_rc;
233235
234236 // calculate expensive terms once
235237 auto const [sin_theta, cos_theta] = amrex::Math::sincos (theta);
@@ -262,18 +264,19 @@ namespace impactx::elements
262264 transport_map ([[maybe_unused]] RefPart const & AMREX_RESTRICT refpart) const
263265 {
264266 using namespace amrex ::literals; // for _rt and _prt
267+ using amrex::Math::powi;
265268
266269 // length of the current slice
267270 amrex::ParticleReal const slice_ds = m_ds / nslice ();
268271
269272 // find beta*gamma^2, beta
270- amrex::ParticleReal const betgam2 = amrex::Math:: powi<2 >(refpart.pt ) - 1_prt;
273+ amrex::ParticleReal const betgam2 = powi<2 >(refpart.pt ) - 1_prt;
271274 amrex::ParticleReal const bet = refpart.beta ();
272275 amrex::ParticleReal const ibetgam2 = 1_prt / betgam2;
273- amrex::ParticleReal const b2rc2 = amrex::Math:: powi<2 >(bet) * amrex::Math:: powi<2 >(m_rc);
276+ amrex::ParticleReal const b2rc2 = powi<2 >(bet) * powi<2 >(m_rc);
274277
275278 // update horizontal and longitudinal phase space variables
276- amrex::ParticleReal const gx = m_k + amrex::Math:: powi<-2 >(m_rc);
279+ amrex::ParticleReal const gx = m_k + powi<-2 >(m_rc);
277280 amrex::ParticleReal const omega_x = std::sqrt (std::abs (gx));
278281
279282 // update vertical phase space variables
0 commit comments