VTK
9.7.20261001
Main Page
Related Pages
Topics
Namespaces
Classes
Files
File List
File Members
Filters
CellGrid
Basis
HGrad
EdgeCnGradient.h
Go to the documentation of this file.
1
// Derivatives of the arbitrary-order Lagrange interpolants on the edge [-1, 1].
2
//
3
// See EdgeCnBasis.h for the definition of the Lagrange points and of invspc.
4
//
5
// Differentiating the product that defines the l-th interpolant gives a sum
6
// over the omitted factor:
7
//
8
// L'_l(rr) = ∑_{k≠l} 1/(x_l - x_k) ∏_{i≠k,l} (rr - x_i)/(x_l - x_i)
9
//
10
// The reciprocal of the leading difference is invspc/(l - k) and each factor
11
// of the product is written exactly as it is in EdgeCnBasis.h.
12
RealT
invspc
= RealT(order[0]) / 2.;
13
14
for
(
int
ll = 0; ll <= order[0]; ++ll)
15
{
16
RealT termSum = 0.;
17
for
(
int
kk = 0; kk <= order[0]; ++kk)
18
{
19
if
(kk == ll)
20
{
21
continue
;
22
}
23
RealT
term
=
invspc
/ RealT(ll - kk);
24
for
(
int
ii = 0; ii <= order[0]; ++ii)
25
{
26
if
(ii == kk || ii == ll)
27
{
28
continue
;
29
}
30
term
*= (rr *
invspc
- (RealT(ii) -
invspc
)) / RealT(ll - ii);
31
}
32
termSum +=
term
;
33
}
34
// Like the fixed-order HGrad gradients, store a full 3-tuple per basis
35
// function and zero the axes the cell does not parameterize.
36
basisGradient
[3 * ll + 0] = termSum;
// ∂/∂r
37
basisGradient
[3 * ll + 1] = 0.;
38
basisGradient
[3 * ll + 2] = 0.;
39
}
basisGradient
basisGradient[0]
Definition
CellC0Gradient.h:1
invspc
RealT invspc
Definition
EdgeCnBasis.h:12
term
int term
Definition
HexGnBasis.h:23
Generated on
for VTK by
1.16.1