java.lang.Object
simpa.acc.api.match.SimpaMultivariateFunction
simpa.acc.api.match.SigmaMultivariateFunction
- All Implemented Interfaces:
org.apache.commons.math3.analysis.MultivariateFunction
-
Field Summary
Fields inherited from class simpa.acc.api.match.SimpaMultivariateFunction
DEFAULT_LOSS_PENALTY
-
Constructor Summary
ConstructorsConstructorDescriptionSigmaMultivariateFunction
(Beam beam, TwissParameters initialTwiss, Sequence sequence, List<MatchingVariable> variables, List<MatchingTarget> targets, double stepSize, boolean backward, double diskRadius) -
Method Summary
Modifier and TypeMethodDescriptioncopyAndSet
(Beam b, PotentialProvider pp, List<MatchingVariable> matchingVariables) A deep copy of of all particles in the beam, but the tracking state is freshly created.double
void
setMatchingVariables
(double[] point) double
value
(double[] point) Methods inherited from class simpa.acc.api.match.SimpaMultivariateFunction
setLosssPenaly
-
Constructor Details
-
SigmaMultivariateFunction
public SigmaMultivariateFunction(Beam beam, TwissParameters initialTwiss, Sequence sequence, List<MatchingVariable> variables, List<MatchingTarget> targets, double stepSize, boolean backward, double diskRadius)
-
-
Method Details
-
value
public double value(double[] point) - Specified by:
value
in interfaceorg.apache.commons.math3.analysis.MultivariateFunction
- Specified by:
value
in classSimpaMultivariateFunction
-
setMatchingVariables
public void setMatchingVariables(double[] point) -
copyAndSet
A deep copy of of all particles in the beam, but the tracking state is freshly created. The vector potential of the copy will be the potential provider parameter. The beam sampler is freshly created according to the matching parameter values. This method is typically used to create a new beam with when the initial conditions of a transfer line is matched.- Parameters:
b
- The beam to be copied.pp
- The potential provider to be used for the new beam particles.matchingVariables
- The matching variables to be used to create the new beam. In the list only the those matching variables are used which specify the initial Twiss parameters.- Returns:
- Copy of the given beam with the given initial Twiss parameters.
-
getResidualSum
public double getResidualSum()
-