Compute the electric current. More...
#include "pluto.h"
Functions | |
void | GetCurrent (Data_Arr V, double **curlB, Grid *grid) |
Compute the curl of magnetic field at the cell interfaces in the direction given by g_dir. It returns a 1D array containing two of the three components (J_x, J_y, J_z). For instance, during the IDIR sweep, we compute (0, J_y, J_z) at interface (i+1/2,j,k). We do NOT compute the x-component (for g_dir == IDIR) since any differential operator successively applied to J will not need it. For instance:
div(J) = 0 (by definition) curl(J) at i+1/2 does not need Jx;
The same argument applies to other directions by cyclic permutation of indexes.