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
5d3f46f7
Commit
5d3f46f7
authored
8 years ago
by
Koen Hillewaert
Browse files
Options
Downloads
Patches
Plain Diff
further bug fix in reorientation of quadrangle
parent
3386c0f1
No related branches found
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
Geo/MQuadrangle.cpp
+4
-4
4 additions, 4 deletions
Geo/MQuadrangle.cpp
with
4 additions
and
4 deletions
Geo/MQuadrangle.cpp
+
4
−
4
View file @
5d3f46f7
...
...
@@ -353,7 +353,7 @@ void MQuadrangle9::reorient(int rot, bool swap) {
MQuadrangle
::
reorient
(
rot
,
swap
);
MVertex
*
tmp
[
4
];
if
(
swap
)
for
(
int
i
=
0
;
i
<
4
;
i
++
)
tmp
[
i
]
=
_vs
[(
9
-
i
-
rot
)
%
4
];
// edge swapped
if
(
swap
)
for
(
int
i
=
0
;
i
<
4
;
i
++
)
tmp
[
i
]
=
_vs
[(
7
-
i
+
rot
)
%
4
];
// edge swapped
else
for
(
int
i
=
0
;
i
<
4
;
i
++
)
tmp
[
i
]
=
_vs
[(
4
+
i
-
rot
)
%
4
];
std
::
memcpy
(
_vs
,
tmp
,
4
*
sizeof
(
MVertex
*
));
}
...
...
@@ -371,7 +371,7 @@ void MQuadrangleN::reorient(int rot, bool swap) {
if
(
swap
)
{
for
(
int
iEdge
=
0
;
iEdge
<
4
;
iEdge
++
)
{
int
edgeIdx
=
((
9
-
iEdge
-
rot
)
%
4
)
*
nbEdgePts
;
int
edgeIdx
=
((
7
-
iEdge
+
rot
)
%
4
)
*
nbEdgePts
;
for
(
int
i
=
nbEdgePts
-
1
;
i
>=
0
;
i
--
)
tmp
.
push_back
(
_vs
[
edgeIdx
+
i
]);
}
}
...
...
@@ -387,11 +387,11 @@ void MQuadrangleN::reorient(int rot, bool swap) {
if
(
_vs
.
size
()
>=
idx
)
{
nbEdgePts
=
order
-
3
;
if
(
order
>
2
)
{
if
(
swap
)
for
(
int
i
=
0
;
i
<
4
;
i
++
)
tmp
.
push_back
(
_vs
[
idx
+
(
8
-
i
-
rot
)
%
4
]);
if
(
swap
)
for
(
int
i
=
0
;
i
<
4
;
i
++
)
tmp
.
push_back
(
_vs
[
idx
+
(
4
-
i
+
rot
)
%
4
]);
else
for
(
int
i
=
0
;
i
<
4
;
i
++
)
tmp
.
push_back
(
_vs
[
idx
+
(
4
+
i
-
rot
)
%
4
]);
idx
+=
4
;
if
(
order
>
3
)
{
if
(
swap
)
for
(
int
i
=
0
;
i
<
4
;
i
++
)
tmp
.
push_back
(
_vs
[
idx
+
(
9
-
i
-
rot
)
%
4
]);
if
(
swap
)
for
(
int
i
=
0
;
i
<
4
;
i
++
)
tmp
.
push_back
(
_vs
[
idx
+
(
7
-
i
+
rot
)
%
4
]);
else
for
(
int
i
=
0
;
i
<
4
;
i
++
)
tmp
.
push_back
(
_vs
[
idx
+
(
4
+
i
-
rot
)
%
4
]);
idx
+=
4
;
if
(
order
>
4
)
Msg
::
Error
(
"Reorientation of quad not supported above order 4"
);
...
...
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