{"id":20131300,"url":"https://github.com/qzed/ws17-numsim-final","last_synced_at":"2025-07-14T22:32:56.100Z","repository":{"id":100505472,"uuid":"119266954","full_name":"qzed/WS17-NumSim-Final","owner":"qzed","description":"Final project for the 2017/2018 Numerical Simulations course at the University of Stuttgart.","archived":false,"fork":false,"pushed_at":"2018-04-10T07:24:29.000Z","size":258,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":4,"default_branch":"develop","last_synced_at":"2025-03-02T21:44:33.194Z","etag":null,"topics":[],"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/qzed.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":"2018-01-28T14:45:15.000Z","updated_at":"2023-09-08T17:35:52.000Z","dependencies_parsed_at":"2023-05-15T12:15:12.157Z","dependency_job_id":null,"html_url":"https://github.com/qzed/WS17-NumSim-Final","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/qzed/WS17-NumSim-Final","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/qzed%2FWS17-NumSim-Final","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/qzed%2FWS17-NumSim-Final/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/qzed%2FWS17-NumSim-Final/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/qzed%2FWS17-NumSim-Final/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/qzed","download_url":"https://codeload.github.com/qzed/WS17-NumSim-Final/tar.gz/refs/heads/develop","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/qzed%2FWS17-NumSim-Final/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":265360327,"owners_count":23752682,"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":[],"created_at":"2024-11-13T20:47:29.208Z","updated_at":"2025-07-14T22:32:56.067Z","avatar_url":"https://github.com/qzed.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Numerical Simulations Course: Final Project\n\nOur final project for the 2017/2018 numerical simulations course at the University of Stuttgart.\n\nThe objective of this project is the implementation of our previously CPU-based flow solver in OpenCL to exploit the massively parallel architecture of the GPU, ultimatively acheiving a speed-up over the CPU-implementation.\n\nTo acheive this, multiple kernels have been created, including kernels for\n- the initialization of boundary values,\n- calculation of the preliminary velocities `F` and `G`,\n- the solver for the pressure equation (including the calculation of its right-hand-side),\n- calculation of the residual,\n- calculation of the new velocities,\n- and multiple reduction kernels, used, for example, for the calculation of the residual and the visualization.\n\nFurthermore we re-implemented the visualization using OpenGL.\nThis lets us use the data directly available on the GPU, thus we can reduce the amount of data copied between device and host.\n\n\n## Dependencies\n\nThis project has the following dependencies:\n- OpenCL (calculation)\n- OpenGL (visualization)\n- SDL2 (window- and OpenGL context-creation)\n- GLEW (OpenGL function loading)\n\nAs well as dependencies to the following third-party header-only libraries that are included:\n- `cl2.hpp` (https://github.com/KhronosGroup/OpenCL-CLHPP) the official OpenCL C++ wrapper\n- `json.hpp` (https://github.com/nlohmann/json) to write json files for performance-testing \n\n\n## Compile and Execute\n\nThe program can be compiled using `cmake`, i.e.\n```sh\nmkdir build \u0026\u0026 cd build         # create build directory\nccmake ..                       # configure using ccmake\ncmake --build .\n```\n\nAnd then executed (in the build directory) using `./main`.\nRun `./main -h` for a short info about the available command line options.\n\n\n## Keyboard Shortcuts\n\n### Interpolation Modifier\n\n| Shortcut      | Effect                                |\n|:-------------:|:--------------------------------------|\n| \u003ckbd\u003el\u003c/kbd\u003e  | Linear interpolation of between cells | \n| \u003ckbd\u003en\u003c/kbd\u003e  | Cell values (no interpolation)        | \n\n\n### Selection of Visualization Data\n\n| Shortcut      | Effect                           |\n|:-------------:|:---------------------------------|\n| \u003ckbd\u003e1\u003c/kbd\u003e  | Display magnitude of velocity    |\n| \u003ckbd\u003e2\u003c/kbd\u003e  | Display x-velocity (u, centered) |\n| \u003ckbd\u003e3\u003c/kbd\u003e  | Display y-velocity (v, centered) |\n| \u003ckbd\u003e4\u003c/kbd\u003e  | Display pressure                 |\n| \u003ckbd\u003e5\u003c/kbd\u003e  | Display vorticity                |\n| \u003ckbd\u003e6\u003c/kbd\u003e  | Display stream function          |\n\n\n### Selection of Intermediate Data for Visualization\n\n| Shortcut       | Effect                                                |\n|:--------------:|:------------------------------------------------------|\n| \u003ckbd\u003eF1\u003c/kbd\u003e  | Display cell x-velocity (u, non-centered)             |\n| \u003ckbd\u003eF2\u003c/kbd\u003e  | Display cell y-velocity (v, non-centered)             |\n| \u003ckbd\u003eF3\u003c/kbd\u003e  | Display preliminary cell x-velocity (f, non-centered) |\n| \u003ckbd\u003eF4\u003c/kbd\u003e  | Display preliminary cell y-velocity (g, non-centered) |\n| \u003ckbd\u003eF5\u003c/kbd\u003e  | Display right-hand-side of pressure equation          |\n| \u003ckbd\u003eF6\u003c/kbd\u003e  | Display boundary types                                |\n\n\n## Parameter Files and Geometry Files\n\nThe default parameters and geometry are left unchanged from previous exercise-sheets. \nAdditionally one can load a parameter and geometry files using\n\n```\n./path/to/build/main -p \u003cparameter-file\u003e -g \u003cgeometry-file\u003e\n```\n\nThe syntax of parameter and geometry-files is also left unchanged from the previous exercises, and can, for example, be generated by the `Magrathea` program provided to us in exercise three.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fqzed%2Fws17-numsim-final","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fqzed%2Fws17-numsim-final","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fqzed%2Fws17-numsim-final/lists"}