File indexing completed on 2025-01-18 09:54:34
0001 #ifndef _ButcherTableau_h_
0002 #define _ButcherTableau_h_
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015
0016
0017
0018
0019
0020 #include <vector>
0021 #include <string>
0022 namespace Genfun {
0023 class ButcherTableau {
0024
0025 public:
0026
0027
0028 inline ButcherTableau(const std::string &name, unsigned int order);
0029
0030
0031 inline const std::string & name() const;
0032
0033
0034 inline unsigned int order() const;
0035
0036
0037 inline unsigned int nSteps() const;
0038
0039
0040 inline double & A(unsigned int i, unsigned int j);
0041 inline double & b(unsigned int i);
0042 inline double & c(unsigned int i);
0043
0044
0045 inline const double & A(unsigned int i, unsigned int j) const;
0046 inline const double & b(unsigned int i) const;
0047 inline const double & c(unsigned int i) const;
0048
0049
0050 private:
0051
0052 std::vector< std::vector<double> > _A;
0053 std::vector<double> _b;
0054 std::vector<double> _c;
0055 std::string _name;
0056 unsigned int _order;
0057 };
0058
0059
0060 class EulerTableau: public ButcherTableau {
0061
0062 public:
0063 inline EulerTableau();
0064 };
0065
0066 class MidpointTableau: public ButcherTableau {
0067
0068 public:
0069 inline MidpointTableau();
0070 };
0071
0072 class TrapezoidTableau: public ButcherTableau {
0073
0074 public:
0075 inline TrapezoidTableau();
0076 };
0077
0078 class RK31Tableau: public ButcherTableau {
0079
0080 public:
0081 inline RK31Tableau();
0082 };
0083
0084 class RK32Tableau: public ButcherTableau {
0085
0086 public:
0087 inline RK32Tableau();
0088 };
0089
0090 class ClassicalRungeKuttaTableau: public ButcherTableau {
0091
0092 public:
0093 inline ClassicalRungeKuttaTableau();
0094 };
0095
0096 class ThreeEighthsRuleTableau: public ButcherTableau {
0097
0098 public:
0099 inline ThreeEighthsRuleTableau();
0100 };
0101
0102 }
0103
0104 inline std::ostream & operator << (std::ostream & o, const Genfun::ButcherTableau & b);
0105
0106
0107 #include "CLHEP/GenericFunctions/ButcherTableau.icc"
0108
0109 #endif