{"id":19752718,"url":"https://github.com/thomasthelen/qodes","last_synced_at":"2025-10-28T00:42:13.207Z","repository":{"id":87031523,"uuid":"50302013","full_name":"ThomasThelen/QODES","owner":"ThomasThelen","description":"Quick Ordinary Differential Equation Solver (QODES) is an ODE solving library with a focus on usability and ease.","archived":false,"fork":false,"pushed_at":"2021-12-30T02:40:33.000Z","size":16602,"stargazers_count":2,"open_issues_count":1,"forks_count":1,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-01-10T21:47:49.874Z","etag":null,"topics":["algorithm","mathematics","numerical-methods","ode","ode-solver","ode-solving-library","solver"],"latest_commit_sha":null,"homepage":"","language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ThomasThelen.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2016-01-24T18:44:16.000Z","updated_at":"2025-01-02T06:44:03.000Z","dependencies_parsed_at":"2023-05-30T07:15:23.614Z","dependency_job_id":null,"html_url":"https://github.com/ThomasThelen/QODES","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ThomasThelen%2FQODES","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ThomasThelen%2FQODES/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ThomasThelen%2FQODES/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ThomasThelen%2FQODES/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ThomasThelen","download_url":"https://codeload.github.com/ThomasThelen/QODES/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":241084302,"owners_count":19907090,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["algorithm","mathematics","numerical-methods","ode","ode-solver","ode-solving-library","solver"],"created_at":"2024-11-12T02:49:50.214Z","updated_at":"2025-10-28T00:42:08.177Z","avatar_url":"https://github.com/ThomasThelen.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"![alt text](https://github.com/ThomasThelen/QODES/raw/master/qodes.png)\n\n[![Project Status: Inactive – The project has reached a stable, usable state but is no longer being actively developed; support/maintenance will be provided as time allows.](https://www.repostatus.org/badges/latest/inactive.svg)](https://www.repostatus.org/#inactive)  [![license](https://img.shields.io/github/license/mashape/apistatus.svg)]()\n[![CodeFactor](https://www.codefactor.io/repository/github/thomasthelen/qodes/badge)](https://www.codefactor.io/repository/github/thomasthelen/qodes)\n\n# QODES\nQuick Ordinary Differential Equation Solver (QODES) is a header-only ODE solving library with a focus on end user usability. The library supports a small, but standard set of numerical \nmethods for solving ODEs. These include the Forward Euler method and the Rune Kutta class.\n\nNote that there are much more robust libraries out there like Odient; this was largely a project that I had worked on for fun and can be used for reference.\n# Building\nTo build the example, run the following from inside the `build/` directory,\n\n```\ncmake ..\ncmake --build .\n```\n\n# Quick Start\nTo use this, download `QODES.h` and include it in your C++ project. A list of classes are provided below that represent the different solution algorithms.\n\n```\nRunge Kutta 4 : RK4\nRunge Kutta 3/8 : RK38\nRunge–Kutta–Fehlberg : RK45\nRunge-Kutta-Dormand-Prince: RKDP\nForward Euler : ForwardEuler\n```\n\nThe constructor of these classes takes the step size, the target x value in question, and an initial condition. For adaptive methods, supply the initial step size and subsequent sizes will be automatically computed.\n\nThe general form of creating an algorithm follows, where 0.10 is the step size, 10 is the x value that we want the slope at, and 2 is the initial condition `y(0)=2`. In this case, the Runge Kutta 3/8 method is chosen.\n ```c++\nauto RK = std::make_shared\u003cRK38\u003cdouble\u003e\u003e RK38\u003cdouble\u003e(0.10, 10, 2);\n```\n\n Once the algorithm is created, the differential should be created. The following is a good template to use; note that `y` is _not_ neccessary in the ODE but should still be a function parameter.\n  ```c++\n  template \u003cclass T\u003e\n  T MyFunction(T x, T y)\n{\n\tT result = x + y;\n\treturn result;\n}\n```\nThe final steps are to set the Eqn.differential_equation to the ODE from above and call the `Solve()` method on the solver.\n  ```c++\n  RK-\u003eEqn.differential_equation = MyFunction;\n```\n  ```c++\n  RK-\u003eSolve();\n```\n\n## Example main.cpp\nThis example solves a basic differential equation at x=10 with a step of 0.5 and initial condition y(0)=1.\n  ```c++\n#include \"stdafx.h\"\n#include \"QODE.hpp\"\n\nint main()\n{\n\tstd::cout\u003c\u003c \"Solving dy/dx=x with the RK4 method...\" \u003c\u003c std::endl;\n\tAlgorithm ClassicRK = RK4(0.50, 10, 1);\n\tClassicRK.Eqn.differential_equation = MyFunction;\n\tClassicRK.Solve();\n\treturn 0;\n}\n\ntemplate \u003cclass T\u003e\nT MyFunction(T x, T y)\n{\n\tT result = x;\n\treturn result;\n}\n```\n  \n# Sources\nhttp://depa.fquim.unam.mx/amyd/archivero/DormandPrince_19856.pdf\n\nhttp://www.mymathlib.com/diffeq/runge-kutta/runge_kutta_3_8.html","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthomasthelen%2Fqodes","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fthomasthelen%2Fqodes","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthomasthelen%2Fqodes/lists"}