29 const std::vector<double>& coefnum,
30 const std::vector<double>& coefdenom,
31 const std::vector<double>& coefnumphi,
32 const std::vector<double>& coefdenomphi):
33 TrimCoilFit(bmax, rmin, rmax, coefnum, coefdenom, coefnumphi, coefdenomphi)
39 if (r < rmin_m || r >
rmax_m)
return;
41 double phase=0.0, d_phase=0.0, d2_phase=0.0;
43 double phi = 0.0, d_phi = 0.0, d2_phi=0.0;
47 double derivative = d_phase * phi + phase * d_phi;
48 double der2 = d2_phase * phi + phase * d2_phi + 2*d_phi*d_phase;
50 *bz += -
bmax_m * derivative;
51 *br += -
bmax_m * der2 * z;
double bmax_m
Maximum B field (kG)
double rmax_m
Maximum radius (m)
void calculateRationalFunction(FunctionType, double value, double ", double &der_quot) const
calculate rational function and its first derivative
virtual void doApplyField(const double r, const double z, const double phi_rad, double *br, double *bz)
virtual implementation of applyField
TrimCoilPhaseFit()=delete