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
7ff1d7f0
Commit
7ff1d7f0
authored
13 years ago
by
Jean-François Remacle
Browse files
Options
Downloads
Patches
Plain Diff
This time the new frontal algo is stable... people should definitively use it
parent
d49aa459
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
Mesh/meshGFaceDelaunayInsertion.cpp
+12
-8
12 additions, 8 deletions
Mesh/meshGFaceDelaunayInsertion.cpp
benchmarks/stl/artery.geo
+4
-0
4 additions, 0 deletions
benchmarks/stl/artery.geo
benchmarks/stl/falcon1.geo
+16
-16
16 additions, 16 deletions
benchmarks/stl/falcon1.geo
with
32 additions
and
24 deletions
Mesh/meshGFaceDelaunayInsertion.cpp
+
12
−
8
View file @
7ff1d7f0
...
@@ -740,7 +740,7 @@ static bool insertAPoint(GFace *gf, std::set<MTri3*,compareTri3Ptr>::iterator it
...
@@ -740,7 +740,7 @@ static bool insertAPoint(GFace *gf, std::set<MTri3*,compareTri3Ptr>::iterator it
bool
inside
=
false
;
bool
inside
=
false
;
double
uv
[
2
];
double
uv
[
2
];
// FIXME !!! ----> FIXED (JFR)
// FIXME !!! ----> FIXED (JFR)
if
(
MTri3
::
radiusNorm
==
2
){
if
(
0
&&
MTri3
::
radiusNorm
==
2
){
inside
=
invMapUV
(
worst
->
tri
(),
center
,
Us
,
Vs
,
uv
,
1.e-8
);
inside
=
invMapUV
(
worst
->
tri
(),
center
,
Us
,
Vs
,
uv
,
1.e-8
);
if
(
inside
)
ptin
=
worst
;
if
(
inside
)
ptin
=
worst
;
if
(
!
inside
&&
worst
->
getNeigh
(
0
)){
if
(
!
inside
&&
worst
->
getNeigh
(
0
)){
...
@@ -778,7 +778,7 @@ static bool insertAPoint(GFace *gf, std::set<MTri3*,compareTri3Ptr>::iterator it
...
@@ -778,7 +778,7 @@ static bool insertAPoint(GFace *gf, std::set<MTri3*,compareTri3Ptr>::iterator it
MVertex
*
v
=
new
MFaceVertex
(
p
.
x
(),
p
.
y
(),
p
.
z
(),
gf
,
center
[
0
],
center
[
1
]);
MVertex
*
v
=
new
MFaceVertex
(
p
.
x
(),
p
.
y
(),
p
.
z
(),
gf
,
center
[
0
],
center
[
1
]);
v
->
setIndex
(
Us
.
size
());
v
->
setIndex
(
Us
.
size
());
double
lc1
,
lc
;
double
lc1
,
lc
;
if
(
backgroundMesh
::
current
()){
if
(
0
&&
backgroundMesh
::
current
()){
lc1
=
lc
=
lc1
=
lc
=
backgroundMesh
::
current
()
->
operator
()(
center
[
0
],
center
[
1
],
0.0
);
backgroundMesh
::
current
()
->
operator
()(
center
[
0
],
center
[
1
],
0.0
);
}
}
...
@@ -1022,7 +1022,6 @@ double optimalPointFrontal (GFace *gf,
...
@@ -1022,7 +1022,6 @@ double optimalPointFrontal (GFace *gf,
dir
[
1
]
*
dir
[
1
]
*
metric
[
2
]);
dir
[
1
]
*
dir
[
1
]
*
metric
[
2
]);
// const double p = 0.5 * lengthMetric(P, Q, metric); // / RATIO;
// const double p = 0.5 * lengthMetric(P, Q, metric); // / RATIO;
// const double q = lengthMetric(center, midpoint, metric);
/*
/*
const double rhoM1 = 0.5 *
const double rhoM1 = 0.5 *
(vSizes[base->getVertex(ip1)->getIndex()] +
(vSizes[base->getVertex(ip1)->getIndex()] +
...
@@ -1047,13 +1046,19 @@ double optimalPointFrontal (GFace *gf,
...
@@ -1047,13 +1046,19 @@ double optimalPointFrontal (GFace *gf,
vSizesBGM
[
base
->
getVertex
(
ip2
)
->
getIndex
()]
)
;
// * RATIO;
vSizesBGM
[
base
->
getVertex
(
ip2
)
->
getIndex
()]
)
;
// * RATIO;
const
double
rhoM
=
Extend1dMeshIn2dSurfaces
()
?
std
::
min
(
rhoM1
,
rhoM2
)
:
rhoM2
;
const
double
rhoM
=
Extend1dMeshIn2dSurfaces
()
?
std
::
min
(
rhoM1
,
rhoM2
)
:
rhoM2
;
const
double
rhoM_hat
=
rhoM
;
const
double
rhoM_hat
=
rhoM
;
const
double
d
=
rhoM_hat
*
sqrt
(
3.
)
*
0.5
/
RATIO
;
const
double
q
=
lengthMetric
(
center
,
midpoint
,
metric
);
const
double
d
=
rhoM_hat
*
sqrt
(
3.
)
*
0.5
;
// printf("%12.5E %12.5E\n",d,RATIO);
// printf("%12.5E %12.5E\n",d,RATIO);
newPoint
[
0
]
=
midpoint
[
0
]
+
d
*
dir
[
0
];
// const double L = d ;
newPoint
[
1
]
=
midpoint
[
1
]
+
d
*
dir
[
1
];
const
double
L
=
d
>
q
?
q
:
d
;
return
d
*
RATIO
;
newPoint
[
0
]
=
midpoint
[
0
]
+
L
*
dir
[
0
]
/
RATIO
;
newPoint
[
1
]
=
midpoint
[
1
]
+
L
*
dir
[
1
]
/
RATIO
;
return
L
;
// > q ? d : q;
}
}
/*
/*
...
@@ -1081,7 +1086,6 @@ void optimalPointFrontalB (GFace *gf,
...
@@ -1081,7 +1086,6 @@ void optimalPointFrontalB (GFace *gf,
std
::
vector
<
double
>
&
vSizesBGM
,
std
::
vector
<
double
>
&
vSizesBGM
,
double
newPoint
[
2
],
double
newPoint
[
2
],
double
metric
[
3
]){
double
metric
[
3
]){
static
int
missed
=
1
;
// as a starting point, let us use the "fast algo"
// as a starting point, let us use the "fast algo"
double
d
=
optimalPointFrontal
(
gf
,
worst
,
active_edge
,
Us
,
Vs
,
vSizes
,
vSizesBGM
,
newPoint
,
metric
);
double
d
=
optimalPointFrontal
(
gf
,
worst
,
active_edge
,
Us
,
Vs
,
vSizes
,
vSizesBGM
,
newPoint
,
metric
);
int
ip1
=
active_edge
-
1
<
0
?
2
:
active_edge
-
1
;
int
ip1
=
active_edge
-
1
<
0
?
2
:
active_edge
-
1
;
...
...
This diff is collapsed.
Click to expand it.
benchmarks/stl/artery.geo
+
4
−
0
View file @
7ff1d7f0
...
@@ -9,4 +9,8 @@ Merge "artery.stl";
...
@@ -9,4 +9,8 @@ Merge "artery.stl";
CreateTopology
;
CreateTopology
;
Compound
Surface
(
100
)
=
{
1
};
Compound
Surface
(
100
)
=
{
1
};
Compound
Line
(
1001
)
=
{
1
};
Compound
Line
(
1002
)
=
{
2
};
Compound
Line
(
1003
)
=
{
3
};
Physical
Surface
(
101
)
=
{
100
};
Physical
Surface
(
101
)
=
{
100
};
This diff is collapsed.
Click to expand it.
benchmarks/stl/falcon1.geo
+
16
−
16
View file @
7ff1d7f0
Merge
'
falcon1
.
stl
'
;
Merge
'
falcon1
.
stl
'
;
Point
(
201
)
=
{
-
30.0
,
30.0
,
15.0
,
0.1
};
Point
(
201
)
=
{
-
30.0
,
30.0
,
15.0
,
0.1
};
Point
(
202
)
=
{
-
30.0
,
30.0
,
-
15.0
,
0.1
};
Point
(
202
)
=
{
-
30.0
,
30.0
,
-
15.0
,
0.1
};
Point
(
203
)
=
{
0.0
,
30.0
,
15.0
,
0.1
};
Point
(
203
)
=
{
0.0
,
30.0
,
15.0
,
0.1
};
Point
(
204
)
=
{
0.0
,
30.0
,
-
15.0
,
0.1
};
Point
(
204
)
=
{
0.0
,
30.0
,
-
15.0
,
0.1
};
Line
(
203
)
=
{
202
,
204
};
Line
(
203
)
=
{
202
,
204
};
Line
(
204
)
=
{
204
,
203
};
Line
(
204
)
=
{
204
,
203
};
Line
(
205
)
=
{
203
,
201
};
Line
(
205
)
=
{
203
,
201
};
Line
(
206
)
=
{
201
,
202
};
Line
(
206
)
=
{
201
,
202
};
Line
Loop
(
207
)
=
{
203
,
204
,
205
,
206
};
Line
Loop
(
207
)
=
{
203
,
204
,
205
,
206
};
Plane
Surface
(
208
)
=
{
207
};
Plane
Surface
(
208
)
=
{
207
};
Extrude
{
0
,
-
50
,
0
}
{
Surface
{
208
};
}
Extrude
{
0
,
-
50
,
0
}
{
Surface
{
208
};
}
Surface
Loop
(
1
)
=
{
1
};
Surface
Loop
(
1
)
=
{
1
};
Surface
Loop
(
232
)
=
{
-
217
,
208
,
-
221
,
-
225
,
-
229
,
-
230
};
Surface
Loop
(
232
)
=
{
-
217
,
208
,
-
221
,
-
225
,
-
229
,
-
230
};
Volume
(
233
)
=
{
232
,
1
};
Volume
(
233
)
=
{
232
,
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