gma.py¶
GeometricMechanicsAnalysis
dataclass
¶
GeometricMechanicsAnalysis(model: Isotropic | Step | ExponentialActivation)
Analysis of geomorphic Hamiltonian using geometric mechanics.
Parameters¶
model: Isotropic | Step| ExponentialActivation Surface-normal erosion function model.
Attributes¶
β_mpx: float | None = None Surface slope angle at maximum px.
float | None = None
Ray angle at maximum px.
float | None = None
Surface slope at first critical ray angle.
float | None = None
Surface slope at second critical ray angle.
float | None = None
First critical ray angle.
float | None = None
Second critical ray angle.
float | None = None
Lower ramp-slope angle.
float | None = None
Upper ramp-slope angle.
float | None = None
Angle of ray for lower ramp.
float | None = None
Angle of ray for upper ramp.
Performs a suite of analyses, generating a lot of new attributes containing the output.
-
Python package
- visualization
- levelset
Methods:
-
Hamiltonian–Compute Hamiltonian values H(px,pz) anywhere (not just for H=½, obvs).
-
build_H_interpolation–Generate a 2D spline interpolant for off-shell Hamiltonian grid.
-
build_dHdp_interpolation–Build interpolating functions and grids for dHdpx, dHdpz.
-
build_gstar_interpolation–Generate an interpolating function for the det Hessian of H.
-
compute_H_det_Hessian–Compute determinant of Hessian of H.
-
compute_dHdp–Compute gradient of H.
-
construct_detgstar_curve–Generate a spline-interpolation fn for |g*(β)| for on-shell px, pz.
-
construct_α_curve–Generate several grids and spline interpolation fns.
-
find_detgstar_zeros–Find critical angles.
-
p_dot_v–Compute inner product p(v).
-
px_onshell–Use speed function to compute slowness component px from β.
-
pz_onshell–Use speed function to compute slowness component pz from β.
Source code in erosionfront/geomorphic/gma.py
Hamiltonian
¶
Compute Hamiltonian values H(px,pz) anywhere (not just for H=½, obvs).
Parameters¶
px: float | NDArray x component(s) of p covector
float | NDArray
z component(s) of p covector
Attributes¶
Uses ξ_fn_β function attribute.
Returns¶
float | NDArray: Value(s) of H 'off-shell' or on.
Source code in erosionfront/geomorphic/gma.py
build_H_interpolation
¶
Generate a 2D spline interpolant for off-shell Hamiltonian grid.
Attributes¶
Uses px_onshell, pz_onshell, Hamiltonian. Modifies many.
Source code in erosionfront/geomorphic/gma.py
build_dHdp_interpolation
¶
Build interpolating functions and grids for dHdpx, dHdpz.
Attributes¶
Uses pxz_points, pxz_points, dHdpx, dHdpz, px_pz_interp_grid_pts, n_grid_px_pts, n_grid_pz_pts.
Modifies dHdpx_interpfn, dHdpz_interpfn, dHdpx_interp_grid, dHdpx_interp_grid.
Source code in erosionfront/geomorphic/gma.py
build_gstar_interpolation
¶
Generate an interpolating function for the det Hessian of H.
Attributes¶
Uses pxz_points, px_pz_interp_grid_pts, n_grid_px_pts, n_grid_pz_pts. Modifies det_gstar_interpfn, det_gstar_interp_grid.
Source code in erosionfront/geomorphic/gma.py
compute_H_det_Hessian
¶
Compute determinant of Hessian of H.
Attributes¶
Uses dHdpx, dHdpx. Modifies det_gstar_grid.
Source code in erosionfront/geomorphic/gma.py
compute_dHdp
¶
Compute gradient of H.
Attributes¶
Uses H_grid, Δpx, Δpz. Modifies dHdpx, dHdpz.
Source code in erosionfront/geomorphic/gma.py
construct_detgstar_curve
¶
Generate a spline-interpolation fn for |g*(β)| for on-shell px, pz.
Attributes¶
Uses px, pz, β, det_gstar_interpfn, modifies det_gstar_onshell, det_gstar_onshell_interpfn.
Source code in erosionfront/geomorphic/gma.py
construct_α_curve
¶
Generate several grids and spline interpolation fns.
Make grids for onshell dHdpx, dHdpz. Build spline interpolation fns for on-shell dHdpx, dHdpz. ray angle α.
Attributes¶
Uses px, pz, β, dHdpx_interpfn, dHdpz_interpfn.
Modifies dHdpx_onshell, dHdpz_onshell, dHdpx_onshell_interpfn, dHdpz_onshell_interpfn, α_onshell_interpfn.
Source code in erosionfront/geomorphic/gma.py
find_detgstar_zeros
¶
Find critical angles.
Attributes¶
Uses several, modifies several.
Source code in erosionfront/geomorphic/gma.py
381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 | |
p_dot_v
¶
Compute inner product p(v).
Attributes¶
dHdpx_onshell: NDArray px component of H gradient = vx
NDArray
pz component of H gradient = vz
NDArray
x components of p covector array
NDArray
z components of p covector array
Returns¶
NDArray: Inner product p(v), which should all be ones.
Source code in erosionfront/geomorphic/gma.py
px_onshell
¶
Use speed function to compute slowness component px from β.
The suffix 'on-shell' emphasizes that this computation only works for px/pz/β values where H(px,pz)=½.
Parameters¶
β: float | NDArray Surface slope angle(s).
Attributes¶
Uses ξ_fn_β function attribute.
Returns¶
float | NDArray: Value(s) of slowness component px.
Source code in erosionfront/geomorphic/gma.py
pz_onshell
¶
Use speed function to compute slowness component pz from β.
The suffix 'on-shell' emphasizes that this computation only works for px/pz/β values where H(px,pz)=½.
Parameters¶
β: float | NDArray Surface slope angle(s).
Attributes¶
Uses ξ_fn_β function attribute.
Returns¶
float | NDArray: Value(s) of slowness component pz.