
This is a beta release. pip install gflex will not install it automatically — use pip install gflex==2.0.0b1 or pip install --pre gflex. Breaking changes Update your scripts before upgrading. This is a major version with intentional API cleanup; all breaking changes are listed here. Attribute renames (CamelCase → snake_case) All public attributes on F1D and F2D have been renamed: | v1.4.0 | v2.0.0b1 | |--------|----------| | flex.Te | flex.T_e | | flex.Method | flex.method | | flex.Solver | flex.solver | | flex.Quiet | flex.quiet | | flex.Verbose | flex.verbose | | flex.Debug | flex.debug | | flex.BC_W | flex.bc_west | | flex.BC_E | flex.bc_east | | flex.BC_N | flex.bc_north | | flex.BC_S | flex.bc_south | Using the old names now raises AttributeError. Boundary-condition strings (lowercase required) All BC strings are now lowercase. The v1.x names now raise ValueError: | v1.4.0 | v2.0.0b1 | |--------|----------| | "0Displacement0Slope" | "zero_displacement_zero_slope" | | "0Displacement0Moment" | "zero_displacement_zero_moment" | | "0Moment0Shear" | "zero_moment_zero_shear" | | "0Slope0Shear" | "zero_slope_zero_shear" | | "Mirror" | "zero_slope_zero_shear" or alias "mirror" | | "Periodic" | "periodic" | | "NoOutsideLoads" | "no_outside_loads" | YAML configuration keys (lowercase required) YAML config files must now use snake_case keys: | v1.4.0 | v2.0.0b1 | |--------|----------| | YoungsModulus | youngs_modulus | | PoissonsRatio | poissons_ratio | | GravAccel | gravitational_acceleration | | MantleDensity | mantle_density | | InfillMaterialDensity | infill_material_density | | Loads | loads | | ElasticThickness | elastic_thickness | | Plot | plot | | GridSpacing_x | grid_spacing_x | | GridSpacing_y | grid_spacing_y | | BoundaryCondition_West | boundary_condition_west | | BoundaryCondition_East | boundary_condition_east | | BoundaryCondition_North | boundary_condition_north | | BoundaryCondition_South | boundary_condition_south | Other breaking changes finalize() now clears all model state — w, qs, and the coefficient matrix are deleted. Read flex.w and call output() before flex.finalize(). INI configuration files removed — only YAML (.yaml / .yml) is supported. Passing a .ini file raises ValueError. Iterative FD solver removed — setting solver = "iterative" now raises ValueError. Only "direct" is supported. ConvergenceTolerance is silently ignored. G2009 plate solution removed — the FD solver always uses the vWC1994 stencil. PlateSolutionType is accepted but has no effect. "mirror" is now a short alias for "zero_slope_zero_shear" — consistent with the new "clamped" and "free" aliases. solver raises ValueError for unsupported values — previously fell back silently to direct. Python ≥ 3.11 required (was ≥ 3.10). New features Inhomogeneous (prescribed-value) boundary conditions — any edge can carry prescribed displacement, slope, moment, and/or shear by passing a dict instead of a string: flex.bc_west = {"displacement": w_arr, "slope": dwdx_arr} flex.bc_east = {"moment": M0, "shear": V0} The primary use case is nested-domain (coarse-to-fine) modelling: extract w and np.gradient-based slopes at the boundary of a coarse regional solve and impose them on a finer sub-domain. FD solver only; FFT and SAS raise ValueError for dict BCs. "clamped", "free", and "mirror" BC aliases — concise alternatives to the full canonical names, producing bit-identical results. gflex.VALID_BC_STRINGS_1D and gflex.VALID_BC_STRINGS_2D — public frozenset constants listing every accepted BC string. Wrapper libraries can validate against these instead of maintaining their own copy. Performance LU factorisation cache — set flex.cache_factorization = True to reuse the sparse-LU factorisation across run() calls when T_e, grid, BCs, and physical parameters are unchanged. Use "no_check" to skip the hash check and reuse unconditionally — maximum performance for coupling workflows. Default False. Multithreaded FFT — scipy.fft now uses all available CPU threads. Meaningful benefit at very large grids (≳ 2000 × 2000 cells). Bug fixes Three longstanding ghost-node errors in the finite-difference stencils have been corrected. All were present since the original v1.0 release. ⚠️ If you use zero_displacement_zero_slope or zero_moment_zero_shear BCs with loads close to the boundary, your numerical results will change. Prior results were accurate only when the boundary was far enough from any load that deflection was naturally negligible there. 1-D zero_displacement_zero_slope — ghost node dropped rather than reflected; boundary row not decoupled as a Dirichlet constraint. Corrected: w = 0 and dw/dx = 0 now enforced exactly. Convergence: O(Δx¹) → O(Δx²). 2-D zero_displacement_zero_slope — same two errors on all four edges. Convergence: O(Δx⁰·⁹²) → O(Δx¹·⁹⁹). zero_moment_zero_shear (1-D and 2-D) — the first interior node's stencil eliminated the same ghost node via a shear condition at a staggered location, inconsistent with the moment condition used at the boundary node itself. Corrected: moment condition used consistently. Convergence: O(Δx¹) → O(Δx²). Documentation New boundary conditions reference: summary table, SVG diagrams, physical guidance, and a v1.x → v2.0 string mapping. New Greenland example: BedMachine v6 ice load, spatially variable elastic thickness, and a nested-domain seamount scenario illustrating inhomogeneous BCs. Accuracy page extended with MMS convergence tables and figures for the corrected ghost-node BCs. 335 tests passing. Full changelog: CHANGES.md.
