算法艺术创作
algorithmic-art
通过代码和可调参数创作生成艺术与交互式视觉效果。
mesh-and-geometry【设计与创意】Use PhysicsNeMo-Mesh for Mesh/DomainMesh creation, validation, geometry/calculus, queries, repair/remesh, I/O, and visualization.
独立 GitHub 快照 · 自动分类 · 以原作者文档为准
Use this sub-skill when the task is about PhysicsNeMo-Mesh objects or mesh preprocessing rather than choosing a neural model or building a data reader.
Mesh, DomainMesh, simplicial mesh, triangle mesh, tetrahedral mesh, point cloud, curve mesh.point_data, cell_data, global_data, TensorDict field ranks.Mesh for one geometry and DomainMesh for an interior mesh plus named boundary meshes.physicsnemo.mesh exports only the core object model and field-rank helpers. Validation, I/O, sampling, repair, remeshing, spatial, and calculus functions live in submodules.mesh.to("cuda") moves geometry and attached data together; PyVista/VTK visualization and conversion are CPU/external-library workflows.from physicsnemo.mesh import DomainMesh, Mesh
from physicsnemo.mesh.validation import compute_quality_metrics, validate
# Compatibility alias exists in the validation submodule, not the mesh root:
from physicsnemo.mesh.validation import validate_mesh # pending-deprecation alias
Never write from physicsnemo.mesh import validate_mesh; it is not a root export.
points: floating tensor with shape (n_points, n_spatial_dims).cells: integer tensor with shape (n_cells, n_manifold_dims + 1), same device as points; omit it or pass None for a point cloud.n_manifold_dims <= n_spatial_dims; triangles in 3D are valid, tetrahedra in 2D are not.[0, n_points) and one cell should not repeat a vertex unless intentionally testing degeneracy.point_data leaves start with n_points; cell_data leaves start with n_cells; global_data has no leading mesh batch dimension.ranks_from_tensordict() and validate_data_contains_ranks().DomainMesh, every boundary value must be a Mesh and share the interior spatial dimension; use dm.validate() plus dm.is_boundary_watertight() when boundary closure matters.model-selection.MeshReader or DomainMeshReader: route to sibling sub-skill datapipes.distributed-and-domain-parallel.active-learning-and-deployment.Run a tiny local check without downloads:
python sub-skills/mesh-and-geometry/scripts/mesh_smoke.py
python sub-skills/mesh-and-geometry/scripts/mesh_smoke.py --cuda
The --cuda path only moves a three-point triangle mesh to CUDA when CUDA is available.