Skip to content
Snippets Groups Projects
Commit d7510e91 authored by Nicolas Marsic's avatar Nicolas Marsic
Browse files

Line Quadrature: bug fix -- Round Up

parent 580e3e91
No related branches found
No related tags found
No related merge requests found
...@@ -9,8 +9,11 @@ ...@@ -9,8 +9,11 @@
IntPt * GQL[20] = {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}; IntPt * GQL[20] = {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0};
IntPt *getGQLPts(int order) IntPt *getGQLPts(int order)
{ {
int n = (order+1)/2; // Number of Gauss Point:
// (order + 1) / 2 *ROUNDED UP*
int n = (order + 1) / (double)2 + 0.5;
int index = n; int index = n;
if(!GQL[index]) { if(!GQL[index]) {
double *pt,*wt; double *pt,*wt;
...@@ -28,5 +31,5 @@ IntPt *getGQLPts(int order) ...@@ -28,5 +31,5 @@ IntPt *getGQLPts(int order)
int getNGQLPts(int order) int getNGQLPts(int order)
{ {
return (order+1)/2; return (order + 1) / (double)2 + 0.5;
} }
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment