|
OPAL (Object Oriented Parallel Accelerator Library) 2024.2
OPAL
|
#include <TrimCoilFit.h>


Public Member Functions | |
| TrimCoilFit (double bmax, double rmin, double rmax, const std::vector< double > &coefnum, const std::vector< double > &coefdenom, const std::vector< double > &coefnumphi, const std::vector< double > &coefdenomphi) | |
| virtual | ~TrimCoilFit () |
| void | applyField (const double r, const double z, const double phi_rad, double *br, double *bz) |
| Apply the trim coil at position r and z to Bfields br and bz Calls virtual doApplyField. More... | |
| void | setAzimuth (const double phimin, const double phimax) |
| Set azimuthal range where trim coil acts: [phimin, phimax] (also when phimin > phimax) More... | |
Protected Types | |
| enum | PolynomType { NUM , DENOM , NUMPHI , DENOMPHI } |
| enum | FunctionType { RADIUS =0 , PHI =2 } |
Protected Member Functions | |
| void | calculateRationalFunction (FunctionType, double value, double ", double &der_quot) const |
| calculate rational function and its first derivative More... | |
| void | calculateRationalFunction (FunctionType, double value, double ", double &der_quot, double &der2_quot) const |
| calculate rational function and its first and second derivative More... | |
Protected Attributes | |
| double | bmax_m |
| Maximum B field (kG) More... | |
| double | rmin_m |
| Minimum radius (m) More... | |
| double | rmax_m |
| Maximum radius (m) More... | |
| double | phimin_m = 0.0 |
| Minimal azimuth (rad) More... | |
| double | phimax_m = Physics::two_pi |
| Maximal azimuth (rad) More... | |
Private Member Functions | |
| TrimCoilFit ()=delete | |
| virtual void | doApplyField (const double r, const double z, const double phi_rad, double *br, double *bz)=0 |
| virtual implementation of applyField More... | |
Private Attributes | |
| std::vector< std::vector< double > > | coefs |
| rational function coefficients More... | |
Definition at line 32 of file TrimCoilFit.h.
|
protected |
| Enumerator | |
|---|---|
| RADIUS | |
| PHI | |
Definition at line 47 of file TrimCoilFit.h.
|
protected |
| Enumerator | |
|---|---|
| NUM | |
| DENOM | |
| NUMPHI | |
| DENOMPHI | |
Definition at line 46 of file TrimCoilFit.h.
| TrimCoilFit::TrimCoilFit | ( | double | bmax, |
| double | rmin, | ||
| double | rmax, | ||
| const std::vector< double > & | coefnum, | ||
| const std::vector< double > & | coefdenom, | ||
| const std::vector< double > & | coefnumphi, | ||
| const std::vector< double > & | coefdenomphi | ||
| ) |
|
inlinevirtual |
Definition at line 43 of file TrimCoilFit.h.
|
privatedelete |
|
inherited |
Apply the trim coil at position r and z to Bfields br and bz Calls virtual doApplyField.
Definition at line 43 of file TrimCoil.cpp.
References abs(), Util::angle_0to2pi(), Util::angleBetweenAngles(), TrimCoil::bmax_m, TrimCoil::doApplyField(), Physics::e, TrimCoil::phimax_m, and TrimCoil::phimin_m.

|
protected |
calculate rational function and its first derivative
Definition at line 57 of file TrimCoilFit.cpp.
References coefs.
Referenced by TrimCoilBFit::doApplyField(), and TrimCoilPhaseFit::doApplyField().
|
protected |
calculate rational function and its first and second derivative
Definition at line 90 of file TrimCoilFit.cpp.
References coefs.
|
privatepure virtualinherited |
virtual implementation of applyField
Implemented in TrimCoilBFit, TrimCoilMirrored, and TrimCoilPhaseFit.
Referenced by TrimCoil::applyField().
|
inherited |
Set azimuthal range where trim coil acts: [phimin, phimax] (also when phimin > phimax)
Definition at line 53 of file TrimCoil.cpp.
References Util::angle_0to2pi(), Units::deg2rad, TrimCoil::phimax_m, and TrimCoil::phimin_m.

|
protectedinherited |
Maximum B field (kG)
Definition at line 45 of file TrimCoil.h.
Referenced by TrimCoil::applyField(), TrimCoilBFit::doApplyField(), TrimCoilMirrored::doApplyField(), TrimCoilPhaseFit::doApplyField(), and TrimCoil::TrimCoil().
|
private |
rational function coefficients
Definition at line 58 of file TrimCoilFit.h.
Referenced by calculateRationalFunction(), and TrimCoilFit().
|
protectedinherited |
Maximal azimuth (rad)
Definition at line 53 of file TrimCoil.h.
Referenced by TrimCoil::applyField(), and TrimCoil::setAzimuth().
|
protectedinherited |
Minimal azimuth (rad)
Definition at line 51 of file TrimCoil.h.
Referenced by TrimCoil::applyField(), and TrimCoil::setAzimuth().
|
protectedinherited |
Maximum radius (m)
Definition at line 49 of file TrimCoil.h.
Referenced by TrimCoilBFit::doApplyField(), TrimCoilMirrored::doApplyField(), TrimCoilPhaseFit::doApplyField(), and TrimCoil::TrimCoil().
|
protectedinherited |
Minimum radius (m)
Definition at line 47 of file TrimCoil.h.
Referenced by TrimCoilMirrored::doApplyField(), and TrimCoil::TrimCoil().