#ifndef GRID_CHEBYSHEV_H #define GRID_CHEBYSHEV_H #include #include namespace Grid { //////////////////////////////////////////////////////////////////////////////////////////// // Simple general polynomial with user supplied coefficients //////////////////////////////////////////////////////////////////////////////////////////// template class Polynomial : public OperatorFunction { private: std::vector Coeffs; public: Polynomial(std::vector &_Coeffs) : Coeffs(_Coeffs) {}; // Implement the required interface void operator() (LinearOperatorBase &Linop, const Field &in, Field &out) { Field AtoN = in; out = AtoN*Coeffs[0]; for(int n=1;n class Chebyshev : public OperatorFunction { private: std::vector Coeffs; int order; double hi; double lo; public: void csv(std::ostream &out){ for (double x=lo; x &Linop, const Field &in, Field &out) { GridBase *grid=in._grid; int vol=grid->gSites(); Field T0(grid); T0 = in; Field T1(grid); Field T2(grid); Field y(grid); Field *Tnm = &T0; Field *Tn = &T1; Field *Tnp = &T2; std::cout << "Chebyshev ["<