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
964a8ecf
Commit
964a8ecf
authored
13 years ago
by
Amaury Johnen
Browse files
Options
Downloads
Patches
Plain Diff
acceptable temporary solution
parent
5e745720
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
Mesh/meshGFaceRecombine.cpp
+7
-69
7 additions, 69 deletions
Mesh/meshGFaceRecombine.cpp
Mesh/meshGFaceRecombine.h
+2
-2
2 additions, 2 deletions
Mesh/meshGFaceRecombine.h
with
9 additions
and
71 deletions
Mesh/meshGFaceRecombine.cpp
+
7
−
69
View file @
964a8ecf
...
@@ -260,12 +260,6 @@ double Recombine2D::recombine(int depth)
...
@@ -260,12 +260,6 @@ double Recombine2D::recombine(int depth)
{
{
Rec2DData
::
clearChanges
();
Rec2DData
::
clearChanges
();
double
bestGlobalQuality
;
double
bestGlobalQuality
;
_data
->
printActions
();
Rec2DNode
*
root1
=
new
Rec2DNode
(
NULL
,
NULL
,
bestGlobalQuality
,
depth
);
_data
->
printActions
();
Rec2DNode
*
root2
=
new
Rec2DNode
(
NULL
,
NULL
,
bestGlobalQuality
,
depth
);
_data
->
printActions
();
_data
->
printState
();
Rec2DNode
*
root
=
new
Rec2DNode
(
NULL
,
NULL
,
bestGlobalQuality
,
depth
);
Rec2DNode
*
root
=
new
Rec2DNode
(
NULL
,
NULL
,
bestGlobalQuality
,
depth
);
Rec2DNode
*
currentNode
=
root
->
selectBestNode
();
Rec2DNode
*
currentNode
=
root
->
selectBestNode
();
...
@@ -1054,7 +1048,7 @@ bool gterRec2DAction::operator()(Rec2DAction *ra1, Rec2DAction *ra2) const
...
@@ -1054,7 +1048,7 @@ bool gterRec2DAction::operator()(Rec2DAction *ra1, Rec2DAction *ra2) const
}
}
Rec2DAction
::
Rec2DAction
()
Rec2DAction
::
Rec2DAction
()
:
_lastUpdate
(
Recombine2D
::
getNumChange
()
-
1
),
_globQualIfExecuted
(
.0
)
:
_lastUpdate
(
Recombine2D
::
getNumChange
()
-
1
),
_globQualIfExecuted
(
.0
)
,
_globQualIfExecuted2
(
.0
),
_globQualIfExecuted3
(
.0
)
{
{
}
}
...
@@ -1069,33 +1063,6 @@ double Rec2DAction::getReward()
...
@@ -1069,33 +1063,6 @@ double Rec2DAction::getReward()
if
(
_lastUpdate
<
Recombine2D
::
getNumChange
())
if
(
_lastUpdate
<
Recombine2D
::
getNumChange
())
_computeGlobQual
();
_computeGlobQual
();
static
const
Rec2DAction
*
ra
=
this
;
double
doub
=
_globQualIfExecuted
;
static
double
a
=
.0
;
static
const
double
b
=
doub
;
static
int
k
=
-
1
;
static
int
num
=
-
3
;
if
(
k
==
-
1
)
{
++
k
;
Msg
::
Error
(
"========== Im %d ========="
,
this
);
}
if
(
ra
==
this
)
{
if
(
a
==
doub
)
{
++
k
;
Msg
::
Warning
(
"same reward :) num %d"
,
k
);
}
else
{
Msg
::
Warning
(
"reward changed %g -> %g (first %g)"
,
a
,
doub
,
b
);
a
=
doub
;
printCoord
();
_computeGlobQual2
();
}
if
(
_lastUpdate
!=
num
)
{
Msg
::
Info
(
"__ %d __ %d __"
,
_lastUpdate
,
Recombine2D
::
getNumChange
());
num
=
_lastUpdate
;
}
}
return
_globQualIfExecuted
/* - Rec2DData::getGlobalQuality()*/
;
return
_globQualIfExecuted
/* - Rec2DData::getGlobalQuality()*/
;
}
}
...
@@ -1164,16 +1131,8 @@ void Rec2DTwoTri2Quad::reveal()
...
@@ -1164,16 +1131,8 @@ void Rec2DTwoTri2Quad::reveal()
void
Rec2DTwoTri2Quad
::
_computeGlobQual
()
void
Rec2DTwoTri2Quad
::
_computeGlobQual
()
{
{
/*static const Rec2DAction *ra = this;
static
const
Rec2DAction
*
ra
=
this
;
double doub = _globQualIfExecuted;
static double a = .0;
static const double b = doub;
static int k = -1;
static int num = -3;
if (k == -1) {
++k;
Msg::Error("========== And me %d =========", this);
}*/
double
valEdge
=
-
REC2D_EDGE_BASE
*
_edges
[
4
]
->
getQual
();
double
valEdge
=
-
REC2D_EDGE_BASE
*
_edges
[
4
]
->
getQual
();
for
(
int
i
=
0
;
i
<
4
;
++
i
)
for
(
int
i
=
0
;
i
<
4
;
++
i
)
valEdge
+=
REC2D_EDGE_QUAD
*
_edges
[
i
]
->
getQual
();
valEdge
+=
REC2D_EDGE_QUAD
*
_edges
[
i
]
->
getQual
();
...
@@ -1185,32 +1144,11 @@ void Rec2DTwoTri2Quad::_computeGlobQual()
...
@@ -1185,32 +1144,11 @@ void Rec2DTwoTri2Quad::_computeGlobQual()
_globQualIfExecuted
=
_globQualIfExecuted
=
Rec2DData
::
getGlobalQuality
(
4
*
REC2D_EDGE_QUAD
-
REC2D_EDGE_BASE
,
Rec2DData
::
getGlobalQuality
(
4
*
REC2D_EDGE_QUAD
-
REC2D_EDGE_BASE
,
valEdge
,
0
,
valVert
);
valEdge
,
0
,
valVert
);
_lastUpdate
=
Recombine2D
::
getNumChange
();
/*if (ra == this) {
_lastUpdate
=
Recombine2D
::
getNumChange
();
if
(
ra
==
this
)
{
Msg
::
Info
(
" %d %g %g"
,
4
*
REC2D_EDGE_QUAD
-
REC2D_EDGE_BASE
,
valEdge
,
valVert
);
Msg
::
Info
(
" %d %g %g"
,
4
*
REC2D_EDGE_QUAD
-
REC2D_EDGE_BASE
,
valEdge
,
valVert
);
}*/
}
}
void
Rec2DTwoTri2Quad
::
_computeGlobQual2
()
{
Msg
::
Info
(
"%g %g %g %g %g %g %g"
,
-
REC2D_EDGE_BASE
*
_edges
[
4
]
->
getQual
(),
REC2D_EDGE_QUAD
*
_edges
[
0
]
->
getQual
(),
REC2D_EDGE_QUAD
*
_edges
[
1
]
->
getQual
(),
REC2D_EDGE_QUAD
*
_edges
[
2
]
->
getQual
(),
REC2D_EDGE_QUAD
*
_edges
[
3
]
->
getQual
(),
_vertices
[
0
]
->
getGainMerge
(
_triangles
[
0
],
_triangles
[
1
]),
_vertices
[
1
]
->
getGainMerge
(
_triangles
[
0
],
_triangles
[
1
])
);
double
valEdge
=
-
REC2D_EDGE_BASE
*
_edges
[
4
]
->
getQual
();
for
(
int
i
=
0
;
i
<
4
;
++
i
)
valEdge
+=
REC2D_EDGE_QUAD
*
_edges
[
i
]
->
getQual
();
double
valVert
;
valVert
+=
_vertices
[
0
]
->
getGainMerge
(
_triangles
[
0
],
_triangles
[
1
]);
valVert
+=
_vertices
[
1
]
->
getGainMerge
(
_triangles
[
0
],
_triangles
[
1
]);
Msg
::
Info
(
"%d %g %g"
,
4
*
REC2D_EDGE_QUAD
-
REC2D_EDGE_BASE
,
valEdge
,
valVert
);
Msg
::
Info
(
"%g"
,
Rec2DData
::
getGlobalQuality
(
4
*
REC2D_EDGE_QUAD
-
REC2D_EDGE_BASE
,
valEdge
,
0
,
valVert
));
}
}
void
Rec2DTwoTri2Quad
::
color
(
int
a
,
int
b
,
int
c
)
void
Rec2DTwoTri2Quad
::
color
(
int
a
,
int
b
,
int
c
)
...
...
This diff is collapsed.
Click to expand it.
Mesh/meshGFaceRecombine.h
+
2
−
2
View file @
964a8ecf
...
@@ -219,6 +219,8 @@ class Rec2DDataChange {
...
@@ -219,6 +219,8 @@ class Rec2DDataChange {
class
Rec2DAction
{
class
Rec2DAction
{
protected
:
protected
:
double
_globQualIfExecuted
;
double
_globQualIfExecuted
;
double
_globQualIfExecuted2
;
double
_globQualIfExecuted3
;
int
_lastUpdate
;
int
_lastUpdate
;
public
:
public
:
...
@@ -246,7 +248,6 @@ class Rec2DAction {
...
@@ -246,7 +248,6 @@ class Rec2DAction {
private
:
private
:
virtual
void
_computeGlobQual
()
=
0
;
virtual
void
_computeGlobQual
()
=
0
;
virtual
void
_computeGlobQual2
()
=
0
;
};
};
class
Rec2DTwoTri2Quad
:
public
Rec2DAction
{
class
Rec2DTwoTri2Quad
:
public
Rec2DAction
{
...
@@ -282,7 +283,6 @@ class Rec2DTwoTri2Quad : public Rec2DAction {
...
@@ -282,7 +283,6 @@ class Rec2DTwoTri2Quad : public Rec2DAction {
private
:
private
:
virtual
void
_computeGlobQual
();
virtual
void
_computeGlobQual
();
virtual
void
_computeGlobQual2
();
};
};
class
Rec2DEdge
{
class
Rec2DEdge
{
...
...
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