Skip to content

Commit bf7bebd

Browse files
committedApr 3, 2025
Use get_order() in gauss quadrature code
In case someday we ever want to change things in a centralized way? But also we should be consistent about using get_order where we can
1 parent d524f88 commit bf7bebd

File tree

4 files changed

+5
-34
lines changed

4 files changed

+5
-34
lines changed
 

‎src/quadrature/quadrature_gauss_2D.C

+1-7
Original file line numberDiff line numberDiff line change
@@ -60,13 +60,7 @@ void QGauss::init_2D()
6060
// x^2 xy y^2
6161
// yx^2 xy^2
6262
// x^2y^2
63-
//
64-
// Rather than construct a 1D quadrature rule (which inits it)
65-
// and then reinit it with a potentially-elevated p-level, we
66-
// add twice that p-level (as is our standard behavior,
67-
// sensible for typical inner product integrals) to the order
68-
// to get the desired p-elevated order.
69-
QGauss q1D(1,_order + 2*_p_level);
63+
QGauss q1D(1,get_order());
7064
tensor_product_quad( q1D );
7165
return;
7266
}

‎src/quadrature/quadrature_gauss_3D.C

+2-13
Original file line numberDiff line numberDiff line change
@@ -42,13 +42,7 @@ void QGauss::init_3D()
4242
{
4343
// We compute the 3D quadrature rule as a tensor
4444
// product of the 1D quadrature rule.
45-
//
46-
// Rather than construct a 1D quadrature rule (which inits it)
47-
// and then reinit it with a potentially-elevated p-level, we
48-
// add twice that p-level (as is our standard behavior,
49-
// sensible for typical inner product integrals) to the order
50-
// to get the desired p-elevated order.
51-
QGauss q1D(1, _order + 2*_p_level);
45+
QGauss q1D(1, get_order());
5246
tensor_product_hex( q1D );
5347
return;
5448
}
@@ -517,12 +511,7 @@ void QGauss::init_3D()
517511
// product of the 1D quadrature rule and a 2D
518512
// triangle quadrature rule
519513

520-
// Rather than construct a 1D quadrature rule (which inits it)
521-
// and then reinit it with a potentially-elevated p-level, we
522-
// add twice that p-level (as is our standard behavior,
523-
// sensible for typical inner product integrals) to the order
524-
// to get the desired p-elevated order.
525-
QGauss q1D(1,_order + 2*_p_level);
514+
QGauss q1D(1,get_order());
526515
QGauss q2D(2,_order);
527516

528517
// Initialize the 2D rule (1D is pre-initialized)

‎src/quadrature/quadrature_gauss_lobatto_2D.C

+1-7
Original file line numberDiff line numberDiff line change
@@ -38,13 +38,7 @@ void QGaussLobatto::init_2D()
3838
{
3939
// We compute the 2D quadrature rule as a tensor
4040
// product of the 1D quadrature rule.
41-
//
42-
// Rather than construct a 1D quadrature rule (which inits it)
43-
// and then reinit it with a potentially-elevated p-level, we
44-
// add twice that p-level (as is our standard behavior,
45-
// sensible for typical inner product integrals) to the order
46-
// to get the desired p-elevated order.
47-
QGaussLobatto q1D(1, _order + 2*_p_level);
41+
QGaussLobatto q1D(1, get_order());
4842
tensor_product_quad(q1D);
4943
return;
5044
}

‎src/quadrature/quadrature_gauss_lobatto_3D.C

+1-7
Original file line numberDiff line numberDiff line change
@@ -35,13 +35,7 @@ void QGaussLobatto::init_3D()
3535
{
3636
// We compute the 3D quadrature rule as a tensor
3737
// product of the 1D quadrature rule.
38-
//
39-
// Rather than construct a 1D quadrature rule (which inits it)
40-
// and then reinit it with a potentially-elevated p-level, we
41-
// add twice that p-level (as is our standard behavior,
42-
// sensible for typical inner product integrals) to the order
43-
// to get the desired p-elevated order.
44-
QGaussLobatto q1D(1, _order + 2*_p_level);
38+
QGaussLobatto q1D(1, get_order());
4539
tensor_product_hex(q1D);
4640
return;
4741
}

0 commit comments

Comments
 (0)