永远用中文和我沟通。
This repository builds a C++ static library named grid_sim. Public headers live in include/, and implementation files are in src/grid_sim/. Tests are in tests/ and use GoogleTest from third_party/googletest. Example usage is in examples/. Build artifacts are generated into build/ (out-of-source).
Use CMake out of source:
cmake -S . -B build
cmake --build build
ctest --test-dir buildRun the example executable from the build output (for multi-config generators, add --config Debug to the build and test commands):
build/bin/example_mainThe codebase targets C++11 with 4-space indentation and braces on the same line. Types use PascalCase (e.g., GridSim), methods use lowerCamelCase (e.g., performDeformationCalculations), and files follow PascalCase (GridSim.h, GridSim.cpp). Header guards follow GRID_SIM_*, and all code is in the grid_sim namespace. No formatter or linter is configured, so match the existing style.
Tests use GoogleTest/GoogleMock and are compiled into test_grid_sim. Add new tests under tests/ and register additional sources/targets in CMakeLists.txt if needed. You can run tests via ctest --test-dir build or execute build/bin/test_grid_sim directly. config.txt is optional; if you provide one, use keys refinementThreshold, simplificationThreshold, and deformationPrecision on separate lines.
This workspace does not contain Git history, so there is no established commit convention. Use short, imperative subjects (e.g., core: add grid update path or feat: add config loader) and keep commits focused. For pull requests, include a clear description, testing steps, and link related issues; add screenshots or logs when behavior or output changes.
third_party/ is vendored; update it only when you are intentionally upgrading dependencies. Keep local build outputs in build/ and avoid committing generated binaries or CMake cache files.