buffalo_panel.families.SharedGlobalDofMap

class buffalo_panel.families.SharedGlobalDofMap(global_index, n_elements)[source]

Bases: DofMap

Collapse many element-local columns into one shared global degree.

Every owned element contributes to a common global coefficient and reads the same solved strength during post-processing.

Methods

lift_local_row(local_weights, n_unknowns)

Lift one shared local row into the global unknown space.

local_coefficients(x, n_elements)

Return the expanded shared coefficient for each local kernel column.

n_local_dofs(n_elements)

Return the expanded local coefficient count for this shared map.

scatter_columns(local_block, global_matrix)

Accumulate a shared element family into one global column.

Attributes

global_index

Shared global coefficient index used by all owned elements.

n_elements

Number of family elements collapsed into the shared coefficient.

global_index: int

Shared global coefficient index used by all owned elements.

n_elements: int

Number of family elements collapsed into the shared coefficient.

n_local_dofs(n_elements)[source]

Return the expanded local coefficient count for this shared map.

Parameters:

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

Returns:

Number of expanded family-local coefficients.

Return type:

int

Raises:

ValueError – If self.n_elements does not match n_elements.

scatter_columns(local_block, global_matrix)[source]

Accumulate a shared element family into one global column.

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

  • global_matrix (FloatArray) – Global matrix that receives the summed contribution in the shared column.

Raises:

ValueError – If local_block does not have one column per owned element.

local_coefficients(x, n_elements)[source]

Return the expanded shared coefficient for each local kernel column.

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

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

Returns:

Length-n_elements vector filled with the shared solved coefficient.

Return type:

FloatArray

Raises:

ValueError – If self.n_elements does not match n_elements.

lift_local_row(local_weights, n_unknowns)[source]

Lift one shared local row into the global unknown space.

Parameters:
  • local_weights (FloatArray) – One-dimensional local weight row with one entry per owned element.

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

Returns:

Global row whose shared coefficient equals the sum of the local weights.

Return type:

FloatArray

Raises:

ValueError – If local_weights is not one-dimensional, does not match n_elements, or n_unknowns is too small.