Skip to content

v2.3.0

Latest

Choose a tag to compare

@ktangsali ktangsali released this 21 Nov 02:46
84ffe10

PhysicsNeMo General Release v2.3.0

Added

  • Unified external aero recipe: adds AB-UPT surface, volume, and joint
    configurations calling the library model directly, configurable independent
    point-set sampling in DomainMeshReader, and grouped tensor outputs for
    unequal surface/volume point counts.

  • The unified external aerodynamics recipe adds experimental SMART surface and volume templates.

  • The unified external aerodynamics recipe adds experimental ISLA configs on
    DrivAerML (isla_surface, isla_volume and isla_volume_joint) and a
    scheduler config group. Each ISLA config reads the whole flow-domain
    boundary and fits one 80 GB GPU at its defaults.

  • Adds the FlipBoundaryOrientation and BoundaryCellsToPoints mesh
    transforms to physicsnemo.datapipes. The first reverses the cell winding
    and stored normals of named boundaries, and the second adds a point-cloud
    boundary at drawn cells of another boundary, with those cells' fields and
    measures.

  • Adds physicsnemo.experimental.models.ab_upt.ABUPT, an independent
    implementation with interacting surface/volume anchors, reusable query
    contexts, input scaling and chunked forward decoding, and a finite-difference
    vorticity helper that undoes coordinate and velocity scaling.

  • physicsnemo.mesh.sampling.sample_cells_systematic draws a fixed number of
    a mesh's cells with probability proportional to their measure, with
    Horvitz-Thompson weights for unbiased sums. The sample is spread over the
    mesh, the same in every pose, bitwise the same from run to run on CPU and
    on CUDA, and compiles to one graph.

  • KNNScorer and DensityScorer provide reusable out-of-distribution (OOD)
    scoring under experimental.uq.ood, with optional geometry descriptors.
    The examples keep scoring decisions in the application. Both scorers support
    weights-only tensor persistence. The k-nearest neighbors (kNN) scorer uses
    bounded distance blocks and leave-one-out reference scoring. The density
    scorer supports held-out calibration.

  • Mean and Variance now support opt-in tensor-aware streaming with detached
    state, state combination, and ShardTensor reductions over declared
    observation axes.
    Existing metric constructors retain their behavior. Public TensorAccumulator
    and StatisticRule support custom statistics through summarize, merge, and
    result hooks, with built-in MeanRule and VarianceRule. SumReduction
    defines the type of the completed-reduction callback, including its keepdim
    argument. Fresh summaries transfer ownership to the accumulator. Variance
    merging reuses scratch storage while preserving both input states and rollback
    after failed updates. The examples cover weighted means, Gaussian process (GP)
    mixtures, Concrete Dropout, observables, and conformal calibration.

  • Groups experimental scalar and field GP heads under experimental.uq.gp.
    Both this namespace and experimental.uq expose the heads without gpytorch;
    constructing a head raises an installation error if it is missing.

  • Adds GeoTransolver.forward_with_geometry_features for predictions and detached
    geometry tokens in one pass, preserving the existing forward API.

  • Strata depthwise conditioning convolutions automatically size vmap chunks
    to the 32-bit indexing limit via DepthwiseConv(chunk_size="auto").

  • MeshDataset(cache_host=True) reads each sample once and serves repeats from
    memory, for fitting runs on a few samples. DomainMeshReader gains
    interior_n_points_range to draw the interior point count for each sample,
    and CenterMesh gains store_center_as to keep the subtracted center in
    global_data.

  • Adds a Rotor37 compressor blade example with GeoTransolver
    (examples/cfd/rotor37_geotransolver)

  • Adds an experimental, independently implemented SMART operator with sampled
    geometry encoding, reusable latent contexts, and chunked field decoding.

  • Adds physicsnemo.experimental.uq.conformal: post-hoc conformal prediction
    for spatio-temporal fields with PointwiseCalibrator,
    FunctionalBandCalibrator, RiskControlCalibrator, ConformalPredictor,
    CoverageAccumulator, AbsoluteErrorScore, NormalizedErrorScore,
    QuantileRegressionScore, and AuxScale. Custom scores subclass
    NonconformityScore and register with register_score; check_score
    tests them.

  • Adds physicsnemo.experimental.nn.shell_contact: shell contact as pure
    functions over tensors (node-to-facet pair search with a Warp BVH broad
    phase and fused Warp narrow phase, crossing-aware signed gaps, edge
    features and tapers, penetration depths and rigid-wall clamp), and
    physicsnemo.experimental.nn.geodesic_knn (k-nearest neighbourhoods of a
    mesh along its edges; Euclidean ones use physicsnemo.nn.functional.knn).

  • Adds physicsnemo.experimental.models.deformer: the DeFormer
    network (a GeoTransolver/FLARE backbone with static kNN-attention
    stages and a fused kernel) and its contact-aware corrector (message passing
    on the structural edges and on the contact edges discovered on a predicted
    shape).

  • Adds the DeFormer crash surrogate to examples/structural_mechanics/crash:
    the time-conditional network and corrector wrappers, the three full-vehicle Yaris
    recipes (px_yaris_deformer, px_yaris_deformer_corrector,
    px_yaris_geotransolver), the body-in-white recipe biw_yaris_deformer
    and target-relative penetration metrics.

  • Adds standalone FLARE++ attention and model APIs, with input-conditioned
    dynamic routing, plus a GALE_FPP backend for using the same mixer inside
    GeoTransolver.

  • Adds physicsnemo.datapipes.keys and routes every config-driven field name
    in physicsnemo.datapipes through it, so a "." in a YAML field name
    ("solution.pressure") addresses a leaf inside a nested TensorDict.
    Nested Mesh data no longer needs to be flattened before use.

  • DistributedManager.initialize(timeout=...) accepts numeric seconds or a
    timedelta for the default process-group timeout. Explicit values override
    PHYSICSNEMO_DIST_TIMEOUT_S; unset or empty configuration keeps PyTorch's
    backend default. Invalid timeouts are rejected before initialization state
    changes, allowing corrected configuration to be retried.

  • MeshToDomainMesh in cell_centroids mode records each source cell's
    complete effective measure on the interior under the mesh-owned
    _effective_measure point-data key, so
    integrals and weighted losses over the query points remain possible after
    the cells are gone.

  • Unified external aero recipe: a sample can carry several prediction point
    sets with their own targets (target_sources), so branch models
    (output_groups) and single-decoder models (output_sets) can train on
    volume and surface points jointly; model configs can add such a set to any
    dataset with extra_task.

  • Unified external aero recipe: NonDimensionalizeByMetadata gains
    scale_geometry so chained instances scale the geometry once; inference
    re-dimensionalizes with the field maps of every instance.

  • Extends the diffusion module to support flow matching. The new API
    surface covers three pieces:

    • New losses in physicsnemo.diffusion.metrics.losses train against a
      flow/velocity target: FlowMatchingLoss, plus WeightedFlowMatchingLoss
      for an element-wise weight such as a binary mask. Their
      MultiDiffusionFlowMatchingLoss and
      MultiDiffusionWeightedFlowMatchingLoss counterparts provide patch-based
      flow-matching training on large spatial domains. MultiDiffusionModel2D
      and MultiDiffusionPredictor support both patch-based diffusion and flow
      matching during training and inference.
    • A dedicated RectifiedFlowNoiseScheduler in
      physicsnemo.diffusion.noise_schedulers provides a rectified-flow
      schedule.
    • Module-wide support for flow predictors, enabled by new conversion
      functions in LinearGaussianNoiseScheduler (x0_to_flow / flow_to_x0
      / score_to_flow / flow_to_score) and the corresponding conversion
      callbacks everywhere conversions between prediction types are necessary.
  • Adds physicsnemo.experimental.models.isla.ISLA (Invariant Slice Attention),
    an experimental mesh-native surrogate for steady boundary-value problems that
    takes the boundary as named meshes, and case_scales, which gives other
    models ISLA's length and field scales. ISLA's outputs follow rotations,
    reflections and translations of the problem exactly, up to roundoff, except
    on some symmetric or nearly symmetric boundaries described on its
    documentation page.

  • physicsnemo.mesh.spatial exports canonical_frame, the principal-axis frame
    that a weighted point set carries with it, and frame_coordinates, the
    points' coordinates in that frame.

  • ClusterTree.find_point_interaction_pairs takes targets of shape (R, M, D)
    with root_rows, the row each root's tree reads, so one call walks a forest
    whose trees each use their own coordinates.

  • Adds ExponentialEulerSolver, EDMStochasticExponentialEulerSolver,
    DPMPlusPlus2M, and DPMPlusPlus2MUniC2 to
    physicsnemo.diffusion.samplers. ExponentialEulerSolver supports
    DDIM-like sampling for distilled few-step models, its stochastic
    counterpart adds EDM-style churn and configurable re-noising,
    DPMPlusPlus2M provides efficient second-order sampling, and
    DPMPlusPlus2MUniC2 adds a UniC-2 corrector stage that raises
    DPM-Solver++(2M) to third order while keeping one denoiser evaluation
    per step. The solvers share an extended semi-linear callback API
    (bias_fn, bias_int_fn, slope_fn); users can select all four
    solvers by string key through physicsnemo.diffusion.samplers.sample.

  • The examples/weather/regional_weather_diffusion recipe can train diffusion
    models with rectified flow matching (training.loss.type: flow_matching) and
    sample them in validation and inference.py. Adds the
    replication_corrdiff_conus config and dataset for replicating the
    CorrDiff-ERA5-HRRR downscaling model over the contiguous US.

  • ClusterTree.find_dual_interaction_pairs(source_admissible=...) marks source
    nodes that must never be approximated by their aggregate, such as nodes
    whose normals differ too much.

  • ClusterTree.find_point_interaction_pairs builds a Barnes-Hut plan for
    individual target points by a single-tree walk (every point reads nearby
    sources exactly and distant nodes through their aggregates). For scattered
    targets such as volume prediction points it replaces
    find_dual_interaction_pairs(expand_far_targets=True), whose criterion
    charges the target leaf's own extent: on a 200k-face car with 200k volume
    points the dual plan held 1.6e9 pairs at theta=0.5 and the point plan
    holds 1.5e8.

  • The PhysicsNeMo-Mesh API reference documents physicsnemo.mesh.fields
    (RankSpec and FieldSchema) and the physicsnemo.mesh.primitives catalog.

  • ClusterTree.merge joins trees into one forest, whose root_ids list the
    root of each tree. Every traversal starts from all of them, so one
    traversal plans a tree against every tree of a forest, on either side.

  • ClusterTree.from_points, the new ClusterTree.from_point_groups (one tree
    per group of points, and their forest) and
    ClusterTree.find_point_interaction_pairs run in Warp kernels on CUDA by
    default (implementation=), with one host synchronization instead of one per
    tree level, and give the same trees and plans. The point plans now list each
    target's entries together, and count_only=True counts them without making
    the plan.

  • radius_search accepts points with 1 or 2 coordinates, as well as 3, with
    both backends. The torch backend accepts any number of coordinates, and
    points with more than 3 use it by default.

  • ShardTensor ring attention, ring kNN and ring ball query run on functional
    collectives; ring attention works under torch.compile as an eager
    graph-break region, with uneven sequence shards and attention masks
    sharded like the queries. In-place detach_ on a ShardTensor is
    supported.

  • radius_search on sharded inputs works under torch.compile.

  • Domain-parallel (rank-local) reading in the datapipes: ZarrReader,
    TensorStoreZarrReader, MeshReader and DomainMeshReader accept a
    domain_parallel dict and a 1-D device_mesh; each rank reads only its
    rows and the dataset assembles Shard(0) ShardTensors on the device.
    Custom readers opt in by implementing Reader._load_sample_domain_parallel
    with the exported DomainParallelConfig / resolve_leaf_placements.

  • The unified external aero recipe trains with optional domain parallelism
    (domain_parallelism.domain_size), reading samples sharded and running the
    model on ShardTensors over a domain x data-parallel device mesh.

