SIMLIB/C++  3.07
ni_abm4.h
Go to the documentation of this file.
1 /////////////////////////////////////////////////////////////////////////////
2 //! \file ni_abm4.h Adams-Bashforth-Moulton 4th order
3 //
4 // Copyright (c) 1996-1997 David Leska
5 // Copyright (c) 1998-2004 Petr Peringer
6 // This library is licensed under GNU Library GPL. See the file COPYING.
7 //
8 
9 //
10 // numerical integration: Adams-Bashforth-Moulton's
11 // predictor-corrector 4th order
12 //
13 
14 
15 #include "simlib.h"
16 
17 namespace simlib3 {
18 
19 // order of the ABM4 method
20 const int abm_ord=4;
21 
22 
23 ////////////////////////////////////////////////////////////////////////////
24 // class representing the integration method
25 //
26 class ABM4 : public MultiStepMethod {
27 private:
28  int ABM_Count; // # of start steps (done by starting method)
29  Memory Z[abm_ord]; // auxiliary memories
30  Memory PRED; // auxiliary memories -- value of predictor
31 public:
32  ABM4(const char* name, const char* slave_name):
33  MultiStepMethod(name, slave_name),
34  ABM_Count(0)
35  { /*NOTHING*/ }
36  virtual ~ABM4() // destructor
37  { /*NOTHING*/ }
38  virtual void Integrate(void) override; // integration method
39  virtual bool PrepareStep(void) override; // prepare object for integration step
40 }; // class ABM4
41 
42 } // namespace
43 
44 // end of ni_abm4.h
45 
Memory Z[abm_ord]
Definition: ni_abm4.h:29
virtual ~ABM4()
Definition: ni_abm4.h:36
int ABM_Count
Definition: ni_abm4.h:28
virtual bool PrepareStep(void) override
prepare the object for the step of integration
Definition: ni_abm4.cc:217
virtual void Integrate(void) override
Definition: ni_abm4.cc:53
const int abm_ord
Definition: ni_abm4.h:20
base for multi-step integration method
Definition: simlib.h:1162
Implementation of class CalendarList interface is static - using global functions in SQS namespace...
Definition: algloop.cc:32
ABM4(const char *name, const char *slave_name)
Definition: ni_abm4.h:32
Main SIMLIB/C++ interface.
Memory PRED
Definition: ni_abm4.h:30