graphlow.core.MeshGeometry#

class graphlow.core.MeshGeometry(mesh: TensorMesh[T])#

Differentiable geometry evaluated on a mesh.

This is a thin wrapper around functions in graphlow.geometry.* that operate on a TensorMesh and return backend tensors. Autograd flows through mesh.points (and any differentiable data used by the operator).

Notes

Returned tensor shapes are always (n_elements, feature_dim). For example, cell volumes are (n_cells, 1).

Methods

apply_cell_local_fem_matrix_tet(...[, ...])

Apply the given local FEM matrix on the tet mesh.

apply_dirichlet_to_global_fem_matrix(...)

Apply the given Dirichlet boundary condition to the linear problem.

cell_centroids()

Compute per-cell centroids for a volume mesh.

cell_local_fem_mass_tet([cell_density])

Generate the cell-wise local FEM mass matrix on the tet mesh.

cell_local_fem_rigidity_tet([...])

Generate the cell-wise local FEM rigidity matrix on the tet mesh.

cell_volumes()

Compute per-cell volumes for a volume mesh.

chamfer_distance(target_points, *[, ...])

Compute Chamfer distance to a target point set.

face_area_vectors()

Compute face area vectors.

face_areas()

Compute face areas.

face_centroids()

Compute face centroids.

face_normals([eps])

Compute unit face normals.

global_fem_matrix_tet(cell_local_matrix_tet)

Compute the global FEM matrix on the tet mesh from the given cell-wise local FEM matrix.

hausdorff_distance(target_points, *[, ...])

Compute Hausdorff distance to a target point set.

isoAM([with_moment_matrix, consider_volume, ...])

Compute isotropic anisotropic metric (IsoAM) operator.

isoAM_with_neumann([with_moment_matrix, ...])

Compute IsoAM with a Neumann boundary model.

surface_volume()

Compute the enclosed volume of a surface mesh.