{"id":22136369,"url":"https://github.com/computationalphysiology/goss","last_synced_at":"2025-07-25T20:32:57.874Z","repository":{"id":36956244,"uuid":"366472177","full_name":"ComputationalPhysiology/goss","owner":"ComputationalPhysiology","description":"General ODE System Solver","archived":false,"fork":false,"pushed_at":"2024-06-24T20:40:35.000Z","size":19513,"stargazers_count":2,"open_issues_count":1,"forks_count":0,"subscribers_count":5,"default_branch":"main","last_synced_at":"2024-08-10T23:44:17.361Z","etag":null,"topics":["cpp","ode","ode-solver","odeint","python"],"latest_commit_sha":null,"homepage":"https://computationalphysiology.github.io/goss","language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"lgpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ComputationalPhysiology.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","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":"2021-05-11T18:02:53.000Z","updated_at":"2024-08-10T09:13:57.000Z","dependencies_parsed_at":"2024-06-03T23:24:39.821Z","dependency_job_id":null,"html_url":"https://github.com/ComputationalPhysiology/goss","commit_stats":{"total_commits":523,"total_committers":7,"mean_commits":74.71428571428571,"dds":0.5449330783938815,"last_synced_commit":"445481432bdb1d44cc1b252a1f2ab5e6767f03f8"},"previous_names":[],"tags_count":29,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ComputationalPhysiology%2Fgoss","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ComputationalPhysiology%2Fgoss/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ComputationalPhysiology%2Fgoss/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ComputationalPhysiology%2Fgoss/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ComputationalPhysiology","download_url":"https://codeload.github.com/ComputationalPhysiology/goss/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":227615988,"owners_count":17794161,"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":["cpp","ode","ode-solver","odeint","python"],"created_at":"2024-12-01T19:22:03.572Z","updated_at":"2024-12-01T19:22:04.162Z","avatar_url":"https://github.com/ComputationalPhysiology.png","language":"C++","readme":"[![CI-cpp](https://github.com/ComputationalPhysiology/goss/actions/workflows/cpp.yml/badge.svg)](https://github.com/ComputationalPhysiology/goss/actions/workflows/cpp.yml)\n[![CI-fenics](https://github.com/ComputationalPhysiology/goss/actions/workflows/fenics.yml/badge.svg)](https://github.com/ComputationalPhysiology/goss/actions/workflows/fenics.yml)\n[![github pages](https://github.com/ComputationalPhysiology/goss/actions/workflows/github-pages.yml/badge.svg)](https://github.com/ComputationalPhysiology/goss/actions/workflows/github-pages.yml)\n[![PyPI version](https://badge.fury.io/py/pygoss.svg)](https://badge.fury.io/py/pygoss)\n[![coverage](https://img.shields.io/endpoint?url=https://gist.githubusercontent.com/finsberg/a7290de789564f03eb6b1ee122fce423/raw/goss-badge.json)](https://img.shields.io/endpoint?url=https://gist.githubusercontent.com/finsberg/a7290de789564f03eb6b1ee122fce423/raw/goss-badge.json)\n\n# `goss` - General ODE System Solver\n\n`goss` is python wrapper around a C++ library for solving ordinary differential equations with a variety of different schemes.\n\n\nDocumentation is hosted at https://computationalphysiology.github.io/goss\nSource code is found at https://github.com/ComputationalPhysiology/goss\n\n\n## Motivation\n\nThe general idea is that you define your ODE in a [`gotran ode file`](https://github.com/ComputationalPhysiology/gotran) and hand the ode over to `goss`.\n\nFirst define the ode in a gotran ODE file\n\n```\n# lorentz.ode\nparameters(\nsigma=10.0,\nrho=28.0,\nbeta=8/3\n)\n\n# The values of the states represent the initial conditions\nstates(\nx=0.0,\ny=1.0,\nz=1.05\n)\n\ndx_dt = sigma * (y - x)\ndy_dt = x * (rho - z) - y\ndz_dt = x * y - beta * z\n```\nYou can now solve the ode as follows\n```python\nimport numpy as np\nimport matplotlib.pyplot as plt\nfrom gotran import load_ode\nimport goss\n\n# Import the ode in gotran\nlorentz = load_ode(\"lorentz.ode\")\n# Jit compile the code for the right hand side\node = goss.ParameterizedODE(lorentz)\n# Select a solver and instantiate the solver\nsolver = goss.solvers.RKF32(ode)\n# Select the time steps you want to solve for\nt = np.linspace(0, 100, 10001)\n# Solve the system\nu = solver.solve(t)\n\n# Plot the solution\nfig = plt.figure()\nax = fig.add_subplot(projection=\"3d\")\n\nax.plot(u[:, 0], u[:, 1], u[:, 2], lw=0.5)\nax.set_xlabel(\"X Axis\")\nax.set_ylabel(\"Y Axis\")\nax.set_zlabel(\"Z Axis\")\nax.set_title(\"Lorenz Attractor\")\nplt.show()\n```\n![_](https://raw.githubusercontent.com/ComputationalPhysiology/goss/main/docs/_static/lorentz.png)\n\n\nFor more examples, check out the [demo folder](https://github.com/ComputationalPhysiology/goss/tree/main/demo)\n\nThere is also a command line interface that can be used to list the available solvers, run the solver and generate the goss code\n\n![_](https://raw.githubusercontent.com/ComputationalPhysiology/goss/main/docs/source/_static/cli.gif)\n\n\n\n## Install\n\nYou can install goss with pip\n```\npython -m pip install pygoss\n```\nSee [installation instructions](docs/install.md) for more options\n\n\n## Known issues\n\n- There is currently an issue on Apple Silicon with exceptions raised from by the jit compiled code which means the [one test](https://github.com/ComputationalPhysiology/goss/blob/main/tests/test_ode_bindings.py#L51) is not passing. An issue has been filed for this [here](https://github.com/wlav/cppyy/issues/68)\n- If you get the following type of error: `UnicodeDecodeError: 'utf-8' codec can't decode byte 0xc0 in position ...`, then you can try to install `goss` from source, i.e\n```\npython3 -m pip install pygoss --no-binary=pygoss --force-reinstall --no-deps\n```\n\n## Contributing\n\nContributions are very welcomed. To contribute please fork the repo, create a branch a submit a pull request. Before the pull request can be accepted it has to pass the test suit for the python and C++ code. Also note that we try to enforce an consistent coding style. To ensure that you follow the coding style you can install the pre-commit hook in the repo\n```\npython -m pip install pre-commit\npre-commit install\n```\nFor every future commit, you will now run a set of tests that will make sure that you follow the coding style.\n\nSee the [contributing section](CONTRIBUTING.md) for more info.\n\n## License\n`goss` is licensed under the GNU LGPL, version 3 or (at your option) any later version.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcomputationalphysiology%2Fgoss","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcomputationalphysiology%2Fgoss","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcomputationalphysiology%2Fgoss/lists"}