SMILE
v2.5
Schwarzschild Modelling Interactive expLoratory Environment
|
Direct computation of potential for any density profile, using double integration over space. More...
#include <potential.h>
Public Types | |
enum | ACCURACYMODE { AM_FAST, AM_MEDIUM, AM_SLOW } |
Public Types inherited from smile::CDensity | |
enum | POTENTIALTYPE { PT_UNKNOWN, PT_DIRECT, PT_COMPOSITE, PT_COEFS, PT_NB, PT_BSE, PT_BSECOMPACT, PT_SPLINE, PT_CYLSPLINE, PT_LOG, PT_HARMONIC, PT_SCALEFREE, PT_SCALEFREESH, PT_SPHERICAL, PT_DEHNEN, PT_MIYAMOTONAGAI, PT_FERRERS, PT_PLUMMER, PT_ISOCHRONE, PT_PERFECTELLIPSOID, PT_NFW, PT_SERSIC, PT_EXPDISK, PT_ELLIPSOIDAL, PT_MGE } |
list of all existing types of density or density/potential models, each of them implemented in its own class More... | |
enum | SYMMETRYTYPE { ST_NONE = 0, ST_REFLECTION = 1, ST_PLANESYM = 2, ST_ZROTSYM = 4, ST_SPHSYM = 8, ST_TRIAXIAL = ST_REFLECTION | ST_PLANESYM, ST_AXISYMMETRIC = ST_TRIAXIAL | ST_ZROTSYM, ST_SPHERICAL = ST_AXISYMMETRIC | ST_SPHSYM, ST_DEFAULT = ST_TRIAXIAL } |
Type of symmetry. More... | |
Public Member Functions | |
CPotentialDirect (const CDensity *_density, size_t mmax, ACCURACYMODE _accuracymode=AM_FAST) | |
init potential from analytic mass model | |
CPotentialDirect (const CPointMassSet< double > *_points, size_t mmax, SYMMETRYTYPE sym) | |
init potential from N-body snapshot | |
virtual CPotential * | clone () const |
not implemented | |
virtual POTENTIALTYPE | PotentialType () const |
enumerable potential type | |
virtual const char * | PotentialName () const |
string representation of potential type | |
virtual SYMMETRYTYPE | symmetry () const |
returns symmetry type of this potential | |
virtual double | Rho (double X, double Y, double Z, double) const |
returns density at given coordinates, this should obviously be overriden in derivative classes | |
virtual double | Phi (double X, double Y, double Z, double t=0) const |
Return potential at a given spatial point (possibly a time-varying one). More... | |
virtual void | Force (const double[], const double, double *, double *) const |
virtual double | Mass (const double r) const |
not implemented | |
virtual double | totalMass () const |
returns estimated M(r=infinity) or -1 if mass is infinite | |
double | Rho_m (double R, double z, int m) const |
double | Phi_m (double R, double z, int m) const |
Public Member Functions inherited from smile::CPotential | |
virtual void | Force (const double xyz[N_DIM], const double t, double *force, double *forceDeriv=NULL) const =0 |
Compute forces and, optionally, force derivatives at a given point. More... | |
Public Member Functions inherited from smile::CDensity | |
double | getRadiusByMass (const double m) const |
solves for Mass(r)=m | |
void | getRadiiByMass (const vectord &masses, vectord *radii) const |
solves for Mass(r)=m for an array of sorted values of m (more efficient than doing it one-by-one) | |
bool | checkMassMonotonic () const |
safety measure: check (roughly) that mass is increasing with radius | |
bool | checkDensityNonzero () const |
another safety measure: check that density doesn't drop to zero along any of three axes (important to assess spherical-harmonic approximation quality) | |
virtual double | getGamma () const |
returns inner density slope estimate (only used in BSE potential expansion for the automatic selection of shape parameter Alpha) | |
Static Public Member Functions | |
static const char * | myName () |
Private Member Functions | |
double | computeRho_m (double R, double z, int m) const |
Private Attributes | |
const CDensity * | density |
SYMMETRYTYPE | mysymmetry |
ACCURACYMODE | accuracymode |
std::vector< interp2d_spline * > | splines |
std::vector< gsl_spline * > | spl_hyperg |
const CPointMassSet< double > * | points |
Direct computation of potential for any density profile, using double integration over space.
Not suitable for orbit integration, as it does not provide expressions for forces; only used for computing potential on a grid for Cylindrical Spline potential approximation.
|
virtual |
Return potential at a given spatial point (possibly a time-varying one).
Implements smile::CPotential.