~max-mcginley/third-order-lie-map/generator

« back to all changes in this revision

Viewing changes to LieOperator.cc

  • Committer: Max McGinley
  • Date: 2015-08-18 17:13:46 UTC
  • Revision ID: max.mcginley@stfc.ac.uk-20150818171346-ou729otm1b9zmnvo
RK4 method added to integrated interaction 4th order hamiltonian. Relative error around 5e-4 for 10mm x,y and 1Mev px, py. Added missing global and particle generation header files. 2 lattices uploaded for use in tests etc. Documentation to follow.

Show diffs side-by-side

added added

removed removed

Lines of Context:
159
159
 
160
160
//*****************************LieOperator Functions***************************************
161
161
 
 
162
LieOperator::LieOperator(lie_polynomial pol) : f4(pol) {
 
163
        thirdOrderMap = NULL;
 
164
}
 
165
 
162
166
lie_polynomial LieOperator::differentiate(const lie_polynomial& f, int index) {
163
167
        lie_polynomial retval;
164
168
        if (index >= 4 || index < 0) {
172
176
        return retval;
173
177
}
174
178
 
 
179
 
175
180
PolynomialMap LieOperator::applyTransformToMatrix(Matrix<double> mat) {
176
181
        std::vector<PolynomialMap::PolynomialCoefficient> cos;
177
182
        for (int i = 0; i < 4; i++) {