Acoular 25.03 documentation

Grid

«  grids   ::   grids   ::   RectGrid  »

Grid

class acoular.grids.Grid

Bases: ABCHasStrictTraits

Abstract base class for grid geometries.

This class defines a common interface for all grid geometries and provides tools to query grid properties and related data. It is intended to serve as a base class for specialized grid implementations and should not be instantiated directly as it lacks concrete functionality.

size = Property(desc='overall number of grid points')

The total number of grid points. This property is automatically calculated based on other defining attributes of the grid. (read-only)

shape = Property(desc='grid shape as tuple')

The shape of the grid, represented as a tuple. Primarily useful for Cartesian grids. (read-only)

pos = Property(desc='x, y, z positions of grid points')

The grid positions represented as a (3, size) array of floats. (read-only)

digest = Property

A unique identifier for the grid, based on its properties. (read-only)

subdomain(sector)

Return the indices for a subdomain in the grid.

Allows arbitrary subdomains of type Sector.

Parameters:
sectorSector object

Sector describing the subdomain.

Returns:
tuple

A 2-tuple of arrays of integers or numpy.s_ objects that can be used to mask or select the specified subdomain from a grid-shaped array.

Notes

The numpy.where() method is used to determine the the indices.

«  grids   ::   grids   ::   RectGrid  »