30 #ifndef GRALE_MASSSHEETLENS_H
32 #define GRALE_MASSSHEETLENS_H
34 #include "graleconfig.h"
36 #include "constants.h"
41 class GRALE_IMPORTEXPORT MassSheetLensParams :
public GravitationalLensParams
44 MassSheetLensParams() { m_density = 0; }
45 MassSheetLensParams(
double density) { m_density = density; }
46 MassSheetLensParams(
double Dd,
double Ds,
double Dds) { m_density = (SPEED_C*SPEED_C/(4.0*CONST_PI*CONST_G*Dd))*(Ds/Dds); }
47 double getDensity()
const {
return m_density; }
48 GravitationalLensParams *createCopy()
const;
49 bool write(serut::SerializationInterface &si)
const;
50 bool read(serut::SerializationInterface &si);
55 class GRALE_IMPORTEXPORT MassSheetLens :
public GravitationalLens
61 bool getAlphaVector(Vector2D<double> theta, Vector2D<double> *pAlpha)
const;
62 double getSurfaceMassDensity(Vector2D<double> theta)
const;
63 bool getAlphaVectorDerivatives(Vector2D<double> theta,
double &axx,
double &ayy,
double &axy)
const;
65 bool getProjectedPotential(
double D_s,
double D_ds, Vector2D<double> theta,
66 double *pPotentialValue)
const;
68 bool getSuggestedScales(
double *pDeflectionScale,
double *pPotentialScale)
const;
69 bool getCLParameterCounts(
int *pNumIntParams,
int *pNumFloatParams)
const;
70 bool getCLParameters(
double deflectionScale,
double potentialScale,
int *pIntParams,
float *pFloatParams)
const;
71 std::string getCLProgram(std::string &subRoutineName)
const;
72 int getCLSubLenses()
const {
return 1; }
74 bool processParameters(
const GravitationalLensParams *pLensParams);
82 #endif // GRALE_MASSSHEETLENS_H