buffalo_panel.post.FieldPoints2D

class buffalo_panel.post.FieldPoints2D(x, y)[source]

Field evaluation points for two-dimensional post-processing.

A field-point container represents one fixed target set. Inputs are broadcast to a common shape and copied at construction so later caller-side mutations do not alter the points used for evaluation. Methods that compute field values can use the flattened coordinate views and reshape results back to the original field-point shape.

Methods

from_inputs(x, y)

Build field points from scalar, vector, or array-like coordinates.

reshape_values(values)

Reshape flat field values back to the field-point shape.

Attributes

x

Field-point x-coordinates with the broadcast input shape.

y

Field-point y-coordinates with the broadcast input shape.

coordinates

Flattened point coordinates with shape (size, 2).

shape

Broadcast shape of the field points.

size

Number of field points.

x_flat

Flattened x-coordinates for kernel evaluation.

y_flat

Flattened y-coordinates for kernel evaluation.

x: FloatArray

Field-point x-coordinates with the broadcast input shape.

y: FloatArray

Field-point y-coordinates with the broadcast input shape.

classmethod from_inputs(x, y)[source]

Build field points from scalar, vector, or array-like coordinates.

Parameters:
Returns:

Normalized field-point container whose coordinate arrays preserve the broadcast input shape.

Return type:

FieldPoints2D

Raises:

ValueError – If x and y cannot be broadcast to a common shape.

property shape: tuple[int, ...]

Broadcast shape of the field points.

property size: int

Number of field points.

property x_flat: FloatArray

Flattened x-coordinates for kernel evaluation.

property y_flat: FloatArray

Flattened y-coordinates for kernel evaluation.

property coordinates: FloatArray

Flattened point coordinates with shape (size, 2).

reshape_values(values)[source]

Reshape flat field values back to the field-point shape.

Parameters:

values (FloatInput) – Field values with one entry per field point.

Returns:

Values reshaped to shape.

Return type:

FloatArray

Raises:

ValueError – If values does not contain one entry per field point.