Changed

  • Renames the body-in-white crash recipes crash_geoflare_oneshot and
    crash_geotransolver_oneshot of examples/structural_mechanics/crash to
    biw_yaris_geoflare_oneshot and biw_yaris_geotransolver_oneshot: every
    recipe of the example now names its dataset (px_yaris_* full vehicle,
    biw_yaris_* body-in-white, bumper_* bumper beam).

  • ⚠️ BC-impact (crash example global features): the datapipe of
    examples/structural_mechanics/crash standardizes the global features with
    train-split statistics stored in stats/global_stats.json, which changes the
    inputs of the three bumper recipes. A run directory written before this
    change holds checkpoints but no such file: train.py refuses to resume it
    instead of recomputing the statistics and continuing on rescaled inputs, and
    inference.py needs the file. Start such runs afresh.

  • ⚠️ BC-impact (crash example edge statistics): the graph datapipe
    of the crash example divides the first sample's contribution to the edge
    statistics by the sample count like every other sample's, which fixes an
    edge-length standard deviation that collapsed to about 1e-4. Existing runs
    keep the values stored in their own stats directory; new runs compute the
    corrected ones, so their models are not interchangeable with the old runs'.

  • ⚠️ BC-impact (crash example frame names): inference.py of the
    crash example writes the predicted frames as frame_001 to frame_T
    (prediction k belongs to frame k + 1) instead of starting at
    frame_000; post_processing/compute_l2_error.py reads the new names.

  • ⚠️ BC-impact (diffusion metric imports): Cleans up
    physicsnemo.diffusion dependencies and imports. General-purpose metrics can
    no longer be imported from physicsnemo.diffusion.metrics. Use the following
    modules instead:

    • rank_probability_score: physicsnemo.metrics.general.calibration
    • crps, kcrps: physicsnemo.metrics.general.crps
    • StreamingStatistic, Mean, Variance:
      physicsnemo.metrics.general.ensemble_metrics
    • entropy_from_counts, relative_entropy_from_counts:
      physicsnemo.metrics.general.entropy
    • Histogram, cdf, histogram, normal_cdf, normal_pdf:
      physicsnemo.metrics.general.histogram
    • power_spectrum: physicsnemo.metrics.general.power_spectrum
    • wasserstein_from_cdf, wasserstein_from_samples:
      physicsnemo.metrics.general.wasserstein

    For example, use from physicsnemo.metrics.general.crps import crps.
    Replace EnsembleMetrics imports with
    from physicsnemo.metrics.general.ensemble_metrics import StreamingStatistic.
    Removed imports emit a warning and an error with the replacement import.
    wasserstein_from_normal remains available through both existing import paths.

  • Partitioning a graph across GPUs (partition_graph_with_id_mapping, behind
    DistributedGraph and GraphCast's distributed mode) no longer loops over
    destination nodes in Python. A 1-million-node grid now takes well under a
    second instead of half a minute or more.

  • ClusterTree builds tighter trees by default (split="morton"), so
    Barnes-Hut plans need 2-4x fewer interactions at the same theta.
    split="midpoint" gives the previous trees.

  • GLOBE's default theta is 1.5 (was 1.0). With the new trees, DrivAerML
    training reaches about 40% lower validation loss in the same time.

  • GLOBE's default expand_far_targets is True (was False), as in its
    examples.

  • ClusterTree.compute_source_aggregates is 20-30x faster, and
    ClusterTree.find_dual_interaction_pairs is up to 1.7x faster with 40% less
    peak memory. The plan's interactions are no longer sorted by source.

  • GLOBE's BarnesHutKernel needs less memory to train: an 80k-face DrivAerML
    training step no longer runs out of memory.

  • An eager GLOBE training step on 10k-face DrivAerML samples runs 2.2x
    faster, and torch.compile builds GLOBE faster, with the same outputs.

  • GLOBE's BarnesHutKernel.forward takes near_chunk_count, a number of
    chunks, in place of near_chunk_size, and no longer takes
    source_aggregates.

  • The source_data and global_data of GLOBE's kernel classes must hold
    exactly the declared fields, under nested keys: a flat key such as
    "grp.v" now raises a KeyError that names the wrong fields.

  • GLOBE returns nested output fields in sorted key order, such as
    ("flow", "nut") before ("flow", "u").

  • The GLOBE DrivAerML example now trains for 450 epochs on one node, with the
    model and training configuration of the GLOBE paper's DrivAerML results.
    --n-epochs and --lr-decay-epochs replace --patience-steps, and
    checkpoints from earlier versions of the example do not resume.

  • ClusterTree.compute_source_aggregates packs its source data with
    TensorDict.pack, so source data with leaves of several dtypes now raises
    a TypeError instead of being promoted.

  • Refresh core, optional, development, and container dependency versions.
    Require PyTorch 2.13 or newer;
    use PyTorch 2.13's CUDA 12.9 wheels for the CUDA 12 backend. NATTEN
    extras select PyTorch 2.13 to match their prebuilt kernels. Python support remains
    3.11 through 3.14.

  • Mesh connectivity sorts the vertices of its short index tuples (edges,
    faces, cells) with a sorting network of elementwise minima and maxima on
    large CUDA inputs, instead of torch.sort. On an NVIDIA GB300, facet and
    boundary extraction, edge graphs, point adjacency, and manifold checks of
    10M-cell meshes are 3-5x faster, butterfly subdivision 2.3x, and cell
    adjacency, cleaning, and the DEC Laplacian 1.2-2.1x. Results are unchanged.

  • physicsnemo.mesh.fields is rebuilt around two types. RankSpec (rank,
    symmetric, parity; shape(n_spatial_dims), numel(n_spatial_dims)) is
    one field's transformation law; FieldSchema is an insertion-ordered
    mapping from dotted field names to RankSpec, parsed once at a model's
    boundary with FieldSchema.parse (nested groups and dotted names flatten
    alike) and queried with .ranks, .count(rank), FieldSchema.key(name),
    and .check(tensordict, label=...). Both are read-only dicts, so a
    declaration serializes to JSON as written and model checkpoints can record
    them directly. Validation is construction, so an invalid schema cannot
    exist. A field is declared as a RankSpec or a mapping of values,
    {"rank": n} (YAML: pressure: {rank: 0}); a mapping of mappings is a
    nested group. Integer leaves are no longer accepted.

  • Mesh geometry, curvature, sampling, mesh generation, LSQ gradients, and
    the PyTorch backends of the deformation functionals solve their small
    per-cell determinants, inverses, and least-squares problems in closed form
    instead of with batched torch.linalg calls. Vertex angles, Gaussian
    curvature, and quality metrics become up to 1,000x faster on GPU, and many
    mesh operations 4-130x faster on CPU.

  • Mesh vertex angles, dual volumes, curvature, quality metrics, and cell and
    point normals use up to 3.4x less peak memory, and gradients through cell
    centroids and normals are faster on GPU. Results are unchanged up to
    rounding.

  • Mesh LSQ gradients (Mesh.gradient, curl, divergence,
    compute_point_derivatives, compute_cell_derivatives, and the torch
    backend of physicsnemo.nn.functional.mesh_lsq_gradient) solve the float32
    systems of all points or cells at once rather than one neighbor count at a
    time, and the derivatives of several fields share their least-squares
    systems. On a GB200, the gradient of a 5.1M-tet mesh is 2.4x faster and
    that of meshes up to 1.3M tets 3.4-3.7x faster; the derivatives of eight
    scalar fields on a 1M-tet mesh are 13x faster. Results are unchanged up to
    rounding. The intrinsic gradient of a float64 field on a float32 mesh now
    returns a result of float32 accuracy instead of raising a dtype error.

  • GLOBE's field declarations are renamed after the schemas they hold:
    output_field_ranks, boundary_source_data_ranks and global_data_ranks
    become output_schema, boundary_source_schemas and global_schema
    (kernels: output_schema, source_schema, global_schema), each also the
    attribute holding the parsed FieldSchema. GLOBE raises
    NotImplementedError for fields it does not implement (rank 2 and above,
    pseudotensors) instead of silently dropping or misreading them. The GLOBE
    examples and the unified external-aerodynamics recipe configs are updated.

  • Cell-to-cell adjacency pairs the cells of each shared facet in one
    vectorized pass, adjacency offsets come from a binary search instead of
    bincount, and adjacencies carry their device, so cached adjacencies are
    reused without revalidation. Cell adjacency and the dual graph are 1.4-1.6x
    faster with 30% less peak memory, and synchronize CUDA 5 times instead of 38.

  • Mesh adjacencies, facet extraction, manifold checks, and fix_orientation
    use up to 3x less peak memory, with unchanged results.

  • physicsnemo.mesh.Mesh, DomainMesh, Adjacency, BVH, ClusterTree,
    DualInteractionPlan, and SourceAggregates now inherit directly from
    TensorClass instead of using the @tensorclass decorator. Existing
    constructor defaults and Mesh[m, s] runtime specialization remain
    available, and nested mesh types survive memmap round trips. The memmap
    layout is unchanged: existing .pmsh and .pdmsh files remain readable, and
    new files are byte-identical to those written with the decorator.

  • from_pyvista(point_source="cell_centroids", manifold_dim=1) builds the
    dual graph of line, triangle, and tetrahedral meshes 25-30x faster, with
    identical output. With the default force_copy=False, to_pyvista output
    of 1D and 3D meshes now shares cell storage with the Mesh, as 2D output
    already did.

  • Mesh facet extraction, repair, merging, smoothing, subdivision, and quality
    metrics avoid CUDA synchronizations hidden in indexing with Python lists,
    blocking copies of small host tables, boolean masks, and one .item() per
    count. Laplacian smoothing synchronizes at most 4 times instead of about 30,
    independent of the number of iterations, and remove_degenerate_cells is
    about 5x faster. Results are unchanged.

  • Loop and butterfly subdivision evaluate their edge rules for every edge and
    select with torch.where, instead of compacting boundary and interior edges
    with boolean masks. Butterfly subdivision synchronizes CUDA 3 times instead
    of 13, Loop subdivision 9 instead of 13, and both are 10-15% faster.

  • Mesh subdivision, cell_data_to_point_data, point_data_to_cell_data, and
    Mesh.merge need up to 2.9x less peak memory, with unchanged results.

  • Mesh integration uses a shared _effective_measure field for complete cell
    and point measures. Cell measures fall back to geometry; point measures are
    explicit and independent of connectivity. Mesh.integrate_samples evaluates
    point quadrature separately from existing cell and vertex-field integration.
    Sampling, centroid conversion, geometric transformations, subdivision, and
    GLOBE use the mesh-owned measure API. Point measures carry their represented
    dimension so geometric scaling preserves their physical units.

  • Promotes the volumetric DiffusionUNet3D and its reusable Conv3D,
    GroupNorm3D, UNetAttention3D, and UNetBlock3D layers from experimental
    to stable production APIs in physicsnemo.models.diffusion_unets and
    physicsnemo.nn. The promoted APIs now carry backward-compatibility
    guarantees and output/checkpoint non-regression coverage. Existing
    experimental import paths remain as deprecated compatibility shims.

    Migration from 2.2.x: meshes saved with cell_data["_measure_weights"]
    must be regenerated or converted once before integration:

    from physicsnemo.mesh.calculus import set_cell_measures
    
    if "_measure_weights" in mesh.cell_data:
        weights = mesh.cell_data.pop("_measure_weights")
        set_cell_measures(mesh, mesh.cell_areas * weights)

    Replace compose_measure_weights calls with scale_measures. Consumers
    should read complete measures with cell_measures instead of multiplying
    cell_areas by cell_measure_weights. Update stored-field mappings from
    cell_data._measure_weights to cell_data._effective_measure and remove any
    subsequent multiplication by geometric areas.

  • LSQ point gradients on large surface meshes are about 2x faster on GPU, and
    LSQ gradients (Mesh and physicsnemo.nn.functional.mesh_lsq_gradient)
    synchronize the GPU much less often. LSQ and DEC derivatives also need less
    peak memory.

  • Mesh.slice_points picks its cell-remapping algorithm by mesh shape: the
    full-mesh lookup table as before, or a binary search over the kept ids when the
    mesh has far more points than cell-vertex entries (a reader keeping a block of
    cells out of a mesh with hundreds of millions of vertices). Index
    normalization avoids allocating a full-mesh range and preserves empty slices,
    integer indices, and boolean masks. Point fields use ordinary indexed gathers.

  • Darcy2D solves with multi-grid red-black successive over-relaxation
    instead of Jacobi iteration, converging in far fewer iterations and about
    100x closer to the discrete solution at the default tolerance. Batches whose
    SOR solve diverges are re-solved with Gauss-Seidel. Darcy2D now raises a
    ValueError unless 0 < min_permeability <= max_permeability and
    max_permeability / min_permeability <= 4; above that ratio the
    finite-difference scheme does not converge.

  • Extends LinearGaussianNoiseScheduler with two methods.
    get_linear_denoiser accepts prediction_type and denoising_type, and
    returns bias, antiderivative, and slope callables for the new exponential
    and multistep solvers. snr exposes the schedule's signal-to-noise ratio,
    used as the multistep extrapolation coordinate by DPMPlusPlus2M and
    DPMPlusPlus2MUniC2.

  • translate, rotate, scale, and their DomainMesh and datapipe
    counterparts no longer synchronize CUDA for Python-number arguments, string
    axes, rotations, and scalar scales, so they return without waiting for queued
    GPU work. transform gains assume_similarity and rotate gains
    assume_valid_axis, to skip the remaining runtime checks for general
    matrices and device-tensor axes. Cached normals are mapped with one small
    inverse instead of solve_ex with millions of right-hand sides, whose slow
    path for pivoting matrices made RandomRotateMesh(mode="uniform") take 1.3 s
    on the 17.7M-triangle DrivAerML surface (6.5 ms now, on a GB300).

  • The tolerance of sample_data_at_points, find_containing_cells, and
    find_all_containing_cells is now relative. Barycentric coordinates must
    still be >= -tolerance, but the distance from a point to a cell's affine
    hull is now limited to tolerance times the largest absolute coordinate of
    the mesh, instead of tolerance in mesh units. Results no longer depend on
    the mesh's length unit and are identical when the mesh and query points are
    scaled by a power of two.

  • Mesh BVH queries, and with them validate, Mesh.clean(), point
    containment and sampling, use up to 2.7x less peak memory. Results are
    unchanged.

  • fix_orientation orients cells of any dimension and is 6x faster on the
    DrivAerML surface. Cells that fill their space, such as tetrahedra in 3D,
    come out with positive volumes. Its stats add n_cells_flipped, with
    n_faces_flipped kept as an alias, and n_non_orientable_components.

  • repair_mesh(fix_orientation=True) orients every mesh except point clouds,
    instead of only surfaces in 3D.

  • compute_mesh_statistics reads all statistics in one device-to-host
    transfer instead of about 20 .item() calls.

  • MeshReader and DomainMeshReader map sample files copy-on-write, so
    editing a loaded sample in place no longer changes the dataset on disk.
    Readers on Lustre also no longer take write locks.

  • Moving or copying a mesh with cached adjacencies no longer synchronizes a
    CUDA device.

  • BoundingBoxFilter takes about half as long on CPU. On a GPU it
    synchronizes once per coordinate key, instead of once per filtered tensor.

  • Every PhysicsNeMo-Mesh API page now opens with a figure, and the nine
    tutorials in examples/minimal/mesh are reorganized from a first mesh to ML
    pipelines. New sections show how to use the edge graph of a mesh, a
    Mesh[1, n], in graph network models.

  • The perturbed_grid primitive takes perturbation_scale as a fraction of
    the grid spacing (was an absolute length), so its default no longer folds
    cells, even on fine grids.

  • CenterMesh materializes the center of mass on sharded meshes so the offset
    stays a plain tensor.

  • index_select and integer-tensor indexing on a ShardTensor exchange only
    the requested rows instead of all-gathering the source; no host sync, and
    torch.compile safe.

  • Unified external aero recipe: when a dataset puts its targets at cell
    centroids, as the surface datasets do, the training loss and the metrics
    weight each target point by its cell's area (or volume), so they no longer
    depend on how finely the mesh resolves each region. Set
    measure_weighted=false to count every point alike, as before.

  • The stream-based ring helpers perform_ring_iteration_async and
    get_comm_stream are removed; use perform_ring_iteration_funcol with
    wait=False and finish_ring_iteration for overlap.

  • Promotes GLOBE out of experimental to physicsnemo.models.globe.GLOBE, the
    package's only export. Legacy import shims keep the old
    physicsnemo.experimental.models.globe paths and saved checkpoints working
    and emit a LegacyFeatureWarning.

Deprecated

  • EnsembleMetrics, the base class of Mean, Variance, and Histogram, is
    renamed StreamingStatistic. EnsembleMetrics remains an alias of the same
    class, so existing subclasses and isinstance checks keep working; importing
    it emits a LegacyFeatureWarning.
  • weighted_multinomial and WeightedMultinomial moved from
    physicsnemo.nn.functional to physicsnemo.utils. Importing them from
    physicsnemo.nn.functional still works but emits LegacyFeatureWarning.
  • Unified external aerodynamics recipe: training.loss_type: rmse is
    deprecated in favour of relative_mse, which names what it always
    computed (target-normalized relative MSE, no square root) and delegates
    to physicsnemo.metrics.general.relative_error. rmse still works and
    warns.
  • The physicsnemo.experimental.models.globe import path is deprecated.
    Import GLOBE from physicsnemo.models.globe instead.

Removed

  • Removes physicsnemo.deploy, deprecated in this release. Its only callers
    were PhysicsNeMo's own ONNX tests, which now carry the two functions they
    used. Instead of export_to_onnx_stream, call
    torch.onnx.export with an io.BytesIO target; instead of
    run_onnx_inference, run the result in an onnxruntime.InferenceSession.
  • physicsnemo.experimental.guardrails. Scoring moved to
    physicsnemo.experimental.uq.ood; thresholds and responses now live in
    example recipes. Replacements:
    • GuardedGeoTransolver, attach_ood_guard, OODGuard, OODGuardConfig:
      call GeoTransolver.forward_with_geometry_features, pool the tokens,
      and score them with KNNScorer. Global-parameter bounds become an explicit
      input check. See examples/minimal/uq/feature_scoring.py. A saved
      GuardedGeoTransolver keeps its GeoTransolver weights under the model.
      prefix; refit the scorer on reference features.
    • GeometryGuardrail, GeometryDensityModel, TorchPCEDensityModel:
      DensityScorer(method="gmm" | "pce") on descriptors from
      physicsnemo.experimental.uq.ood.geometry.extract_features. See
      examples/minimal/guardrails/geometry_validation.py, which also replaces
      load_features_from_dir.
    • The other geometry utilities keep their names under
      physicsnemo.experimental.uq.ood.geometry; FEATURE_VERSION is now v1.1.
  • The physicsnemo.experimental.uq.variational_gp_head and
    physicsnemo.experimental.uq.field_variational_gp_head modules. Import the
    heads from physicsnemo.experimental.uq as before, or from
    physicsnemo.experimental.uq.gp.
  • physicsnemo.experimental.models.globe.utilities, whose TensorDict helpers
    GLOBE no longer uses.
  • physicsnemo.mesh.fields: RankSpecDict, flatten_rank_spec,
    rank_counts, ranks_from_tensordict, and validate_data_contains_ranks,
    replaced by FieldSchema (see Changed). Importing one of them from
    physicsnemo.mesh or physicsnemo.mesh.fields raises an ImportError that
    names its replacement.
  • Removes the opt-in physicsnemo.compat import-alias layer and the
    PHYSICSNEMO_ENABLE_COMPAT environment variable. The layer mapped pre-v2.0
    module paths onto their v2.0 locations; three minor releases later, callers
    should import from the current paths listed in v2.0-MIGRATION-GUIDE.md.
    Checkpoint loading is unaffected.
  • Removes physicsnemo.utils.mesh, deprecated since 2.1 with removal scheduled
    for 2.2. The vtk and stl entries leave the utils-extras extra with it.
    Replacements:
    • sdf_to_stl(field, threshold): marching_cubes from
      physicsnemo.mesh.generate returns a Mesh; save it with to_pyvista
      from physicsnemo.mesh.io, for example,
      to_pyvista(marching_cubes(torch.as_tensor(field), threshold)).save("out.stl").
    • combine_vtp_files(files, out):
      pyvista.merge([pyvista.read(f) for f in files]).save(out).
    • convert_tesselated_files_in_directory: pyvista.read(src).save(dst) per
      file; PyVista reads and writes OBJ, VTP, and STL.

Fixed

  • Mesh.save and DomainMesh.save can write a mesh read from disk to a new
    path. They used to raise unless copy_existing=True was passed, because the
    loaded tensors are memory-mapped to the original files.
  • The container build compiles NATTEN from source with C++20 when no
    prebuilt NATTEN wheel is supplied, so it builds on PyTorch 2.15 base
    images, whose headers require C++20.
  • The container build compiles pyg-lib from source without the uv cache, so
    it no longer reuses a pyg-lib wheel built against an older PyTorch, which
    failed to load with an undefined symbol after a base image upgrade.
  • Mesh.with_cells and fix_orientation keep the effective measure and area
    of each cell whose vertices are only reordered, as when flipping a winding,
    instead of rescaling them by float32 roundoff or raising on zero-area cells.
  • DistributedManager now initializes on CPU-only hosts, where PyTorch rejected
    its CPU device_id and a missing local rank raised ZeroDivisionError.
    cleanup() no longer raises after a failed initialization.
  • The GLOBE DrivAerML example integrates the friction force on the car with
    the right sign. Its drag coefficients were about 0.055 too low.
  • The unified external aero recipe integrates force coefficients with the
    right signs for DrivAerML and HighLiftAeroML. A dataset YAML now declares
    where its surface normals point and which side its wall shear stress acts
    on (surface_normals_point, wall_shear_acts_on).
  • initialize_mlflow offline mode logs to SQLite (./mlruns/mlflow.db)
    instead of the file store that current MLflow rejects.
  • docs/test_scripts run again on current PhysicsNeMo.
  • physicsnemo.metrics.cae.cfd.compute_tke_spectrum no longer raises
    UnboundLocalError when length is passed; the domain length now sets the
    grid spacing used for the wavenumbers.
  • The GLOBE DrivAerML example trains under torch.compile again on PyTorch 2.13
    and 2.14. It and the AirfRANS example now set
    torch._dynamo.config.specialize_float, which avoids a Dynamo crash in GLOBE's
    Padé networks (pytorch/pytorch#193194).
  • Stabilizes PCE density scores for collinear features by fitting polynomial
    covariance/precision in float64. Rejects non-finite density scores before
    percentile decisions and isolates scorer initialization from prediction RNGs.
  • Preserve unreduced ShardTensor placement dimensions in sum and mean
    when keepdim=True, including independently sharded simulation and spatial axes.
  • torch.compile with ShardTensor: neighborhood attention (na1d/na2d/
    na3d) keeps its halo exchange when compiled, select handles a negative
    dim, dynamic shapes no longer fail in the spec hash, a plain DTensor
    operand next to a ShardTensor uses the DTensor fallback, and a plain
    parameter used with a ShardTensor gets a reduced gradient as in eager.
  • Multi-node jobs launched with srun no longer hang in
    DistributedManager.initialize() when Slurm starts rank 0 on a different node
    from the one that ran srun. The rendezvous now uses the job step's first node.
  • DistributedManager.initialize() works in a Slurm batch script run without
    srun. It used to find no rendezvous address there and raise a TypeError.
  • Mesh.get_point_to_points_adjacency(), get_facet_mesh(), and
    get_boundary_mesh() compile with torch.compile(fullgraph=True, dynamic=True).
    Facet extraction now specializes on the cell width instead of passing a
    symbolic size to itertools.combinations.
  • Compiled code that reads Mesh geometric properties, such as cell_areas
    or curvatures, no longer recompiles when the input mesh's cache differs, and
    no longer writes into that cache. set_cell_measures stores a copy of the
    cached cell_areas, so a measure never aliases it. physicsnemo.mesh now
    checks whether its own code is being traced, because since torch 2.13
    torch.compiler.is_compiling() is True in every thread during a compile,
    which made data-loading threads drop caches and skip validation.
  • Mesh geometric properties, curvatures, and the calculus operators give
    correct gradients when the points require gradients, even after a read under
    torch.no_grad(), and a second backward() on the same mesh no longer
    fails. Such meshes now compute these properties on every access instead of
    caching them.
  • GraphCast and MeshGraphNet run on graphs partitioned across GPUs again
    (partition_size > 1, or a DistributedGraph in place of the PyG graph),
    so the distributed shallow-water example works. This broke when the DGL
    backend was removed.
  • partition_graph_with_id_mapping, and so partition_graph_nodewise,
    partition_graph_by_coordinate_bbox and DistributedGraph, accept int32
    CSC indices and rank mappings. Before, they failed with a dtype mismatch.
  • weighted_multinomial with replacement=True accepts more than 2^24
    weights, instead of raising torch.multinomial's category-limit error. So
    DoMINO's sample_points_on_mesh now works on meshes with over 2^24 faces.
  • MeshDataset.close() no longer raises AttributeError with a MeshReader
    or DomainMeshReader. Both readers now have a close() method.
  • GLOBE accepts boundary_meshes as a TensorDict, as the DrivAerML example
    passes them. Before, every forward pass of that example failed.
  • A GLOBE model built with a torch.device as tree_build_device can now be
    saved. Before, save() raised TypeError, because JSON cannot hold a device.
  • Under torch.compile, GLOBE no longer recompiles on its second training
    step, nor for each new sample of a similar size. Each of these recompiles
    took minutes at DrivAerML sizes.
  • The GLOBE examples' requirements no longer downgrade PyVista and Matplotlib
    below the versions PhysicsNeMo requires.
  • signed_distance_field, in physicsnemo.nn.functional and
    physicsnemo.mesh.spatial, supports backpropagation: the signed distance is
    differentiable with respect to the mesh vertices and the query points.
    Before, backward raised because the Warp op had no autograd formula. The
    hit points and hit faces carry no gradients.
  • With max_points, the Warp backend of radius_search leaves the .grad of
    batched points and queries unset in the forward pass. Before, it set them to
    zeros.
  • Mesh.clean(), clean_mesh, merge_duplicate_points, and validate() find
    every duplicate point in clusters of more than 100 coincident points. Before,
    some duplicates were missed and stayed in the cleaned mesh.
  • Mesh.merge treats a list of one mesh like a longer list. It checks its
    input and stacks global_data along a new dimension. Before, it returned a
    copy of the mesh.
  • Mesh.pad and Mesh.pad_to_next_power place padding cells on a padding
    point when they also pad points. Before, padding cells touched the last real
    point and changed results there, such as cell_data_to_point_data.
  • DomainMesh.rotate, scale, and transform work when the meshes of a
    domain differ in float dtype, such as a float64 interior with float32
    boundaries, where they raised before.
  • repair_mesh also removes the degenerate cells that its merge of duplicate
    points creates. Before, its output could fail validate().
  • fill_holes works on meshes with point or cell data, where it raised before.
    The new points and faces hold NaN in floating-point fields and 0 in others.
  • compute_mesh_statistics reports the mean and standard deviation of the
    edge lengths of all cells. Before, the mean averaged each cell's shortest and
    longest edge, and the standard deviation covered only the longest edges.
  • is_manifold() rejects triangle surfaces pinched at a vertex, such as two
    closed surfaces that share a single vertex.
  • get_boundary_edges returns edges, not triangles, for meshes of four or more
    manifold dimensions.
  • Mesh.with_data given a dict no longer shares nested data groups with the
    source mesh, so changing the result leaves the source unchanged.
  • cell_data_to_point_data and point_data_to_cell_data raise, unless
    overwrite_keys=True, when a field has the name of a data group in the
    destination or the reverse. Before, they silently dropped data.
  • Cleaning or repairing a mesh with no cells keeps its point data fields, now
    empty, so the result can be merged with other meshes.
  • get_point_to_points_adjacency() returns no neighbors for meshes of vertex
    cells, where it raised before.
  • Mesh and DomainMesh subclasses that add fields no longer need their own
    __init__ with TensorDict 0.15, whose tensorclass subclasses inherit the
    parent's __init__. The base __init__ accepts and stores the fields that a
    subclass declares, and still raises TypeError for any other keyword.
  • Linear subdivision of tetrahedral meshes keeps the orientation of every
    child cell. Before, half of the children came out inverted.
  • The unit_square, rectangle, structured_grid, l_shape, cube_volume,
    torus, hemisphere, disk, plane and tetbeam primitives have
    positively oriented cells and outward or +z normals. Before, their cells were
    inverted or their normals pointed the wrong way. plane also raises
    ValueError for a zero or non-finite normal, where it used to return the +z
    plane.
  • Meshes with int32 connectivity give the same results as int64 ones in
    Butterfly and Loop subdivision, edge lookups and refit_mesh_to_implicit.
    Before, large meshes could get wrong Butterfly midpoints and edge matches,
    Loop subdivision raised on open surfaces, and refit_mesh_to_implicit could
    leave boundary vertices off the surface.
  • Loop subdivision of float64 meshes computes its vertex weights in
    float64. Before, it computed them in float32, which limited the new
    vertex positions to float32 precision.
  • A mesh saved with cached adjacencies now loads in a new Python process.
    Before, Mesh.load raised unless physicsnemo.mesh.neighbors was already
    imported.
  • Intrinsic cell gradients on curves in 3D now lie along each cell's own
    direction. Before, they crashed on open curves and were projected onto the
    wrong tangent on closed curves.
  • Intrinsic point gradients on manifold meshes no longer depend on the winding
    of the cells, at any angle between them, so they are correct on
    get_boundary_mesh output and on the Möbius strip. Consistently wound meshes
    give the same results as before.
  • Curvature of a curve whose two edges at a vertex both start or both end
    there, as get_boundary_mesh produces, is now correct. Before, the angle at
    such a vertex was wrong, so a right-angled corner had zero curvature.
  • DEC gradients, divergences, and Laplacians of a float32 field on a float64
    mesh now return float64 results instead of raising. DEC gradients and
    Laplacians of tensor fields, and LSQ cell gradients, no longer fail on meshes
    without cells, and flat handles fields with several trailing dimensions.
  • Intrinsic LSQ gradients no longer raise on float32 point clouds or on 16-bit
    curves, and raise a TypeError for integer fields instead of truncating the
    result. On surfaces in four or more dimensions they are now correct at points
    with two neighbors, and DEC intrinsic gradients of curves in 3D are now
    correct at their endpoints.
  • Derivatives of intrinsic gradients with respect to the points are no longer
    NaN on straight curves in 3D, or flat surfaces in 4D, that lie along the axes.
    On curves in 3D and surfaces in 4D, only first derivatives are exact.
  • DEC gradients of planar triangle meshes are no longer NaN at the vertices of
    zero-area triangles, such as those Mesh.pad adds. DEC divergences are now
    correct on float32 meshes a few millimetres across in metres.
  • Mesh.clean now sums the point measures of merged points, so integrals by
    point quadrature no longer change.
  • DefaultCollator with a stack_dim past the batch dimensions of the
    samples stacks each tensor with torch.stack, without TensorDict behaviour
    that 0.15 deprecates. The batch's batch_size now matches its tensors, and
    samples with non-tensor data no longer fail to collate.
  • physicsnemo.mesh no longer raises small lengths, areas and volumes to a
    fixed floor, which distorted results on float32 meshes in meters a few
    millimeters across. Area-weighted aggregation, partition_cells centroids,
    support volumes, the DEC Laplacian, the sharp, Gaussian, and mean curvatures,
    and triangle circumcenters now give the same results at any scale.
  • sample_random_points_on_cells with a small alpha no longer places some
    points outside their cells.
  • In float32, sdf_polygon_2d no longer gives NaN distances for a polygon
    with a repeated vertex or NaN gradients on its edges, and
    mesh_implicit_domain now meshes float32 polygons such as a square.
  • The API reference again shows the docstrings of Mesh, DomainMesh, and the
    other tensorclasses in physicsnemo.mesh. TensorDict 0.14 replaced them
    with generated signatures.
  • Meshes with explicit measures integrate correctly after get_facet_mesh,
    get_boundary_mesh, to_edge_graph, extrude, project, embed and pad.
    Before, facets and extruded cells inherited the parent's measure, project
    kept the old one, embed raised on centroid point clouds, and padding cells
    got NaN measures that made a later scale raise. extrude now raises on
    dimensional point measures instead of copying them to the extruded points.
  • DomainMesh.apply_to_meshes leaves each boundary mesh on the device the
    function returns it on. Before, the boundaries went back to the domain's
    device.
  • rotate with a Python angle rotates float64 meshes at float64 precision.
    Before, it computed the rotation in float32.
  • rotate rotates float64 meshes about a vector axis at float64 precision.
    Before, it rounded the axis to float32, so points on the axis moved.
  • rotate, scale, and transform with a square matrix work on float16 and
    bfloat16 meshes, and keep their dtype. Before, they raised an error.
  • Loop subdivision keeps float16 and bfloat16 points in their dtype, and no
    longer overflows on float16 meshes far from the origin. Before, it returned
    float32 points.
  • sample_random_points_on_cells with alpha other than 1 works on float16
    and bfloat16 meshes on CPU. Before, it raised an error.
  • Anisotropic maps with a small overall scale are no longer taken for
    similarities. Before, transforming by one kept wrong cached point normals,
    and scaled point measures instead of raising.
  • pad_to_next_power pads to the smallest power that fits. Before, a size that
    already was such a power could be padded to the next one, and some
    non-integer powers raised.
  • The GLOBE examples no longer pin TensorDict 0.12, which conflicted with
    PhysicsNeMo's own requirement.
  • delaunay_mesh_2d recovers boundary segments that cross several triangles.
    Before, it raised on simple polygons, even rectilinear ones, and blamed
    float64 degeneracy or crossing segments.
  • signed_distance_field accepts non-contiguous query points and vertices,
    such as a transposed tensor, which used to raise a Warp error.
  • The mesh signed_distance_field keeps the orientation of the near-degenerate
    faces it repairs. Before, the repair could flip a thin face, so points
    outside a watertight mesh got a negative distance.
  • knn with the cuML backend, find_nearest_cells and match_points return
    empty results for an empty query set on CUDA, as they do on CPU, instead of
    raising a CUDA error. match_points also returns no matches for an empty
    target.
  • Mesh transforms and projections keep the dtype of each vector and tensor
    field. A float32 field on float64 points, as VTK files often store them,
    raised a dtype error.
  • The GLOBE AirfRANS example casts its meshes to float32. Since from_pyvista
    began keeping float64 points, preprocessing failed on every sample.
  • DomainMeshReader gains boundary_subsample ("both", "cells",
    "points") to choose which subsample applies to the in-file boundaries.
    Composing the cell and point subsamples on a triangulated boundary kept only
    the cells whose three vertices all survived the point cut, about N / 27 of
    the N requested. The default keeps the composed behavior.
  • The hemisphere and cone primitives have a single pole or apex vertex,
    so the cone is closed. Before, the vertex was repeated around the ring,
    leaving zero-area triangles.
  • tetrahedron_surface edges have length side_length, and
    sphere_icosahedral with subdivisions=0 honors radius.
  • sphere_volume and cylinder_volume tetrahedra fill the solid without
    overlap. With VTK 9.7, their Delaunay tetrahedra overlapped and left gaps.
  • lumpy_ball raises ValueError when noise_amplitude folds its surface
    so far that the tetrahedra would overlap.
  • text_1d_2d outlines are closed loops; before, each ended in a zero-length
    edge. text_2d_2d fills curved glyphs fully: thin rings such as U+25CB lost
    part of their area.
  • text_2d_2d fills glyphs with slanted edges, such as 'A' and 'V', without
    flat triangles or hanging vertices, so text_2d_3d of ordinary text is
    watertight. It also leaves the counter of a nested glyph empty: '®' was 3%
    too large.
  • cone, disk and plane work when torch's default dtype is float64, where
    they raised before.
  • Unified external aero recipe: GLOBE-volume trains on all the requested
    vehicle surface cells, not about 4% of them.
  • Seeded DomainMeshReader subsamples select the same rows from Zarr stores
    as from memmap files. Before, boundaries read in full, and interiors read
    with drop_interior_cells, could differ between the two formats.
  • from_pyvista(point_source="cell_centroids") places the centroid of every
    linear cell at the mean of its vertices, as Mesh.cell_centroids does.
    Before, polygons, pyramids, prisms and polyhedra got other points, and even
    a regular pentagon was off-center.
  • to_pyvista exports vertex-cell meshes, and empty line and triangle meshes,
    with their cell data. Before, the export failed.
  • to_zarr raises a TypeError naming any field it cannot store, such as a
    bfloat16 field, before it writes anything. Before, it left a partial store
    that loaded without those fields.
  • to_zarr raises a ValueError before it writes anything when a field key
    or boundary name is one that zarr cannot store, such as one that is empty or
    contains /. Before, such a name could come back as another key, or leave a
    store that would not load.
  • from_zarr loads the stores that to_zarr writes for subclasses of Mesh
    and DomainMesh, as their base class, and to_zarr raises a TypeError on
    a subclass with fields of its own. Before, from_zarr refused these stores.
  • from_zarr, MeshReader and DomainMeshReader keep the cell shape of a
    zarr mesh with zero cells. Before, such a mesh came back as a point cloud.
  • to_pyvista exports empty meshes with vector or tensor fields, where it
    raised before, and from_pyvista reads complex arrays of one value with
    shape (1,), where it raised or dropped a dimension before.
  • from_pyvista with point_source="cell_centroids" joins two cells of
    different dimensions by the same dual-graph edges whatever the order of the
    cells. Before, these edges depended on it.
  • from_zarr, MeshReader and DomainMeshReader raise on a zarr store that
    to_zarr did not write or did not finish. Before, a store cut short by a
    full disk, for example, loaded without its missing fields.
  • from_zarr loads scalar uint64 fields, where it raised before.
  • Mesh.draw with matplotlib colors 2D curves by their scalars and honors
    alpha_edges. It also draws 1D meshes in view, vertex cells as colored
    markers, and integer vector scalars, where it failed before.
  • Mesh.draw with matplotlib fits the view to every mesh drawn on ax and,
    in 2D, keeps limits the caller fixed; before, it showed only the last mesh.
    Meshes far from the origin no longer shrink to a speck in the view.
  • Mesh.draw with PyVista lets backend_options set the edge color, line
    width and scalar bar, where it raised before.
  • GLOBE DrivAerML postprocessing reports correct Cd, Cl, and Cs on subsampled
    surfaces. Before, they shrank with the fraction of cells kept.
  • The unified external aero recipe documents how surface subsampling affects
    force integration.
  • ClusterTree.find_dual_interaction_pairs returned an empty plan if any point
    had a NaN coordinate, and failed on plans with more than 2^31 interactions.
  • ClusterTree.from_points no longer keeps the autograd graph of its inputs.
  • With expand_far_targets=True and leaf_size > 1,
    ClusterTree.find_dual_interaction_pairs still approximated some targets by
    their leaf's centroid.
  • Unified external aero recipe: the final epoch is always checkpointed,
    resumed runs keep the epoch-mode learning-rate schedule (older checkpoints
    resume one epoch behind), and fp16 runs save and restore GradScaler state.
  • Checkpoint loading resolves model weights at the selected training checkpoint's
    filename index, preventing resumes that mix epochs. Missing required weights
    raise before any model or training state is restored. Distributed loads validate
    on every rank using rank 0's file lookup.
  • fix_orientation no longer leaves opposite windings across sharp creases,
    such as the edges of a cube.
  • Mesh.is_manifold() no longer raises on a tetrahedral mesh with a
    degenerate cell.
  • Mesh slicing reuses integer indices across connectivity, fields, and caches
    to avoid repeated CUDA synchronization for the same boolean mask.
    Point slicing skips mask processing when the output has no cells because
    the input has no cells or the point selection is empty.
  • DEC gradients (gradient(method="dec")) of tetrahedral meshes read triangle
    faces as edges and were wrong at most vertices, and on 1D meshes they raised.
    They now use the edges of every cell and are exact for linear fields on
    segments, triangles and tetrahedra. to_edge_graph() works on 1D meshes, and
    get_facet_mesh(manifold_codimension=0) returns the deduplicated cells.
  • Meshes from slice_cells and subdivide get their own data containers, so
    adding or removing a field on them no longer changes the source mesh.
  • Triangle areas use direct area components and a rescaled norm, preserving
    thin faces and their quadrature measures without Gram cancellation or
    overflow or underflow in the norm.
  • Vertex angles of nearly flat triangles in 2D and nearly flat tetrahedra are
    now accurate. A 2D triangle with an angle near pi used to get angles of 0, 0,
    and 0, which also threw off Gaussian curvature and quality metrics.
  • Gaussian curvature of curves in 3D is now correct: a unit circle with 1,000
    segments had a curvature of 499 instead of 1.
  • Small angles from stable_angle_between_vectors, volumes of thin
    tetrahedra in 4D or more, and FEM cotangent weights of thin cells keep their
    accuracy in float32. The first two used to come out as 0.
  • FEM cotangent weights of long, thin but well-shaped cells are accurate in
    any vertex order. A tetrahedron with one edge 5,000 times longer than the
    others used to get the weights of a degenerate cell.
  • Vertex angles of triangles in 3D are correct in float16 and at any
    coordinate scale, and stable_angle_between_vectors is correct in float16.
    Both used to return NaN or wrong angles there.
  • On CUDA, LSQ gradients of rank-deficient stencils, such as those of a flat
    surface, are now minimum-norm solutions, as on CPU. They used to be NaN,
    wrong by orders of magnitude, or a LinAlgError.
  • On CUDA, sample_data_at_points next to a degenerate cell no longer raises
    LinAlgError. Degenerate cells contain no sample points on any device, and
    compute_circumcenters returns their centroid instead of NaN or infinity.
  • Edge flips in mesh_implicit_domain work at any coordinate scale; below
    about 1e-13 they were silently skipped.
  • The PyTorch Sobolev deformation accepts float32 cells of any size, and the
    StVK strain energy has finite gradients for degenerate reference cells.
  • Unified external aero recipe: near-wall SDF normals no longer flip inward
    from float32 roundoff. Stored signed distances are unchanged.
  • Fixes mesh dtype handling: preserves integer-coordinate precision, normalizes
    connectivity safely, and rejects integer .to() casts. Floating-point and
    complex casts preserve the source mesh.
  • Fixed an issue in Natten2DSelfAttention and RopeNatten2DSelfAttention
    with qk_norm=True mixing LayerNorm fp32 Q/K outputs with autocasted V
    dtypes.
  • Normalizes cell, point, transformed, and partition-cluster mesh normals
    robustly across floating-point dtypes and scales. Zero vectors remain zero,
    small nonzero vectors retain unit length, and large finite vectors avoid
    norm overflow.
  • Datapipe transforms, collators, readers, and the unified external aero
    recipe no longer silently skip or mis-handle nested TensorDict fields
    (membership was tested against top-level td.keys(), and
    NormalizeMeshFields.inverse_td matched leaves by their last name only).
  • from_pyvista and to_pyvista round-trip nested Mesh data keys, and GLOBE
    accepts a nested global_data_ranks declaration.
  • Fixes out-of-bounds reads in the Darcy2D multi-grid solver for
    nr_multigrids >= 3 that could return huge or NaN pressure fields, and
    corrects the coarse-node coordinates used by bilinear upsampling for
    reduction factors greater than 2.
  • Darcy2D permeability fields are random per sample again: the
    init_uniform_random_4d and init_uniform_random_2d kernels seeded every
    thread from only its first launch index, so all samples in a batch shared
    four random Fourier coefficients
    (#2035).
    init_uniform_random_2d also negated min_value, which made the
    KelvinHelmholtz2D perturbations constant.
  • Darcy2D solves the Darcy equation it documents: the Jacobi update divided
    the grad(k) . grad(u) term by 2 dx instead of 4 dx**2, effectively
    dropping it (#2036).
    Generated pressure fields change; the darcy normaliser in the darcy_fno,
    darcy_transolver and darcy_nested_fnos examples is updated to match, and
    darcy_nested_fnos datasets must be regenerated.
  • The Darcy2D convergence check no longer reports a diverged (NaN) solve as
    converged.
  • Module.save now writes .mdlus checkpoints atomically (transfer to a
    temporary sibling name, then rename into place), so a process killed
    mid-write no longer leaves an unloadable truncated checkpoint. Also fixes
    legacy_format=True, which failed with FileNotFoundError on current
    fsspec versions.
  • save_checkpoint now also writes training state and plain PyTorch weights
    atomically, so an interrupted save no longer leaves a truncated checkpoint.
    With epoch=None, all files of a save share one index, so load_checkpoint
    restores weights and training state from the same save.
  • RandomRotateMesh defaults to mode="axis_aligned" when axes is given.
    Unified external aero recipe translation configs pass tensor bounds so
    torch.distributions.Uniform instantiates.
  • RenameMeshFields and DropMeshFields also apply to a DomainMesh's
    domain-level global_data.
  • sample_data_at_points and find_containing_cells find on-surface points
    of float32 surface meshes in large length units. A torus scaled to
    |x| ~ 1300 (millimeters) previously found 0.4% of its on-surface points
    and returned NaN for the rest, because float32 rounding (about
    1.2e-7 * |x|) exceeded the absolute 1e-6 distance tolerance.
  • BVH.from_mesh and ClusterTree.from_points compute Morton codes for 1-3
    spatial dimensions by spreading each coordinate's bits with a few
    shift-and-mask steps. CUDA no longer materializes every bit as int64 (about
    1 kB per point, 55 GB at 50M cells); temporaries are about 72 B per point in
    3D, and the step is about 4x faster on large inputs. Codes are unchanged.
  • sample_data_at_points, find_containing_cells, and
    find_all_containing_cells no longer miss the containing cell when a query
    point has more than 32 BVH candidate cells (for example, near a vertex shared
    by many triangles, or with a prebuilt BVH with leaf_size > 1). The BVH
    candidate search used by these functions no longer caps candidates per point.
  • Fixes VPNoiseScheduler.sigma_inv at extreme noise levels. In particular,
    converting sigma=0 no longer returns a slightly negative diffusion time.
  • radius_search with implementation="torch" no longer returns point 0's
    coordinates in unused neighbor slots when max_points exceeds the number of
    points. Those slots now stay zero, as with the warp backend, so point 0 no
    longer receives their gradient.
  • Eleven PhysicsNeMo-Mesh API pages that listed no functions now document them,
    and the pages of tensorclasses such as Mesh no longer list every TensorDict
    method.
  • PhysicsNeMo-Mesh examples that raised an error, and claims that the code
    contradicts, are corrected across the API reference, READMEs, and docstrings.
    The corrected claims include the sign of the Laplacian and the dimensions
    that each calculus operator supports.
  • The transient conjugate heat transfer tank filling example trains again, on
    one GPU or several. Before, its train.py stopped with a TypeError before
    the first step.
  • Importing physicsnemo.domain_parallel no longer breaks torch.compile for
    the whole process when nothing has imported torch._dynamo before it.
  • MeshReader and DomainMeshReader implement close(), so
    MeshDataset.close() works on the mesh path.
  • Coordinated subsampling in the zarr readers picks its reference key in the
    configured order rather than set order, so the rows read are deterministic.
  • ShardTensor fixes for domain parallelism: redistribute no longer grows an
    unbounded planner cache for fixed shapes (step time was climbing with step
    count),
    scatter_tensor returns a shard that owns its storage, stream recording on
    wrapped tensors works, and several torch.compile tracing issues are
    resolved.
  • torch.unbind on a Partial ShardTensor resolves the pending reduction
    before slicing instead of silently dropping it.
  • Fixed autocasting bugs for some attention operations in domain parallelism.
  • Backward through ShardTensor.to_local() adopts the gradient's shard order
    along with its placements, so a sharded primal with a replicated cotangent
    no longer trips a DTensorSpec assertion.

Security

  • CI and the Docker image no longer trust the compromised eMudhra emSign root
    CA (advisory). uv is now 0.13.5 in
    CI and the Dockerfile, the image upgrades ca-certificates and requires
    pip>=26.2.2 and certifi>=2026.10.19, and the lockfiles pin certifi 2026.10.23 and
    virtualenv 21.14.13. The GPU CI bootstrap installs the Hugging Face CLI
    with uv instead of Ubuntu's apt pip, and install-ci sets check-latest
    so it uses the patched CPython releases.

Dependencies

  • Requires TensorDict 0.15.3 or later (tensordict[zarr]>=0.15.3,<0.16.0).
    Building, copying, and moving small meshes takes 20-50% less time on CPU.
    TensorDict's torch.compile fixes since 0.15.0 also stop compiled code from
    recompiling when a Mesh holds the same fields in another order.
  • Drops onnx, torchvision and pandas from the required dependencies.
    pandas is now optional via datapipes-extras or model-extras.

Contributors

We’re grateful to everyone who contributed code, fixes, documentation, reviews, and ideas to PhysicsNeMo v2.3.0. Your contributions help us continuously improve PhysicsNeMo for the entire community!

A special shout-out to our contributors, in no particular order:

@arthurdjn, @lance-lii, @linneawolniewicz, @pjaysaval, @pratikgx, @udsy19, @xyf5432

Thank you ❤️ — we truly appreciate your contributions and hope to see more from you in the future!