All the computation algorithms and data management functions are implemented in the following classes :
Mesh: This class defines the data structure for the grid data. It implements all needed functions to access (for reading and writing) the grid data.
Commands: This class defines the data structure for the set of controls.
HJB: This class defines the general HJB problem. The class has a first main attribute which is a pointer to a Mesh object that contains all the information about the computation domain and its discretization, and a second attribute which is a pointer to a Commands object that contains the information about the set of controls. All parameters related to the definition of the problem (dynamics, cost functions, Hamiltonian function) are attributes of this class. It contains some general methods : different interpolation functions, trajectory reconstruction methods and savings management. This class is the base class for two derived classes : HJB_FD and HJB_SL.
HJB_FD. This class inherits from HJB and defines the main loop computations for finite difference methods.
HJB_SL. This class inherits from HJB and defines the main loop computations for semi-Lagrangian methods.
All the classes described above are already compiled in the library libhj.a. Their headers are in the folder include/.
We remind that the user needs to code the problem parameters into a c++ header file and to include its name in the file data/data_simulation.h. For example, if the user data file is called data_myexample.h, then the following line (and only this one) must be included in the file data/data_simulation.h:
#include ”data_myexample.h”