Rheolef  7.1
an efficient C++ finite element environment
gauss_lobatto_chebyschev.icc
Go to the documentation of this file.
1 #include <cmath>
22 #include <iterator>
23 template <class Size, class OutputIterator1, class OutputIterator2>
24 void gauss_lobatto_chebyschev (Size R, OutputIterator1 zeta, OutputIterator2 omega) {
25  typedef typename std::iterator_traits<OutputIterator1>::value_type T;
26  static T pi = acos(T(-1.));
27  zeta [0] = 1;
28  omega [0] = pi/T(2.*R-2);
29  for (Size r = 1; r < R-1; r++) {
30  zeta [r] = cos(r*pi/T(R-1.));
31  omega[r] = pi/T(R-1.);
32  }
33  zeta [R-1] = -1;
34  omega [R-1] = pi/T(2.*R-2);
35 }
gauss_lobatto_chebyschev
void gauss_lobatto_chebyschev(Size R, OutputIterator1 zeta, OutputIterator2 omega)
Definition: gauss_lobatto_chebyschev.icc:24
T
Expr1::float_type T
Definition: field_expr.h:218