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
Package registry
Model registry
Operate
Terraform modules
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
Romin Tomasetti
gmsh
Commits
0b8e16c0
Commit
0b8e16c0
authored
7 years ago
by
Christophe Geuzaine
Browse files
Options
Downloads
Patches
Plain Diff
fix indices of vertices added in addLastMeshVertexError()
parent
e0dced82
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
Mesh/meshGRegionBoundaryRecovery.cpp
+202
-165
202 additions, 165 deletions
Mesh/meshGRegionBoundaryRecovery.cpp
with
202 additions
and
165 deletions
Mesh/meshGRegionBoundaryRecovery.cpp
+
202
−
165
View file @
0b8e16c0
...
@@ -578,7 +578,8 @@ bool tetgenmesh::reconstructmesh(void *p)
...
@@ -578,7 +578,8 @@ bool tetgenmesh::reconstructmesh(void *p)
Msg
::
Debug
(
" Mesh faces: %ld"
,
facenumber
);
Msg
::
Debug
(
" Mesh faces: %ld"
,
facenumber
);
if
(
meshedges
>
0l
){
if
(
meshedges
>
0l
){
Msg
::
Debug
(
" Mesh edges: %ld"
,
meshedges
);
Msg
::
Debug
(
" Mesh edges: %ld"
,
meshedges
);
}
else
{
}
else
{
if
(
!
nonconvex
){
if
(
!
nonconvex
){
long
vsize
=
points
->
items
-
dupverts
-
unuverts
;
long
vsize
=
points
->
items
-
dupverts
-
unuverts
;
if
(
b
->
weighted
)
vsize
-=
nonregularcount
;
if
(
b
->
weighted
)
vsize
-=
nonregularcount
;
...
@@ -700,7 +701,8 @@ bool tetgenmesh::reconstructmesh(void *p)
...
@@ -700,7 +701,8 @@ bool tetgenmesh::reconstructmesh(void *p)
MVertex
*
v
=
new
MVertex
(
pointloop
[
0
],
pointloop
[
1
],
pointloop
[
2
],
_gr
);
MVertex
*
v
=
new
MVertex
(
pointloop
[
0
],
pointloop
[
1
],
pointloop
[
2
],
_gr
);
v
->
setIndex
(
pointmark
(
pointloop
));
v
->
setIndex
(
pointmark
(
pointloop
));
_extras
[
pointmark
(
pointloop
)]
=
v
;
_extras
[
pointmark
(
pointloop
)]
=
v
;
_gr
->
mesh_vertices
.
push_back
(
v
);
}
_gr
->
mesh_vertices
.
push_back
(
v
);
}
}
}
else
if
(
pointtype
(
pointloop
)
==
FREEFACETVERTEX
){
else
if
(
pointtype
(
pointloop
)
==
FREEFACETVERTEX
){
sdecode
(
point2sh
(
pointloop
),
parentsh
);
sdecode
(
point2sh
(
pointloop
),
parentsh
);
...
@@ -994,7 +996,8 @@ void tetgenmesh::outmesh2medit(const char* mfilename)
...
@@ -994,7 +996,8 @@ void tetgenmesh::outmesh2medit(const char* mfilename)
if
(
mfilename
!=
(
char
*
)
NULL
&&
mfilename
[
0
]
!=
'\0'
){
if
(
mfilename
!=
(
char
*
)
NULL
&&
mfilename
[
0
]
!=
'\0'
){
strcpy
(
mefilename
,
mfilename
);
strcpy
(
mefilename
,
mfilename
);
}
else
{
}
else
{
strcpy
(
mefilename
,
"unnamed"
);
strcpy
(
mefilename
,
"unnamed"
);
}
}
strcat
(
mefilename
,
".mesh"
);
strcat
(
mefilename
,
".mesh"
);
...
@@ -1033,7 +1036,8 @@ void tetgenmesh::outmesh2medit(const char* mfilename)
...
@@ -1033,7 +1036,8 @@ void tetgenmesh::outmesh2medit(const char* mfilename)
// Medit need start number form 1.
// Medit need start number form 1.
if
(
in
->
firstnumber
==
1
){
if
(
in
->
firstnumber
==
1
){
shift
=
0
;
shift
=
0
;
}
else
{
}
else
{
shift
=
1
;
shift
=
1
;
}
}
...
@@ -1050,7 +1054,8 @@ void tetgenmesh::outmesh2medit(const char* mfilename)
...
@@ -1050,7 +1054,8 @@ void tetgenmesh::outmesh2medit(const char* mfilename)
if
(
!
b
->
reversetetori
){
if
(
!
b
->
reversetetori
){
p1
=
(
point
)
tetptr
[
4
];
p1
=
(
point
)
tetptr
[
4
];
p2
=
(
point
)
tetptr
[
5
];
p2
=
(
point
)
tetptr
[
5
];
}
else
{
}
else
{
p1
=
(
point
)
tetptr
[
5
];
p1
=
(
point
)
tetptr
[
5
];
p2
=
(
point
)
tetptr
[
4
];
p2
=
(
point
)
tetptr
[
4
];
}
}
...
@@ -1061,7 +1066,8 @@ void tetgenmesh::outmesh2medit(const char* mfilename)
...
@@ -1061,7 +1066,8 @@ void tetgenmesh::outmesh2medit(const char* mfilename)
pointmark
(
p3
)
+
shift
,
pointmark
(
p4
)
+
shift
);
pointmark
(
p3
)
+
shift
,
pointmark
(
p4
)
+
shift
);
if
(
numelemattrib
>
0
){
if
(
numelemattrib
>
0
){
fprintf
(
outfile
,
" %.17g"
,
elemattribute
(
tetptr
,
0
));
fprintf
(
outfile
,
" %.17g"
,
elemattribute
(
tetptr
,
0
));
}
else
{
}
else
{
fprintf
(
outfile
,
" 0"
);
fprintf
(
outfile
,
" 0"
);
}
}
fprintf
(
outfile
,
"
\n
"
);
fprintf
(
outfile
,
"
\n
"
);
...
@@ -1109,6 +1115,39 @@ bool meshGRegionBoundaryRecovery(GRegion *gr)
...
@@ -1109,6 +1115,39 @@ bool meshGRegionBoundaryRecovery(GRegion *gr)
ret
=
false
;
ret
=
false
;
}
}
else
if
(
err
==
3
){
else
if
(
err
==
3
){
std
::
map
<
int
,
MVertex
*>
all
;
std
::
list
<
GFace
*>
f
=
gr
->
faces
();
for
(
std
::
list
<
GFace
*>::
iterator
it
=
f
.
begin
();
it
!=
f
.
end
();
++
it
){
GFace
*
gf
=
*
it
;
for
(
unsigned
int
i
=
0
;
i
<
gf
->
triangles
.
size
();
i
++
){
for
(
int
j
=
0
;
j
<
3
;
j
++
){
MVertex
*
v
=
gf
->
triangles
[
i
]
->
getVertex
(
j
);
all
[
v
->
getIndex
()]
=
v
;
}
}
}
std
::
list
<
GEdge
*>
e
=
gr
->
embeddedEdges
();
for
(
std
::
list
<
GEdge
*>::
iterator
it
=
e
.
begin
();
it
!=
e
.
end
();
++
it
){
GEdge
*
ge
=
*
it
;
for
(
unsigned
int
i
=
0
;
i
<
ge
->
lines
.
size
();
i
++
){
for
(
int
j
=
0
;
j
<
2
;
j
++
){
MVertex
*
v
=
ge
->
lines
[
i
]
->
getVertex
(
j
);
all
[
v
->
getIndex
()]
=
v
;
}
}
}
std
::
list
<
GVertex
*>
v
=
gr
->
embeddedVertices
();
for
(
std
::
list
<
GVertex
*>::
iterator
it
=
v
.
begin
();
it
!=
v
.
end
();
++
it
){
GVertex
*
gv
=
*
it
;
for
(
unsigned
int
i
=
0
;
i
<
gv
->
points
.
size
();
i
++
){
MVertex
*
v
=
gv
->
points
[
i
]
->
getVertex
(
0
);
all
[
v
->
getIndex
()]
=
v
;
}
}
for
(
unsigned
int
i
=
0
;
i
<
gr
->
mesh_vertices
.
size
();
i
++
){
MVertex
*
v
=
gr
->
mesh_vertices
[
i
];
all
[
v
->
getIndex
()]
=
v
;
}
std
::
string
what
;
std
::
string
what
;
bool
pnt
=
true
;
bool
pnt
=
true
;
switch
(
tetgenBR
::
sevent
.
e_type
){
switch
(
tetgenBR
::
sevent
.
e_type
){
...
@@ -1148,8 +1187,7 @@ bool meshGRegionBoundaryRecovery(GRegion *gr)
...
@@ -1148,8 +1187,7 @@ bool meshGRegionBoundaryRecovery(GRegion *gr)
}
}
}
}
for
(
int
i
=
0
;
i
<
3
;
i
++
){
for
(
int
i
=
0
;
i
<
3
;
i
++
){
if
(
vtags
[
f
][
i
]){
MVertex
*
v
=
all
[
vtags
[
f
][
i
]];
MVertex
*
v
=
gr
->
model
()
->
getMeshVertexByTag
(
vtags
[
f
][
i
]);
if
(
v
){
if
(
v
){
gr
->
model
()
->
addLastMeshVertexError
(
v
);
gr
->
model
()
->
addLastMeshVertexError
(
v
);
x
.
push_back
(
v
->
x
());
x
.
push_back
(
v
->
x
());
...
@@ -1159,7 +1197,6 @@ bool meshGRegionBoundaryRecovery(GRegion *gr)
...
@@ -1159,7 +1197,6 @@ bool meshGRegionBoundaryRecovery(GRegion *gr)
}
}
}
}
}
}
}
if
(
pnt
){
if
(
pnt
){
double
px
=
tetgenBR
::
sevent
.
int_point
[
0
];
double
px
=
tetgenBR
::
sevent
.
int_point
[
0
];
double
py
=
tetgenBR
::
sevent
.
int_point
[
1
];
double
py
=
tetgenBR
::
sevent
.
int_point
[
1
];
...
...
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