1 #ifndef ParametrizedEngine_BCyl_h
2 #define ParametrizedEngine_BCyl_h
23 namespace magfieldparam {
27 template<
typename ...
Args>
29 prm{std::forward<Args>(
init)...},
35 coeff(1/(prm[8]*prm[8])){}
43 namespace bcylDetails{
59 ff[3]=a2*ff[1]*(
T(1)-4*
u2);
63 inline float myExp(
float x) {
return unsafe_expf<3>(x);}
80 using namespace bcylDetails;
90 T rat=
T(0.5)*pars.ainv;
92 Br=pars.hb0*rat*(fu[1]-gv[1]-(fu[3]-gv[3])*rat2*
T(0.5));
93 Bz=pars.hb0*(fu[0]+gv[0]-(fu[2]+gv[2])*rat2);
95 T corBr= pars.prm[4]*z*(az-pars.prm[5])*(az-pars.prm[5]);
96 T corBz=-pars.prm[6]*(
97 myExp(-(z-pars.prm[7])*(z-pars.prm[7])*pars.coeff) +
98 myExp(-(z+pars.prm[7])*(z+pars.prm[7])*pars.coeff)
constexpr BCylParam(Args...init)
void operator()(T r2, T z, T &Br, T &Bz) const
Abs< T >::type abs(const T &t)
void compute(T r2, T z, T &Br, T &Bz) const
void ffunkti(T u, T *__restrict__ ff) __attribute__((always_inline))
float __attribute__((vector_size(8))) float32x2_t
BCycl(BCylParam< T > const &ipar)