bfieldtools.integrals.triangle_potential_approx

bfieldtools.integrals.triangle_potential_approx(Rcenters, ta, reg=1e-12)

1/r potential of a uniform triangle using centroid approximation

Calculates 1/R potentials for triangle centroids (The singularity at the centroid is handled with the very small reg value, but anyway the values close to the centroid are inexact)

Parameters:
Rcenters(N, (Ntri), 3) array

Displacement vectors (Neval, Ntri, xyz) from triangle centers

ta(Ntri) array

Triangle areas

reg: float

Regularization value used in approximation

Returns:
result: result: ndarray (…., Ntri, Ntri_verts)

Resultant 1/r potential for each node (Ntri_verts) in each triangle (Ntri) in the displacement vectors R