Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
gmsh
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Larry Price
gmsh
Commits
6817b6a5
Commit
6817b6a5
authored
9 years ago
by
Jonathan Lambrechts
Browse files
Options
Downloads
Patches
Plain Diff
Numeric : fix rounding in Quad and Hex quadrature order
parent
82dbf85b
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
Numeric/GaussQuadratureHex.cpp
+3
-2
3 additions, 2 deletions
Numeric/GaussQuadratureHex.cpp
Numeric/GaussQuadratureQuad.cpp
+3
-2
3 additions, 2 deletions
Numeric/GaussQuadratureQuad.cpp
with
6 additions
and
4 deletions
Numeric/GaussQuadratureHex.cpp
+
3
−
2
View file @
6817b6a5
...
...
@@ -69,7 +69,7 @@ IntPt *getGQHPts(int order)
if
(
order
<
2
)
return
GQH
[
order
];
if
(
order
==
2
)
return
GQH
[
3
];
if
(
order
==
3
)
return
GQH
[
3
];
int
n
=
(
order
+
3
)
/
2
;
int
n
=
(
order
+
1
)
/
(
float
)
2
+
0.5
;
int
index
=
n
-
2
+
4
;
if
(
index
>=
(
int
)(
sizeof
(
GQH
)
/
sizeof
(
IntPt
*
))){
Msg
::
Error
(
"Increase size of GQH in gauss quadrature hex"
);
...
...
@@ -100,5 +100,6 @@ int getNGQHPts(int order)
if
(
order
==
2
)
return
8
;
if
(
order
<
2
)
return
GQHnPt
[
order
];
return
((
order
+
3
)
/
2
)
*
((
order
+
3
)
/
2
)
*
((
order
+
3
)
/
2
);
int
n
=
(
order
+
1
)
/
(
float
)
2
+
0.5
;
return
n
*
n
*
n
;
}
This diff is collapsed.
Click to expand it.
Numeric/GaussQuadratureQuad.cpp
+
3
−
2
View file @
6817b6a5
...
...
@@ -110,7 +110,7 @@ IntPt *getGQQPts(int order)
if
(
order
<
2
)
return
GQQ
[
order
];
if
(
order
==
2
)
return
GQQ
[
3
];
if
(
order
==
3
)
return
GQQ
[
3
];
int
n
=
(
order
+
3
)
/
2
;
int
n
=
(
order
+
1
)
/
(
float
)
2
+
0.5
;
int
index
=
n
-
2
+
7
;
if
(
index
>=
(
int
)(
sizeof
(
GQQ
)
/
sizeof
(
IntPt
*
))){
Msg
::
Error
(
"Increase size of GQQ in gauss quadrature quad"
);
...
...
@@ -139,5 +139,6 @@ int getNGQQPts(int order)
if
(
order
==
2
)
return
4
;
if
(
order
<
2
)
return
GQQnPt
[
order
];
return
((
order
+
3
)
/
2
)
*
((
order
+
3
)
/
2
);
int
n
=
(
order
+
1
)
/
(
float
)
2
+
0.5
;
return
n
*
n
;
}
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment