buffalo_panel.families.SharedGlobalDofMap
- class buffalo_panel.families.SharedGlobalDofMap(global_index, n_elements)[source]
Bases:
DofMapCollapse 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
Shared global coefficient index used by all owned 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_elementsdoes not matchn_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_blockdoes 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_elementsvector filled with the shared solved coefficient.- Return type:
- Raises:
ValueError – If
self.n_elementsdoes not matchn_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:
- Raises:
ValueError – If
local_weightsis not one-dimensional, does not matchn_elements, orn_unknownsis too small.