30 #ifndef GRALE_COMPOSITELENS_H
32 #define GRALE_COMPOSITELENS_H
34 #include "graleconfig.h"
42 class GRALE_IMPORTEXPORT CompositeLensParams :
public GravitationalLensParams
47 CompositeLensParams();
48 ~CompositeLensParams();
49 bool addLens(
double factor, Vector2D<double> position,
double angle,
const GravitationalLens &lens);
50 bool write(serut::SerializationInterface &si)
const;
51 bool read(serut::SerializationInterface &si);
52 const std::list<LensInfo *> &getLensInfo()
const {
return m_lensInfo; }
53 GravitationalLensParams *createCopy()
const;
55 std::list<LensInfo *> m_lensInfo;
95 bool getAlphaVectorDerivatives(
Vector2D<double> theta,
double &axx,
double &ayy,
double &axy)
const;
96 void setDerivativeAngularDistanceScale(
double distanceScale);
97 bool getProjectedPotential(
double D_s,
double D_ds,
Vector2D<double> theta,
double *pPotentialValue)
const;
99 int getNumberOfSubLenses()
const {
return m_lenses.size(); }
102 double getSubLensAngle(
int i)
const {
return m_angles[i]; }
103 double getSubLensFactor(
int i)
const {
return m_factors[i]; }
105 bool getSuggestedScales(
double *pDeflectionScale,
double *pPotentialScale)
const;
106 bool getCLParameterCounts(
int *pNumIntParams,
int *pNumFloatParams)
const;
107 bool getCLParameters(
double deflectionScale,
double potentialScale,
int *pIntParams,
float *pFloatParams)
const;
108 std::string getCLProgram(std::string &subRoutineName)
const;
109 int getCLSubLenses()
const;
113 static std::string getCLProgram(
const std::vector<std::string> &subRoutineNames,
int recursionLevel,
int maxRecursion);
115 void findCLSubroutines(std::string &prog, std::vector<std::string> &otherRoutineNames,
int recursionLevel,
int &maxRecursionLevel)
const;
117 std::vector<GravitationalLens *> m_lenses;
118 std::vector<Vector2D<double> > m_positions;
119 std::vector<double> m_angles;
120 std::vector<double> m_factors;
125 #endif // GRALE_COMPOSITELENS_H