TYCHO  1.3.0
 All Data Structures Files Functions Variables Enumerations Enumerator
Functions
/home/kapf/tycho_docu/hydro_sweeps.c File Reference
#include <stdio.h>
#include <stdlib.h>
#include <math.h>
#include "variables_global.h"
#include "prototypes.h"

Go to the source code of this file.

Functions

int hydro_sweeps (int x, int y, int z, int direction)

Function Documentation

int hydro_sweeps ( int  x,
int  y,
int  z,
int  direction 
)

The forward and backward hydro sweeps the direction gives the forward [0] or backward [1] sweeps

Definition at line 18 of file hydro_sweeps.c.

References copy_arrays_for_viscosity(), dimension, sweep_x(), sweep_y(), sweep_z(), viscosity_on_off, wind(), and wind_on_off.

Referenced by main().

{
// Here we switch the wind on
if (wind_on_off == 1) wind(x, y, z);
if (direction == 0) {
sweep_x(x, y, z, 0);
if (dimension > 1) sweep_y(x, y, z, 1);
if (dimension == 3) sweep_z(x, y, z, 2);
}
if (direction == 1) {
if (dimension == 3) sweep_z(x, y, z, 2);
if (dimension > 1) sweep_y(x, y, z, 1);
sweep_x(x, y, z, 0);
}
return 0;
}