![]()  | 
  
    SMILE
    v2.5
    
   Schwarzschild Modelling Interactive expLoratory Environment 
   | 
 
basis-set expansion on the Zhao(1996) basis set (alpha models) More...
#include <potential.h>


Public Member Functions | |
| template<typename NumT > | |
| CPotentialBSE (double _Alpha, size_t _Ncoefs_radial, size_t _Ncoefs_angular, const CPointMassSet< NumT > &points, SYMMETRYTYPE _sym=ST_TRIAXIAL, bool checkMonotonic=true) | |
| init coefficients from a discrete point mass set  | |
| CPotentialBSE (double _Alpha, const std::vector< vectord > &coefs) | |
| load coefficients from stored values  | |
| CPotentialBSE (double _Alpha, size_t _Ncoefs_radial, size_t _Ncoefs_angular, const CDensity *density) | |
| init potential coefficients from an analytic mass model  | |
| virtual CPotential * | clone () const | 
| Return a pointer to a copy of this instance of potential.  More... | |
| virtual POTENTIALTYPE | PotentialType () const | 
| enumerable potential type  | |
| virtual const char * | PotentialName () const | 
| string representation of potential type  | |
| virtual double | Mass (const double r) const | 
| a faster estimate of M(r) from the l=0 harmonic only  | |
| void | getCoefs (std::vector< vectord > *coefsArray) const | 
| return BSE coefficients array  | |
| double | getAlpha () const | 
| return the shape parameter of basis set  | |
| size_t | getNcoefs_radial () const | 
| return the number of radial basis functions  | |
  Public Member Functions inherited from smile::CPotentialSH | |
| CPotentialSH (size_t _Ncoefs_angular) | |
| virtual SYMMETRYTYPE | symmetry () const | 
| returns symmetry type of this potential  | |
| virtual double | Rho (double X, double Y, double Z, double t=0) 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 xyz[N_DIM], const double t, double *force, double *forceDeriv=NULL) const | 
| common function for all derivative classes  | |
| size_t | getNcoefs_angular () const | 
| return l_max – the order of angular expansion  | |
  Public Member Functions inherited from smile::CDensity | |
| virtual double | totalMass () const | 
| returns estimated M(r=infinity) or -1 if mass is infinite  | |
| 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 | |
| virtual void | computeSHCoefs (const double r, double coefsF[], double coefsdFdr[], double coefsd2Fdr2[]) const | 
| compute angular expansion coefs at the given radius  | |
| template<typename NumT > | |
| void | prepareCoefsDiscrete (const CPointMassSet< NumT > &points) | 
| compute coefficients from a discrete point mass set; if Alpha=0 then it is computed automatically from the data  | |
| void | prepareCoefsAnalytic (const CDensity *density) | 
| compute coefficients from a smooth mass profile; if Alpha=0 then it is chosen automatically from density->getGamma()  | |
| void | initDefault () | 
| called as a default initialization when everything else fails  | |
| void | checkSymmetry () | 
| assigns symmetry class if some coefficients are (near-)zero  | |
Private Attributes | |
| size_t | Ncoefs_radial | 
| number of radial basis functions [ =SHcoefs.size() ]  | |
| std::vector< vectord > | SHcoefs | 
| array of coefficients A_nlm of potential expansion  | |
| double | Alpha | 
| shape parameter controlling inner and outer slopes of basis functions  | |
Additional Inherited Members | |
  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... | |
  Protected Member Functions inherited from smile::CPotentialSH | |
| void | assignlmrange () | 
| assigns the above variables based on mysymmetry, should be called whenever mysymmetry has changed  | |
  Protected Attributes inherited from smile::CPotentialSH | |
| size_t | Ncoefs_angular | 
| l_max, the order of angular expansion (0 means spherically symmetric model)  | |
| SYMMETRYTYPE | mysymmetry | 
| may have different type of symmetry  | |
| int | lmax | 
| int | lstep | 
| int | mmin | 
| int | mmax | 
| int | mstep | 
| range of angular coefficients used for given symmetry  | |
basis-set expansion on the Zhao(1996) basis set (alpha models)
      
  | 
  inlinevirtual | 
Return a pointer to a copy of this instance of potential.
A standard copy constructor or assignment is disabled because of different amount of data needed to be copied in different derived classes).
Implements smile::CPotential.
 1.8.8