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

« back to all changes in this revision

Viewing changes to LieMap.hh

  • 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:
82
82
        PolynomialMap generateThirdOrderMap(double zOut, bool store = true);
83
83
        
84
84
        //getters
85
 
        Matrix<double> getTransferMatrix() {return *transferMatrix;}
86
 
        BfieldIntegrator* getIntegrator() {return integrator;}
87
 
        PolynomialMap getThirdOrderMap() {return *thirdOrderMap;}
88
 
        LieOperator* getThirdOrderTrans() {return thirdOrderTrans;}
 
85
        Matrix<double> getTransferMatrix() {if (transferMatrix == NULL) throw std::runtime_error("LieMap::getTransferMatrix() is NULL"); return *transferMatrix;}
 
86
        BfieldIntegrator* getIntegrator() {if (integrator == NULL) throw std::runtime_error("LieMap::getIntegrator() is NULL"); return integrator;}
 
87
        PolynomialMap getThirdOrderMap() {if (thirdOrderMap == NULL) throw std::runtime_error("LieMap::getTransferMap() is NULL"); return *thirdOrderMap;}
 
88
        LieOperator* getThirdOrderTrans() {if (thirdOrderTrans == NULL) throw std::runtime_error("LieMap::getThirdOrderTrans() is NULL"); return thirdOrderTrans;}
89
89
        FourthOrderHamiltonian* getHamiltonian() {if (hamiltonian == NULL) hamiltonian = new FourthOrderHamiltonian(getIntegrator(),this); return hamiltonian;}
90
90
        double getZOut() {return zFinal;}
91
91
        double getZIn() {return zInit;}