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
871a92ef
Commit
871a92ef
authored
15 years ago
by
Matti Pellika
Browse files
Options
Downloads
Patches
Plain Diff
Fix CellComplex::removeSubdomain iterator invalidating.
parent
e425765e
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
Geo/CellComplex.cpp
+5
-10
5 additions, 10 deletions
Geo/CellComplex.cpp
Geo/ChainComplex.cpp
+3
-2
3 additions, 2 deletions
Geo/ChainComplex.cpp
Plugin/HomologyComputation.cpp
+1
-0
1 addition, 0 deletions
Plugin/HomologyComputation.cpp
with
9 additions
and
12 deletions
Geo/CellComplex.cpp
+
5
−
10
View file @
871a92ef
...
@@ -500,21 +500,16 @@ int CellComplex::reduceComplex(){
...
@@ -500,21 +500,16 @@ int CellComplex::reduceComplex(){
void
CellComplex
::
removeSubdomain
(){
void
CellComplex
::
removeSubdomain
(){
for
(
int
i
=
0
;
i
<
4
;
i
++
){
for
(
int
i
=
0
;
i
<
4
;
i
++
){
for
(
citer
cit
=
firstCell
(
i
);
cit
!=
lastCell
(
i
);
cit
++
){
for
(
citer
cit
=
firstCell
(
i
);
cit
!=
lastCell
(
i
);
){
Cell
*
cell
=
*
cit
;
if
(
cell
->
inSubdomain
())
{
removeCell
(
cell
);
++
cit
;
}
}
for
(
citer
cit
=
firstCell
(
i
);
cit
!=
lastCell
(
i
);
cit
++
){
Cell
*
cell
=
*
cit
;
Cell
*
cell
=
*
cit
;
if
(
cell
->
inSubdomain
())
{
if
(
cell
->
inSubdomain
())
{
removeCell
(
cell
);
removeCell
(
cell
);
cit
=
firstCell
(
i
)
;
cit
++
;
}
}
else
++
cit
;
}
}
}
}
return
;
return
;
}
}
...
@@ -526,7 +521,7 @@ int CellComplex::coreduceComplex(){
...
@@ -526,7 +521,7 @@ int CellComplex::coreduceComplex(){
int
count
=
0
;
int
count
=
0
;
CellComplex
::
removeSubdomain
();
removeSubdomain
();
for
(
int
dim
=
0
;
dim
<
4
;
dim
++
){
for
(
int
dim
=
0
;
dim
<
4
;
dim
++
){
citer
cit
=
firstCell
(
dim
);
citer
cit
=
firstCell
(
dim
);
...
...
This diff is collapsed.
Click to expand it.
Geo/ChainComplex.cpp
+
3
−
2
View file @
871a92ef
// Gmsh - Copyright (C) 1997-2009 C. Geuzaine, J.-F. Remacle
// Gmsh - Copyright (C) 1997-2009 C. Geuzaine, J.-F. Remacle
//
//
// See the LICENSE.txt file for license information. Please report all
// See the LICENSE.txt file for license information. Please report all
...
@@ -703,8 +704,8 @@ void Chain::createPView(){
...
@@ -703,8 +704,8 @@ void Chain::createPView(){
opt_mesh_pyramids
(
0
,
GMSH_SET
,
0
);
opt_mesh_pyramids
(
0
,
GMSH_SET
,
0
);
// show post-processing normals, tangents and element boundaries
// show post-processing normals, tangents and element boundaries
opt_view_normals
(
0
,
GMSH_SET
,
20
);
//
opt_view_normals(0, GMSH_SET, 20);
opt_view_tangents
(
0
,
GMSH_SET
,
20
);
//
opt_view_tangents(0, GMSH_SET, 20);
opt_view_show_element
(
0
,
GMSH_SET
,
1
);
opt_view_show_element
(
0
,
GMSH_SET
,
1
);
if
(
!
data
.
empty
()){
if
(
!
data
.
empty
()){
...
...
This diff is collapsed.
Click to expand it.
Plugin/HomologyComputation.cpp
+
1
−
0
View file @
871a92ef
...
@@ -94,6 +94,7 @@ PView *GMSH_HomologyComputationPlugin::execute(PView *v)
...
@@ -94,6 +94,7 @@ PView *GMSH_HomologyComputationPlugin::execute(PView *v)
else
if
(
cuts
!=
1
&&
gens
!=
1
&&
betti
==
1
)
homology
->
computeBettiNumbers
();
else
if
(
cuts
!=
1
&&
gens
!=
1
&&
betti
==
1
)
homology
->
computeBettiNumbers
();
else
Msg
::
Error
(
"Choose either generators, dual generators or Betti numbers to compute."
);
else
Msg
::
Error
(
"Choose either generators, dual generators or Betti numbers to compute."
);
delete
homology
;
delete
homology
;
return
0
;
return
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