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
40d7dd84
Commit
40d7dd84
authored
8 years ago
by
Christophe Geuzaine
Browse files
Options
Downloads
Patches
Plain Diff
test: OrientedBoundary" and "CombinedOrientedBoundary"
parent
5949440f
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
4
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
Geo/GModel.cpp
+21
-5
21 additions, 5 deletions
Geo/GModel.cpp
Geo/GModel.h
+1
-1
1 addition, 1 deletion
Geo/GModel.h
Parser/Gmsh.tab.cpp
+405
-400
405 additions, 400 deletions
Parser/Gmsh.tab.cpp
Parser/Gmsh.y
+7
-2
7 additions, 2 deletions
Parser/Gmsh.y
with
434 additions
and
408 deletions
Geo/GModel.cpp
+
21
−
5
View file @
40d7dd84
...
@@ -432,7 +432,7 @@ void GModel::getEntitiesInBox(std::vector<GEntity*> &entities, SBoundingBox3d bo
...
@@ -432,7 +432,7 @@ void GModel::getEntitiesInBox(std::vector<GEntity*> &entities, SBoundingBox3d bo
}
}
void
GModel
::
getBoundaryTags
(
std
::
vector
<
int
>
inTags
[
4
],
std
::
vector
<
int
>
outTags
[
4
],
void
GModel
::
getBoundaryTags
(
std
::
vector
<
int
>
inTags
[
4
],
std
::
vector
<
int
>
outTags
[
4
],
bool
combined
)
bool
combined
,
bool
oriented
)
{
{
for
(
int
dim
=
1
;
dim
<
4
;
dim
++
){
for
(
int
dim
=
1
;
dim
<
4
;
dim
++
){
for
(
unsigned
int
i
=
0
;
i
<
inTags
[
dim
].
size
();
i
++
){
for
(
unsigned
int
i
=
0
;
i
<
inTags
[
dim
].
size
();
i
++
){
...
@@ -440,8 +440,16 @@ void GModel::getBoundaryTags(std::vector<int> inTags[4], std::vector<int> outTag
...
@@ -440,8 +440,16 @@ void GModel::getBoundaryTags(std::vector<int> inTags[4], std::vector<int> outTag
GRegion
*
gr
=
getRegionByTag
(
inTags
[
3
][
i
]);
GRegion
*
gr
=
getRegionByTag
(
inTags
[
3
][
i
]);
if
(
gr
){
if
(
gr
){
std
::
list
<
GFace
*>
faces
(
gr
->
faces
());
std
::
list
<
GFace
*>
faces
(
gr
->
faces
());
for
(
std
::
list
<
GFace
*>::
iterator
it
=
faces
.
begin
();
it
!=
faces
.
end
();
it
++
)
std
::
list
<
int
>
orientations
(
gr
->
faceOrientations
());
outTags
[
2
].
push_back
((
*
it
)
->
tag
());
std
::
list
<
int
>::
iterator
ito
=
orientations
.
begin
();
for
(
std
::
list
<
GFace
*>::
iterator
it
=
faces
.
begin
();
it
!=
faces
.
end
();
it
++
){
int
tag
=
(
*
it
)
->
tag
();
if
(
oriented
&&
ito
!=
orientations
.
end
()){
tag
*=
*
ito
;
ito
++
;
}
outTags
[
2
].
push_back
(
tag
);
}
}
}
else
else
Msg
::
Error
(
"Unknown model region with tag %d"
,
inTags
[
3
][
i
]);
Msg
::
Error
(
"Unknown model region with tag %d"
,
inTags
[
3
][
i
]);
...
@@ -450,8 +458,16 @@ void GModel::getBoundaryTags(std::vector<int> inTags[4], std::vector<int> outTag
...
@@ -450,8 +458,16 @@ void GModel::getBoundaryTags(std::vector<int> inTags[4], std::vector<int> outTag
GFace
*
gf
=
getFaceByTag
(
inTags
[
2
][
i
]);
GFace
*
gf
=
getFaceByTag
(
inTags
[
2
][
i
]);
if
(
gf
){
if
(
gf
){
std
::
list
<
GEdge
*>
edges
(
gf
->
edges
());
std
::
list
<
GEdge
*>
edges
(
gf
->
edges
());
for
(
std
::
list
<
GEdge
*>::
iterator
it
=
edges
.
begin
();
it
!=
edges
.
end
();
it
++
)
std
::
list
<
int
>
orientations
(
gf
->
edgeOrientations
());
outTags
[
1
].
push_back
((
*
it
)
->
tag
());
std
::
list
<
int
>::
iterator
ito
=
orientations
.
begin
();
for
(
std
::
list
<
GEdge
*>::
iterator
it
=
edges
.
begin
();
it
!=
edges
.
end
();
it
++
){
int
tag
=
(
*
it
)
->
tag
();
if
(
oriented
&&
ito
!=
orientations
.
end
()){
tag
*=
*
ito
;
ito
++
;
}
outTags
[
1
].
push_back
(
tag
);
}
}
}
else
else
Msg
::
Error
(
"Unknown model face with tag %d"
,
inTags
[
2
][
i
]);
Msg
::
Error
(
"Unknown model face with tag %d"
,
inTags
[
2
][
i
]);
...
...
This diff is collapsed.
Click to expand it.
Geo/GModel.h
+
1
−
1
View file @
40d7dd84
...
@@ -291,7 +291,7 @@ class GModel {
...
@@ -291,7 +291,7 @@ class GModel {
// get tags of entities of the boundary of the given input entities
// get tags of entities of the boundary of the given input entities
void
getBoundaryTags
(
std
::
vector
<
int
>
inTags
[
4
],
std
::
vector
<
int
>
outTags
[
4
],
void
getBoundaryTags
(
std
::
vector
<
int
>
inTags
[
4
],
std
::
vector
<
int
>
outTags
[
4
],
bool
combined
);
bool
combined
,
bool
oriented
);
// return the highest number associated with an elementary entity of
// return the highest number associated with an elementary entity of
// a given dimension (or the highest overall if dim < 0)
// a given dimension (or the highest overall if dim < 0)
...
...
This diff is collapsed.
Click to expand it.
Parser/Gmsh.tab.cpp
+
405
−
400
View file @
40d7dd84
This diff is collapsed.
Click to expand it.
Parser/Gmsh.y
+
7
−
2
View file @
40d7dd84
...
@@ -2234,7 +2234,10 @@ Transform :
...
@@ -2234,7 +2234,10 @@ Transform :
List_Add($$, &s);
List_Add($$, &s);
}
}
}
}
else if(action == "Boundary" || action == "CombinedBoundary"){
else if(action == "Boundary" ||
action == "CombinedBoundary" ||
action == "OrientedBoundary" ||
action == "CombinedOrientedBoundary"){
// boundary operations are performed directly on GModel, which enables
// boundary operations are performed directly on GModel, which enables
// to compute the boundary of hybrid CAD models; this also automatically
// to compute the boundary of hybrid CAD models; this also automatically
// binds all boundary entities for OCC models
// binds all boundary entities for OCC models
...
@@ -2244,7 +2247,9 @@ Transform :
...
@@ -2244,7 +2247,9 @@ Transform :
if(GModel::current()->getGEOInternals()->getChanged())
if(GModel::current()->getGEOInternals()->getChanged())
GModel::current()->getGEOInternals()->synchronize(GModel::current());
GModel::current()->getGEOInternals()->synchronize(GModel::current());
std::vector<int> in[4], out[4]; ListOfShapes2Vectors($3, in);
std::vector<int> in[4], out[4]; ListOfShapes2Vectors($3, in);
GModel::current()->getBoundaryTags(in, out, action == "CombinedBoundary");
GModel::current()->getBoundaryTags
(in, out, action.find("Combined") != std::string::npos,
action.find("Oriented") != std::string::npos);
Vectors2ListOfShapes(out, $$);
Vectors2ListOfShapes(out, $$);
}
}
else{
else{
...
...
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