Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,14 @@ breaking changes to the API or the command-line interface; patch releases
with cells `(w/2)·scale_factor^min(|tan θ|, |cot θ|)`, and a
line-numbered warning that this approximates FastHenry's staircase
refinement. Native mode still rejects it.
- Deck reader: a fractional `.freq ndec` (issue #154), as the User's Guide
documents, in every mode: any `ndec > 0` samples `fmin · 10^(k/ndec)`, so
`fmin=1e3 fmax=1e7 ndec=0.5` solves 1e3, 1e5 and 1e7 Hz. Previously any
non-integer `ndec` was rejected. `--freq` accepts a fractional `NDEC` too.
A negative `ndec` stays a line-numbered error everywhere. Under
`--fasthenry-compat`, a point is kept while it is ≤ 1.001 · `fmax`, and
`ndec=0` (read as 0.01), an omitted `ndec` (read as 1) and `fmin > fmax`
(an empty sweep) are line-numbered warnings instead of errors.
- Deck reader: `relx=` / `rely=` / `relz=` on a corner-point `G` statement
(issue #146), the documented offset (User's Guide §1.3.9), in every mode.
It is added to every node-reference, hole and contact coordinate on the
Expand Down
10 changes: 8 additions & 2 deletions docs/fasthenry-compat.md
Original file line number Diff line number Diff line change
Expand Up @@ -82,8 +82,14 @@ Status key:

| Field | Status | Notes |
|---|---|---|
| `.freq fmin= fmax= ndec=` | Supported | Log-spaced decade sweep, `ndec` points per decade; see `frequency_sweep` and the module's `# Semantics` section for the exact formula. |
| `fmin = fmax` | Supported | The single-frequency case, at any `ndec`. |
| `.freq fmin= fmax= ndec=` | Supported | Log-spaced decade sweep, `ndec` points per decade: `fmin · 10^(k/ndec)` for `k = 0, 1, …` while `k/ndec ≤ log10(fmax/fmin)`; see `frequency_sweep` and the module's `# Semantics` section. The last point is the stepped value, never clamped to `fmax`; where `k/ndec` is a whole number the point is exactly `fmin · 10^q`. `--freq` uses the same rule. |
| Fractional `ndec` (`ndec=0.5`, `ndec=2.5`) | Supported | Issue #154. The User's Guide says `ndec` need not be an integer, and every mode accepts any `ndec > 0`: `fmin=1e3 fmax=1e7 ndec=0.5` solves 1e3, 1e5, 1e7 Hz; `ndec=0.3` solves 1e3 and 2.15443e6 Hz; `ndec=0.2` solves 1e3 Hz alone. `inp.rs`'s `fractional_ndec_reproduces_the_measured_table` pins the measured table in both modes. |
| `ndec < 0` | Error | A line-numbered error in every mode (FastHenry never terminates on one). |
| `ndec = 0` | Error, warns under `--fasthenry-compat` | Native: a line-numbered error. Compat: reads as `ndec=0.01`, as FastHenry does, with a warning on the `.freq` line. |
| `ndec` omitted | Error, warns under `--fasthenry-compat` | Native: a line-numbered error. Compat: reads as `ndec=1`, with a warning on the `.freq` line. |
| Points just above `fmax` | Supported, differs | Native keeps a point only when it is ≤ `fmax` (up to rounding). FastHenry keeps it while ≤ 1.001 · `fmax`, so `fmin=1 fmax=9.995 ndec=1` solves 1 and 10 Hz there and 1 Hz here; `--fasthenry-compat` uses FastHenry's 0.1% slack. |
| `fmin > fmax` | Error, warns under `--fasthenry-compat` | Native: a line-numbered error. Compat: FastHenry's empty sweep (or `fmin` alone when it is within the 0.1% slack of `fmax`), with a warning on the `.freq` line; an empty sweep leaves nothing to solve unless `--freq` overrides it. |
| `fmin = fmax` | Supported | The single-frequency case, at any `ndec > 0`. |
| `fmin = 0` | Supported, differs | Allowed only when `fmin = fmax` (the DC solve) — `log10(0)` is undefined, so a genuine log sweep starting at zero has no well-defined first point. Rejected with a line-numbered error rather than silently starting somewhere else. |

## `.equiv`
Expand Down
2 changes: 1 addition & 1 deletion fasterhenry-cli/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ Arguments:

Options:
--freq <FMIN_HZ> <FMAX_HZ> <NDEC>
Override the deck's sweep: min Hz, max Hz, points per decade (decade-sampled, log-spaced; FMIN == FMAX runs one frequency)
Override the deck's sweep: min Hz, max Hz, points per decade (decade-sampled, log-spaced; NDEC may be fractional but must be > 0; FMIN == FMAX runs one frequency)

--json <OUT_JSON>
Write the JSON result to this file instead of stdout
Expand Down
3 changes: 2 additions & 1 deletion fasterhenry-cli/src/cli.rs
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,8 @@ pub struct RunArgs {
/// extension).
pub input: PathBuf,
/// Override the deck's sweep: min Hz, max Hz, points per decade
/// (decade-sampled, log-spaced; FMIN == FMAX runs one frequency).
/// (decade-sampled, log-spaced; NDEC may be fractional but must be > 0;
/// FMIN == FMAX runs one frequency).
#[arg(
long,
value_names = ["FMIN_HZ", "FMAX_HZ", "NDEC"],
Expand Down
Loading
Loading