graphlow.core.MeshGeometry.apply_dirichlet_to_global_fem_matrix#

MeshGeometry.apply_dirichlet_to_global_fem_matrix(global_matrix: T, global_b: T, sparse_dirichlet: T) tuple[T, T]#

Apply the given Dirichlet boundary condition to the linear problem.

Parameters:
global_matrix: T

Sparse global matrix.

global_b: T

Dense global tensor.

sparse_dirichlet: T

Sparse tensor describing the Dirichlet boundary condition.

Returns:
global_matrix_with_dirichlet: T

Sparse global matrix after taking into account the Dirichlet bc.

global_b_with_dirichlet: T

Global b after taking into account the Dirichlet bc.