From bf7bebdbe7c15fec8740f2bdae8016cde2244452 Mon Sep 17 00:00:00 2001 From: Alex Lindsay Date: Thu, 3 Apr 2025 17:02:05 -0600 Subject: [PATCH] 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 --- src/quadrature/quadrature_gauss_2D.C | 8 +------- src/quadrature/quadrature_gauss_3D.C | 15 ++------------- src/quadrature/quadrature_gauss_lobatto_2D.C | 8 +------- src/quadrature/quadrature_gauss_lobatto_3D.C | 8 +------- 4 files changed, 5 insertions(+), 34 deletions(-) diff --git a/src/quadrature/quadrature_gauss_2D.C b/src/quadrature/quadrature_gauss_2D.C index 0a1082ee55..7cc62ab706 100644 --- a/src/quadrature/quadrature_gauss_2D.C +++ b/src/quadrature/quadrature_gauss_2D.C @@ -60,13 +60,7 @@ void QGauss::init_2D() // x^2 xy y^2 // yx^2 xy^2 // x^2y^2 - // - // Rather than construct a 1D quadrature rule (which inits it) - // and then reinit it with a potentially-elevated p-level, we - // add twice that p-level (as is our standard behavior, - // sensible for typical inner product integrals) to the order - // to get the desired p-elevated order. - QGauss q1D(1,_order + 2*_p_level); + QGauss q1D(1,get_order()); tensor_product_quad( q1D ); return; } diff --git a/src/quadrature/quadrature_gauss_3D.C b/src/quadrature/quadrature_gauss_3D.C index 943a7a545e..ce4a400f21 100644 --- a/src/quadrature/quadrature_gauss_3D.C +++ b/src/quadrature/quadrature_gauss_3D.C @@ -42,13 +42,7 @@ void QGauss::init_3D() { // We compute the 3D quadrature rule as a tensor // product of the 1D quadrature rule. - // - // Rather than construct a 1D quadrature rule (which inits it) - // and then reinit it with a potentially-elevated p-level, we - // add twice that p-level (as is our standard behavior, - // sensible for typical inner product integrals) to the order - // to get the desired p-elevated order. - QGauss q1D(1, _order + 2*_p_level); + QGauss q1D(1, get_order()); tensor_product_hex( q1D ); return; } @@ -517,12 +511,7 @@ void QGauss::init_3D() // product of the 1D quadrature rule and a 2D // triangle quadrature rule - // Rather than construct a 1D quadrature rule (which inits it) - // and then reinit it with a potentially-elevated p-level, we - // add twice that p-level (as is our standard behavior, - // sensible for typical inner product integrals) to the order - // to get the desired p-elevated order. - QGauss q1D(1,_order + 2*_p_level); + QGauss q1D(1,get_order()); QGauss q2D(2,_order); // Initialize the 2D rule (1D is pre-initialized) diff --git a/src/quadrature/quadrature_gauss_lobatto_2D.C b/src/quadrature/quadrature_gauss_lobatto_2D.C index 855f5bc04e..40904ace1a 100644 --- a/src/quadrature/quadrature_gauss_lobatto_2D.C +++ b/src/quadrature/quadrature_gauss_lobatto_2D.C @@ -38,13 +38,7 @@ void QGaussLobatto::init_2D() { // We compute the 2D quadrature rule as a tensor // product of the 1D quadrature rule. - // - // Rather than construct a 1D quadrature rule (which inits it) - // and then reinit it with a potentially-elevated p-level, we - // add twice that p-level (as is our standard behavior, - // sensible for typical inner product integrals) to the order - // to get the desired p-elevated order. - QGaussLobatto q1D(1, _order + 2*_p_level); + QGaussLobatto q1D(1, get_order()); tensor_product_quad(q1D); return; } diff --git a/src/quadrature/quadrature_gauss_lobatto_3D.C b/src/quadrature/quadrature_gauss_lobatto_3D.C index c27b447d4c..ac22bdf1ac 100644 --- a/src/quadrature/quadrature_gauss_lobatto_3D.C +++ b/src/quadrature/quadrature_gauss_lobatto_3D.C @@ -35,13 +35,7 @@ void QGaussLobatto::init_3D() { // We compute the 3D quadrature rule as a tensor // product of the 1D quadrature rule. - // - // Rather than construct a 1D quadrature rule (which inits it) - // and then reinit it with a potentially-elevated p-level, we - // add twice that p-level (as is our standard behavior, - // sensible for typical inner product integrals) to the order - // to get the desired p-elevated order. - QGaussLobatto q1D(1, _order + 2*_p_level); + QGaussLobatto q1D(1, get_order()); tensor_product_hex(q1D); return; }