This is a numeric solver for higher oder ordinary differential equations based on Runge Kutta 4. Created for Uni Class
Installation should be done through VCPKG, following the standard procedure.
The code uses apart from standard C++ libraries and pugixml, matplotlib-cpp for graphic representations, which can be found on the following link.
https://github.com/lava/matplotlib-cpp
Installation instructions for Ubuntu are given in the README.md in the matplotlib-cpp repository. Because the library is essentially a wapper of a python library, python needs to be integrated to run it. Here are instructions for setting up environment in Visual Studio 2022, Python 3.10. (Windows)
-
Install the latest version of Python making sure to add check the box that adds Python to path (refers to environment variables). Make sure that python can be accessed via command prompt:
python --version
-
Install numpy and matplotlib using commands:
python -m pip install matplotlib python -m pip install numpy
-
After creating a new project in VS (make sure to choose release and not debug, also in x64) and downloading matplotlibcpp.h from the repository add it to the project (the source files).
-
In order to add additional include directories, go to project>properties>C/C++>Additional include dirrectories and add the path to python and numpy include directories. In my case that was
C:\Users\Korisnik\AppData\Local\Programs\Python\Python310\include; C:\Users\Korisnik\AppData\Local\Programs\Python\Python310\Lib\site-packages\numpy\core\include
- After that go to project>properties>linker>General>Additional library directories and add python libs. In my case that was
C:\Users\Korisnik\AppData\Local\Programs\Python\Python310\libs
- Then go to project>properties>linker>input>additional dependencies and add python310.lib making sure not to delete %. In my case that was
C:\Users\Korisnik\AppData\Local\Programs\Python\Python310\libs\python310.lib;$(CoreLibraryDependencies);%(AdditionalDependencies)