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
a9cfd7ad
Commit
a9cfd7ad
authored
23 years ago
by
Christophe Geuzaine
Browse files
Options
Downloads
Patches
Plain Diff
New automatic numbering
parent
b55410e3
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
Mesh/3D_Extrude_Old.cpp
+13
-12
13 additions, 12 deletions
Mesh/3D_Extrude_Old.cpp
examples/servo3D.geo
+5
-5
5 additions, 5 deletions
examples/servo3D.geo
with
18 additions
and
17 deletions
Mesh/3D_Extrude_Old.cpp
+
13
−
12
View file @
a9cfd7ad
// $Id: 3D_Extrude_Old.cpp,v 1.
1
2001-06-25 1
3:05:16
geuzaine Exp $
// $Id: 3D_Extrude_Old.cpp,v 1.
2
2001-06-25 1
6:23:00
geuzaine Exp $
// This is the old extrusion mesh generator -> only available through
// command line options -extrude (w/o -recombine). This mesh generator
...
...
@@ -10,16 +10,20 @@
//
// All geometrical entities are automatically numbered:
//
// volumes: 3 * 1
0^6
+ layer *
10^3
+ surf->num
// New XY surfaces: 2 * 1
0^6
+ layer *
10^3
+ surf->num
// perp. surfaces: 1 * 1
0^6
+ layer *
10^3
+ curve->num
// perp. lines: 4 * 1
0^6
+ layer *
10^3
+ point->Num
// volumes: 3 *
K
1 + layer *
K2
+ surf->num
// New XY surfaces: 2 *
K
1 + layer *
K2
+ surf->num
// perp. surfaces: 1 *
K
1 + layer *
K2
+ curve->num
// perp. lines: 4 *
K
1 + layer *
K2
+ point->Num
//
// WARNING:
//
// The is no way to save XY generated lines or other entities for the
// moment
#define NB_LAYER_MAX 100
#define K1 100.e6
#define K2 1.e6 // to store NB_LAYER_MAX
#include
"Gmsh.h"
#include
"Const.h"
#include
"Geo.h"
...
...
@@ -32,9 +36,6 @@ extern Context_T CTX ;
extern
Mesh
*
LOCAL
,
*
THEM
;
extern
int
CurrentNodeNumber
;
#define NB_LAYER_MAX 100
static
Tree_T
*
Tree_Ares
,
*
Tree_Swaps
;
FILE
*
file
;
...
...
@@ -404,11 +405,11 @@ static void Extrude_Surface3 (void *data , void *dum){
/* Numerotation automatique des entites physiques */
printf
(
"Extruding Surface %d
\n
"
,
s
->
Num
);
for
(
i
=
0
;
i
<
NbLayer
;
i
++
){
ZonLayer
[
i
]
=
(
int
)(
3
*
1
.e6
)
+
(
int
)
((
i
+
1
)
*
1.e3
)
+
s
->
Num
;
ZonLayer
[
i
]
=
(
int
)(
3
*
K
1
)
+
(
int
)
((
i
+
1
)
*
K2
)
+
s
->
Num
;
}
SurfLayer
[
0
]
=
s
->
Num
;
for
(
i
=
0
;
i
<
NbLayer
;
i
++
){
SurfLayer
[
i
+
1
]
=
(
int
)(
2
*
1
.e6
)
+
(
int
)((
i
+
1
)
*
1.e3
)
+
s
->
Num
;
SurfLayer
[
i
+
1
]
=
(
int
)(
2
*
K
1
)
+
(
int
)((
i
+
1
)
*
K2
)
+
s
->
Num
;
}
Tree_Action
(
s
->
Simplexes
,
Extrude_Simplex_Phase3
);
...
...
@@ -473,7 +474,7 @@ static void Extrude_Curve (void *data , void *dum){
/* Numerotation automatique des entites physiques */
printf
(
"Extruding Curve %d
\n
"
,
c
->
Num
);
for
(
i
=
0
;
i
<
NbLayer
;
i
++
){
SurfLayer
[
i
]
=
(
int
)(
1
*
1
.e6
)
+
(
int
)((
i
+
1
)
*
1.e3
)
+
c
->
Num
;
SurfLayer
[
i
]
=
(
int
)(
1
*
K
1
)
+
(
int
)((
i
+
1
)
*
K2
)
+
c
->
Num
;
}
for
(
i
=
0
;
i
<
List_Nbr
(
c
->
Vertices
)
-
1
;
i
++
){
...
...
@@ -515,7 +516,7 @@ static void Extrude_Point (void *data , void *dum){
/* Numerotation automatique des entites physiques */
printf
(
"Extruding Vertex %d
\n
"
,
v
->
Num
);
for
(
i
=
0
;
i
<
NbLayer
;
i
++
){
LineLayer
[
i
]
=
(
int
)(
4
*
1
.e6
)
+
(
int
)((
i
+
1
)
*
1.e3
)
+
v
->
Num
;
LineLayer
[
i
]
=
(
int
)(
4
*
K
1
)
+
(
int
)((
i
+
1
)
*
K2
)
+
v
->
Num
;
}
if
((
pV2
=
(
Vertex
**
)
Tree_PQuery
(
THEM
->
Vertices
,
pV
))){
...
...
This diff is collapsed.
Click to expand it.
examples/servo3D.geo
+
5
−
5
View file @
a9cfd7ad
...
...
@@ -379,11 +379,11 @@ Plane Surface(88) = {87};
// ----------------------------------------------------
// ----------------------------------------------------
L_
=
100
0000
;
S_
=
200
0000
;
V_
=
300
0000
;
P_
=
400
0000
;
N_
=
1
000
;
L_
=
100
e6
;
S_
=
200
e6
;
V_
=
300
e6
;
P_
=
400
e6
;
N_
=
1
e6
;
Physical
Volume
(
1301
)
=
{
V_
+
N_
+
68
};
// Rotor
...
...
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