Compute magnetic field from vector potential. More...
#include "pluto.h"Functions | |
| void | VectorPotentialDiff (double *b, int i, int j, int k, Grid *grid) |
The function VectorPotentialDiff() computes either staggered or cell-center magnetic field components by suitable central differencing of the vector potential,
.
For cell-centered MHD vector potential is compute at the cell-center. In the case of staggered MHD, the position of A is edge-centered and it is shown below:
______________________
/ /|
/ / |
/ z face / |
/ Ax |
/ / |
/ / Az
----------Ay----------- |
| | |
| | y |
| | face |
| | /
Az x face Az /
| | Ax
| | /
| | /
| |/
----------Ay-----------
| void VectorPotentialDiff | ( | double * | b, |
| int | i, | ||
| int | j, | ||
| int | k, | ||
| Grid * | grid | ||
| ) |
Assign face- or cell-centered magnetic field by differentiating the vector potential.
| [out] | b | array of magnetic field starting at 0, |
| [in] | i | the cell index in the first coordinate direction |
| [in] | j | the cell index in the first coordinate direction |
| [in] | k | the cell index in the first coordinate direction |
| [in] | grid | pointer to an array of Grid structures |
1.8.2