Migrating to 0.1.x mesh API#
This page maps the legacy GraphlowMesh-style API (mesh.compute_*,
mesh.dict_*_tensor, top-level mesh.device, and similar) to the
current TensorMesh layout: mesh.topology,
mesh.geometry, mesh.backend, and attribute containers.
For the high-level release summary (removed packages, new modules, tests, and docs), see Release notes.
The tables below use mesh for a TensorMesh
instance. Names that are unchanged may still differ in type, caching, or
backend behavior—check the API reference when porting.
Mesh core (points and cells)#
Legacy |
New |
|---|---|
|
|
|
|
|
|
|
|
Feature dictionaries#
Legacy |
New |
|---|---|
|
|
|
|
|
Removed. Topology is cached on |
Backend (device and dtypes)#
Legacy |
New |
|---|---|
|
Removed. Use |
|
|
|
|
I/O and PyVista#
Legacy |
New |
|---|---|
|
|
|
Removed. Choose the execution device via |
|
|
|
|
Extraction and indexing#
Legacy |
New |
|---|---|
|
Removed. Parent/surface index semantics are handled inside
|
|
|
|
Removed. Use |
|
Removed. Use |
Cell-point maps and medians#
Legacy |
New |
|---|---|
|
|
|
|
|
|
Geometry (compute_* → mesh.geometry)#
Legacy |
New |
|---|---|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Topology and adjacency (compute_* → mesh.topology)#
Legacy |
New |
|---|---|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Removed helpers (rewrite pattern)#
Legacy |
Migration strategy |
|---|---|
|
Use |
|
Reconstruct from the point-level correspondence plus the appropriate
|
Suggested porting order#
Replace construction/IO with
read()/from_pyvista()and an explicit backend.Rename
dict_*_tensoraccess topoint_data/cell_data.Replace
mesh.device/mesh.dtypereads withmesh.backend.*.Batch-replace
compute_*geometry calls withmesh.geometry.*and topology calls withmesh.topology.*using the tables above.For removed extraction or relative-incidence helpers, sketch the data flow with
cell_block/face_blockand parent-surface gather/scatter before deleting old glue code.