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
1104fbda
Commit
1104fbda
authored
9 years ago
by
Christophe Geuzaine
Browse files
Options
Downloads
Patches
Plain Diff
pp
parent
4aaaecc1
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
Mesh/meshGRegionBoundaryRecovery.cpp
+230
-233
230 additions, 233 deletions
Mesh/meshGRegionBoundaryRecovery.cpp
with
230 additions
and
233 deletions
Mesh/meshGRegionBoundaryRecovery.cpp
+
230
−
233
View file @
1104fbda
...
@@ -130,7 +130,7 @@ bool tetgenmesh::reconstructmesh(void *p)
...
@@ -130,7 +130,7 @@ bool tetgenmesh::reconstructmesh(void *p)
Msg
::
Debug
(
"Points have been tetrahedralized"
);
Msg
::
Debug
(
"Points have been tetrahedralized"
);
{
//transfernodes();
{
point
pointloop
;
point
pointloop
;
REAL
x
,
y
,
z
;
REAL
x
,
y
,
z
;
int
i
;
int
i
;
...
@@ -147,7 +147,8 @@ bool tetgenmesh::reconstructmesh(void *p)
...
@@ -147,7 +147,8 @@ bool tetgenmesh::reconstructmesh(void *p)
xmin
=
xmax
=
x
;
xmin
=
xmax
=
x
;
ymin
=
ymax
=
y
;
ymin
=
ymax
=
y
;
zmin
=
zmax
=
z
;
zmin
=
zmax
=
z
;
}
else
{
}
else
{
xmin
=
(
x
<
xmin
)
?
x
:
xmin
;
xmin
=
(
x
<
xmin
)
?
x
:
xmin
;
xmax
=
(
x
>
xmax
)
?
x
:
xmax
;
xmax
=
(
x
>
xmax
)
?
x
:
xmax
;
ymin
=
(
y
<
ymin
)
?
y
:
ymin
;
ymin
=
(
y
<
ymin
)
?
y
:
ymin
;
...
@@ -163,7 +164,7 @@ bool tetgenmesh::reconstructmesh(void *p)
...
@@ -163,7 +164,7 @@ bool tetgenmesh::reconstructmesh(void *p)
z
=
zmax
-
zmin
;
z
=
zmax
-
zmin
;
longest
=
sqrt
(
x
*
x
+
y
*
y
+
z
*
z
);
longest
=
sqrt
(
x
*
x
+
y
*
y
+
z
*
z
);
if
(
longest
==
0.0
)
{
if
(
longest
==
0.0
)
{
Msg
::
Warning
(
"
Error:
The point set is trivial
.
\n
"
);
Msg
::
Warning
(
"The point set is trivial"
);
return
true
;
return
true
;
}
}
...
@@ -171,7 +172,7 @@ bool tetgenmesh::reconstructmesh(void *p)
...
@@ -171,7 +172,7 @@ bool tetgenmesh::reconstructmesh(void *p)
if
(
minedgelength
==
0.0
)
{
if
(
minedgelength
==
0.0
)
{
minedgelength
=
longest
*
b
->
epsilon
;
minedgelength
=
longest
*
b
->
epsilon
;
}
}
}
// transfernodes();
}
point
*
idx2verlist
;
point
*
idx2verlist
;
...
@@ -182,7 +183,7 @@ bool tetgenmesh::reconstructmesh(void *p)
...
@@ -182,7 +183,7 @@ bool tetgenmesh::reconstructmesh(void *p)
idx2verlist
[
0
]
=
dummypoint
;
// Let 0th-entry be dummypoint.
idx2verlist
[
0
]
=
dummypoint
;
// Let 0th-entry be dummypoint.
}
}
if
(
1
)
{
{
// Index the vertices.
// Index the vertices.
for
(
unsigned
int
i
=
0
;
i
<
_vertices
.
size
();
i
++
){
for
(
unsigned
int
i
=
0
;
i
<
_vertices
.
size
();
i
++
){
_vertices
[
i
]
->
setIndex
(
i
);
_vertices
[
i
]
->
setIndex
(
i
);
...
@@ -282,7 +283,8 @@ bool tetgenmesh::reconstructmesh(void *p)
...
@@ -282,7 +283,8 @@ bool tetgenmesh::reconstructmesh(void *p)
bondflag
++
;
bondflag
++
;
}
}
}
}
}
else
{
}
else
{
bondflag
++
;
bondflag
++
;
}
}
enextself
(
checktet
);
enextself
(
checktet
);
...
@@ -293,7 +295,8 @@ bool tetgenmesh::reconstructmesh(void *p)
...
@@ -293,7 +295,8 @@ bool tetgenmesh::reconstructmesh(void *p)
// All three faces at d in 'checktet' have been connected.
// All three faces at d in 'checktet' have been connected.
// It can be removed from the link.
// It can be removed from the link.
prevchktet
.
tet
[
8
+
prevchktet
.
ver
]
=
tptr
;
prevchktet
.
tet
[
8
+
prevchktet
.
ver
]
=
tptr
;
}
else
{
}
else
{
// Bakup the previous tet in the link.
// Bakup the previous tet in the link.
prevchktet
=
checktet
;
prevchktet
=
checktet
;
}
}
...
@@ -495,11 +498,10 @@ bool tetgenmesh::reconstructmesh(void *p)
...
@@ -495,11 +498,10 @@ bool tetgenmesh::reconstructmesh(void *p)
outmesh2medit
(
"dump2"
);
outmesh2medit
(
"dump2"
);
}
}
}
// meshsurface()
}
delete
[]
idx2verlist
;
delete
[]
idx2verlist
;
////////////////////////////////////////////////////////
// Boundary recovery.
// Boundary recovery.
clock_t
t
;
clock_t
t
;
...
@@ -526,14 +528,9 @@ bool tetgenmesh::reconstructmesh(void *p)
...
@@ -526,14 +528,9 @@ bool tetgenmesh::reconstructmesh(void *p)
Msg
::
Debug
(
"Statistics:
\n
"
);
Msg
::
Debug
(
"Statistics:
\n
"
);
Msg
::
Debug
(
" Input points: %ld"
,
_vertices
.
size
());
Msg
::
Debug
(
" Input points: %ld"
,
_vertices
.
size
());
//if (b->refine) {
// printf(" Input tetrahedra: %d\n", in->numberoftetrahedra);
//}
if
(
b
->
plc
)
{
if
(
b
->
plc
)
{
Msg
::
Debug
(
" Input facets: %ld"
,
f_list
.
size
());
Msg
::
Debug
(
" Input facets: %ld"
,
f_list
.
size
());
Msg
::
Debug
(
" Input segments: %ld"
,
e_list
.
size
());
Msg
::
Debug
(
" Input segments: %ld"
,
e_list
.
size
());
//printf(" Input holes: %d\n", in->numberofholes);
//printf(" Input regions: %d\n", in->numberofregions);
}
}
tetnumber
=
tetrahedrons
->
items
-
hullsize
;
tetnumber
=
tetrahedrons
->
items
-
hullsize
;
...
@@ -541,7 +538,8 @@ bool tetgenmesh::reconstructmesh(void *p)
...
@@ -541,7 +538,8 @@ bool tetgenmesh::reconstructmesh(void *p)
if
(
b
->
weighted
)
{
// -w option
if
(
b
->
weighted
)
{
// -w option
Msg
::
Debug
(
" Mesh points: %ld"
,
points
->
items
-
nonregularcount
);
Msg
::
Debug
(
" Mesh points: %ld"
,
points
->
items
-
nonregularcount
);
}
else
{
}
else
{
Msg
::
Debug
(
" Mesh points: %ld"
,
points
->
items
);
Msg
::
Debug
(
" Mesh points: %ld"
,
points
->
items
);
}
}
Msg
::
Debug
(
" Mesh tetrahedra: %ld"
,
tetnumber
);
Msg
::
Debug
(
" Mesh tetrahedra: %ld"
,
tetnumber
);
...
@@ -569,7 +567,8 @@ bool tetgenmesh::reconstructmesh(void *p)
...
@@ -569,7 +567,8 @@ bool tetgenmesh::reconstructmesh(void *p)
if
(
st_segref_count
>
0l
)
{
if
(
st_segref_count
>
0l
)
{
Msg
::
Debug
(
" Steiner points on segments: %ld"
,
st_segref_count
);
Msg
::
Debug
(
" Steiner points on segments: %ld"
,
st_segref_count
);
}
}
}
else
{
}
else
{
Msg
::
Debug
(
" Convex hull faces: %ld"
,
hullsize
);
Msg
::
Debug
(
" Convex hull faces: %ld"
,
hullsize
);
if
(
meshhulledges
>
0l
)
{
if
(
meshhulledges
>
0l
)
{
Msg
::
Debug
(
" Convex hull edges: %ld"
,
meshhulledges
);
Msg
::
Debug
(
" Convex hull edges: %ld"
,
meshhulledges
);
...
@@ -583,10 +582,8 @@ bool tetgenmesh::reconstructmesh(void *p)
...
@@ -583,10 +582,8 @@ bool tetgenmesh::reconstructmesh(void *p)
if
(
0
)
{
if
(
0
)
{
outmesh2medit
(
"dump"
);
outmesh2medit
(
"dump"
);
}
}
////////////////////////////////////////////////////////
{
{
////////////////////////////////////////////////////////
// Write mesh into to GRegion.
// Write mesh into to GRegion.
Msg
::
Info
(
"--> Write to GRegion..."
);
Msg
::
Info
(
"--> Write to GRegion..."
);
...
...
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