A suite of tools for representing and solving electromagnetic simulation problems.
A number of fixes were needed to make >1D work in practice. - We had to change purity/impurity evaluation to take one `xyz[i]` column vector at a time, since we cannot (yet?) vectorize such an evaluation over each column of the matrix `xyz`. - The same goes for the SDF; each `xyz[i]` column vector becomes a scalar, which are collected into a new column vector. - We emphasized naming of "bounded field", since `mnp` can only be used with the "unbounded field" (which pre-slices away ghost cells). - A VERY unfortunate bug was fixed in the row-matrix constructor, which always set `cols: 1`. - Curl math and rewrites were fixed and validated by hand. - In the source rewrite math, the largest `dxyz` is now used, instead of letting it create a non-uniform nD Gaussian. - For deducing `xyz` in `DIMS<FLDIMS` situations, `dxyz[i]` defaults to `0` when `i>=DIMS`, since this causes the "extra" `xyz` values to always also be zero (as they should). This is of course not the right decision when ex. choosing `dxyz[i]` defaults for curl, as there the default doesn't matter at all, so long as it is _not_ zero (as that would cause 0/0 -> NaN!). |
||
|---|---|---|
| pkgs | ||
| .editorconfig | ||
| .gitignore | ||
| .licensesnip | ||
| .pre-commit-config.yaml | ||
| .tombi.toml | ||
| Cargo.lock | ||
| Cargo.toml | ||
| cog.toml | ||
| LICENSE | ||
| README.md | ||
| rustfmt.toml | ||
hopsim
A suite of tools for representing and solving electromagnetic simulation problems.
Policies
Developer Tooling
-
Testing (
cargo test): Run the test suite for the entire workspace.- Usage: Run
cargo test.
- Usage: Run
-
Micro-Benchmarking (
criterion): Microbenchmarking to track performance changes over time.- Usage: Run
cargo bench(criterionis an internal library).
- Usage: Run
-
License Headers (
licensesnip): Add license headers to all source files.- Installation:
cargo install licensesnip. - Usage: Use
licensesnipto add headers. Uselicensesnip removeto remove headers. - Alternative: Manually add license headers (
prekchecks this).
- Installation:
-
Pre-Commit Checks (
prek): Simple checks run before every commit.- Installation:
cargo install --locked prek. - Usage: Use
prek installto install hooks, runningprekbefore every commit in this localgitrepo (undo w/prek uninstall). - Alternative: Manually enforce all rules in
.pre-commit-config.yml(CI will runprek)
- Installation:
-
Commit Message Hygiene (
cocogitto): Enforce conventional commits, automatic versioning, and changelog management.- Installation:
cargo install cocogitto - Usage: Use
cog commitinstead ofgit commit. - Alternative: Manually write messages w/conventional commits syntax (
prekchecks this).
- Installation:
-
CI (not yet implemented): Enforces all of the above
Commit-Message Policy
The following types must be represented in cog.toml and .pre-commit-config.yaml:
- Standard:
fix,feat,refactor,perf,ux,revert. - Auxiliary:
deps,docs,test,lang. - DX:
style,build,tool,ci. - Workflow:
hotfix,dump,wip,experiment,chore. - Purpose:
init,merge.
The following scopes must be represented in .pre-commit-config.yaml:
- Interfaces:
cli. - Support:
emsim,miniexpr,minigrid,minicoord,libhopsim. - Methods:
hopsim-solver,fdtd. - Solvers:
fdtd-cpu,fdtd-cuda,fdtd-naive. - Sim Data:
simdata-hdf5.