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
7524e746
Commit
7524e746
authored
18 years ago
by
Christophe Geuzaine
Browse files
Options
Downloads
Patches
Plain Diff
better handling of "negative" physical groups
parent
49e8937e
No related branches found
No related tags found
No related merge requests found
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
Common/Visibility.cpp
+5
-5
5 additions, 5 deletions
Common/Visibility.cpp
Geo/GModel.cpp
+8
-6
8 additions, 6 deletions
Geo/GModel.cpp
Mesh/meshGFace.cpp
+5
-1
5 additions, 1 deletion
Mesh/meshGFace.cpp
benchmarks/misc/side_by_side.script
+4
-2
4 additions, 2 deletions
benchmarks/misc/side_by_side.script
with
22 additions
and
14 deletions
Common/Visibility.cpp
+
5
−
5
View file @
7524e746
// $Id: Visibility.cpp,v 1.2
5
2006-1
1-30 01:06:07
geuzaine Exp $
// $Id: Visibility.cpp,v 1.2
6
2006-1
2-12 18:16:41
geuzaine Exp $
//
// Copyright (C) 1997-2007 C. Geuzaine, J.-F. Remacle
//
...
...
@@ -260,22 +260,22 @@ void VisibilityManager::setVisibilityByNumber(int type, int num, char val, bool
case
6
:
// physical point
for
(
GModel
::
viter
it
=
GMODEL
->
firstVertex
();
it
!=
GMODEL
->
lastVertex
();
it
++
)
for
(
unsigned
int
i
=
0
;
i
<
(
*
it
)
->
physicals
.
size
();
i
++
)
if
(
all
||
(
*
it
)
->
physicals
[
i
]
==
num
)
(
*
it
)
->
setVisibility
(
val
,
recursive
);
if
(
all
||
std
::
abs
(
(
*
it
)
->
physicals
[
i
]
)
==
num
)
(
*
it
)
->
setVisibility
(
val
,
recursive
);
break
;
case
7
:
// physical line
for
(
GModel
::
eiter
it
=
GMODEL
->
firstEdge
();
it
!=
GMODEL
->
lastEdge
();
it
++
)
for
(
unsigned
int
i
=
0
;
i
<
(
*
it
)
->
physicals
.
size
();
i
++
)
if
(
all
||
(
*
it
)
->
physicals
[
i
]
==
num
)
(
*
it
)
->
setVisibility
(
val
,
recursive
);
if
(
all
||
std
::
abs
(
(
*
it
)
->
physicals
[
i
]
)
==
num
)
(
*
it
)
->
setVisibility
(
val
,
recursive
);
break
;
case
8
:
// physical surface
for
(
GModel
::
fiter
it
=
GMODEL
->
firstFace
();
it
!=
GMODEL
->
lastFace
();
it
++
)
for
(
unsigned
int
i
=
0
;
i
<
(
*
it
)
->
physicals
.
size
();
i
++
)
if
(
all
||
(
*
it
)
->
physicals
[
i
]
==
num
)
(
*
it
)
->
setVisibility
(
val
,
recursive
);
if
(
all
||
std
::
abs
(
(
*
it
)
->
physicals
[
i
]
)
==
num
)
(
*
it
)
->
setVisibility
(
val
,
recursive
);
break
;
case
9
:
// physical volume
for
(
GModel
::
riter
it
=
GMODEL
->
firstRegion
();
it
!=
GMODEL
->
lastRegion
();
it
++
)
for
(
unsigned
int
i
=
0
;
i
<
(
*
it
)
->
physicals
.
size
();
i
++
)
if
(
all
||
(
*
it
)
->
physicals
[
i
]
==
num
)
(
*
it
)
->
setVisibility
(
val
,
recursive
);
if
(
all
||
std
::
abs
(
(
*
it
)
->
physicals
[
i
]
)
==
num
)
(
*
it
)
->
setVisibility
(
val
,
recursive
);
break
;
}
}
...
...
This diff is collapsed.
Click to expand it.
Geo/GModel.cpp
+
8
−
6
View file @
7524e746
// $Id: GModel.cpp,v 1.2
4
2006-1
1-29 16:57:00 remacl
e Exp $
// $Id: GModel.cpp,v 1.2
5
2006-1
2-12 18:16:41 geuzain
e Exp $
//
// Copyright (C) 1997-2007 C. Geuzaine, J.-F. Remacle
//
...
...
@@ -153,7 +153,9 @@ bool GModel::noPhysicalGroups()
static
void
addInGroup
(
GEntity
*
ge
,
std
::
map
<
int
,
std
::
vector
<
GEntity
*>
>
&
group
)
{
for
(
unsigned
int
i
=
0
;
i
<
ge
->
physicals
.
size
();
i
++
){
int
p
=
ge
->
physicals
[
i
];
// phyicals can be stored with negative signs when the entity
// should be "reversed"
int
p
=
std
::
abs
(
ge
->
physicals
[
i
]);
if
(
std
::
find
(
group
[
p
].
begin
(),
group
[
p
].
end
(),
ge
)
==
group
[
p
].
end
())
group
[
p
].
push_back
(
ge
);
}
...
...
@@ -188,16 +190,16 @@ int GModel::maxPhysicalNumber()
int
num
=
0
;
for
(
viter
it
=
firstVertex
();
it
!=
lastVertex
();
++
it
)
for
(
unsigned
int
i
=
0
;
i
<
(
*
it
)
->
physicals
.
size
();
i
++
)
num
=
std
::
max
(
num
,
(
*
it
)
->
physicals
[
i
]);
num
=
std
::
max
(
num
,
std
::
abs
(
(
*
it
)
->
physicals
[
i
])
)
;
for
(
eiter
it
=
firstEdge
();
it
!=
lastEdge
();
++
it
)
for
(
unsigned
int
i
=
0
;
i
<
(
*
it
)
->
physicals
.
size
();
i
++
)
num
=
std
::
max
(
num
,
(
*
it
)
->
physicals
[
i
]);
num
=
std
::
max
(
num
,
std
::
abs
(
(
*
it
)
->
physicals
[
i
])
)
;
for
(
fiter
it
=
firstFace
();
it
!=
lastFace
();
++
it
)
for
(
unsigned
int
i
=
0
;
i
<
(
*
it
)
->
physicals
.
size
();
i
++
)
num
=
std
::
max
(
num
,
(
*
it
)
->
physicals
[
i
]);
num
=
std
::
max
(
num
,
std
::
abs
(
(
*
it
)
->
physicals
[
i
])
)
;
for
(
riter
it
=
firstRegion
();
it
!=
lastRegion
();
++
it
)
for
(
unsigned
int
i
=
0
;
i
<
(
*
it
)
->
physicals
.
size
();
i
++
)
num
=
std
::
max
(
num
,
(
*
it
)
->
physicals
[
i
]);
num
=
std
::
max
(
num
,
std
::
abs
(
(
*
it
)
->
physicals
[
i
])
)
;
return
num
;
}
...
...
This diff is collapsed.
Click to expand it.
Mesh/meshGFace.cpp
+
5
−
1
View file @
7524e746
// $Id: meshGFace.cpp,v 1.4
0
2006-12-12
01:39:15
geuzaine Exp $
// $Id: meshGFace.cpp,v 1.4
1
2006-12-12
18:16:41
geuzaine Exp $
//
// Copyright (C) 1997-2007 C. Geuzaine, J.-F. Remacle
//
...
...
@@ -1424,6 +1424,10 @@ bool shouldRevert(MEdge &reference, std::vector<T*> &elements)
void
orientMeshGFace
::
operator
()(
GFace
*
gf
)
{
// in old versions we did not reorient transfinite surface meshes;
// we could add the following to provide backward compatibility:
// if(gf->meshAttributes.Method == TRANSFINI) return;
// orients the mesh to match the orientation of the first edge
std
::
list
<
GEdge
*>
edges
=
gf
->
edges
();
std
::
list
<
int
>
ori
=
gf
->
orientations
();
...
...
This diff is collapsed.
Click to expand it.
benchmarks/misc/side_by_side.script
+
4
−
2
View file @
7524e746
View[0].RangeType = 2 ; // custom
View[0].CustomMin = View[0].Min ;
View[0].CustomMax = View[0].Max ;
View[1].OffsetX = 1.5 * View[0].MaxX ;
View[1].RangeType = 2 ; // custom
View[1].Min = View[0].Min ;
View[1].Max = View[0].Max ;
View[1].
Custom
Min = View[0].Min ;
View[1].
Custom
Max = View[0].Max ;
View[1].ShowScale = 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