bfieldtools.mesh_magnetics.vector_potential_coupling

bfieldtools.mesh_magnetics.vector_potential_coupling(mesh, r, Nchunks=None, approx_far=True, margin=2, chunk_clusters=False)

Compute vector potential coupling matrices from a linear stream function on a mesh using analytic integrals.

Parameters
mesh: Trimesh mesh object

mesh describing the geometry of the field source

r: ndarray (Np, 3)

evaluation points

approx_far: Boolean (True)

If True, use approximate calculation for triangles that far from the source triangles using a simple quadrature (see integrals.triangle_potential_approx)

margin: float

Cut-off distance for “far” points measured in mean triangle side length.

Returns
A: ndarray (Np, 3, Nvertices)

Coupling matrix corresponding to a mapping from a stream function on the mesh to vector potential at the evaluation points