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
2e251391
Commit
2e251391
authored
8 years ago
by
Christophe Geuzaine
Browse files
Options
Downloads
Patches
Plain Diff
fix compile
parent
918274d0
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
Geo/discreteDiskFace.cpp
+15
-14
15 additions, 14 deletions
Geo/discreteDiskFace.cpp
contrib/MeshQualityOptimizer/MeshQualityOptimizer.h
+3
-2
3 additions, 2 deletions
contrib/MeshQualityOptimizer/MeshQualityOptimizer.h
with
18 additions
and
16 deletions
Geo/discreteDiskFace.cpp
+
15
−
14
View file @
2e251391
...
@@ -462,7 +462,7 @@ bool discreteDiskFace::checkOrientationUV()
...
@@ -462,7 +462,7 @@ bool discreteDiskFace::checkOrientationUV()
discreteDiskFaceTriangle
*
ct
;
discreteDiskFaceTriangle
*
ct
;
if
(
_order
==
1
){
if
(
_order
==
1
){
double
initial
,
current
;
// initial and current orientation
double
current
;
// initial and current orientation
ct
=
&
_ddft
[
0
];
ct
=
&
_ddft
[
0
];
double
p1
[
2
]
=
{
ct
->
p
[
0
].
x
(),
ct
->
p
[
0
].
y
()};
double
p1
[
2
]
=
{
ct
->
p
[
0
].
x
(),
ct
->
p
[
0
].
y
()};
double
p2
[
2
]
=
{
ct
->
p
[
1
].
x
(),
ct
->
p
[
1
].
y
()};
double
p2
[
2
]
=
{
ct
->
p
[
1
].
x
(),
ct
->
p
[
1
].
y
()};
...
@@ -1010,7 +1010,8 @@ void discreteDiskFace::printParamMesh()
...
@@ -1010,7 +1010,8 @@ void discreteDiskFace::printParamMesh()
// computes some kind of maximal distance in a mesh
// computes some kind of maximal distance in a mesh
static
void
addTo
(
std
::
map
<
MVertex
*
,
std
::
vector
<
MElement
*>
>
&
v2t
,
MVertex
*
v
,
MElement
*
t
){
static
void
addTo
(
std
::
map
<
MVertex
*
,
std
::
vector
<
MElement
*>
>
&
v2t
,
MVertex
*
v
,
MElement
*
t
)
{
std
::
map
<
MVertex
*
,
std
::
vector
<
MElement
*>
>
::
iterator
it
=
v2t
.
find
(
v
);
std
::
map
<
MVertex
*
,
std
::
vector
<
MElement
*>
>
::
iterator
it
=
v2t
.
find
(
v
);
if
(
it
==
v2t
.
end
()){
if
(
it
==
v2t
.
end
()){
std
::
vector
<
MElement
*>
tt
;
tt
.
push_back
(
t
);
std
::
vector
<
MElement
*>
tt
;
tt
.
push_back
(
t
);
...
@@ -1018,7 +1019,9 @@ static void addTo (std::map<MVertex*, std::vector<MElement*> > &v2t, MVertex *v,
...
@@ -1018,7 +1019,9 @@ static void addTo (std::map<MVertex*, std::vector<MElement*> > &v2t, MVertex *v,
}
}
else
it
->
second
.
push_back
(
t
);
else
it
->
second
.
push_back
(
t
);
}
}
static
void
update
(
std
::
map
<
MVertex
*
,
double
>
&
Close
,
MVertex
*
v2
,
double
d
){
static
void
update
(
std
::
map
<
MVertex
*
,
double
>
&
Close
,
MVertex
*
v2
,
double
d
)
{
std
::
map
<
MVertex
*
,
double
>::
iterator
it
=
Close
.
find
(
v2
);
std
::
map
<
MVertex
*
,
double
>::
iterator
it
=
Close
.
find
(
v2
);
if
(
it
==
Close
.
end
())
Close
[
v2
]
=
d
;
if
(
it
==
Close
.
end
())
Close
[
v2
]
=
d
;
else
if
(
it
->
second
>
d
)
it
->
second
=
d
;
else
if
(
it
->
second
>
d
)
it
->
second
=
d
;
...
@@ -1026,9 +1029,11 @@ static void update(std::map<MVertex*,double> &Close, MVertex *v2, double d){
...
@@ -1026,9 +1029,11 @@ static void update(std::map<MVertex*,double> &Close, MVertex *v2, double d){
}
}
static
MEdge
getEdge
(
MElement
*
t
,
MVertex
*
v
){
static
MEdge
getEdge
(
MElement
*
t
,
MVertex
*
v
)
{
for
(
int
i
=
0
;
i
<
3
;
i
++
)
for
(
int
i
=
0
;
i
<
3
;
i
++
)
if
(
t
->
getVertex
(
i
)
==
v
)
return
t
->
getEdge
((
i
+
1
)
%
3
);
if
(
t
->
getVertex
(
i
)
==
v
)
return
t
->
getEdge
((
i
+
1
)
%
3
);
return
MEdge
();
}
}
/* warning
/* warning
...
@@ -1042,9 +1047,8 @@ static double computeDistanceLinePoint (MVertex *v1, MVertex *v2, MVertex *v){
...
@@ -1042,9 +1047,8 @@ static double computeDistanceLinePoint (MVertex *v1, MVertex *v2, MVertex *v){
}
}
*/
*/
static
double
computeDistance
(
MVertex
*
v1
,
double
d1
,
MVertex
*
v2
,
double
d2
,
MVertex
*
v
){
static
double
computeDistance
(
MVertex
*
v1
,
double
d1
,
MVertex
*
v2
,
double
d2
,
MVertex
*
v
)
{
// o------------a
// o------------a
//
//
//
//
...
@@ -1077,8 +1081,8 @@ static double computeDistance (MVertex *v1, double d1, MVertex *v2, double d2, M
...
@@ -1077,8 +1081,8 @@ static double computeDistance (MVertex *v1, double d1, MVertex *v2, double d2, M
return
sqrt
((
x0
-
xv
)
*
(
x0
-
xv
)
+
(
y0
-
yv
)
*
(
y0
-
yv
));
return
sqrt
((
x0
-
xv
)
*
(
x0
-
xv
)
+
(
y0
-
yv
)
*
(
y0
-
yv
));
}
}
std
::
map
<
MVertex
*
,
double
>::
iterator
closest
(
std
::
map
<
MVertex
*
,
double
>
&
Close
)
{
std
::
map
<
MVertex
*
,
double
>::
iterator
closest
(
std
::
map
<
MVertex
*
,
double
>
&
Close
)
{
std
::
map
<
MVertex
*
,
double
>::
iterator
itClose
;
std
::
map
<
MVertex
*
,
double
>::
iterator
itClose
;
double
c
=
1.e22
;
double
c
=
1.e22
;
for
(
std
::
map
<
MVertex
*
,
double
>::
iterator
it
=
Close
.
begin
();
it
!=
Close
.
end
();
++
it
){
for
(
std
::
map
<
MVertex
*
,
double
>::
iterator
it
=
Close
.
begin
();
it
!=
Close
.
end
();
++
it
){
...
@@ -1090,9 +1094,8 @@ std::map<MVertex*,double>::iterator closest (std::map<MVertex*,double> &Close){
...
@@ -1090,9 +1094,8 @@ std::map<MVertex*,double>::iterator closest (std::map<MVertex*,double> &Close){
return
itClose
;
return
itClose
;
}
}
double
triangulation
::
geodesicDistance
()
{
double
triangulation
::
geodesicDistance
()
{
if
(
bord
.
empty
())
return
1.e22
;
if
(
bord
.
empty
())
return
1.e22
;
std
::
map
<
MVertex
*
,
std
::
vector
<
MElement
*>
>
v2t
;
std
::
map
<
MVertex
*
,
std
::
vector
<
MElement
*>
>
v2t
;
for
(
size_t
i
=
0
;
i
<
tri
.
size
();
++
i
){
for
(
size_t
i
=
0
;
i
<
tri
.
size
();
++
i
){
...
@@ -1191,8 +1194,6 @@ double triangulation::geodesicDistance () {
...
@@ -1191,8 +1194,6 @@ double triangulation::geodesicDistance () {
*/
*/
return
CLOSEST
;
return
CLOSEST
;
}
}
#endif
#endif
This diff is collapsed.
Click to expand it.
contrib/MeshQualityOptimizer/MeshQualityOptimizer.h
+
3
−
2
View file @
2e251391
...
@@ -63,9 +63,10 @@ struct MeshQualOptParameters {
...
@@ -63,9 +63,10 @@ struct MeshQualOptParameters {
minTargetIdealJac
(
0.1
),
minTargetInvCondNum
(
0.1
),
weight
(
1.
),
minTargetIdealJac
(
0.1
),
minTargetInvCondNum
(
0.1
),
weight
(
1.
),
nbLayers
(
6
)
,
dim
(
3
)
,
maxOptIter
(
300
),
maxBarrierUpdates
(
50
),
nbLayers
(
6
)
,
dim
(
3
)
,
maxOptIter
(
300
),
maxBarrierUpdates
(
50
),
onlyVisible
(
true
),
distanceFactor
(
12
),
fixBndNodes
(
false
),
strategy
(
0
),
onlyVisible
(
true
),
distanceFactor
(
12
),
fixBndNodes
(
false
),
strategy
(
0
),
maxPatchAdapt
(
3
),
maxLayersAdaptFact
(
2
),
distanceAdaptFact
(
2.
),
nCurses
(
1
),
logFileName
(
""
),
CPU
(
0.
),
maxPatchAdapt
(
3
),
maxLayersAdaptFact
(
2
),
distanceAdaptFact
(
2.
),
nCurses
(
1
),
logFileName
(
""
),
SUCCESS
(
-
1
),
minIdealJac
(
0.
),
maxIdealJac
(
0.
),
minInvCondNum
(
0.
),
maxInvCondNum
(
0.
),
minIdealJac
(
0.
),
maxIdealJac
(
0.
),
minInvCondNum
(
0.
),
maxInvCondNum
(
0.
),
SUCCESS
(
-
1
)
CPU
(
0.
)
{
{
}
}
};
};
...
...
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