Performs various magnetic field averaging operations. More...
#include "pluto.h"Functions | |
| void | CT_AverageMagneticField (double ****bf, double ****UU, Grid *grid) |
| void | CT_AverageNormalMagField (const Data *d, int side, Grid *grid) |
| Compute the normal component of the volume-average magnetic field from the staggered components in the ghost zones. | |
| void | CT_AverageTransverseMagField (const Data *d, int side, Grid *grid) |
| Compute the transverse component of the volume-average magnetic field from the staggered components in the ghost zones. | |
| void CT_AverageMagneticField | ( | double **** | bf, |
| double **** | UU, | ||
| Grid * | grid | ||
| ) |
Average staggered magnetic field components to form a zone-centered field, e.g., 
The averaging procedure is performed inside the computational domain augmented by an additional row/plane of ghost zones in the boundary regions. Inclusion of boundary regions is useful only during the predictor step of the CT-CTU algorithm, whereas is useless for RK time stepping.
When the CT_EN_CORRECTION flag is enabled, we also redefine the zone total energy using the newly formed cell-centered field, i.e.,
| [in] | bf | array of staggered fields |
| [out] | UU | array of conservative variables |
| [in] | grid | pointer to Grid structure |
For a given "side" of the boundary, average the staggered magnetic field components normal to that boundary into a cell-centered field. For instance, at X3_BEG we only average Bz. Transverse components should be averaged using a slightly different stencil. This function is automatically called from Boundary() for consistency between staggered and zone-centered fields.
| [in,out] | d | pointer to PLUTO Data structure |
| [in] | side | the side |
| [in] | grid | pointer to PLUTO Grid structure |
For a given "side" of the boundary, average the staggered magnetic field components transverse to that boundary into a cell-centered field. For instance, at X2_BEG we average Bx and Bz. This call is necessary only if one requires consistency between staggered and cell-centered magnetic field components.
| [in,out] | d | pointer to PLUTO Data structure |
| [in] | side | the side |
| [in] | grid | pointer to PLUTO Grid structure |
1.8.2