|
||||||||||
| 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.EnvTrackerAdapt2
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 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_MAXSTEP
attribute label for maximum step size |
static java.lang.String |
ATTRTAG_NORM
attribute label for residual norm |
static java.lang.String |
ATTRTAG_SLACK
attribute label for slack tolerance |
static java.lang.String |
NODETAG_ADAPT
data node label for EnvTrackerAdapt2 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 | |
EnvTrackerAdapt2()
Creates a new instance of EnvTrackerAdapt2 |
|
| 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. |
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. |
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 |
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 |
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 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_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
| Constructor Detail |
public EnvTrackerAdapt2()
| Method Detail |
public void setMaxStepSize(double dblMaxStep)
dblMaxStep - maximum allowable step size in meterspublic 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 EnvTrackerAdapt2.NORM_*public double getStepSize()
public double getMaxStepSize()
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 EnvTrackerAdapt2 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 EnvTrackerAdapt2 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 | |||||||||