xnn.ffnn.models.amoeba_kernels.gather_field#

xnn.ffnn.models.amoeba_kernels.gather_field(grid, jac, w, start, batch, mesh, acc, d, coef, guard=None)[source]#

acc += coef d - grad(potential) in place: the mesh part of the field of the dipoles d (acc (N, 3) holds their real-space field) with the self-field coefficient coef; with the scalars guard of a conjugate-gradient iteration acc is left alone once the solve has converged.

Parameters:
Return type:

Tensor