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
3adbfd71
Commit
3adbfd71
authored
15 years ago
by
Emilie Marchandise
Browse files
Options
Downloads
Patches
Plain Diff
No commit message
No commit message
parent
f787c2c2
No related branches found
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
Geo/GFaceCompound.cpp
+51
-0
51 additions, 0 deletions
Geo/GFaceCompound.cpp
Geo/GFaceCompound.h
+1
-0
1 addition, 0 deletions
Geo/GFaceCompound.h
Mesh/meshGFace.cpp
+1
-0
1 addition, 0 deletions
Mesh/meshGFace.cpp
with
53 additions
and
0 deletions
Geo/GFaceCompound.cpp
+
51
−
0
View file @
3adbfd71
...
@@ -1446,6 +1446,57 @@ bool GFaceCompound::checkAspectRatio() const
...
@@ -1446,6 +1446,57 @@ bool GFaceCompound::checkAspectRatio() const
}
}
void
GFaceCompound
::
coherenceNormals
()
{
std
::
map
<
MEdge
,
std
::
set
<
MTriangle
*>
,
Less_Edge
>
edge2tris
;
for
(
int
i
=
0
;
i
<
triangles
.
size
();
i
++
){
MTriangle
*
t
=
triangles
[
i
];
for
(
int
j
=
0
;
j
<
3
;
j
++
){
MEdge
me
=
t
->
getEdge
(
j
);
std
::
map
<
MEdge
,
std
::
set
<
MTriangle
*>
,
Less_Edge
>::
iterator
it
=
edge2tris
.
find
(
me
);
if
(
it
==
edge2tris
.
end
())
{
std
::
set
<
MTriangle
*>
mySet
;
mySet
.
insert
(
t
);
edge2tris
.
insert
(
std
::
make_pair
(
me
,
mySet
));
}
else
{
std
::
set
<
MTriangle
*>
mySet
=
it
->
second
;
mySet
.
insert
(
t
);
it
->
second
=
mySet
;
}
}
}
std
::
set
<
MTriangle
*
>
touched
;
int
iE
,
si
,
iE2
,
si2
;
touched
.
insert
(
triangles
[
0
]);
while
(
touched
.
size
()
!=
triangles
.
size
()){
for
(
int
i
=
0
;
i
<
triangles
.
size
();
i
++
){
MTriangle
*
t
=
triangles
[
i
];
std
::
set
<
MTriangle
*>::
iterator
it2
=
touched
.
find
(
t
);
if
(
it2
!=
touched
.
end
()){
for
(
int
j
=
0
;
j
<
3
;
j
++
){
MEdge
me
=
t
->
getEdge
(
j
);
t
->
getEdgeInfo
(
me
,
iE
,
si
);
std
::
map
<
MEdge
,
std
::
set
<
MTriangle
*>
,
Less_Edge
>::
iterator
it
=
edge2tris
.
find
(
me
);
std
::
set
<
MTriangle
*>
mySet
=
it
->
second
;
for
(
std
::
set
<
MTriangle
*>::
iterator
itt
=
mySet
.
begin
();
itt
!=
mySet
.
end
();
itt
++
){
if
(
*
itt
!=
t
){
(
*
itt
)
->
getEdgeInfo
(
me
,
iE2
,
si2
);
if
(
si
==
si2
)
(
*
itt
)
->
revert
();
touched
.
insert
(
*
itt
);
}
}
}
}
}
}
return
;
}
void
GFaceCompound
::
buildAllNodes
()
const
void
GFaceCompound
::
buildAllNodes
()
const
{
{
...
...
This diff is collapsed.
Click to expand it.
Geo/GFaceCompound.h
+
1
−
0
View file @
3adbfd71
...
@@ -101,6 +101,7 @@ class GFaceCompound : public GFace {
...
@@ -101,6 +101,7 @@ class GFaceCompound : public GFace {
virtual
int
genusGeom
()
const
;
virtual
int
genusGeom
()
const
;
virtual
bool
checkTopology
()
const
;
virtual
bool
checkTopology
()
const
;
bool
parametrize
()
const
;
bool
parametrize
()
const
;
void
coherenceNormals
();
void
partitionFaceCM
();
void
partitionFaceCM
();
virtual
std
::
list
<
GFace
*>
getCompounds
()
const
{
return
_compound
;};
virtual
std
::
list
<
GFace
*>
getCompounds
()
const
{
return
_compound
;};
mutable
int
nbSplit
;
mutable
int
nbSplit
;
...
...
This diff is collapsed.
Click to expand it.
Mesh/meshGFace.cpp
+
1
−
0
View file @
3adbfd71
...
@@ -1454,6 +1454,7 @@ void partitionAndRemesh(GFaceCompound *gf)
...
@@ -1454,6 +1454,7 @@ void partitionAndRemesh(GFaceCompound *gf)
}
}
Msg
::
Info
(
"*** Mesh of surface %d done by assembly remeshed faces"
,
gf
->
tag
());
Msg
::
Info
(
"*** Mesh of surface %d done by assembly remeshed faces"
,
gf
->
tag
());
gf
->
coherenceNormals
();
gf
->
meshStatistics
.
status
=
GFace
::
DONE
;
gf
->
meshStatistics
.
status
=
GFace
::
DONE
;
//CreateOutputFile("toto.msh", CTX::instance()->mesh.format);
//CreateOutputFile("toto.msh", CTX::instance()->mesh.format);
...
...
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