SMILE
v2.5
Schwarzschild Modelling Interactive expLoratory Environment
|
Class for representing an axisymmetric density model. More...
#include <massmodelaxi.h>
Public Member Functions | |
CMassModelAxisymmetric (const CDensity *density, size_t ngrid_R, size_t ngrid_z, bool initSplineMass=true) | |
construct the axisymmetric approximation to a given density model | |
~CMassModelAxisymmetric () | |
destroy object, deallocate memory | |
double | mass_R (double R) const |
interpolated mass in a cylinder of radius R (extending to infinity in z direction) | |
double | find_R_mass (double m) const |
find radius R containing a given mass in the cylindrical volume | |
double | Sigma (double R) const |
interpolated surface density (integral of rho over z=-infinity..+infinity) as a function of radius R | |
double | mass_z (double z) const |
interpolated mass in a slice from -z to +z, extending to infinity in R direction | |
double | find_z_mass (double m) const |
find value of z such that the mass of the slice -z..+z equals the given amount | |
double | getTotalMass () const |
return the estimate of total mass | |
Protected Attributes | |
vectord | grid_R |
vectord | grid_z |
grid nodes in R and z directions | |
double | totalMass |
total mass of the original density model | |
gsl_spline * | spl_mass_R |
interpolating spline for the enclosed mass in a cylindrical radius R | |
gsl_spline * | spl_mass_z |
interpolating spline for the enclosed mass in a slice in z direction | |
Class for representing an axisymmetric density model.
It takes an instance of CDensity class which provides a 3d mass model; if this model is not axisymmetric itself then it is averaged over azimuthal angle. Then it constructs auxiliary splines that interpolate the one-dimensional mass profiles in R and z directions, and provides functions for their fast evaluation.