VTK  9.7.20261001
EdgeCnBasis.h
Go to the documentation of this file.
1// Lagrange interpolants of arbitrary order on the reference edge [-1, 1].
2//
3// The order[0]+1 Lagrange points are uniformly spaced, with
4// x_o = -1 + 2*o/order[0] for o in [0, order[0]].
5//
6// \a invspc is the inverse of the distance between Lagrange points.
7// Note that formulae below are written in terms of invspc rather than the
8// spacing itself: invspc always has 2 for a denominator and so is exactly
9// representable, while the spacing has order[0] for a denominator and is not.
10//
11// (rr - x_o) / (x_l - x_o) = (rr * invspc - (o - invspc)) / (l - o)
12RealT invspc = RealT(order[0]) / 2.;
13
14for (int ll = 0; ll <= order[0]; ++ll)
15{
16 basis[ll] = 1.;
17 for (int oo = 0; oo <= order[0]; ++oo)
18 {
19 if (oo == ll)
20 {
21 continue;
22 }
23 basis[ll] *= (rr * invspc - (RealT(oo) - invspc)) / RealT(ll - oo);
24 }
25}
basis[0]
Definition CellC0Basis.h:1
RealT invspc
Definition EdgeCnBasis.h:12