User Tools

Site Tools


libnum:classes:index

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
libnum:classes:index [2026/03/04 13:12] – [GearParams] abclibnum:classes:index [2026/03/04 15:43] (current) abc
Line 3: Line 3:
   namespace NumericMethods   namespace NumericMethods
  
-See: ''gear.h'' and ''gear.asst.h'' files.+  * [[gear|Gear Integration method]] (Integration of Systems of Linear Differential Equations).
  
-class [[#Gear|Gear]]; \\ 
-class [[#GearUserProc|GearUserProc]]; \\ 
-struct [[#GearEngineContext|GearEngineContext]]; \\ 
-class [[#GearEngineCallback|GearEngineCallback]]; \\ 
-class [[#GearAssistant|GearAssistant]]; \\ 
-typedef DoubleParamsMap [[#GearParams|GearParams]]; \\ 
-class [[#GearStatistics|GearStatistics]]; \\ 
-class [[#GearAllocator|GearAllocator]]; \\ 
- 
-===== Gear ===== 
-  class Gear 
-  { 
-   public: 
-    Gear(); 
-   ~Gear(); 
-    void set(int n, GearUserProc* derFunc, GearUserProc* jacFunc); 
-    void setCallback(GearEngineCallback& f) { callback = &f;} 
-    Message solve(const double t_begin, const double t_end, const double* y0); 
-    GearEngineContext engineContext; 
-    GearAssistant assistant; 
-  }; 
- 
-The 'set' method of Gear objects defines the dimension, starting Y values and functions  
-to calculate the derivative function values and DY, the Jacobian. 
- 
-The Gear object has its private Allocator which provides memory to consecutive runs of 
-'solve' procedure. 
- 
-The rest settings and user interactions are done via GearAssistance object, the public 
-property of the Gear object. E.g. 'parameters', 'statistics'. 
- 
-===== GearUserProc ===== 
- 
-===== GearEngineContext ===== 
-Read-only references to member variables of the Gear object. 
- 
-  struct GearEngineContext 
-  { 
-   const int&    n;        // dimension 
-   const int&    q;        // current degree of interpolation 
-   const double& h;        // current step of integration  
-   const double& t;        // current time 
-   const double* const& Z; // values (ref to Z[]) 
-  }; 
-===== GearEngineCallback ===== 
-The hook/callback object in Gear::solve(). The Base class for user defined interfaces. 
- 
-  class GearEngineCallback 
-  { 
-   public: 
-    virtual bool call(const GearEngineContext&) { 
-      return true;  // return 'false' to cancel caller proc 
-    } 
-  }; 
- 
-===== GearAssistant ===== 
-  class GearAssistant 
-  { 
-   public: 
-    GearParams     params; 
-    GearStatistics statistics; 
-  }; 
- 
-===== GearAllocator ===== 
-  class GearAllocator 
-  { 
-   public: 
-    GearAllocator(Gear& owner); 
-    ~GearAllocator(); 
-    bool allocateMemory(int task_dimension); 
-  }; 
- 
-===== GearParams ===== 
-  class DoubleParamsMap 
-  { 
-   public: 
-    DoubleParamsMap() : params() {} 
-    bool declareParameter(const char* name, double value=0); 
-    bool setParameter(ParamID id, double value);  // parameter SHOULD be declared before! 
-    double getParameter(ParamID id) const; 
-    std::string getParameterNames() const;  // informative/debug purposes 
-   private: 
-    std::map<ParamID,double> params;  
-  }; 
- 
-//GearEngine// tuning parameters are (doubles): 
-  EPS = 0.01; 
-  HINI = 1e-10; 
-  HMIN = 1e-18; 
-  HMAX = BIG_VAL; 
-  RHMAX = 1; 
-See Gear Algorithm for details. 
  
libnum/classes/index.1772619122.txt.gz · Last modified: by abc