30 #ifndef DEFLECTIONGRIDLENS_H
32 #define DEFLECTIONGRIDLENS_H
34 #include "graleconfig.h"
43 class GRALE_IMPORTEXPORT DeflectionGridLensParams :
public GravitationalLensParams
46 DeflectionGridLensParams();
47 DeflectionGridLensParams(
const std::vector<double> &alphaX,
const std::vector<double> &alphaY,
48 int width,
int height, Vector2D<double> bottomLeft, Vector2D<double> topRight);
50 const std::vector<double> &getAlphaX()
const {
return m_alphaX; }
51 const std::vector<double> &getAlphaY()
const {
return m_alphaY; }
52 int getWidth()
const {
return m_width; }
53 int getHeight()
const {
return m_height; }
54 Vector2D<double> getBottomLeft()
const {
return m_bottomLeft; }
55 Vector2D<double> getTopRight()
const {
return m_topRight; }
57 GravitationalLensParams *createCopy()
const;
58 bool write(serut::SerializationInterface &si)
const;
59 bool read(serut::SerializationInterface &si);
61 std::vector<double> m_alphaX, m_alphaY;
62 int m_width, m_height;
63 Vector2D<double> m_topRight, m_bottomLeft;
66 class GRALE_IMPORTEXPORT DeflectionGridLens :
public GravitationalLens
70 ~DeflectionGridLens();
71 bool getAlphaVector(Vector2D<double> theta, Vector2D<double> *pAlpha)
const;
72 double getSurfaceMassDensity(Vector2D<double> theta)
const ;
73 bool getAlphaVectorDerivatives(Vector2D<double> theta,
double &axx,
double &ayy,
double &axy)
const;
77 bool processParameters(
const GravitationalLensParams *pLensParams);
79 GridFunction *m_pAxFunction, *m_pAyFunction;
80 std::vector<double> m_alphaX, m_alphaY;
81 double m_pixelWidth, m_pixelHeight;
87 #endif // DEFLECTIONGRIDLENS_H