buffalo_panel.families.DofMap

class buffalo_panel.families.DofMap[source]

Bases: ABC

Base class for mapping family-local quantities into global systems.

Concrete DOF maps define both how local influence columns scatter into a global matrix and how solved global coefficients expand back into the family-local coefficient space used by kernels.

Methods

lift_local_row(local_weights, n_unknowns)

Lift one family-local linear row into the global unknown space.

local_coefficients(x, n_elements)

Expand solved coefficients into the family-local coefficient space.

n_local_dofs(n_elements)

Return the number of family-local coefficients represented by this map.

scatter_columns(local_block, global_matrix)

Accumulate a local family block into a global matrix.

abstractmethod n_local_dofs(n_elements)[source]

Return the number of family-local coefficients represented by this map.

Parameters:

n_elements (int) – Number of elements owned by the family using this DOF map.

Returns:

Number of local coefficients expected by the kernel block builder.

Return type:

int

abstractmethod scatter_columns(local_block, global_matrix)[source]

Accumulate a local family block into a global matrix.

Parameters:
  • local_block (FloatArray) – Family-local influence block with one column per family element.

  • global_matrix (FloatArray) – Global matrix that receives the mapped family contribution.

abstractmethod local_coefficients(x, n_elements)[source]

Expand solved coefficients into the family-local coefficient space.

Parameters:
  • x (FloatArray) – Global solved coefficient vector.

  • n_elements (int) – Number of elements owned by the family using this DOF map.

Returns:

One solved coefficient value per family-local degree of freedom.

Return type:

FloatArray

abstractmethod lift_local_row(local_weights, n_unknowns)[source]

Lift one family-local linear row into the global unknown space.

Parameters:
  • local_weights (FloatArray) – One-dimensional row of local coefficient weights.

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

Returns:

Global row equivalent to applying local_weights in the family’s local coefficient space.

Return type:

FloatArray