SMILE  v2.5
Schwarzschild Modelling Interactive expLoratory Environment
Public Member Functions | Private Attributes | List of all members
smile::CBinnedMassRefinementFnc Class Reference

A mass refinement function is used to create an Nbody snapshot with unequal mass particles. More...

#include <orbitlib.h>

Inheritance diagram for smile::CBinnedMassRefinementFnc:
Inheritance graph
[legend]
Collaboration diagram for smile::CBinnedMassRefinementFnc:
Collaboration graph
[legend]

Public Member Functions

 CBinnedMassRefinementFnc (const COrbitLibrary *orbitlib, size_t numBins, const CBasicOrbitFilteringFnc *_evalFnc)
 initialize bin boundaries by sorting the output of evalFnc for all orbits in the library
 
virtual double eval (const COrbitDesc *orbit) const
 return the bin into which the orbit falls, using the pre-initialized array of bins
 

Private Attributes

const CBasicOrbitFilteringFncrankFnc
 the evaluation function; orbits are sorted according to the value returned by this function
 
vectord binBoundary
 divide the entire orbit library into numBins; the bin boundaries in terms of evaluation function values are stored in this array
 

Detailed Description

A mass refinement function is used to create an Nbody snapshot with unequal mass particles.

It ranks orbits into several bins, based on another evaluation function passed as a parameter; mass factors of adjacent bins differ by a factor of two, and each bin contains the number of orbits that also differ by a factor of two. Used in creating multimass Nbody models: one may wish to have a better mass resolution for the inner parts of the model, based on orbit energy, or pericenter distance, or anything else.


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