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
ecb7459b
Commit
ecb7459b
authored
23 years ago
by
Christophe Geuzaine
Browse files
Options
Downloads
Patches
Plain Diff
compatibility fix: numbering of points, etc. with Delete/Coherence
parent
c3d16c9e
No related branches found
No related tags found
No related merge requests found
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
Geo/CAD.cpp
+32
-4
32 additions, 4 deletions
Geo/CAD.cpp
tutorial/t2.geo
+1
-1
1 addition, 1 deletion
tutorial/t2.geo
utils/gmsh.spec
+1
-1
1 addition, 1 deletion
utils/gmsh.spec
with
34 additions
and
6 deletions
Geo/CAD.cpp
+
32
−
4
View file @
ecb7459b
// $Id: CAD.cpp,v 1.3
3
2001-1
0-29 08:52:19
geuzaine Exp $
// $Id: CAD.cpp,v 1.3
4
2001-1
1-07 07:13:45
geuzaine Exp $
#include
"Gmsh.h"
#include
"Gmsh.h"
#include
"Numeric.h"
#include
"Numeric.h"
...
@@ -1203,6 +1203,21 @@ int compareTwoSurfaces (const void *a, const void *b){
...
@@ -1203,6 +1203,21 @@ int compareTwoSurfaces (const void *a, const void *b){
/* Fonction eliminant les doublons dans une
/* Fonction eliminant les doublons dans une
geometrie*/
geometrie*/
void
MaxNumPoint
(
void
*
a
,
void
*
b
){
Vertex
*
v
=
*
(
Vertex
**
)
a
;
THEM
->
MaxPointNum
=
MAX
(
THEM
->
MaxPointNum
,
v
->
Num
);
}
void
MaxNumCurve
(
void
*
a
,
void
*
b
){
Curve
*
c
=
*
(
Curve
**
)
a
;
THEM
->
MaxLineNum
=
MAX
(
THEM
->
MaxLineNum
,
c
->
Num
);
}
void
MaxNumSurface
(
void
*
a
,
void
*
b
){
Surface
*
s
=
*
(
Surface
**
)
a
;
THEM
->
MaxSurfaceNum
=
MAX
(
THEM
->
MaxSurfaceNum
,
s
->
Num
);
}
void
Coherence_PS
(
void
){
void
Coherence_PS
(
void
){
ReplaceAllDuplicates
(
THEM
);
ReplaceAllDuplicates
(
THEM
);
}
}
...
@@ -1239,8 +1254,12 @@ void ReplaceAllDuplicates ( Mesh *m ){
...
@@ -1239,8 +1254,12 @@ void ReplaceAllDuplicates ( Mesh *m ){
List_Delete
(
All
);
List_Delete
(
All
);
end
=
Tree_Nbr
(
m
->
Points
);
end
=
Tree_Nbr
(
m
->
Points
);
if
(
start
-
end
)
Msg
(
DEBUG
,
"Removed %d duplicate points"
,
start
-
end
);
if
(
start
-
end
)
Msg
(
DEBUG
,
"Removed %d duplicate points"
,
start
-
end
);
if
(
CTX
.
geom
.
old_newreg
){
m
->
MaxPointNum
=
0
;
Tree_Action
(
m
->
Points
,
MaxNumPoint
);
Tree_Action
(
m
->
Vertices
,
MaxNumPoint
);
}
/* Replace old points in curves */
/* Replace old points in curves */
...
@@ -1307,6 +1326,10 @@ void ReplaceAllDuplicates ( Mesh *m ){
...
@@ -1307,6 +1326,10 @@ void ReplaceAllDuplicates ( Mesh *m ){
end
=
Tree_Nbr
(
m
->
Curves
);
end
=
Tree_Nbr
(
m
->
Curves
);
if
(
start
-
end
)
Msg
(
DEBUG
,
"Removed %d duplicate curves"
,
start
-
end
);
if
(
start
-
end
)
Msg
(
DEBUG
,
"Removed %d duplicate curves"
,
start
-
end
);
if
(
CTX
.
geom
.
old_newreg
){
m
->
MaxLineNum
=
0
;
Tree_Action
(
m
->
Curves
,
MaxNumCurve
);
}
/* Replace old curves in surfaces */
/* Replace old curves in surfaces */
...
@@ -1345,6 +1368,10 @@ void ReplaceAllDuplicates ( Mesh *m ){
...
@@ -1345,6 +1368,10 @@ void ReplaceAllDuplicates ( Mesh *m ){
end
=
Tree_Nbr
(
m
->
Surfaces
);
end
=
Tree_Nbr
(
m
->
Surfaces
);
if
(
start
-
end
)
Msg
(
DEBUG
,
"Removed %d duplicate surfaces"
,
start
-
end
);
if
(
start
-
end
)
Msg
(
DEBUG
,
"Removed %d duplicate surfaces"
,
start
-
end
);
if
(
CTX
.
geom
.
old_newreg
){
m
->
MaxSurfaceNum
=
0
;
Tree_Action
(
m
->
Surfaces
,
MaxNumSurface
);
}
/* Replace old surfaces in volumes */
/* Replace old surfaces in volumes */
...
@@ -1522,6 +1549,7 @@ void DeletePoint(int ip){
...
@@ -1522,6 +1549,7 @@ void DeletePoint(int ip){
}
}
}
}
List_Delete
(
Curves
);
List_Delete
(
Curves
);
if
(
v
->
Num
==
THEM
->
MaxPointNum
)
THEM
->
MaxPointNum
--
;
Tree_Suppress
(
THEM
->
Points
,
&
v
);
Tree_Suppress
(
THEM
->
Points
,
&
v
);
}
}
...
@@ -1537,6 +1565,7 @@ void DeleteCurve(int ip){
...
@@ -1537,6 +1565,7 @@ void DeleteCurve(int ip){
}
}
}
}
List_Delete
(
Surfs
);
List_Delete
(
Surfs
);
if
(
c
->
Num
==
THEM
->
MaxLineNum
)
THEM
->
MaxLineNum
--
;
Tree_Suppress
(
THEM
->
Curves
,
&
c
);
Tree_Suppress
(
THEM
->
Curves
,
&
c
);
}
}
...
@@ -1555,12 +1584,11 @@ void DeleteSurf( int is ){
...
@@ -1555,12 +1584,11 @@ void DeleteSurf( int is ){
}
}
}
}
List_Delete
(
Vols
);
List_Delete
(
Vols
);
if
(
s
->
Num
==
THEM
->
MaxSurfaceNum
)
THEM
->
MaxSurfaceNum
--
;
//s->Num = 1000000000;
//s->Num = 1000000000;
Tree_Suppress
(
THEM
->
Surfaces
,
&
s
);
Tree_Suppress
(
THEM
->
Surfaces
,
&
s
);
}
}
void
DeleteLine
(
int
ip
,
int
i
){
DeleteCurve
(
ip
);}
void
DeleteShape
(
int
Type
,
int
Num
){
void
DeleteShape
(
int
Type
,
int
Num
){
switch
(
Type
){
switch
(
Type
){
...
...
This diff is collapsed.
Click to expand it.
tutorial/t2.geo
+
1
−
1
View file @
ecb7459b
...
@@ -52,7 +52,7 @@ Extrude Surface { 11, {0, 0, h} } ;
...
@@ -52,7 +52,7 @@ Extrude Surface { 11, {0, 0, h} } ;
// manually a characteristic length for some of the automatically
// manually a characteristic length for some of the automatically
// created points:
// created points:
Characteristic
Length
{
6
,
2
,
5
2
,
3
,
16
,
12
}
=
lc
*
2
;
Characteristic
Length
{
6
,
2
2
,
2
,
3
,
16
,
12
}
=
lc
*
2
;
// If the transformation tools are handy to create complex geometries,
// If the transformation tools are handy to create complex geometries,
// it is sometimes useful to generate the flat geometry, consisting
// it is sometimes useful to generate the flat geometry, consisting
...
...
This diff is collapsed.
Click to expand it.
utils/gmsh.spec
+
1
−
1
View file @
ecb7459b
...
@@ -2,7 +2,7 @@ Summary: A 3D mesh generator with pre- and post-processing facilities
...
@@ -2,7 +2,7 @@ Summary: A 3D mesh generator with pre- and post-processing facilities
Name: gmsh
Name: gmsh
Version: 1.28
Version: 1.28
Source: gmsh-1.28.tar.gz
Source: gmsh-1.28.tar.gz
Release:
1
Release:
2
Copyright: distributable
Copyright: distributable
Group: Applications/Engineering
Group: Applications/Engineering
URL: http://www.geuz.org/gmsh/
URL: http://www.geuz.org/gmsh/
...
...
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