trick/include/trick/ABM_Integrator.hh
Alex Lin ce0cdc9636
Cmake merge (#901)
* Merging changes from cmake branch to master

* Fixing includes for renamed header files

* still need build rule

* Adding warning for swig code for gcc8+

* Adding CMakeLists.txt for data products

* Cmake merge #901

Making adjustments to get cmake working on the Mac (Mojave)

* Cmake merge #901

Changing string append to list append
2019-11-19 09:01:16 -06:00

108 lines
2.5 KiB
C++

/*******************************************************************************
Purpose:
(Define class ABM_Integrator.)
Programmers:
(((David Hammen) (Odyssey) (July 2012) (JEOD_2.2 #462)
(Joint /JEOD integration framework)))
*******************************************************************************/
#ifndef ABM_INTEGRATOR_HH
#define ABM_INTEGRATOR_HH
#ifdef USE_ER7_UTILS_INTEGRATORS
#include "er7_utils/integration/abm4/include/abm4_integrator_constructor.hh"
#include "er7_utils/trick/integration/include/trick_first_order_ode_integrator.hh"
namespace Trick {
/**
* Helper class for ABM_Integrator
*/
class ABM_IntegratorHelper {
protected:
er7_utils::ABM4IntegratorConstructor
helper_integ_constructor; /* --
The integrator constructor associated with ABM integration. */
};
/**
* Integrator using fourth order Adams Bashforth Moulton method.
*/
class ABM_Integrator :
protected ABM_IntegratorHelper,
public er7_utils::TrickFirstOrderOdeIntegrator {
public:
/** Default constructor, needed by the MemoryManager. */
ABM_Integrator () {}
/** Copy constructor, needed for backwards compatibility. */
ABM_Integrator (const ABM_Integrator & src)
:
ABM_IntegratorHelper (src),
TrickFirstOrderOdeIntegrator (src, helper_integ_constructor)
{}
/** Non-default constructor, needed by getIntegrator. */
ABM_Integrator (int state_size, double delta_t)
:
ABM_IntegratorHelper (),
TrickFirstOrderOdeIntegrator (
helper_integ_constructor, state_size, delta_t)
{}
/** Assignment operator. */
ABM_Integrator & operator= (ABM_Integrator src)
{
helper_integ_constructor = src.helper_integ_constructor;
TrickFirstOrderOdeIntegrator::swap (src);
return *this;
}
/** Destructor. */
virtual ~ABM_Integrator() {}
virtual Integrator_type get_Integrator_type() { return ABM_Method; }
};
}
#else
#include "trick/Integrator.hh"
/**
PURPOSE: (Integrator using ABM method.)
*/
namespace Trick {
/** Integrator using ABM method.
*/
class ABM_Integrator : public Integrator {
public:
/** Default Constructor. This must remain public so the MM can create these. */
ABM_Integrator() {};
ABM_Integrator( int State_size, double Dt);
virtual ~ABM_Integrator();
void initialize( int State_size, double Dt);
int integrate();
Integrator_type get_Integrator_type() { return(ABM_Method); };
int counter;
int primed;
double **stored_data;
};
}
#endif
#endif