📄 legendre.h
字号:
//// spectral toolkit // copyright (c) 2005 university corporation for atmospheric research// licensed under the gnu general public license//#ifndef __legendre__#define __legendre__#include "gauss.h"namespace spectral{ /// Gauss-Legendre quadrature class. Uses an highly accurate method based on /// Swartztrauber, P.N., On Computing the Points and Weights for Gauss-Legendre Quadrature, /// <I>SIAM Journal on Scientific Computing</I>, <B>24</B> (2002), pp. 945-954. class legendre : public gauss { public: legendre(int n); private: real cpdp(real *cp, real *dcp); void tpdp(real theta,real cz,real *cp,real *dcp,real &pb,real &dpb); inline real sgn(real x) { return((x<0.0)?(-1.0):(1.0)); } };}#endif// Local Variables:// mode:C++// End:
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -