
12 Modeling shallow water ows using the DG method
Figure2.4. For a 3-node quadratic element, the shape functions are given
by Equation (2.23) and are shown in Figure2.5, where x
i
(i = 1, 2, 3) is the
coordinate of a node. The corresponding quadratic variation of a variable
is shown in Figure2.6.
=
=
≠
()
1
0
Nx
ji
(2.21)
=
−
−
=
−
−
()
()
1
2
2
1
Nx
xx
Nx
xx
(2.22)
1
2
Figure 2.4 1D linear variation of a variable in an element.
1.0
1
2
3
Figure 2.5 1D quadratic shape functions.
U
1
2
U
3
Figure 2.6 1D quadratic variation of a variable in an element.