PLUTO  4.4-patch2
Data Fields
RBox Struct Reference

#include <structs.h>

Data Fields

int ibeg
 
int iend
 
int jbeg
 
int jend
 
int kbeg
 
int kend
 
int di
 
int dj
 
int dk
 
int vpos
 
int * n
 
int * t
 
int * b
 
int * nbeg
 
int * nend
 
int * tbeg
 
int * tend
 
int * bbeg
 
int * bend
 

Detailed Description

The RBox (= Rectangular Box) defines a rectangular portion of the domain in terms of the grid indices [ibeg,jbeg,kbeg] corresponding to the lower corner and [iend,jend,kend] corresponding to the upper corner. The integer vpos specifies the variable location with respect to the grid (e.g. center/staggered).

With some macros it is possible to sweep along the box by changing the direction order (e.g. yxz rather than xyz), see ::BOX_TRANSVERSE_LOOP. In this case the index pointers n, t, b (normal, tangent and bitangent) and the corresponding lower and upper bounds must be set properly using the RBoxSetDirections() function. These are normally used as hidden indices inside the macro.

Note
The lower and upper grid indices may also be reversed (e.g. box->ibeg > box->iend ). In this case the macro BOX_LOOP automatically reset the directional increment (box->di) to -1.

Field Documentation

◆ b

int* b

Pointer to binormal index when looping along a specified direction (e.g. k when dir = IDIR ) Set manually or using a macro.

◆ bbeg

int* bbeg

Pointer to lower index in the binormal direction. Set by the RBoxSetDirections() function.

◆ bend

int* bend

Pointer to upper index in the binormal direction. Set by the RBoxSetDirections() function.

◆ di

int di

Directional increment (+1 or -1) when looping over the 1st dimension of the box. Automatically set by the BOX_LOOP macro.

◆ dj

int dj

Directional increment (+1 or -1) when looping over the 2nd dimension of the box. Automatically set by the BOX_LOOP macro.

◆ dk

int dk

Directional increment (+1 or -1) when looping over the 3rd dimension of the box. Automatically set by the BOX_LOOP macro.

◆ ibeg

int ibeg

Lower corner index in the x1 direction.

◆ iend

int iend

Upper corner index in the x1 direction.

◆ jbeg

int jbeg

Lower corner index in the x2 direction.

◆ jend

int jend

Upper corner index in the x2 direction.

◆ kbeg

int kbeg

Lower corner index in the x3 direction.

◆ kend

int kend

Upper corner index in the x3 direction.

◆ n

int* n

Pointer to the normal index when looping along a specified direction. Set manually or using a macro.

◆ nbeg

int* nbeg

Pointer to lower index in the normal direction. Set by the RBoxSetDirections() function.

◆ nend

int* nend

Pointer to upper index in the normal direction. Set by the RBoxSetDirections() function.

◆ t

int* t

Pointer to tangent index when looping along a specified direction (e.g. j when dir = IDIR ). Set manually or using a macro.

◆ tbeg

int* tbeg

Pointer to lower index in the tangent direction. Set by the RBoxSetDirectionsl() function.

◆ tend

int* tend

Pointer to upper index in the tangent direction. Set by the RBoxSetDirections() function.

◆ vpos

int vpos

Location of the variable inside the cell.


The documentation for this struct was generated from the following file: