[GRASS-git] [OSGeo/grass-addons] 76a37e: v.flexure: update for gFlex v2.0.0; redesign inter...
Andy Wickert
noreply at github.com
Wed Jun 10 06:28:39 PDT 2026
Branch: refs/heads/grass8
Home: https://github.com/OSGeo/grass-addons
Commit: 76a37e7eb9250b4f18b7953c723372a635d5308c
https://github.com/OSGeo/grass-addons/commit/76a37e7eb9250b4f18b7953c723372a635d5308c
Author: Andy Wickert <andy at northernwidget.com>
Date: 2026-06-10 (Wed, 10 Jun 2026)
Changed paths:
A src/vector/v.flexure/testsuite/test_v_flexure.py
M src/vector/v.flexure/v.flexure.html
M src/vector/v.flexure/v.flexure.md
M src/vector/v.flexure/v.flexure.py
Log Message:
-----------
v.flexure: update for gFlex v2.0.0; redesign interface; add testsuite (#1745)
* v.flexure: update for gFlex v2.0.0; redesign interface; add testsuite
Full update to be compatible with gFlex >= 2.0.0:
- Rename API attributes to snake_case (Te→T_e, Method→method, etc.)
- Fix PlanetaryRadius → planetary_radius
- Read flex.w before finalize() (v2 deletes it on finalize)
- Replace grass.pygrass.vector with grass.script module calls
- Redesign output interface: raster output is now primary (required);
optional w_points/w_column for deflection at arbitrary vector points,
evaluated in the same gFlex solve at no extra cost
- Default te_units to km (optional, matches r.flexure)
- Suppress cmcrameri import warning; map GRASS verbosity to gFlex logging
- Update HTML docs with new interface description and EXAMPLES section
- Add gunittest testsuite
Co-Authored-By: Claude Sonnet 4.6 <noreply at anthropic.com>
* v.flexure tests: add linearity, unit-equivalence, stiffer-Te, and forebulge tests
New TestVFlexure methods:
- test_te_km_units (already existed; now joined by four new tests)
- test_te_units_default_km: omitting te_units must match explicit km
- test_linearity: 2× load force → 2× peak deflection (elastic plate is linear)
- test_stiffer_te_less_deflection: Te=20 km deflects less than Te=5 km
New TestVFlexureForebulge class:
- 600×600 km domain at 10 km resolution captures the forebulge ring
(α≈52 km for Te=10 km; forebulge peaks at ~4.87α≈253 km from load)
- test_forebulge_present: max deflection must be positive (upward) on this domain
Co-Authored-By: Claude Sonnet 4.6 <noreply at anthropic.com>
* v.flexure tests: add load-point minimum check and rho_fill coverage
test_w_points_output: assert that the deflection at the load location
(500, 500, cat=2) is the most negative of the three sampled points —
tighter than the existing "at least one negative value" check.
test_custom_material_params: add rho_fill="500" so the fill-density
code path is exercised alongside ym and rho_m.
Co-Authored-By: Claude Sonnet 4.6 <noreply at anthropic.com>
* v.flexure docs: RTD link, version requirement, rewritten NOTES, drop van Wees
- Link to https://gflex.readthedocs.io/ as primary gFlex documentation
- Add gFlex >= 2.0.0 pip-install requirement block
- Rewrite NOTES: clarify SAS_NG method, w_points, lat/lon behaviour;
drop outdated CSDMS blurb and raster_output reference
- Drop van Wees (1994) reference — relevant only to the FD solver
that v.flexure does not use
Co-Authored-By: Claude Sonnet 4.6 <noreply at anthropic.com>
* v.flexure: rename grass.script alias grass→gs (ICN001)
Rename `import grass.script as grass` to `import grass.script as gs`
and update all call sites — required by the grass-addons ruff linter
(ICN001).
Co-Authored-By: Claude Sonnet 4.6 <noreply at anthropic.com>
* v.flexure tests: rename grass.script alias grass→gs (ICN001)
Co-Authored-By: Claude Sonnet 4.6 <noreply at anthropic.com>
* v.flexure docs: regenerate v.flexure.md from updated HTML
Brings the Markdown copy in sync with the rewritten HTML: RTD link,
gFlex >= 2.0.0 requirement, revised NOTES, updated EXAMPLES, corrected
2016 GMD reference, van Wees removed.
Co-Authored-By: Claude Sonnet 4.6 <noreply at anthropic.com>
* v.flexure tests: replace try/finally with addCleanup (PLW0717)
Co-Authored-By: Claude Sonnet 4.6 <noreply at anthropic.com>
* v.flexure: apply ruff format (style only)
Co-Authored-By: Claude Sonnet 4.6 <noreply at anthropic.com>
* v.flexure docs: rewrite .md with 80-char wrap and fenced code blocks (MD013, MD033)
Co-Authored-By: Claude Sonnet 4.6 <noreply at anthropic.com>
* v.flexure tests: add error/validation test classes
TestVFlexureParserErrors: assertModuleFail on bad te_units value ("feet"),
caught by the GRASS option parser before main() runs — no gFlex required.
TestVFlexureInputErrors: assertModuleFail on missing column name, caught by
the gs.fatal() check in main() after attribute lookup — requires gFlex.
Co-Authored-By: Claude Sonnet 4.6 <noreply at anthropic.com>
---------
Co-authored-by: Claude Sonnet 4.6 <noreply at anthropic.com>
To unsubscribe from these emails, change your notification settings at https://github.com/OSGeo/grass-addons/settings/notifications
More information about the grass-commit
mailing list