PLUTO  4.4-patch2
Functions
startup.c File Reference

Loop on the computational cells to assign initial conditions. More...

#include "pluto.h"

Functions

double FieldAverage (double, double, Grid *, int, int)
 

Detailed Description

This function is called anyway, even if restart from file is enabled. This is useful to initialized a number of global variables and/or user-defined parameters by calling Init().

Author
A. Mignone (migno.nosp@m.ne@t.nosp@m.o.inf.nosp@m.n.it) B. Vaidya D. Mukherjee
Date
Apr 10, 2020

Function Documentation

◆ FieldAverage()

double FieldAverage ( double  bp,
double  bm,
Grid grid,
int  dir,
int  l 
)

For central-type discretizaions (no CONSTRAINED_TRANSPORT), computes the volume-averaged magnetic fields from the face values.

Parameters
[in]bpB component at right staggered face (e.g. Bx[i, j, k])
[in]bmB component at left staggered face (e.g. Bx[i-1, j, k])
[in]gridPLUTO grid structure.
[in]dirdirection of staggered. options: IDIR, JDIR, KDIR
[in]linteger for cell along direction of staggered
Returns
average field.