|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object
|
+--gov.sns.xal.model.alg.Tracker
|
+--gov.sns.xal.model.alg.EnvTrackerAdapt
Tracking algorithm for EnvelopeProbe's. The EnvelopeProbe's
state, which is a CorrelationMatrix object, is advanced using the linear
dynamics portion of any beamline element (IElement exposing object) transfer
map. The linear portion is represented as a matrix, thus, the state advance is accomplished
with a transpose conjugation with this matrix.
The effects of space charge are also included in the dynamics calculations. Space charge
effects are also represented with a matrix transpose conjugation, however, the matrix is
computated using the values of the probe's correlation matrix. The result is a nonlinear
effect. The space charge forces are computed using a linear fit to the fields generated by
an ellipsoidal charge distribution with the same statistics described in the probe's
correlation matrix. The linear fit is weighted by the beam distribution itself, so it is
more accurate in regions of higher charged density. For a complete description see the reference
below.
This algorithm uses a second-order accurate, adaptive step sizing algorithm where the step
size is continually adjusted to maintain an given error tolerance in the residual.
EllipsoidalCharge,
Theory and Technique
of Beam Envelope Simulation| Field Summary | |
static int |
ACCUR_ERROR
Error condition in integration accuracy |
static int |
ACCUR_ORDER1
1st order accurate integration algorithm |
static int |
ACCUR_ORDER2
2nd order accurate integration algorithm |
static int |
ACCUR_RANGE
Range of avaible integration accuracies |
static java.lang.String |
ATTRTAG_ERRTOL
attribute label for error tolerance |
static java.lang.String |
ATTRTAG_INITSTEP
attribute label for initial step size |
static java.lang.String |
ATTRTAG_MAXITER
attribute label for maximum iteration count |
static java.lang.String |
ATTRTAG_MAXSTEP
attribute label for maximum step size |
static java.lang.String |
ATTRTAG_NORM
attribute label for residual norm |
static java.lang.String |
ATTRTAG_ORDER
attribute label for order of accuracy in algorithm |
static java.lang.String |
ATTRTAG_SLACK
attribute label for slack tolerance |
static java.lang.String |
NODETAG_ADAPT
data node label for EnvTrackerAdapt settings |
static int |
NORM_L1
l-1 norm |
static int |
NORM_L2
l-2 norm |
static int |
NORM_LINF
l-infinity norm |
static java.lang.Class |
s_clsProbeType
probe type recognized by this algorithm |
static int |
s_intVersion
current algorithm version |
static java.lang.String |
s_strTypeId
string type identifier for algorithm |
| Fields inherited from class gov.sns.xal.model.alg.Tracker |
ATTRTAG_DEBUG, ATTRTAG_TYPE, ATTRTAG_UPDATE, ATTRTAG_VER, CALC_RFGAP_PHASE, NODETAG_ALG, NODETAG_TRACKER, NODETAG_TRAJ, UPDATE_ALWAYS, UPDATE_CUSTOM, UPDATE_ENTRANCE, UPDATE_ENTRANCEANDEXIT, UPDATE_EXIT |
| Constructor Summary | |
EnvTrackerAdapt()
Creates a new instance of EnvTrackerAdapt |
|
| Method Summary | |
void |
doPropagation(IProbe ifcProbe,
IElement elem)
Propagates the probe through the element using a second-order accurate adaptive step size algorithm for space charge calculations. |
int |
getAccuracyOrder()
Get the current accuracy order of the space charge stepping algorithm. |
double |
getErrorTolerance()
Return the acceptable tolerance in the residual error between a full step and two half steps. |
int |
getMatrixNorm()
Get the type of Lebesque norm used for matrices. |
int |
getMaxIterations()
Return the maximum allowable number of steps to progate a probe through an element. |
double |
getMaxStepSize()
Return the maximum allowable step size. |
double |
getSlackTolerance()
Step size adjustment slack tolerance. |
double |
getStepSize()
Return the current step size. |
void |
load(DataAdaptor daptArchive)
Load the parameters of the algorithm from a data source exposing the IArchive interface. |
void |
save(DataAdaptor daptArchive)
Save the settings particular to this subclass of Tracker. |
void |
setAccuracyOrder(int intOrder)
Set the integration accuracy order for the underlying stepping algorithm. |
void |
setErrorTolerance(double dblErr)
Set the acceptable error in the residual correlation matrix. |
void |
setMatrixNorm(int enmNorm)
Set the type of Lebesque norm used in the matrix calculations. |
void |
setMaxIterations(int intMaxIter)
Sets the maximum allowable number of steps to progate a probe through an element. |
void |
setMaxStepSize(double dblMaxStep)
Set the maximum allowable step size. |
void |
setSlackTolerance(double dblSlack)
Set the slack size in the adaptive step size determination. |
void |
setStepSize(double dblStepSize)
Set the initial step size for applying space charge corrections. |
| Methods inherited from class gov.sns.xal.model.alg.Tracker |
advanceProbe, getArchive, getDebugMode, getElemPosition, getProbeUpdatePolicy, getStartElementId, getStopElementId, getType, getVersion, initialize, propagate, registerProbeType, setDebugMode, setElemPosition, setProbeUpdatePolicy, setStartElementId, setStopElementId, unsetStartElementId, unsetStopElementId, useRfGapPhaseCalculation, validElement, validProbe |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
public static final int NORM_LINF
public static final int NORM_L1
public static final int NORM_L2
public static final int ACCUR_ERROR
public static final int ACCUR_ORDER1
public static final int ACCUR_ORDER2
public static final int ACCUR_RANGE
public static final java.lang.String s_strTypeId
public static final int s_intVersion
public static final java.lang.Class s_clsProbeType
public static final java.lang.String NODETAG_ADAPT
public static final java.lang.String ATTRTAG_ORDER
public static final java.lang.String ATTRTAG_MAXSTEP
public static final java.lang.String ATTRTAG_INITSTEP
public static final java.lang.String ATTRTAG_ERRTOL
public static final java.lang.String ATTRTAG_SLACK
public static final java.lang.String ATTRTAG_NORM
public static final java.lang.String ATTRTAG_MAXITER
| Constructor Detail |
public EnvTrackerAdapt()
| Method Detail |
public void setAccuracyOrder(int intOrder)
intOrder - integration orderpublic void setMaxStepSize(double dblMaxStep)
dblMaxStep - maximum allowable step size in meterspublic void setMaxIterations(int intMaxIter)
intMaxIter - maximum alllowable single-element step countpublic void setErrorTolerance(double dblErr)
dblErr - acceptable residual errorpublic void setSlackTolerance(double dblSlack)
dblSlack - size of the slack region in meterspublic void setStepSize(double dblStepSize)
dblStepSize - initial step size in public void setMatrixNorm(int enmNorm)
enmNorm - enumeration constant of family EnvTrackerAdapt.NORM_*public int getAccuracyOrder()
setAccuracyOrder(int)public double getStepSize()
public double getMaxStepSize()
public int getMaxIterations()
public double getErrorTolerance()
public double getSlackTolerance()
public int getMatrixNorm()
public void doPropagation(IProbe ifcProbe,
IElement elem)
throws ModelException
doPropagation in class Trackerelem - element acting on probeifcProbe - probe to propagate
ModelException - invalid probe type or error in advancing probeTracker.advanceProbe(gov.sns.xal.model.IProbe, gov.sns.xal.model.IElement, double),
Tracker.validProbe(gov.sns.xal.model.IProbe)
public void load(DataAdaptor daptArchive)
throws DataFormatException
IArchive interface.
The superclass load method is called first, then the properties
particular to EnvTrackerAdapt are loaded.
- Specified by:
load in interface IArchive- Overrides:
load in class Tracker
- Parameters:
daptArchive - data source containing algorithm configuration
- Throws:
DataFormatException - malformatted algorithm data- See Also:
gov.sns.tools.data.IArchive#load(gov.sns.tools.data.DataAdaptor)
public void save(DataAdaptor daptArchive)
Tracker.
The superclass save method is called first, then the properties
particular to EnvTrackerAdapt are saved.
- Specified by:
save in interface IArchive- Overrides:
save in class Tracker
- Parameters:
daptArchive - data sink exposing IArchive interface- See Also:
gov.sns.tools.data.IArchive#save(gov.sns.tools.data.DataAdaptor)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||