Main Page | Alphabetical List | Data Structures | File List | Data Fields | Globals | Related Pages

hydra.c File Reference

Computation of SPH forces and rate of entropy generation. More...

#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <math.h>
#include <mpi.h>
#include <gsl/gsl_math.h>
#include "allvars.h"
#include "proto.h"

Go to the source code of this file.

Defines

#define boxSize_X   boxSize
#define boxHalf_X   boxHalf
#define boxSize_Y   boxSize
#define boxHalf_Y   boxHalf
#define boxSize_Z   boxSize
#define boxHalf_Z   boxHalf

Functions

void hydro_force (void)
void hydro_evaluate (int target, int mode)
int hydro_compare_key (const void *a, const void *b)


Detailed Description

Computation of SPH forces and rate of entropy generation.

This file contains the "second SPH loop", where the SPH forces are computed, and where the rate of change of entropy due to the shock heating (via artificial viscosity) is computed.

Definition in file hydra.c.


Define Documentation

#define boxHalf_X   boxHalf
 

Definition at line 28 of file hydra.c.

#define boxHalf_Y   boxHalf
 

Definition at line 34 of file hydra.c.

#define boxHalf_Z   boxHalf
 

Definition at line 40 of file hydra.c.

#define boxSize_X   boxSize
 

Definition at line 27 of file hydra.c.

#define boxSize_Y   boxSize
 

Definition at line 33 of file hydra.c.

#define boxSize_Z   boxSize
 

Definition at line 39 of file hydra.c.


Function Documentation

int hydro_compare_key const void *  a,
const void *  b
 

This is a comparison kernel for a sort routine, which is used to group particles that are going to be exported to the same CPU.

Definition at line 563 of file hydra.c.

Referenced by hydro_force().

void hydro_evaluate int  target,
int  mode
 

This function is the 'core' of the SPH force computation. A target particle is specified which may either be local, or reside in the communication buffer.

< adiabatic index of simulated gas

< adiabatic index of simulated gas

< adiabatic index of simulated gas

Definition at line 353 of file hydra.c.

References hydrodata_out::Acc, All, global_data_all_processes::ArtBulkViscConst, global_data_all_processes::ComovingIntegrationOn, sph_particle_data::CurlVel, sph_particle_data::Density, hydrodata_in::Density, sph_particle_data::DhsmlDensityFactor, hydrodata_in::DhsmlDensityFactor, dmin(), sph_particle_data::DtEntropy, hydrodata_out::DtEntropy, hydrodata_in::F1, FLOAT, GAMMA, sph_particle_data::Hsml, hydrodata_in::Hsml, sph_particle_data::HydroAccel, HydroDataGet, HydroDataResult, imax(), KERNEL_COEFF_3, KERNEL_COEFF_6, particle_data::Mass, hydrodata_in::Mass, global_data_all_processes::MaxPart, sph_particle_data::MaxSignalVel, hydrodata_out::MaxSignalVel, ngb_treefind_pairs(), Ngblist, P, particle_data::Pos, hydrodata_in::Pos, sph_particle_data::Pressure, hydrodata_in::Pressure, SphP, particle_data::Ti_begstep, particle_data::Ti_endstep, global_data_all_processes::Timebase_interval, hydrodata_in::Timestep, hydrodata_in::Vel, and sph_particle_data::VelPred.

Referenced by hydro_force().

void hydro_force void   ) 
 

This function is the driver routine for the calculation of hydrodynamical force and rate of change of entropy due to shock heating for all active particles .

< adiabatic index of simulated gas

< adiabatic index of simulated gas

< adiabatic index of simulated gas

< adiabatic index of simulated gas

< adiabatic index of simulated gas

< adiabatic index of simulated gas

Definition at line 50 of file hydra.c.

References hydrodata_out::Acc, All, boxHalf_X, boxHalf_Y, boxHalf_Z, global_data_all_processes::BoxSize, boxSize_X, boxSize_Y, boxSize_Z, global_data_all_processes::BunchSizeHydro, global_data_all_processes::ComovingIntegrationOn, global_data_all_processes::CPU_HydCommSumm, global_data_all_processes::CPU_HydCompWalk, global_data_all_processes::CPU_HydImbalance, sph_particle_data::CurlVel, hydrodata_in::Density, sph_particle_data::Density, hydrodata_in::DhsmlDensityFactor, sph_particle_data::DhsmlDensityFactor, sph_particle_data::DtEntropy, hydrodata_out::DtEntropy, Exportflag, hydrodata_in::F1, GAMMA, GAMMA_MINUS1, hydrodata_in::Hsml, sph_particle_data::Hsml, global_data_all_processes::Hubble, hydro_compare_key(), hydro_evaluate(), sph_particle_data::HydroAccel, HydroDataGet, HydroDataIn, HydroDataPartialResult, HydroDataResult, particle_data::ID, hydrodata_in::Index, hydrodata_in::Mass, particle_data::Mass, sph_particle_data::MaxSignalVel, hydrodata_out::MaxSignalVel, N_gas, NTask, NumSphUpdate, global_data_all_processes::Omega0, global_data_all_processes::OmegaLambda, P, hydrodata_in::Pos, particle_data::Pos, pow(), hydrodata_in::Pressure, sph_particle_data::Pressure, second(), SphP, TAG_HYDRO_A, TAG_HYDRO_B, hydrodata_in::Task, ThisTask, particle_data::Ti_begstep, global_data_all_processes::Ti_Current, particle_data::Ti_endstep, global_data_all_processes::Time, timediff(), hydrodata_in::Timestep, hydrodata_in::Vel, and sph_particle_data::VelPred.

Referenced by compute_accelerations().


Generated on Sun May 22 17:33:30 2005 for GADGET-2 by  doxygen 1.3.9.1