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
Field-point x-coordinates with the broadcast input shape.
Field-point y-coordinates with the broadcast input shape.
Flattened point coordinates with shape
(size, 2).Broadcast shape of the field points.
Number of field points.
Flattened x-coordinates for kernel evaluation.
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:
x (
FloatInput) – Field-point x-coordinates.y (
FloatInput) – Field-point y-coordinates.
- Returns:
Normalized field-point container whose coordinate arrays preserve the broadcast input shape.
- Return type:
- 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:
- Raises:
ValueError – If values does not contain one entry per field point.