Home > lattice > element_creation > atsolenoid.m

atsolenoid

PURPOSE ^

z=solenoid('FAMILYNAME',Length [m],KS,'METHOD')

SYNOPSIS ^

function Elem=atsolenoid(fname,L,KS,method)

DESCRIPTION ^

 z=solenoid('FAMILYNAME',Length [m],KS,'METHOD')
    creates a new solenoid element with Class 'Solenoid'
   The structure with field
    FamName            family name
    Length            length[m]
    KS              solenoid strength KS [rad/m]
    PassMethod     name of the function to use for tracking

   function returns assigned address in the FAMLIST that uniquely identifies
   the family

   Additional structures being set up (initialized to default values within this routine):   
    NumIntSteps        Number of integration steps
    MaxOrder
    R1                    6 x 6 rotation matrix at the entrance
    R2                   6 x 6 rotation matrix at the entrance
    T1                    6 x 1 translation at entrance 
    T2                    6 x 1 translation at exit

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SOURCE CODE ^

0001 function Elem=atsolenoid(fname,L,KS,method)
0002 
0003 % z=solenoid('FAMILYNAME',Length [m],KS,'METHOD')
0004 %    creates a new solenoid element with Class 'Solenoid'
0005 %   The structure with field
0006 %    FamName            family name
0007 %    Length            length[m]
0008 %    KS              solenoid strength KS [rad/m]
0009 %    PassMethod     name of the function to use for tracking
0010 %
0011 %   function returns assigned address in the FAMLIST that uniquely identifies
0012 %   the family
0013 %
0014 %   Additional structures being set up (initialized to default values within this routine):
0015 %    NumIntSteps        Number of integration steps
0016 %    MaxOrder
0017 %    R1                    6 x 6 rotation matrix at the entrance
0018 %    R2                   6 x 6 rotation matrix at the entrance
0019 %    T1                    6 x 1 translation at entrance
0020 %    T2                    6 x 1 translation at exit
0021 
0022 Elem.FamName = fname;  % add check for existing identical family names
0023 Elem.Length = L;
0024 Elem.K         = KS;
0025 Elem.MaxOrder = 3;
0026 Elem.NumIntSteps = 10;
0027 Elem.R1 = diag(ones(6,1));
0028 Elem.R2 = diag(ones(6,1));
0029 Elem.T1 = zeros(1,6);
0030 Elem.T2 = zeros(1,6);
0031 Elem.PassMethod=method;
0032 Elem.Class = 'Solenoid';

Generated on Thu 24-Aug-2017 18:47:33 by m2html © 2005