Repository navigation
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 inDomainMeshReader, 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_volumeandisla_volume_joint) and a
schedulerconfig group. Each ISLA config reads the whole flow-domain
boundary and fits one 80 GB GPU at its defaults. -
Adds the
FlipBoundaryOrientationandBoundaryCellsToPointsmesh
transforms tophysicsnemo.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_systematicdraws 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. -
KNNScorerandDensityScorerprovide reusable out-of-distribution (OOD)
scoring underexperimental.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. -
MeanandVariancenow support opt-in tensor-aware streaming with detached
state, state combination, andShardTensorreductions over declared
observation axes.
Existing metric constructors retain their behavior. PublicTensorAccumulator
andStatisticRulesupport custom statistics throughsummarize,merge, and
resulthooks, with built-inMeanRuleandVarianceRule.SumReduction
defines the type of the completed-reduction callback, including itskeepdim
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 andexperimental.uqexpose the heads withoutgpytorch;
constructing a head raises an installation error if it is missing. -
Adds
GeoTransolver.forward_with_geometry_featuresfor predictions and detached
geometry tokens in one pass, preserving the existingforwardAPI. -
Strata depthwise conditioning convolutions automatically size vmap chunks
to the 32-bit indexing limit viaDepthwiseConv(chunk_size="auto"). -
MeshDataset(cache_host=True)reads each sample once and serves repeats from
memory, for fitting runs on a few samples.DomainMeshReadergains
interior_n_points_rangeto draw the interior point count for each sample,
andCenterMeshgainsstore_center_asto 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 withPointwiseCalibrator,
FunctionalBandCalibrator,RiskControlCalibrator,ConformalPredictor,
CoverageAccumulator,AbsoluteErrorScore,NormalizedErrorScore,
QuantileRegressionScore, andAuxScale. Custom scores subclass
NonconformityScoreand register withregister_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 usephysicsnemo.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 recipebiw_yaris_deformer
and target-relative penetration metrics. -
Adds standalone FLARE++ attention and model APIs, with input-conditioned
dynamic routing, plus aGALE_FPPbackend for using the same mixer inside
GeoTransolver. -
Adds
physicsnemo.datapipes.keysand routes every config-driven field name
inphysicsnemo.datapipesthrough it, so a"."in a YAML field name
("solution.pressure") addresses a leaf inside a nestedTensorDict.
NestedMeshdata no longer needs to be flattened before use. -
DistributedManager.initialize(timeout=...)accepts numeric seconds or a
timedeltafor 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. -
MeshToDomainMeshincell_centroidsmode records each source cell's
complete effective measure on the interior under the mesh-owned
_effective_measurepoint-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 withextra_task. -
Unified external aero recipe:
NonDimensionalizeByMetadatagains
scale_geometryso 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.lossestrain against a
flow/velocity target:FlowMatchingLoss, plusWeightedFlowMatchingLoss
for an element-wise weight such as a binary mask. Their
MultiDiffusionFlowMatchingLossand
MultiDiffusionWeightedFlowMatchingLosscounterparts provide patch-based
flow-matching training on large spatial domains.MultiDiffusionModel2D
andMultiDiffusionPredictorsupport both patch-based diffusion and flow
matching during training and inference. - A dedicated
RectifiedFlowNoiseSchedulerin
physicsnemo.diffusion.noise_schedulersprovides a rectified-flow
schedule. - Module-wide support for flow predictors, enabled by new conversion
functions inLinearGaussianNoiseScheduler(x0_to_flow/flow_to_x0
/score_to_flow/flow_to_score) and the corresponding conversion
callbacks everywhere conversions between prediction types are necessary.
- New losses in
-
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, andcase_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.spatialexportscanonical_frame, the principal-axis frame
that a weighted point set carries with it, andframe_coordinates, the
points' coordinates in that frame. -
ClusterTree.find_point_interaction_pairstakes targets of shape(R, M, D)
withroot_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, andDPMPlusPlus2MUniC2to
physicsnemo.diffusion.samplers.ExponentialEulerSolversupports
DDIM-like sampling for distilled few-step models, its stochastic
counterpart adds EDM-style churn and configurable re-noising,
DPMPlusPlus2Mprovides efficient second-order sampling, and
DPMPlusPlus2MUniC2adds 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 throughphysicsnemo.diffusion.samplers.sample. -
The
examples/weather/regional_weather_diffusionrecipe can train diffusion
models with rectified flow matching (training.loss.type: flow_matching) and
sample them in validation andinference.py. Adds the
replication_corrdiff_conusconfig 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_pairsbuilds 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 attheta=0.5and the point plan
holds 1.5e8. -
The PhysicsNeMo-Mesh API reference documents
physicsnemo.mesh.fields
(RankSpecandFieldSchema) and thephysicsnemo.mesh.primitivescatalog. -
ClusterTree.mergejoins trees into one forest, whoseroot_idslist 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 newClusterTree.from_point_groups(one tree
per group of points, and their forest) and
ClusterTree.find_point_interaction_pairsrun 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, andcount_only=Truecounts them without making
the plan. -
radius_searchaccepts 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. -
ShardTensorring attention, ring kNN and ring ball query run on functional
collectives; ring attention works undertorch.compileas an eager
graph-break region, with uneven sequence shards and attention masks
sharded like the queries. In-placedetach_on aShardTensoris
supported. -
radius_searchon sharded inputs works undertorch.compile. -
Domain-parallel (rank-local) reading in the datapipes:
ZarrReader,
TensorStoreZarrReader,MeshReaderandDomainMeshReaderaccept a
domain_paralleldict and a 1-Ddevice_mesh; each rank reads only its
rows and the dataset assemblesShard(0)ShardTensors on the device.
Custom readers opt in by implementingReader._load_sample_domain_parallel
with the exportedDomainParallelConfig/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_oneshotand
crash_geotransolver_oneshotofexamples/structural_mechanics/crashto
biw_yaris_geoflare_oneshotandbiw_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/crashstandardizes the global features with
train-split statistics stored instats/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.pyrefuses to resume it
instead of recomputing the statistics and continuing on rescaled inputs, and
inference.pyneeds 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 ownstatsdirectory; new runs compute the
corrected ones, so their models are not interchangeable with the old runs'. -
⚠️ BC-impact (crash example frame names):inference.pyof the
crash example writes the predicted frames asframe_001toframe_T
(predictionkbelongs to framek + 1) instead of starting at
frame_000;post_processing/compute_l2_error.pyreads the new names. -
⚠️ BC-impact (diffusion metric imports): Cleans up
physicsnemo.diffusiondependencies and imports. General-purpose metrics can
no longer be imported fromphysicsnemo.diffusion.metrics. Use the following
modules instead:rank_probability_score:physicsnemo.metrics.general.calibrationcrps,kcrps:physicsnemo.metrics.general.crpsStreamingStatistic,Mean,Variance:
physicsnemo.metrics.general.ensemble_metricsentropy_from_counts,relative_entropy_from_counts:
physicsnemo.metrics.general.entropyHistogram,cdf,histogram,normal_cdf,normal_pdf:
physicsnemo.metrics.general.histogrampower_spectrum:physicsnemo.metrics.general.power_spectrumwasserstein_from_cdf,wasserstein_from_samples:
physicsnemo.metrics.general.wasserstein
For example, use
from physicsnemo.metrics.general.crps import crps.
ReplaceEnsembleMetricsimports with
from physicsnemo.metrics.general.ensemble_metrics import StreamingStatistic.
Removed imports emit a warning and an error with the replacement import.
wasserstein_from_normalremains available through both existing import paths. -
Partitioning a graph across GPUs (
partition_graph_with_id_mapping, behind
DistributedGraphand 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. -
ClusterTreebuilds tighter trees by default (split="morton"), so
Barnes-Hut plans need 2-4x fewer interactions at the sametheta.
split="midpoint"gives the previous trees. -
GLOBE's default
thetais 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_targetsisTrue(wasFalse), as in its
examples. -
ClusterTree.compute_source_aggregatesis 20-30x faster, and
ClusterTree.find_dual_interaction_pairsis up to 1.7x faster with 40% less
peak memory. The plan's interactions are no longer sorted by source. -
GLOBE's
BarnesHutKernelneeds 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, andtorch.compilebuilds GLOBE faster, with the same outputs. -
GLOBE's
BarnesHutKernel.forwardtakesnear_chunk_count, a number of
chunks, in place ofnear_chunk_size, and no longer takes
source_aggregates. -
The
source_dataandglobal_dataof GLOBE's kernel classes must hold
exactly the declared fields, under nested keys: a flat key such as
"grp.v"now raises aKeyErrorthat 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-epochsand--lr-decay-epochsreplace--patience-steps, and
checkpoints from earlier versions of the example do not resume. -
ClusterTree.compute_source_aggregatespacks its source data with
TensorDict.pack, so source data with leaves of several dtypes now raises
aTypeErrorinstead 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 oftorch.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.fieldsis rebuilt around two types.RankSpec(rank,
symmetric,parity;shape(n_spatial_dims),numel(n_spatial_dims)) is
one field's transformation law;FieldSchemais an insertion-ordered
mapping from dotted field names toRankSpec, parsed once at a model's
boundary withFieldSchema.parse(nested groups and dotted names flatten
alike) and queried with.ranks,.count(rank),FieldSchema.key(name),
and.check(tensordict, label=...). Both are read-onlydicts, 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 aRankSpecor 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 batchedtorch.linalgcalls. 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 ofphysicsnemo.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_ranksandglobal_data_ranks
becomeoutput_schema,boundary_source_schemasandglobal_schema
(kernels:output_schema,source_schema,global_schema), each also the
attribute holding the parsedFieldSchema. GLOBE raises
NotImplementedErrorfor 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, andSourceAggregatesnow inherit directly from
TensorClassinstead of using the@tensorclassdecorator. Existing
constructor defaults andMesh[m, s]runtime specialization remain
available, and nested mesh types survive memmap round trips. The memmap
layout is unchanged: existing.pmshand.pdmshfiles 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 defaultforce_copy=False,to_pyvistaoutput
of 1D and 3D meshes now shares cell storage with theMesh, 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, andremove_degenerate_cellsis
about 5x faster. Results are unchanged. -
Loop and butterfly subdivision evaluate their edge rules for every edge and
select withtorch.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.mergeneed up to 2.9x less peak memory, with unchanged results. -
Mesh integration uses a shared
_effective_measurefield for complete cell
and point measures. Cell measures fall back to geometry; point measures are
explicit and independent of connectivity.Mesh.integrate_samplesevaluates
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
DiffusionUNet3Dand its reusableConv3D,
GroupNorm3D,UNetAttention3D, andUNetBlock3Dlayers from experimental
to stable production APIs inphysicsnemo.models.diffusion_unetsand
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_weightscalls withscale_measures. Consumers
should read complete measures withcell_measuresinstead of multiplying
cell_areasbycell_measure_weights. Update stored-field mappings from
cell_data._measure_weightstocell_data._effective_measureand remove any
subsequent multiplication by geometric areas. -
LSQ point gradients on large surface meshes are about 2x faster on GPU, and
LSQ gradients (Meshandphysicsnemo.nn.functional.mesh_lsq_gradient)
synchronize the GPU much less often. LSQ and DEC derivatives also need less
peak memory. -
Mesh.slice_pointspicks 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. -
Darcy2Dsolves 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.Darcy2Dnow raises a
ValueErrorunless0 < min_permeability <= max_permeabilityand
max_permeability / min_permeability <= 4; above that ratio the
finite-difference scheme does not converge. -
Extends
LinearGaussianNoiseSchedulerwith two methods.
get_linear_denoiseracceptsprediction_typeanddenoising_type, and
returns bias, antiderivative, and slope callables for the new exponential
and multistep solvers.snrexposes the schedule's signal-to-noise ratio,
used as the multistep extrapolation coordinate byDPMPlusPlus2Mand
DPMPlusPlus2MUniC2. -
translate,rotate,scale, and theirDomainMeshand 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.transformgainsassume_similarityandrotategains
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 ofsolve_exwith millions of right-hand sides, whose slow
path for pivoting matrices madeRandomRotateMesh(mode="uniform")take 1.3 s
on the 17.7M-triangle DrivAerML surface (6.5 ms now, on a GB300). -
The
toleranceofsample_data_at_points,find_containing_cells, and
find_all_containing_cellsis now relative. Barycentric coordinates must
still be>= -tolerance, but the distance from a point to a cell's affine
hull is now limited totolerancetimes the largest absolute coordinate of
the mesh, instead oftolerancein 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_orientationorients 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 addn_cells_flipped, with
n_faces_flippedkept as an alias, andn_non_orientable_components. -
repair_mesh(fix_orientation=True)orients every mesh except point clouds,
instead of only surfaces in 3D. -
compute_mesh_statisticsreads all statistics in one device-to-host
transfer instead of about 20.item()calls. -
MeshReaderandDomainMeshReadermap 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. -
BoundingBoxFiltertakes 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 inexamples/minimal/meshare 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_gridprimitive takesperturbation_scaleas a fraction of
the grid spacing (was an absolute length), so its default no longer folds
cells, even on fine grids. -
CenterMeshmaterializes the center of mass on sharded meshes so the offset
stays a plain tensor. -
index_selectand integer-tensor indexing on aShardTensorexchange only
the requested rows instead of all-gathering the source; no host sync, and
torch.compilesafe. -
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=falseto count every point alike, as before. -
The stream-based ring helpers
perform_ring_iteration_asyncand
get_comm_streamare removed; useperform_ring_iteration_funcolwith
wait=Falseandfinish_ring_iterationfor overlap. -
Promotes GLOBE out of
experimentaltophysicsnemo.models.globe.GLOBE, the
package's only export. Legacy import shims keep the old
physicsnemo.experimental.models.globepaths and saved checkpoints working
and emit aLegacyFeatureWarning.
Deprecated
EnsembleMetrics, the base class ofMean,Variance, andHistogram, is
renamedStreamingStatistic.EnsembleMetricsremains an alias of the same
class, so existing subclasses andisinstancechecks keep working; importing
it emits aLegacyFeatureWarning.weighted_multinomialandWeightedMultinomialmoved from
physicsnemo.nn.functionaltophysicsnemo.utils. Importing them from
physicsnemo.nn.functionalstill works but emitsLegacyFeatureWarning.- Unified external aerodynamics recipe:
training.loss_type: rmseis
deprecated in favour ofrelative_mse, which names what it always
computed (target-normalized relative MSE, no square root) and delegates
tophysicsnemo.metrics.general.relative_error.rmsestill works and
warns. - The
physicsnemo.experimental.models.globeimport path is deprecated.
Import GLOBE fromphysicsnemo.models.globeinstead.
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 ofexport_to_onnx_stream, call
torch.onnx.exportwith anio.BytesIOtarget; instead of
run_onnx_inference, run the result in anonnxruntime.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:
callGeoTransolver.forward_with_geometry_features, pool the tokens,
and score them withKNNScorer. Global-parameter bounds become an explicit
input check. Seeexamples/minimal/uq/feature_scoring.py. A saved
GuardedGeoTransolverkeeps its GeoTransolver weights under themodel.
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_VERSIONis nowv1.1.
- The
physicsnemo.experimental.uq.variational_gp_headand
physicsnemo.experimental.uq.field_variational_gp_headmodules. Import the
heads fromphysicsnemo.experimental.uqas 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, andvalidate_data_contains_ranks,
replaced byFieldSchema(see Changed). Importing one of them from
physicsnemo.meshorphysicsnemo.mesh.fieldsraises anImportErrorthat
names its replacement.- Removes the opt-in
physicsnemo.compatimport-alias layer and the
PHYSICSNEMO_ENABLE_COMPATenvironment 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 inv2.0-MIGRATION-GUIDE.md.
Checkpoint loading is unaffected. - Removes
physicsnemo.utils.mesh, deprecated since 2.1 with removal scheduled
for 2.2. Thevtkandstlentries leave theutils-extrasextra with it.
Replacements:sdf_to_stl(field, threshold):marching_cubesfrom
physicsnemo.mesh.generatereturns aMesh; save it withto_pyvista
fromphysicsnemo.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.saveandDomainMesh.savecan write a mesh read from disk to a new
path. They used to raise unlesscopy_existing=Truewas 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_cellsandfix_orientationkeep 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.DistributedManagernow initializes on CPU-only hosts, where PyTorch rejected
its CPUdevice_idand a missing local rank raisedZeroDivisionError.
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_mlflowoffline mode logs to SQLite (./mlruns/mlflow.db)
instead of the file store that current MLflow rejects.docs/test_scriptsrun again on current PhysicsNeMo.physicsnemo.metrics.cae.cfd.compute_tke_spectrumno longer raises
UnboundLocalErrorwhenlengthis passed; the domain length now sets the
grid spacing used for the wavenumbers.- The GLOBE DrivAerML example trains under
torch.compileagain 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
sumandmean
whenkeepdim=True, including independently sharded simulation and spatial axes. torch.compilewith ShardTensor: neighborhood attention (na1d/na2d/
na3d) keeps its halo exchange when compiled,selecthandles 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
srunno longer hang in
DistributedManager.initialize()when Slurm starts rank 0 on a different node
from the one that ransrun. 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 aTypeError.Mesh.get_point_to_points_adjacency(),get_facet_mesh(), and
get_boundary_mesh()compile withtorch.compile(fullgraph=True, dynamic=True).
Facet extraction now specializes on the cell width instead of passing a
symbolic size toitertools.combinations.- Compiled code that reads
Meshgeometric properties, such ascell_areas
or curvatures, no longer recompiles when the input mesh's cache differs, and
no longer writes into that cache.set_cell_measuresstores a copy of the
cachedcell_areas, so a measure never aliases it.physicsnemo.meshnow
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. Meshgeometric properties, curvatures, and the calculus operators give
correct gradients when the points require gradients, even after a read under
torch.no_grad(), and a secondbackward()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 aDistributedGraphin 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 sopartition_graph_nodewise,
partition_graph_by_coordinate_bboxandDistributedGraph, acceptint32
CSC indices and rank mappings. Before, they failed with a dtype mismatch.weighted_multinomialwithreplacement=Trueaccepts more than 2^24
weights, instead of raisingtorch.multinomial's category-limit error. So
DoMINO'ssample_points_on_meshnow works on meshes with over 2^24 faces.MeshDataset.close()no longer raisesAttributeErrorwith aMeshReader
orDomainMeshReader. Both readers now have aclose()method.GLOBEacceptsboundary_meshesas a TensorDict, as the DrivAerML example
passes them. Before, every forward pass of that example failed.- A
GLOBEmodel built with atorch.deviceastree_build_devicecan now be
saved. Before,save()raisedTypeError, 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, inphysicsnemo.nn.functionaland
physicsnemo.mesh.spatial, supports backpropagation: the signed distance is
differentiable with respect to the mesh vertices and the query points.
Before,backwardraised because the Warp op had no autograd formula. The
hit points and hit faces carry no gradients.- With
max_points, the Warp backend ofradius_searchleaves the.gradof
batched points and queries unset in the forward pass. Before, it set them to
zeros. Mesh.clean(),clean_mesh,merge_duplicate_points, andvalidate()find
every duplicate point in clusters of more than 100 coincident points. Before,
some duplicates were missed and stayed in the cleaned mesh.Mesh.mergetreats a list of one mesh like a longer list. It checks its
input and stacksglobal_dataalong a new dimension. Before, it returned a
copy of the mesh.Mesh.padandMesh.pad_to_next_powerplace padding cells on a padding
point when they also pad points. Before, padding cells touched the last real
point and changed results there, such ascell_data_to_point_data.DomainMesh.rotate,scale, andtransformwork when the meshes of a
domain differ in float dtype, such as a float64 interior with float32
boundaries, where they raised before.repair_meshalso removes the degenerate cells that its merge of duplicate
points creates. Before, its output could failvalidate().fill_holesworks 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_statisticsreports 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_edgesreturns edges, not triangles, for meshes of four or more
manifold dimensions.Mesh.with_datagiven a dict no longer shares nested data groups with the
source mesh, so changing the result leaves the source unchanged.cell_data_to_point_dataandpoint_data_to_cell_dataraise, 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.MeshandDomainMeshsubclasses 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 raisesTypeErrorfor 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,planeandtetbeamprimitives have
positively oriented cells and outward or +z normals. Before, their cells were
inverted or their normals pointed the wrong way.planealso raises
ValueErrorfor a zero or non-finite normal, where it used to return the +z
plane. - Meshes with
int32connectivity give the same results asint64ones in
Butterfly and Loop subdivision, edge lookups andrefit_mesh_to_implicit.
Before, large meshes could get wrong Butterfly midpoints and edge matches,
Loop subdivision raised on open surfaces, andrefit_mesh_to_implicitcould
leave boundary vertices off the surface. - Loop subdivision of
float64meshes computes its vertex weights in
float64. Before, it computed them infloat32, which limited the new
vertex positions tofloat32precision. - A mesh saved with cached adjacencies now loads in a new Python process.
Before,Mesh.loadraised unlessphysicsnemo.mesh.neighborswas 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_meshoutput 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, asget_boundary_meshproduces, 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, andflathandles fields with several trailing dimensions. - Intrinsic LSQ gradients no longer raise on float32 point clouds or on 16-bit
curves, and raise aTypeErrorfor 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 thoseMesh.padadds. DEC divergences are now
correct on float32 meshes a few millimetres across in metres. Mesh.cleannow sums the point measures of merged points, so integrals by
point quadrature no longer change.DefaultCollatorwith astack_dimpast the batch dimensions of the
samples stacks each tensor withtorch.stack, without TensorDict behaviour
that 0.15 deprecates. The batch'sbatch_sizenow matches its tensors, and
samples with non-tensor data no longer fail to collate.physicsnemo.meshno 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_cellscentroids,
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_cellswith a smallalphano longer places some
points outside their cells.- In float32,
sdf_polygon_2dno longer gives NaN distances for a polygon
with a repeated vertex or NaN gradients on its edges, and
mesh_implicit_domainnow meshes float32 polygons such as a square. - The API reference again shows the docstrings of
Mesh,DomainMesh, and the
other tensorclasses inphysicsnemo.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,embedandpad.
Before, facets and extruded cells inherited the parent's measure,project
kept the old one,embedraised on centroid point clouds, and padding cells
got NaN measures that made a laterscaleraise.extrudenow raises on
dimensional point measures instead of copying them to the extruded points. DomainMesh.apply_to_meshesleaves each boundary mesh on the device the
function returns it on. Before, the boundaries went back to the domain's
device.rotatewith a Python angle rotates float64 meshes at float64 precision.
Before, it computed the rotation in float32.rotaterotates float64 meshes about a vector axis at float64 precision.
Before, it rounded the axis to float32, so points on the axis moved.rotate,scale, andtransformwith 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_cellswithalphaother 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_powerpads 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_2drecovers boundary segments that cross several triangles.
Before, it raised on simple polygons, even rectilinear ones, and blamed
float64 degeneracy or crossing segments.signed_distance_fieldaccepts non-contiguous query points and vertices,
such as a transposed tensor, which used to raise a Warp error.- The mesh
signed_distance_fieldkeeps 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. knnwith the cuML backend,find_nearest_cellsandmatch_pointsreturn
empty results for an empty query set on CUDA, as they do on CPU, instead of
raising a CUDA error.match_pointsalso 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. DomainMeshReadergainsboundary_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, aboutN / 27of
theNrequested. The default keeps the composed behavior.- The
hemisphereandconeprimitives 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_surfaceedges have lengthside_length, and
sphere_icosahedralwithsubdivisions=0honorsradius.sphere_volumeandcylinder_volumetetrahedra fill the solid without
overlap. With VTK 9.7, their Delaunay tetrahedra overlapped and left gaps.lumpy_ballraisesValueErrorwhennoise_amplitudefolds its surface
so far that the tetrahedra would overlap.text_1d_2doutlines are closed loops; before, each ended in a zero-length
edge.text_2d_2dfills curved glyphs fully: thin rings such as U+25CB lost
part of their area.text_2d_2dfills glyphs with slanted edges, such as 'A' and 'V', without
flat triangles or hanging vertices, sotext_2d_3dof ordinary text is
watertight. It also leaves the counter of a nested glyph empty: '®' was 3%
too large.cone,diskandplanework 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
DomainMeshReadersubsamples select the same rows from Zarr stores
as from memmap files. Before, boundaries read in full, and interiors read
withdrop_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, asMesh.cell_centroidsdoes.
Before, polygons, pyramids, prisms and polyhedra got other points, and even
a regular pentagon was off-center.to_pyvistaexports vertex-cell meshes, and empty line and triangle meshes,
with their cell data. Before, the export failed.to_zarrraises aTypeErrornaming 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_zarrraises aValueErrorbefore 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_zarrloads the stores thatto_zarrwrites for subclasses ofMesh
andDomainMesh, as their base class, andto_zarrraises aTypeErroron
a subclass with fields of its own. Before,from_zarrrefused these stores.from_zarr,MeshReaderandDomainMeshReaderkeep the cell shape of a
zarr mesh with zero cells. Before, such a mesh came back as a point cloud.to_pyvistaexports empty meshes with vector or tensor fields, where it
raised before, andfrom_pyvistareads complex arrays of one value with
shape(1,), where it raised or dropped a dimension before.from_pyvistawithpoint_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,MeshReaderandDomainMeshReaderraise on a zarr store that
to_zarrdid not write or did not finish. Before, a store cut short by a
full disk, for example, loaded without its missing fields.from_zarrloads scalar uint64 fields, where it raised before.Mesh.drawwith 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.drawwith matplotlib fits the view to every mesh drawn onaxand,
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.drawwith PyVista letsbackend_optionsset 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_pairsreturned an empty plan if any point
had a NaN coordinate, and failed on plans with more than 2^31 interactions.ClusterTree.from_pointsno longer keeps the autograd graph of its inputs.- With
expand_far_targets=Trueandleaf_size > 1,
ClusterTree.find_dual_interaction_pairsstill 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 restoreGradScalerstate. - 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_orientationno 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_cellsandsubdivideget 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, andstable_angle_between_vectorsis 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 aLinAlgError. - On CUDA,
sample_data_at_pointsnext to a degenerate cell no longer raises
LinAlgError. Degenerate cells contain no sample points on any device, and
compute_circumcentersreturns their centroid instead of NaN or infinity. - Edge flips in
mesh_implicit_domainwork 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
Natten2DSelfAttentionandRopeNatten2DSelfAttention
withqk_norm=TruemixingLayerNormfp32 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 nestedTensorDictfields
(membership was tested against top-leveltd.keys(), and
NormalizeMeshFields.inverse_tdmatched leaves by their last name only). from_pyvistaandto_pyvistaround-trip nestedMeshdata keys, and GLOBE
accepts a nestedglobal_data_ranksdeclaration.- Fixes out-of-bounds reads in the
Darcy2Dmulti-grid solver for
nr_multigrids >= 3that could return huge or NaN pressure fields, and
corrects the coarse-node coordinates used by bilinear upsampling for
reduction factors greater than 2. Darcy2Dpermeability fields are random per sample again: the
init_uniform_random_4dandinit_uniform_random_2dkernels seeded every
thread from only its first launch index, so all samples in a batch shared
four random Fourier coefficients
(#2035).
init_uniform_random_2dalso negatedmin_value, which made the
KelvinHelmholtz2Dperturbations constant.Darcy2Dsolves the Darcy equation it documents: the Jacobi update divided
thegrad(k) . grad(u)term by2 dxinstead of4 dx**2, effectively
dropping it (#2036).
Generated pressure fields change; thedarcynormaliser in thedarcy_fno,
darcy_transolveranddarcy_nested_fnosexamples is updated to match, and
darcy_nested_fnosdatasets must be regenerated.- The
Darcy2Dconvergence check no longer reports a diverged (NaN) solve as
converged. Module.savenow writes.mdluscheckpoints 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 withFileNotFoundErroron current
fsspec versions.save_checkpointnow also writes training state and plain PyTorch weights
atomically, so an interrupted save no longer leaves a truncated checkpoint.
Withepoch=None, all files of a save share one index, soload_checkpoint
restores weights and training state from the same save.RandomRotateMeshdefaults tomode="axis_aligned"whenaxesis given.
Unified external aero recipe translation configs pass tensor bounds so
torch.distributions.Uniforminstantiates.RenameMeshFieldsandDropMeshFieldsalso apply to aDomainMesh's
domain-levelglobal_data.sample_data_at_pointsandfind_containing_cellsfind 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 absolute1e-6distance tolerance.BVH.from_meshandClusterTree.from_pointscompute 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_cellsno 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 withleaf_size > 1). The BVH
candidate search used by these functions no longer caps candidates per point.- Fixes
VPNoiseScheduler.sigma_invat extreme noise levels. In particular,
convertingsigma=0no longer returns a slightly negative diffusion time. radius_searchwithimplementation="torch"no longer returns point 0's
coordinates in unused neighbor slots whenmax_pointsexceeds 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 asMeshno 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, itstrain.pystopped with aTypeErrorbefore
the first step. - Importing
physicsnemo.domain_parallelno longer breakstorch.compilefor
the whole process when nothing has importedtorch._dynamobefore it. MeshReaderandDomainMeshReaderimplementclose(), 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. ShardTensorfixes for domain parallelism: redistribute no longer grows an
unbounded planner cache for fixed shapes (step time was climbing with step
count),
scatter_tensorreturns a shard that owns its storage, stream recording on
wrapped tensors works, and severaltorch.compiletracing issues are
resolved.torch.unbindon aPartialShardTensorresolves 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 aDTensorSpecassertion.
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 upgradesca-certificatesand requires
pip>=26.2.2andcertifi>=2026.10.19, and the lockfiles pincertifi2026.10.23 and
virtualenv21.14.13. The GPU CI bootstrap installs the Hugging Face CLI
with uv instead of Ubuntu's apt pip, andinstall-cisetscheck-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'storch.compilefixes since 0.15.0 also stop compiled code from
recompiling when aMeshholds the same fields in another order. - Drops
onnx,torchvisionandpandasfrom the required dependencies.
pandasis now optional viadatapipes-extrasormodel-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!