discretize.utils.inv2X2BlockDiagonal

discretize.utils.inv2X2BlockDiagonal(a11, a12, a21, a22)[source]

Inverts a stack of 2x2 matrices by using the inversion formula

inv(A) = (1/det(A)) * cof(A)^T

Input: A - a11, a12, a21, a22

Output: B - inverse