PLUTO  4.0
 All Data Structures Files Functions Variables Enumerations Macros Pages
Functions
set_indexes.c File Reference

Perform index permutation and set domain integration indexes. More...

#include "pluto.h"

Functions

void SetIndexes (Index *indx, Grid *grid)
 
void ResetState (const Data *d, State_1D *state, Grid *grid)
 

Detailed Description

The function SetIndexes() performs two different tasks, depending on the value of g_dir and the time-stepping algorithm:

The indexes coincide with the usual ones (IBEG, IEND,...) most of the time, but can be expanded one further zone either in the transverse or normal directions or both. This depends on the integration algorithm.

With cell-centered fields, the following table holds:

                      RK        CTU
                 +-------------------------------------------
  Transverse++   |    NO        YES, at predictor step
                 |
  Normal++       |    NO        NO

If constrained transport is enabled, then

                      RK        CTU
                 +-------------------------------------------
  Transverse++   |    YES       YES
                 |
  Normal++       |    NO        YES, at predictor step

Predictor step (g_intStage = 1) in CTU requires extra transverse loop to obtain transverse predictor in any case. Also, with CTU+CT, one needs to expand the grid of one zone in the normal direction as well. This allows to computed fully corner coupled states in the boundary to get electric field components during the constrained transport algorithm.

Author
A. Mignone (migno.nosp@m.ne@p.nosp@m.h.uni.nosp@m.to.i.nosp@m.t)
Date
Sep 17, 2012

Function Documentation

void ResetState ( const Data d,
State_1D state,
Grid grid 
)

Initialize some of the elements of the State_1D structure to zero in order to speed up computations. These includes:

  • left and right eigenvectors
  • the maximum eigenvalue ???
Parameters
[in]dpointer to Data structure
[out]statepointer to a State_1D structure
[in]gridpointer to an array of Grid structures
void SetIndexes ( Index *  indx,
Grid grid 
)

Set vector indices and integration index range.

Parameters
[out]indxpointer to an Index structure
[in]gridpointer to an array of Grid structures