FM3DDynamic.h 2.07 KB
Newer Older
gsell's avatar
gsell committed
1 2 3
#ifndef CLASSIC_FIELDMAP3DDYNAMIC_HH
#define CLASSIC_FIELDMAP3DDYNAMIC_HH

4
#include "Fields/Fieldmap.h"
gsell's avatar
gsell committed
5 6 7 8 9 10

class FM3DDynamic: public Fieldmap {

public:
    virtual bool getFieldstrength(const Vector_t &R, Vector_t &E, Vector_t &B) const;
    virtual void getFieldDimensions(double &zBegin, double &zEnd, double &rBegin, double &rEnd) const;
11
    virtual void getFieldDimensions(double &xIni, double &xFinal, double &yIni, double &yFinal, double &zIni, double &zFinal) const;
12
    virtual bool getFieldDerivative(const Vector_t &R, Vector_t &E, Vector_t &B, const DiffDirection &dir) const;
gsell's avatar
gsell committed
13 14 15 16
    virtual void swap();
    virtual void getInfo(Inform *msg);
    virtual double getFrequency() const;
    virtual void setFrequency(double freq);
17
    virtual void getOnaxisEz(std::vector<std::pair<double, double> > & F);
gsell's avatar
gsell committed
18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46

private:
    FM3DDynamic(std::string aFilename);
    ~FM3DDynamic();

    virtual void readMap();
    virtual void freeMap();

    double *FieldstrengthEz_m;    /**< 3D array with Ez */
    double *FieldstrengthEx_m;    /**< 3D array with Ex */
    double *FieldstrengthEy_m;    /**< 3D array with Ey */
    double *FieldstrengthHz_m;    /**< 3D array with Hz */
    double *FieldstrengthHx_m;    /**< 3D array with Hx */
    double *FieldstrengthHy_m;    /**< 3D array with Hy */

    double frequency_m;

    double xbegin_m;
    double xend_m;

    double ybegin_m;
    double yend_m;

    double zbegin_m;
    double zend_m;

    double hx_m;                   /**< length between points in grid, x-direction */
    double hy_m;                   /**< length between points in grid, y-direction */
    double hz_m;                   /**< length between points in grid, z-direction */
47 48 49
    unsigned int num_gridpx_m;              /**< Read in number of points after 0(not counted here) in grid, r-direction*/
    unsigned int num_gridpy_m;              /**< Read in number of points after 0(not counted here) in grid, r-direction*/
    unsigned int num_gridpz_m;              /**< Read in number of points after 0(not counted here) in grid, z-direction*/
gsell's avatar
gsell committed
50 51 52 53 54

    bool swap_m;
    friend class Fieldmap;
};

55
#endif