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
Package registry
Model registry
Operate
Terraform modules
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
Romin Tomasetti
gmsh
Commits
94018aa9
Commit
94018aa9
authored
4 years ago
by
Christophe Geuzaine
Browse files
Options
Downloads
Plain Diff
Merge branch 'patch_releases_4_8' of
https://gitlab.onelab.info/gmsh/gmsh
into patch_releases_4_8
parents
735e7aae
9f75be0b
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
Geo/GFace.cpp
+10
-10
10 additions, 10 deletions
Geo/GFace.cpp
Geo/GRegion.cpp
+17
-13
17 additions, 13 deletions
Geo/GRegion.cpp
with
27 additions
and
23 deletions
Geo/GFace.cpp
+
10
−
10
View file @
94018aa9
...
...
@@ -75,11 +75,11 @@ int GFace::getMeshSizeFromBoundary() const
int
GFace
::
delEdge
(
GEdge
*
edge
)
{
const
auto
found
=
std
::
find
(
begin
(
l_edges
),
end
(
l_edges
),
edge
);
const
auto
found
=
std
::
find
(
l_edges
.
begin
(),
l_edges
.
end
(
),
edge
);
if
(
found
!=
end
(
l_edges
))
{
l_edges
.
erase
(
found
);
}
if
(
found
!=
l_edges
.
end
(
))
{
l_edges
.
erase
(
found
);
}
const
auto
pos
=
std
::
distance
(
begin
(
l_edges
),
found
);
const
auto
pos
=
std
::
distance
(
l_edges
.
begin
(
),
found
);
if
(
l_dirs
.
empty
())
{
return
0
;
}
...
...
@@ -89,16 +89,14 @@ int GFace::delEdge(GEdge *edge)
}
const
auto
orientation
=
l_dirs
.
at
(
pos
);
l_dirs
.
erase
(
std
::
next
(
begin
(
l_dirs
),
pos
));
return
orientation
;
}
void
GFace
::
setBoundEdges
(
const
std
::
vector
<
int
>
&
tagEdges
)
{
std
::
vector
<
GEdge
*>
e
;
for
(
std
::
size_t
i
=
0
;
i
!=
tagEdges
.
size
();
i
++
)
{
for
(
std
::
size_t
i
=
0
;
i
<
tagEdges
.
size
();
i
++
)
{
GEdge
*
ge
=
model
()
->
getEdgeByTag
(
tagEdges
[
i
]);
if
(
ge
)
{
e
.
push_back
(
ge
);
...
...
@@ -120,13 +118,15 @@ void GFace::setBoundEdges(const std::vector<int> &tagEdges,
Msg
::
Error
(
"Wrong number of curve signs in surface %d"
,
tag
());
setBoundEdges
(
tagEdges
);
}
for
(
std
::
vector
<
int
>::
size_type
i
=
0
;
i
!=
tagEdges
.
size
();
i
++
)
{
for
(
std
::
vector
<
int
>::
size_type
i
=
0
;
i
<
tagEdges
.
size
();
i
++
)
{
GEdge
*
ge
=
model
()
->
getEdgeByTag
(
tagEdges
[
i
]);
if
(
ge
)
{
if
(
std
::
find
(
l_edges
.
begin
(),
l_edges
.
end
(),
ge
)
==
l_edges
.
end
())
{
l_edges
.
push_back
(
ge
);
l_dirs
.
push_back
(
signEdges
[
i
]);
ge
->
addFace
(
this
);
}
}
else
{
Msg
::
Error
(
"Unknown curve %d in surface %d"
,
tagEdges
[
i
],
tag
());
}
...
...
This diff is collapsed.
Click to expand it.
Geo/GRegion.cpp
+
17
−
13
View file @
94018aa9
...
...
@@ -268,11 +268,11 @@ void GRegion::setColor(unsigned int val, bool recursive)
int
GRegion
::
delFace
(
GFace
*
face
)
{
const
auto
found
=
std
::
find
(
begin
(
l_faces
),
end
(
l_faces
),
face
);
const
auto
found
=
std
::
find
(
l_faces
.
begin
(),
l_faces
.
end
(
),
face
);
if
(
found
!=
end
(
l_faces
))
{
l_faces
.
erase
(
found
);
}
if
(
found
!=
l_faces
.
end
(
))
{
l_faces
.
erase
(
found
);
}
const
auto
pos
=
std
::
distance
(
begin
(
l_faces
),
found
);
const
auto
pos
=
std
::
distance
(
l_faces
.
begin
(
),
found
);
if
(
l_dirs
.
empty
())
{
return
0
;
}
...
...
@@ -283,7 +283,7 @@ int GRegion::delFace(GFace *face)
const
auto
orientation
=
l_dirs
.
at
(
pos
);
l_dirs
.
erase
(
std
::
next
(
begin
(
l_dirs
),
pos
));
l_dirs
.
erase
(
std
::
next
(
l_dirs
.
begin
(
),
pos
));
return
orientation
;
}
...
...
@@ -291,10 +291,12 @@ int GRegion::delFace(GFace *face)
void
GRegion
::
setBoundFaces
(
const
std
::
set
<
int
>
&
tagFaces
)
{
for
(
auto
it
=
tagFaces
.
begin
();
it
!=
tagFaces
.
end
();
++
it
)
{
GFace
*
face
=
model
()
->
getFaceByTag
(
*
it
);
if
(
face
)
{
l_faces
.
push_back
(
face
);
face
->
addRegion
(
this
);
GFace
*
gf
=
model
()
->
getFaceByTag
(
*
it
);
if
(
gf
)
{
if
(
std
::
find
(
l_faces
.
begin
(),
l_faces
.
end
(),
gf
)
==
l_faces
.
end
())
{
l_faces
.
push_back
(
gf
);
gf
->
addRegion
(
this
);
}
}
else
{
Msg
::
Error
(
"Unknown surface %d in volume %d"
,
*
it
,
tag
());
...
...
@@ -312,12 +314,14 @@ void GRegion::setBoundFaces(const std::vector<int> &tagFaces,
setBoundFaces
(
tags
);
}
for
(
std
::
size_t
i
=
0
;
i
!=
tagFaces
.
size
();
i
++
)
{
GFace
*
face
=
model
()
->
getFaceByTag
(
tagFaces
[
i
]);
if
(
face
)
{
l_faces
.
push_back
(
face
);
face
->
addRegion
(
this
);
GFace
*
gf
=
model
()
->
getFaceByTag
(
tagFaces
[
i
]);
if
(
gf
)
{
if
(
std
::
find
(
l_faces
.
begin
(),
l_faces
.
end
(),
gf
)
==
l_faces
.
end
())
{
l_faces
.
push_back
(
gf
);
gf
->
addRegion
(
this
);
l_dirs
.
push_back
(
signFaces
[
i
]);
}
}
else
{
Msg
::
Error
(
"Unknown surface %d in volume %d"
,
tagFaces
[
i
],
tag
());
}
...
...
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