discretize.CurvilinearMesh.boundary_edge_vector_integral#

property CurvilinearMesh.boundary_edge_vector_integral#

Integrate a vector function on the boundary.

This matrix represents the boundary surface integral of a vector function multiplied with a finite volume test function on the mesh.

In 1D and 2D, the operation assumes that the right array contains only a single component of the vector u. In 3D, however, we must assume that u will contain each of the three vector components, and it must be ordered as, [edges_1_x, ... ,edge_N_x, edge_1_y, ..., edge_N_y, edge_1_z, ..., edge_N_z] , where N is the number of boundary edges.

Returns:
scipy.sparse.csr_matrix

Sparse matrix of shape (n_edges, n_boundary_edges) for 1D or 2D mesh, (n_edges, 3*n_boundary_edges) for a 3D mesh.

Notes

The integral we are representing on the boundary of the mesh is

\[\int_{\Omega} \vec{w} \cdot (\vec{u} \times \hat{n}) \partial \Omega\]

In discrete form this is:

\[w^T * P @ u_b\]

where w is defined on all edges, and u_b is all three components defined on boundary edges.