OPAL (Object Oriented Parallel Accelerator Library)
2021.1.99
OPAL
src
src
Classic
TrimCoils
TrimCoil.h
Go to the documentation of this file.
1
//
2
// Class TrimCoil
3
// Abstract TrimCoil class.
4
//
5
// Copyright (c) 2018 - 2019, Matthias Frey and Jochem Snuverink,
6
// Paul Scherrer Institut, Villigen PSI, Switzerland
7
// All rights reserved
8
//
9
// Implemented as part of the PhD thesis
10
// "Precise Simulations of Multibunches in High Intensity Cyclotrons"
11
// and the paper
12
// "Matching of turn pattern measurements for cyclotrons using multiobjective optimization"
13
// (https://doi.org/10.1103/PhysRevAccelBeams.22.064602)
14
//
15
// This file is part of OPAL.
16
//
17
// OPAL is free software: you can redistribute it and/or modify
18
// it under the terms of the GNU General Public License as published by
19
// the Free Software Foundation, either version 3 of the License, or
20
// (at your option) any later version.
21
//
22
// You should have received a copy of the GNU General Public License
23
// along with OPAL. If not, see <https://www.gnu.org/licenses/>.
24
//
25
#ifndef TRIM_COIL_H
26
#define TRIM_COIL_H
27
28
#include "
Physics/Physics.h
"
29
30
class
TrimCoil
{
31
32
public
:
33
34
TrimCoil
(
double
bmax,
double
rmin,
double
rmax);
37
void
applyField
(
const
double
r,
const
double
z,
const
double
phi_rad,
double
*br,
double
*bz);
39
void
setAzimuth
(
const
double
phimin,
const
double
phimax);
40
virtual
~TrimCoil
() { };
41
42
protected
:
43
45
double
bmax_m
;
47
double
rmin_m
;
49
double
rmax_m
;
51
double
phimin_m
= 0.0;
53
double
phimax_m
=
Physics::two_pi
;
54
55
private
:
56
58
virtual
void
doApplyField
(
const
double
r,
const
double
z,
const
double
phi_rad,
double
*br,
double
*bz) = 0;
59
};
60
61
#endif
//TRIM_COIL_H
Physics.h
Physics::two_pi
constexpr double two_pi
The value of.
Definition:
Physics.h:33
TrimCoil
Definition:
TrimCoil.h:30
TrimCoil::bmax_m
double bmax_m
Maximum B field (kG)
Definition:
TrimCoil.h:40
TrimCoil::setAzimuth
void setAzimuth(const double phimin, const double phimax)
Set azimuthal range.
Definition:
TrimCoil.cpp:52
TrimCoil::rmax_m
double rmax_m
Maximum radius (m)
Definition:
TrimCoil.h:49
TrimCoil::TrimCoil
TrimCoil(double bmax, double rmin, double rmax)
Definition:
TrimCoil.cpp:31
TrimCoil::rmin_m
double rmin_m
Minimum radius (m)
Definition:
TrimCoil.h:47
TrimCoil::phimin_m
double phimin_m
Minimal azimuth (rad)
Definition:
TrimCoil.h:51
TrimCoil::doApplyField
virtual void doApplyField(const double r, const double z, const double phi_rad, double *br, double *bz)=0
virtual implementation of applyField
TrimCoil::phimax_m
double phimax_m
Maximal azimuth (rad)
Definition:
TrimCoil.h:53
TrimCoil::applyField
void applyField(const double r, const double z, const double phi_rad, double *br, double *bz)
Definition:
TrimCoil.cpp:43
TrimCoil::~TrimCoil
virtual ~TrimCoil()
Definition:
TrimCoil.h:40
Generated on Wed Aug 25 2021 16:41:03 for OPAL (Object Oriented Parallel Accelerator Library) by
1.9.1