Question: Splitting a matrix defined on regular and irregular domains into three matrices

Greetings

I trust that everyone is well here. I have an inquiry regarding the partitioning of a matrix BA, defined on both regular and irregular domains, into three matrices: Ad, Ab, and Ae, such that NewBA = Ad + Ab + Ae. Here, Ad comprises the entries of BA that reside within the domain, Ab includes the elements of BA located on the boundary, and Ae is derived as BA - Ad - Ab for any values of Mx and My. The specifics of matrix BA are contained in the attached document where NewBA constructed manually for different values of Mx and My for better understanding.
Splitting_a_matrix.mw
The attached file contains the matrix BA constructed in a square format. How may the BA matrix be adapted to create an irregular shape, such as a quarter circle?

The red dots indicate the mesh within the domain Ad, while the meshing along the blue line should occur in Ab.

I await your kind reply. Kindly ensure your well-being

Please Wait...