Fill normal staggered component in the ghost zones. More...
#include "pluto.h"
Functions | |
void | FillMagneticField (const Data *d, int side, Grid *grid) |
Assign the normal component of the staggered magnetic field in the ghost zone-faces. | |
Using the div.B = 0 condition in staggered MHD, this function computes the staggered component of magnetic field lying on the zone-face parallel to the boundary specified by "side". This is preformed by solving the div.B = 0 condition for one variable only which in 2-D requires the knowledge of the other 3 components while in 3-D required the knowledge of the other 5 staggered components.
Note that this operation is performed in the outermost ghost zones only since the face value at IBEG-1 or IEND is supposed to be part of the solution and is not changed during this function. Therefore, only nghost-1 faces are assigned:
* +-----+-----+-----+-----+-----+-- * | | | | | | * | X X | | | * | | | | | | * +-----+-----+-----+-----+-----+-- * | * <-----------------> BEG * Physical boundary * * X = components assigned in this function. *
[in,out] | d | pointer to PLUTO Data structure |
[in] | side | the side |
[in] | grid | pointer to PLUTO Grid structure |