Skip to content
Open
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
2 changes: 1 addition & 1 deletion src/quadrature/quadrature_grid_1D.C
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ void QGrid::init_1D()
{
_points.resize(_order + 1);
_weights.resize(_order + 1);
const Real dx = Real(2)/(_order+1);
const Real dx = Real(2)/(static_cast<int>(_order)+1);
for (int i = 0; i != _order + 1; ++i)
{
_points[i](0) = (i+0.5)*dx-1;
Expand Down
2 changes: 1 addition & 1 deletion src/quadrature/quadrature_grid_2D.C
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ void QGrid::init_2D()
{
const unsigned int np = (_order + 1)*(_order + 2)/2;
const Real weight = Real(0.5)/np;
const Real dx = Real(1)/(_order+1);
const Real dx = Real(1)/(static_cast<int>(_order)+1);
_points.resize(np);
_weights.resize(np);

Expand Down
6 changes: 3 additions & 3 deletions src/quadrature/quadrature_grid_3D.C
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ void QGrid::init_3D()
const unsigned int np = (_order+1)*(_order+2)*(_order+3)/6;
// Master tet has 1x1 triangle base, height 1, so volume = 1/6
const Real weight = Real(1)/Real(6)/np;
const Real dx = Real(1)/(_order+1);
const Real dx = Real(1)/(static_cast<int>(_order)+1);
_points.resize(np);
_weights.resize(np);

Expand Down Expand Up @@ -123,8 +123,8 @@ void QGrid::init_3D()
_weights.resize(np);
// Master pyramid has 2x2 base, height 1, so volume = 4/3
const Real weight = Real(4)/Real(3)/np;
const Real dx = Real(2)/(_order+1);
const Real dz = Real(1)/(_order+1);
const Real dx = Real(2)/(static_cast<int>(_order)+1);
const Real dz = Real(1)/(static_cast<int>(_order)+1);

unsigned int pt = 0;
for (int k = 0; k != _order + 1; ++k)
Expand Down