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

Adjust the effective domain size when the -xNjet option is given. More...

#include "pluto.h"

Functions

static int GetRightmostIndex (int, double ***)
 
void SetJetDomain (const Data *d, int dir, int log_freq, Grid *grid)
 
void UnsetJetDomain (const Data *d, int dir, Grid *grid)
 

Detailed Description

The SetJetDomain() function shortens the domain integration index in the direction specified by either '-x1jet', '-x2jet' or '-x3jet' to save computational time. This is done by setting the final integration index in the direction of jet propagation to that of the first zone (counting from the top) with non-zero pressure gradient (GetRightmostIndex()). The function UnsetJetDomain() restores the initial computational domain size. Useful for problems involving jet propagation.

Note
In parallel, the domain shall not be decomposed along the propagation direction.
Author
A. Mignone (migno.nosp@m.ne@p.nosp@m.h.uni.nosp@m.to.i.nosp@m.t)
Date
Oct 3, 2012

Function Documentation

int GetRightmostIndex ( int  dir,
double ***  q 
)
static

Find the local index j where grad(p) exceeds a ceratin threshold

void SetJetDomain ( const Data d,
int  dir,
int  log_freq,
Grid grid 
)

Adjust the size of computational domain by reducing the final computationa index in the direction of propagation.

Parameters
[in]dpointer to Data structure
[in]dirthe direction of propagation
[in]log_freqthe output log frequency
[in,out]gridpointer to array of Grid structures
void UnsetJetDomain ( const Data d,
int  dir,
Grid grid 
)

Restore original (full domain) indexes.