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
GitLab community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Larry Price
gmsh
Commits
3f97c5dc
Commit
3f97c5dc
authored
15 years ago
by
Christophe Geuzaine
Browse files
Options
Downloads
Patches
Plain Diff
improve removeDuplicateMeshVertices
parent
ef5e8b10
No related branches found
No related tags found
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
Geo/GModel.cpp
+27
-20
27 additions, 20 deletions
Geo/GModel.cpp
Mesh/meshGRegionExtruded.cpp
+1
-1
1 addition, 1 deletion
Mesh/meshGRegionExtruded.cpp
with
28 additions
and
21 deletions
Geo/GModel.cpp
+
27
−
20
View file @
3f97c5dc
...
...
@@ -1029,11 +1029,18 @@ int GModel::removeDuplicateMeshVertices(double tolerance)
for
(
int
k
=
0
;
k
<
e
->
getNumVertices
();
k
++
){
MVertex
*
v
=
e
->
getVertex
(
k
);
std
::
set
<
MVertex
*
,
MVertexLessThanLexicographic
>::
iterator
it
=
pos
.
find
(
v
);
if
(
it
!=
pos
.
end
())
if
(
it
==
pos
.
end
()){
Msg
::
Info
(
"Linear search for (%.16g, %.16g, %.16g)"
,
v
->
x
(),
v
->
y
(),
v
->
z
());
it
=
v
->
linearSearch
(
pos
);
if
(
it
==
pos
.
end
()){
Msg
::
Error
(
"Could not find unique vertex (%.16g, %.16g, %.16g)"
,
v
->
x
(),
v
->
y
(),
v
->
z
());
break
;
}
}
verts
.
push_back
(
*
it
);
else
Msg
::
Error
(
"Could not find unique vertex (%g,%g,%g)"
,
v
->
x
(),
v
->
y
(),
v
->
z
());
}
if
(
verts
.
size
()
==
e
->
getNumVertices
()){
MElementFactory
factory
;
MElement
*
e2
=
factory
.
create
(
e
->
getTypeForMSH
(),
verts
,
e
->
getNum
(),
e
->
getPartition
());
...
...
@@ -1048,7 +1055,7 @@ int GModel::removeDuplicateMeshVertices(double tolerance)
case
TYPE_PYR
:
elements
[
7
][
entities
[
i
]
->
tag
()].
push_back
(
e2
);
break
;
case
TYPE_POLYG
:
elements
[
8
][
entities
[
i
]
->
tag
()].
push_back
(
e2
);
break
;
case
TYPE_POLYH
:
elements
[
9
][
entities
[
i
]
->
tag
()].
push_back
(
e2
);
break
;
}
}
}
}
...
...
@@ -1068,7 +1075,7 @@ int GModel::removeDuplicateMeshVertices(double tolerance)
MVertexLessThanLexicographic
::
tolerance
=
old_tol
;
Msg
::
Info
(
"Removed %d duplicate mesh
vertices"
,
diff
);
Msg
::
Info
(
"Removed %d duplicate mesh
%s"
,
diff
,
diff
>
1
?
"vertices"
:
"vertex"
);
return
diff
;
}
...
...
This diff is collapsed.
Click to expand it.
Mesh/meshGRegionExtruded.cpp
+
1
−
1
View file @
3f97c5dc
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