mesh3d#

Mesh classes and polydata builder functions for structured solar-physics grids.

This module provides the two primary mesh classes used throughout pyvisualSphericalMesh and CartesianMesh — together with the abstract base classes and standalone polydata builder functions they depend on.

Class hierarchy#

_BaseFrameMesh (ABC)
├── CartesianMesh(pv.StructuredGrid, CartesianMeshFilters)
└── SphericalMesh(pv.RectilinearGrid, SphericalMeshFilters)

_BaseFrameFilters (ABC)
├── CartesianMeshFilters
└── SphericalMeshFilters

Polydata builders#

build_point_polydata()

Unconnected point cloud from coordinate arrays.

build_spline_polydata()

Line-connected splines from stacked coordinate arrays.

build_slice_polydata()

Quad-faced surface patch from 2-D coordinate arrays.

build_surface_polydata()

Reconstructed surface from scattered points.

build_thompson_sphere()

Sphere centered halfway between the origin and an observer position.

Operator support#

Both mesh classes inherit the full arithmetic suite from _BaseFrameMesh (+, -, *, /, //, %, **, unary neg/pos/abs) and __array_ufunc__(), so that NumPy ufuncs (e.g. np.sqrt(mesh)) operate element-wise on the active scalar field and return a new mesh instance of the same type.

Classes

_BaseFrameFilters()

Abstract base class defining the filter interface for frame-aware mesh classes.

_BaseFrameMesh(*args[, data, dataid, iformat])

Abstract base class shared by SphericalMesh and CartesianMesh.

CartesianMesh(*args, **kwargs)

A pyvista.StructuredGrid for data on a Cartesian \((x, y, z)\) grid.

CartesianMeshFilters()

Filter operations for CartesianMesh.

SphericalMesh(*args, **kwargs)

A pyvista.RectilinearGrid for data on a spherical \((r, \theta, \phi)\) grid.

SphericalMeshFilters()

Filter operations for SphericalMesh.

Functions

build_point_polydata(d1, d2, d3, axis[, frame])

Build an unconnected pyvista.PolyData point cloud from coordinate arrays.

build_slice_polydata(d1, d2, d3, axis[, frame])

Build a quad-faced pyvista.PolyData surface patch from coordinate arrays.

build_spline_polydata(d1, d2, d3, axis[, frame])

Build a line-connected pyvista.PolyData of splines from coordinate arrays.

build_surface_polydata(d1, d2, d3, axis[, ...])

Build a surface mesh from scattered coordinate arrays using a reconstruction method.

build_thompson_sphere(d1, d2, d3[, ...])

Build a Thomson sphere centered halfway between the origin and an observer position.