Numerically computing induced magnetic field from current density Let's say we have current density $J_i$ on a discretized grid with $(N_x \times N_y \times N_z)$ points. What is the best procedure to compute the induced magnetic field $(B_i)$ from the current density vector, $J_k = \epsilon_{ijk} \partial_i B_j $? I am more concerned with the numerical procedure of the solution.
 A: As long as electric field throughout the system is a potential field (gradient of some function of position), the Biot-Savart law (which gives magnetic field as integral of a certain function of current density and position all over the system) applies. This includes the cases where electric potential changes in time, but induced field is negligible.
However, this only gives you contribution to total magnetic field due to that current density, it doesn't give you contribution due to other sources, such as those implied by some specific boundary condition like "field vanishes on one side" or "field has zero normal component on some face of the cuboid region". Including such boundary conditions can be done if we go back to the Maxwell equation
$$
\nabla \times \mathbf B = \mu_0 \mathbf j + \mu_0\epsilon_0\frac{\partial \mathbf E}{\partial t}
$$
and apply the Helmholtz decomposition theorem to express $\mathbf B$ everywhere in terms of $\mu_0 \mathbf j + \mu_0\epsilon_0\frac{\partial \mathbf E}{\partial t}$.
https://en.wikipedia.org/wiki/Helmholtz_decomposition
See the formula for vector field $\mathbf A$ in terms of field $\mathbf F$; this can be directly used in the same way to get the vector field $\mathbf B$ in terms of the field $\mu_0 \mathbf j + \mu_0\epsilon_0\frac{\partial \mathbf E}{\partial t}$. However, as you can see, knowledge of current density is not enough, one needs to know rate of change of electric field everywhere as well. Only in the special case electric field is a potential field (like the electric field inside a capacitor that is slowly charged), the contribution due to the electric term vanishes and it is enough to know current density everywhere, and the result reduces to the Biot-Savart formula.
I can't give you advice on numerical method. I would try basic Riemann integration. It's probably better to ask elsewhere on SE on numerical methods in physics, e.g. https://scicomp.stackexchange.com/ .
