Last change
on this file since 4 was
4,
checked in by zhangj, 11 years ago
|
Initial import--MML version from SOLEIL@2013
|
File size:
1.1 KB
|
Line | |
---|
1 | function varargout = radiationoff(varargin) |
---|
2 | %RADIATIONOFF - Turns classical radiation off in the model |
---|
3 | % Switch all magnets currently set to use pass-methods |
---|
4 | % 'BndMPoleSymplectic4RadPass' and 'StrMPoleSymplectic4RadPass' |
---|
5 | % to their equivalents without radiation |
---|
6 | % 'BndMPoleSymplectic4Pass' and 'StrMPoleSymplectic4Pass' |
---|
7 | % |
---|
8 | % See also RADIATIONON, CAVITYON, CAVITYOFF |
---|
9 | |
---|
10 | if ~evalin('base','exist(''THERING'')') | ~evalin('base','~isempty(whos(''global'',''THERING''))') |
---|
11 | error('Global variable THERING could not be found'); |
---|
12 | end |
---|
13 | |
---|
14 | global THERING |
---|
15 | |
---|
16 | localindex = findcells(THERING,'PassMethod','StrMPoleSymplectic4RadPass'); |
---|
17 | THERING = setcellstruct(THERING,'PassMethod',localindex, 'StrMPoleSymplectic4Pass'); |
---|
18 | totalswitched = length(localindex); |
---|
19 | |
---|
20 | localindex = findcells(THERING,'PassMethod','BndMPoleSymplectic4RadPass'); |
---|
21 | THERING = setcellstruct(THERING,'PassMethod',localindex, 'BndMPoleSymplectic4Pass'); |
---|
22 | totalswitched = totalswitched + length(localindex); |
---|
23 | |
---|
24 | disp(['PassMethod was changed to NOT include radiation in ',num2str(totalswitched), ' elements']) |
---|
25 | clear localindex |
---|
Note: See
TracBrowser
for help on using the repository browser.