Skip to content

v1.1.0

Latest

Choose a tag to compare

@github-actions github-actions released this 17 Jul 06:34

Since v1.0.1 and v1.0.2 shipped without release notes, these notes cover everything since v1.0.0.

Perhaps the biggest change is a repositioning of the package's front doors: the JuMP modeling layer is promoted to the main, high-level front end, Gmsh is promoted to the main mesh generator, and the native API is demoted to the low-level layer underneath them. The low-level API remains fully supported and documented — the API Guide is its guided tour, and this is still where the package's full breadth lives (tensor and spectral discretizations, manifolds, slit domains, parabolic problems, GPU solves, custom convex constraints). The two layers interoperate freely: mgb_solution(m) returns the same solution object the native solver produces. The documentation now reflects this — the home page builds a Gmsh mesh and solves a JuMP model on it.

JuMP modeling front end (new in v1.0.1, matured here)

State convex variational problems in JuMP syntax and solve them with the multigrid interior-point method — an auto-loading package extension (using MultiGridBarrier, JuMP), documented in the manual.

  • MGBModel(geom) is a JuMP model over a fixed discretization: @variable, @constraint, @objective, and the usual accessors work unchanged; optimize! lowers directly to amgassemblemgb_solve, with the hierarchy derived automatically from the geometry and the Dirichlet constraints. No MOI model is ever built.
  • Derivatives are deriv(u, :dx); objectives are integral(affine expr); pointwise cones are [q...; s] in EpiPower(p) (with spatially varying p allowed) or JuMP's SecondOrderCone. Variable kinds: Broken(), Continuous(), Uniform() — untagged variables infer their kind.
  • Regions: On(pairs) / On(geom, mask) restrict any constraint to a node set — equality + On is a Dirichlet condition, inequality + On a piecewise barrier. Works with FEM and spectral geometries. All spatial data is nodal vectors, with functions and constants as sugar; solutions round-trip (set_start(u, value(u))).
  • Cross-validated against the classical API: every Zoo problem rebuilt in JuMP matches the native constructors bit-for-bit.

New in v1.1.0:

  • Constraint duals. dual(cr) for every constraint type: inequality and cone duals are nodal densities (e.g. the contact pressure of an obstacle problem), Dirichlet equality duals are raw per-node reactions (discrete boundary flux; sums give total force). dual_status, has_duals, and is_solved_and_feasible(m; dual = true) work accordingly — see Duals.
  • Standard JuMP accessors: set_silent/unset_silent, solution_summary, is_solved_and_feasible/assert_is_solved_and_feasible, value on affine expressions, all_variables, start_value, has_values, and the result keyword throughout. termination_status now reports MOI.OPTIMAL on success (previously LOCALLY_SOLVED; the problems are convex), and solver failures map to honest MOI statuses (INFEASIBLE, ITERATION_LIMIT, ...) with diagnostics in raw_status.
  • Spatial data rides the expression algebra: a Function or nodal vector next to a model variable means Coef(m, data) automatically — u == g, u >= phi_vals, a * u, [w - image_vec; r] in EpiPower(2.0). Plain constants work in Dirichlet conditions (u == 0.0) and cone rows; @variable(m, u, start = f) accepts all data forms; integral is linear.
  • Two-sided constraints: @constraint(m, lo <= u <= hi) lowers to the stacked pair of inequalities.
  • Modeling guards: conflicting Dirichlet data, out-of-range On pairs, nonconvex EpiPower exponents (p < 1), Bool masks used as data, and variables outside every cone are caught at modeling time with explanatory errors instead of solver failures.

Gmsh import (new in v1.0.1)

  • gmsh_import() converts the current Gmsh model (or a .msh/.geo file) into a Geometry, and Gmsh physical groups into named node sets that plug into Dirichlet conditions and the JuMP On regions — see the Gmsh page.
  • Triangles import as P1/P2; quadrilaterals and hexahedra at any order, straight or curved (with the 3D high-order face gluing completed in the tensor elements to support it).
  • New in v1.1.0: topology-preserving subdivide of imported meshes, exact node-tag connectivity (slit/branch-cut domains survive import), and input validation.

Embedded manifolds (new in v1.0.1)

  • Curves in R^2/R^3 and surfaces in R^3: variational problems on embedded geometries.

Python is now optional (v1.0.2)

  • Plotting (PyPlot/matplotlib, PyVista in 3d) and amg_pyamg moved to auto-loading package extensions; the core package no longer depends on Python.
  • Note: the parent package no longer re-exports plot/savefig — load PyPlot to plot (using PyPlot extends PyPlot.plot to every solution and geometry type).

Elements and solver (v1.1.0)

  • Pure Lagrange P2 elements: fem2d_P2(bubble = false) with :broken_P1 slacks, and a new barrier_nodes constraint-collocation keyword that restores the optimal convergence rates for them.
  • Feasibility phase redesigned: box barrier with automatic bound escalation and infeasibility certification (surfacing as MOI.INFEASIBLE through JuMP).
  • Honest failure reporting: MGBConvergenceFailure carries machine-readable codes; Newton reports indefinite Hessians instead of stalling silently.

CUDA (v1.1.0)

  • One variadic GPU kernel for barrier evaluation (unboxed closures), and stream-, device- and exception-safe cuDSS management.

Behavior changes

  • Console silence (v1.1.0): the package writes nothing to stdout/stderr except the opt-in progress bar; all diagnostics go to the solve log (sol.log, solver_log(m)).
  • plot/savefig no longer re-exported (v1.0.2, see above).
  • JuMP termination_status now MOI.OPTIMAL on success (v1.1.0, see above).

Diffs: v1.0.0...v1.0.1 · v1.0.1...v1.0.2 · v1.0.2...v1.1.0