buffalo_panel.families.ElementFamily

class buffalo_panel.families.ElementFamily(name, support, singularity, basis, n_elements, panel_indices, dof_map, metadata=None)[source]

Describe one family of panel elements in an assembled formulation.

This dataclass groups the support, singularity, basis, ownership, and degree-of-freedom mapping needed to assemble one logically uniform set of elements into a global linear system.

Raises:

ValueError – If panel_indices is not one-dimensional or if its size does not match n_elements.

Methods

boundary_trace_row(boundary, n_unknowns)

Build a global row for one trailing-edge boundary strength trace.

endpoint_trace_row(endpoint, n_unknowns)

Build a global row that evaluates family strength at one endpoint.

local_coefficients(x)

Expand solved coefficients into the family-local coefficient space.

pinned_zero_row(n_unknowns)

Build fallback row that pins this family's primary coefficient to zero.

Attributes

name

Human-readable family name used for debugging and reporting.

support

Support descriptor identifying the geometric element type.

singularity

Singularity descriptor defining the family physics.

basis

Basis descriptor defining how the family is parameterized.

n_elements

Number of elements owned by this family.

panel_indices

Local panel indices owned by this family.

dof_map

Map that places family coefficients into the global solve vector.

metadata

Optional semantic labels or bookkeeping metadata for the family.

n_local_dofs

Return the number of family-local coefficients used by this family.

registry_key

Return the backend registry lookup key for this family.

name: str

Human-readable family name used for debugging and reporting.

support: SupportDescriptor

Support descriptor identifying the geometric element type.

singularity: SingularityDescriptor

Singularity descriptor defining the family physics.

basis: BasisDescriptor

Basis descriptor defining how the family is parameterized.

n_elements: int

Number of elements owned by this family.

panel_indices: IntInput

Local panel indices owned by this family.

dof_map: DofMap

Map that places family coefficients into the global solve vector.

metadata: dict[str, object] | None

Optional semantic labels or bookkeeping metadata for the family.

property registry_key: tuple[str, str, str]

Return the backend registry lookup key for this family.

Returns:

  • tuple[str, str, str] – Triple of support, singularity, and basis names used to select the appropriate computational kernel implementation.

  • The triple of support, singularity, and basis names used to select the

  • appropriate computational kernel implementation.

property n_local_dofs: int

Return the number of family-local coefficients used by this family.

Returns:

Number of family-local coefficients expected by kernel block builders for this family.

Return type:

int

local_coefficients(x)[source]

Expand solved coefficients into the family-local coefficient space.

Parameters:

x (FloatInput) – Global solved coefficient vector.

Returns:

One float64 solved coefficient per family-local kernel column.

Return type:

FloatArray

Raises:

ValueError – If the family’s degree-of-freedom map is inconsistent with family.n_elements.

endpoint_trace_row(endpoint, n_unknowns)[source]

Build a global row that evaluates family strength at one endpoint.

Parameters:
  • endpoint ({"start", "end"}) – Which support endpoint should be traced.

  • n_unknowns (int) – Length of the global solve vector.

Returns:

Global row that maps solve coefficients to the endpoint strength.

Return type:

FloatArray

Notes

This helper currently supports single-element line families with per-element global indexing for constant and linear-line bases. That is enough to assemble the current open-trailing-edge endpoint conditions while leaving a clear extension point for future bases.

boundary_trace_row(boundary, n_unknowns)[source]

Build a global row for one trailing-edge boundary strength trace.

Parameters:
  • boundary ({"lower_te", "upper_te"}) – Requested trailing-edge endpoint trace. "lower_te" means the start of the first family element, and "upper_te" means the end of the last family element.

  • n_unknowns (int) – Length of the global solve vector.

Returns:

Global row that maps solve coefficients to the requested boundary strength.

Return type:

FloatArray

Notes

This helper currently supports: - constant families with any element count - one-element linear-line families

pinned_zero_row(n_unknowns)[source]

Build fallback row that pins this family’s primary coefficient to zero.

Parameters:

n_unknowns (int) – Length of the global solve vector.

Returns:

Global row used as a temporary fallback constraint.

Return type:

FloatArray

Notes

This helper currently supports single-element line families with a per-element DOF map. It intentionally captures the temporary fallback behavior behind the family interface so formulation assembly does not need to inspect the concrete DOF-map type.