Mesh Index#

class pyfes.core.mesh.Index#

Bases: pybind11_object

Provide efficient spatial indexing of mesh triangles for rapid spatial queries.

__init__(self: pyfes.core.mesh.Index, lon: Annotated[numpy.typing.ArrayLike, numpy.float64, '[m, 1]'], lat: Annotated[numpy.typing.ArrayLike, numpy.float64, '[m, 1]'], triangles: Annotated[numpy.typing.ArrayLike, numpy.int32, '[m, 3]']) None#

Construct an index of a mesh.

Parameters:
  • lon – Specify the longitude of the vertices.

  • lat – Specify the latitude of the vertices.

  • triangles – Provide the triangles of the mesh.

lat(self: pyfes.core.mesh.Index) Annotated[numpy.typing.NDArray[numpy.float64], '[m, 1]']#

Retrieve the latitude of the vertices.

Returns:

The latitude of the vertices.

lon(self: pyfes.core.mesh.Index) Annotated[numpy.typing.NDArray[numpy.float64], '[m, 1]']#

Retrieve the longitude of the vertices.

Returns:

The longitude of the vertices.

triangles(self: pyfes.core.mesh.Index) Annotated[numpy.typing.NDArray[numpy.int32], '[m, 3]']#

Retrieve the triangles of the mesh.

Returns:

The triangles of the mesh.