ModelSpace
All Classes Namespaces Functions Variables Enumerations Pages
Integrator.hpp
1/******************************************************************************
2* Copyright (c) ATTX LLC 2024. All Rights Reserved.
3*
4* This software and associated documentation (the "Software") are the
5* proprietary and confidential information of ATTX, LLC. The Software is
6* furnished under a license agreement between ATTX and the user organization
7* and may be used or copied only in accordance with the terms of the agreement.
8* Refer to 'license/attx_license.adoc' for standard license terms.
9*
10* EXPORT CONTROL NOTICE: THIS SOFTWARE MAY INCLUDE CONTENT CONTROLLED UNDER THE
11* INTERNATIONAL TRAFFIC IN ARMS REGULATIONS (ITAR) OR THE EXPORT ADMINISTRATION
12* REGULATIONS (EAR99). No part of the Software may be used, reproduced, or
13* transmitted in any form or by any means, for any purpose, without the express
14* written permission of ATTX, LLC.
15******************************************************************************/
16/*
17Integrator header file
18
19Author: Alex Reynolds
20*/
21
22#ifndef INTEGRATOR_HPP
23#define INTEGRATOR_HPP
24
25#include <array>
26
27#include "Rates.hpp"
28
29namespace clockwerk {
30
31 /// This class is a base implementation of the integrator. It defines the
32 /// basic functions and components of an integrator.
33 ///
34 /// It cannot function on its own. A derived class for RK4, forward Euler,
35 /// etc. must be implemented to use the integrator.
36 template <typename T, unsigned int N>
37 class Integrator {
38 public:
39 /// Constructor for the
40 Integrator(Rates<T, N>& rate_calculator);
41
42 /// Function to step the integrator forward from time start to time end
43 /// @param start_time Start time for integration
44 /// @param end_time End time for integration
45 /// @param start_state State at start of integration
46 /// @param out_state Output state via implicit -- result of integration
47 /// @note Un-implemented in this base class definition
48 virtual void step(T start_time, T end_time,
49 const std::array<T, N> &start_state, std::array<T, N> &out_state) {}
50 protected:
51 /// Reference to dynamics object that calculates rates
53 };
54
55 template <typename T, unsigned int N>
56 Integrator<T, N>::Integrator(Rates<T, N>& rate_calculator)
57 : _rate_calculator(rate_calculator) {}
58
59}
60
61#endif
This class is a base implementation of the integrator. It defines the basic functions and components ...
Definition Integrator.hpp:37
Rates< T, N > & _rate_calculator
Reference to dynamics object that calculates rates.
Definition Integrator.hpp:52
Integrator(Rates< T, N > &rate_calculator)
Constructor for the.
Definition Integrator.hpp:56
virtual void step(T start_time, T end_time, const std::array< T, N > &start_state, std::array< T, N > &out_state)
Function to step the integrator forward from time start to time end.
Definition Integrator.hpp:48
Definition Rates.hpp:27