PLUTO  4.4-patch2
Functions
ct_fill_mag_field.c File Reference

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-faces 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.
. More...

#include "pluto.h"

Functions

void FillMagneticField (const Data *d, int side, Grid *grid)
 
void FillElectricField (const Data *d, int side, Grid *grid)
 

Detailed Description

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.
 * 
Author
A. Mignone (migno.nosp@m.ne@t.nosp@m.o.inf.nosp@m.n.it)
Date
Apr 25, 2019

///////////////////////////////////////////////////////////////////

Function Documentation

◆ FillElectricField()

void FillElectricField ( const Data d,
int  side,
Grid grid 
)
Parameters
[in,out]dpointer to PLUTO Data structure
[in]sidethe side
[in]gridpointer to PLUTO Grid structure
Todo:
replace the loops with more compact macro, such as X1_BEG_LOOP()...

◆ FillMagneticField()

void FillMagneticField ( const Data d,
int  side,
Grid grid 
)
Parameters
[in,out]dpointer to PLUTO Data structure
[in]sidethe side
[in]gridpointer to PLUTO Grid structure
Todo:
replace the loops with more compact macro, such as X1_BEG_LOOP()...