Rheolef  7.2
an efficient C++ finite element environment
 
Loading...
Searching...
No Matches
gauss_lobatto_chebyschev.icc
Go to the documentation of this file.
1
21#include <cmath>
22#include <iterator>
23template <class Size, class OutputIterator1, class OutputIterator2>
24void 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}
Expr1::float_type T
Definition field_expr.h:230
void gauss_lobatto_chebyschev(Size R, OutputIterator1 zeta, OutputIterator2 omega)