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) |
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.
Initialize some of the elements of the State_1D structure to zero in order to speed up computations. These includes: