Skip to content

Use get_order() in gauss quadrature code #4129

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Apr 8, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 1 addition & 7 deletions src/quadrature/quadrature_gauss_2D.C
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down
15 changes: 2 additions & 13 deletions src/quadrature/quadrature_gauss_3D.C
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down Expand Up @@ -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)
Expand Down
8 changes: 1 addition & 7 deletions src/quadrature/quadrature_gauss_lobatto_2D.C
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down
8 changes: 1 addition & 7 deletions src/quadrature/quadrature_gauss_lobatto_3D.C
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down