CProj3DKernel Class Reference

3D to 2D projection using the SPH smoothing kernel More...

#include <CGridder.hpp>

Inheritance diagram for CProj3DKernel:

Inheritance graph
[legend]
Collaboration diagram for CProj3DKernel:

Collaboration graph
[legend]

List of all members.

Public Member Functions

 CProj3DKernel (int nx, int ny, Cvals *xval, Cvals *yval, Cvals *binval, double xmin, double xmax, double ymin, double ymax, int istart, int iend)
 Constructor.
int doGridding ()

Static Private Member Functions

static void setupIntegratedKernel ()
static float wFromKernTab (const float &R2)

Static Private Attributes

static bool _setup_int_kernel = true
static int _int_kernel_size = 1000
static vector< float > _intkerntab
static double _radkernel = 2.
static double _radkernel2 = _radkernel*_radkernel
static double _dR2table = _radkernel2 / (_int_kernel_size)
static double _ddR2table = 1. / _dR2table


Detailed Description

3D to 2D projection using the SPH smoothing kernel

Class to make a projection from 3D to 2D using the SPH smoothing kernel respecfully stolen from splash by Daniel Price (interpolate3D_projection.F90)

to avoid bugs output the x- and ydata should be either x,y or z.


Constructor & Destructor Documentation

CProj3DKernel::CProj3DKernel ( int  nx,
int  ny,
Cvals xval,
Cvals yval,
Cvals binval,
double  xmin,
double  xmax,
double  ymin,
double  ymax,
int  istart,
int  iend 
)

Constructor.

Note: we do not allocate the memory here: we allocate enough memory to contain the image, we will thus be allocating less memory than nx, ny dictate. If we don't do that this way then xmax or ymax has to change (have to increase proportional to the ratio of old to new bin number, e.g. if we had 250 x-bins and only use 25 for bining because the particles are located in some rectangle), as we are putting xmin..xmax in less bins than nx but still think that xmin..xmax is spread over nx bins.


Member Function Documentation

int CProj3DKernel::doGridding (  )  [virtual]

Projecting function, as from splash (Daniel Price's code)

returns number of particles gridded

Implements CGridder.

void CProj3DKernel::setupIntegratedKernel (  )  [static, private]

static function, sets up the table containing the integrated smoothing kernel tabulated in (r/h)**2 so that sqrt is not necessary

float CProj3DKernel::wFromKernTab ( const float &  R2  )  [static, private]

using linear interpolation: find the integrated value of the smoothing kernel for a certain R2


Member Data Documentation

int CProj3DKernel::_int_kernel_size = 1000 [static, private]

size of the integrated kernel table

vector< float > CProj3DKernel::_intkerntab [static, private]

container for the integrated kernel

bool CProj3DKernel::_setup_int_kernel = true [static, private]

flags whether we need to setup the integrated kernel


The documentation for this class was generated from the following files:

Generated on Fri Oct 16 18:59:58 2009 for HYPLOT by  doxygen 1.5.8