SMILE  v2.5
Schwarzschild Modelling Interactive expLoratory Environment
Namespaces | Functions
managepotential.h File Reference

Creation of CPotential and CMassModel instances, and input/output of potentials. More...

#include "common.h"
Include dependency graph for managepotential.h:
This graph shows which files directly or indirectly include this file:

Namespaces

 smile
 common namespace for all core SMILE classes, functions and variables
 

Functions

const CDensity * smile::createDensity (const CConfigPotential *config)
 create a density model according to the parameters. More...
 
const CPotential * smile::createPotential (CConfigPotential *config)
 create an instance of CPotential according to the parameters passed. More...
 
template<typename NumT >
const CPotential * smile::createPotentialFromPoints (const CConfigPotential *configPotential, const CPointMassSet< NumT > *points)
 create a potential of a generic expansion kind from a set of point masses. More...
 
const CPotential * smile::readPotential (CConfigPotential *configPotential)
 load a potential from a text or snapshot file. More...
 
bool smile::writePotential (const std::string &fileName, const CPotential *potential)
 write potential expansion coefficients to a text file. More...
 
CMassModel * smile::createMassModel (const CDensity *density, int numNodes=NUM_RADIAL_POINTS_SPHERICAL_MODEL, double Rmin=0, double Rmax=0, const CMassModel *poten=NULL)
 create an equivalent spherical mass model for the given density profile. More...
 

Detailed Description

Creation of CPotential and CMassModel instances, and input/output of potentials.

Author
EV
Date
2010-2015

This file provides several utility function to manage instances of CDensity and CPotential: creating a density or potential model from parameters provided in CConfigPotential, creating a potential from a set of point masses or from an N-body snapshot file, loading potential coefficients from a text file, writing expansion coefficients to a text file, and creating a spherical mass model that approximates the given density model. Note that potential here is elementary (non-composite, no central black hole).