Skip to content

Commit aaa5463

Browse files
authoredApr 8, 2025··
Merge pull request #4129 from libMesh/use-get-order
Use get_order() in gauss quadrature code
2 parents 3e4dba2 + bf7bebd commit aaa5463

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
@@ -62,13 +62,7 @@ void QGauss::init_2D()
6262
// x^2 xy y^2
6363
// yx^2 xy^2
6464
// x^2y^2
65-
//
66-
// Rather than construct a 1D quadrature rule (which inits it)
67-
// and then reinit it with a potentially-elevated p-level, we
68-
// add twice that p-level (as is our standard behavior,
69-
// sensible for typical inner product integrals) to the order
70-
// to get the desired p-elevated order.
71-
QGauss q1D(1,_order + 2*_p_level);
65+
QGauss q1D(1,get_order());
7266
tensor_product_quad( q1D );
7367
return;
7468
}

‎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)
Please sign in to comment.