{"id":46592995,"url":"https://github.com/samsilverman/rwmicro","last_synced_at":"2026-03-07T14:02:08.038Z","repository":{"id":336319002,"uuid":"1132263770","full_name":"samsilverman/rwmicro","owner":"samsilverman","description":"rwmicro is a lightweight C++ library for generating random-walk microstructures—binary patterns created by a periodic random walk.","archived":false,"fork":false,"pushed_at":"2026-02-03T20:48:27.000Z","size":74,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-02-04T09:36:30.518Z","etag":null,"topics":["computational-mechanics","cpp","generative-design","materials-science","metamaterials","microstructure","monte-carlo","procedural-generation","random-walk","stochastic"],"latest_commit_sha":null,"homepage":"","language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/samsilverman.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":"CITATION.bib","codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-01-11T16:31:13.000Z","updated_at":"2026-02-03T20:48:31.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/samsilverman/rwmicro","commit_stats":null,"previous_names":["samsilverman/rwmicro"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/samsilverman/rwmicro","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/samsilverman%2Frwmicro","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/samsilverman%2Frwmicro/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/samsilverman%2Frwmicro/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/samsilverman%2Frwmicro/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/samsilverman","download_url":"https://codeload.github.com/samsilverman/rwmicro/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/samsilverman%2Frwmicro/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30216493,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-07T13:35:13.914Z","status":"ssl_error","status_checked_at":"2026-03-07T13:35:13.569Z","response_time":53,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["computational-mechanics","cpp","generative-design","materials-science","metamaterials","microstructure","monte-carlo","procedural-generation","random-walk","stochastic"],"created_at":"2026-03-07T14:02:07.379Z","updated_at":"2026-03-07T14:02:08.034Z","avatar_url":"https://github.com/samsilverman.png","language":"C++","readme":"# rwmicro\n\n[![Report a Bug](https://img.shields.io/static/v1.svg?label=🐛\u0026message=Report%20a%20Bug\u0026color=red)](https://github.com/samsilverman/rwmicro/issues)\n[![Request a Feature](https://img.shields.io/static/v1.svg?label=💡\u0026message=Request%20a%20Feature\u0026color=yellow)](https://github.com/samsilverman/rwmicro/issues)\n[![Read the Paper](https://img.shields.io/static/v1.svg?label=DOI\u0026message=10.1145/3745778.3766645\u0026color=blue)](https://doi.org/10.1145/3745778.3766645)\n\n[![MacOS Build Status](https://github.com/samsilverman/rwmicro/actions/workflows/macos-build.yml/badge.svg)](https://github.com/samsilverman/rwmicro/actions/workflows/macos-build.yml)\n[![Ubuntu Build Status](https://github.com/samsilverman/rwmicro/actions/workflows/ubuntu-build.yml/badge.svg)](https://github.com/samsilverman/rwmicro/actions/workflows/ubuntu-build.yml)\n[![Windows Build Status](https://github.com/samsilverman/rwmicro/actions/workflows/windows-build.yml/badge.svg)](https://github.com/samsilverman/rwmicro/actions/workflows/windows-build.yml)\n\n![Teaser](https://github.com/samsilverman/rwmicro/blob/main/assets/images/teaser.svg)\n\n`rwmicro` is a lightweight C++ library for generating *random-walk microstructures*—binary patterns created by a periodic random walk.\n\nRandom walk microstructures produce expressive, diverse, and always-connected material layouts that are ideal for metamaterial design and learning structure–property relationships. This library is used in our paper:\n\n   \u003eSamuel Silverman, Dylan Balter, Keith A. Brown, Emily Whiting  \n   [*Random-Walk Microstructures for Differentiable Topology Optimization*](https://sam-silverman.com/assets/pdf/Silverman-RandomWalkMicrostructures.pdf)  \n   Proceedings of the  ACM Symposium on Computational Fabrication (2025)\n\n## Dependencies\n\n- **C++17 or later**\n- **Catch2 v3** (optional, for testing)\n- **OpenMP** (optional, for example applications)\n\n## Building\n\n```bash\ngit clone https://github.com/samsilverman/rwmicro.git\ncd rwmicro\nmkdir build \u0026\u0026 cd build\ncmake ..\nmake -j8\n```\n\nThe recommended way to use `rwmicro` is to vendor it directly (e.g., as a git submodule) and add it to your build with:\n\n```cmake\nadd_subdirectory(\"path/to/rwmicro\")\ntarget_link_libraries(your_target PRIVATE rwmicro)\n```\n\n### Library Compile Flags\n\n| CMake Flag | Default | Description |\n| - | - | - |\n| `RWMICRO_BUILD_TESTS` | `OFF` | Build test suite. |\n| `RWMICRO_BUILD_APPS` | `OFF` | Build command-line applications. |\n| `RWMICRO_USE_OPENMP` | `OFF` | Enable OpenMP parallelism in command-line applications. |\n\nThese flags are set in the cmake line:\n\n```bash\ncmake .. -DRWMICRO_BUILD_APPS=ON ...\n```\n\nFor convenience, a `build.sh` script is included for building with compile flags:\n\n```bash\n./build.sh\n```\n\n## Minimal Example\n\n```cpp\n#include \u003ccstddef\u003e\n#include \u003ciostream\u003e\n#include \u003crwmicro/rwmicro.hpp\u003e\n\nint main() {\n    const std::size_t nx = 5;\n    const std::size_t ny = 5;\n    const std::size_t targetMass = 15;\n\n    rwmicro::Grid grid(nx, ny);\n    rwmicro::grow(grid, targetMass);\n    const bool valid = rwmicro::validate(grid);\n\n    std::cout \u003c\u003c \"Microstructure:\\n\" \u003c\u003c grid \u003c\u003c std::endl;\n    std::cout \u003c\u003c \"Valid: \" \u003c\u003c valid \u003c\u003c std::endl;\n\n    rwmicro::save(grid, \"microstructure.csv\");\n\n    return 0;\n}\n```\n\n## Documentation\n\nDocumentation for all functions is provided through Doxygen-style docstrings. [Command-line tools](https://github.com/samsilverman/rwmicro/blob/main/apps/README.md) in `apps/` demonstrate complete example workflows.\n\n## Applications\n\nBuild and run the provided command-line tools:\n\n```bash\nmkdir build \u0026\u0026 cd build\ncmake -DRWMICRO_BUILD_APPS=ON ..\nmake -j8\n./apps/\u003capp_name\u003e\n```\n\nSee the apps [README](https://github.com/samsilverman/rwmicro/blob/main/apps/README.md) for more details.\n\n## Tests\n\nBuild and run the test suite:\n\n```bash\nmkdir build \u0026\u0026 cd build\ncmake -DRWMICRO_BUILD_TESTS=ON ..\nmake -j8\n./tests/rwmicro_tests\n```\n\n## Contributing\n\nContribution guidelines are provided in [CONTRIBUTING.md](https://github.com/samsilverman/rwmicro/blob/main/CONTRIBUTING.md).\n\n## Maintainers\n\n- [Sam Silverman](https://github.com/samsilverman/) - [sssilver@bu.edu](mailto:sssilver@bu.edu)\n\n## Citation\n\n```bibtex\n@inproceedings{Silverman:2025:RandomWalkMicrostructures,\nauthor = {Silverman, Samuel and Balter, Dylan and Brown, Keith A. and Whiting, Emily},\ntitle = {Random-Walk Microstructures for Differentiable Topology Optimization},\nyear = {2025},\nisbn = {9798400720345},\npublisher = {Association for Computing Machinery},\naddress = {New York, NY, USA},\nurl = {https://doi.org/10.1145/3745778.3766645},\ndoi = {10.1145/3745778.3766645},\nbooktitle = {Proceedings of the ACM Symposium on Computational Fabrication},\narticleno = {25},\nnumpages = {11},\nkeywords = {microstructures, random walks, inverse design, neural networks, homogenization},\nlocation = {},\nseries = {SCF '25}\n}\n```\n\n## License\n\nReleased under the [MIT License](https://github.com/samsilverman/rwmicro/blob/main/LICENSE).\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsamsilverman%2Frwmicro","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsamsilverman%2Frwmicro","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsamsilverman%2Frwmicro/lists"}