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
d55538f7
Commit
d55538f7
authored
19 years ago
by
Christophe Geuzaine
Browse files
Options
Downloads
Patches
Plain Diff
don't use the "manual" numbering the extrude demo: it creates bad habits for new users
parent
6000d7f2
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
tutorial/t3.geo
+13
-13
13 additions, 13 deletions
tutorial/t3.geo
with
13 additions
and
13 deletions
tutorial/t3.geo
+
13
−
13
View file @
d55538f7
...
@@ -13,14 +13,14 @@ Include "t1.geo";
...
@@ -13,14 +13,14 @@ Include "t1.geo";
// As in `t2.geo', we plan to perform an extrusion along the z axis.
// As in `t2.geo', we plan to perform an extrusion along the z axis.
// But here, instead of only extruding the geometry, we also want to
// But here, instead of only extruding the geometry, we also want to
// extrude the 2D mesh. This is done with the same `Extrude' command,
// extrude the 2D mesh. This is done with the same `Extrude' command,
// but by specifying the number of layers (4 in this case,
with 8, 4,
// but by specifying the number of layers (4
layers
in this case,
each
//
2 and 1 subdivisions, respectively), with volume numbers 9000 to
//
with heights equal to h/4, but with 8, 4, 2 and 1 subdivisions,
//
9003 and
respective
heights equal to h/4
:
// respective
ly)
:
h
=
0.1
;
h
=
0.1
;
Extrude
{
0
,
0
,
h
}
{
Extrude
{
0
,
0
,
h
}
{
Surface
{
6
};
Layers
{
{
8
,
4
,
2
,
1
},
{
9000
:
9003
},
{
0.25
,
0.5
,
0.75
,
1
}
};
Surface
{
6
};
Layers
{
{
8
,
4
,
2
,
1
},
{
0.25
,
0.5
,
0.75
,
1
}
};
}
}
// The extrusion can also be performed with a rotation instead of a
// The extrusion can also be performed with a rotation instead of a
...
@@ -30,25 +30,25 @@ Extrude {0,0,h} {
...
@@ -30,25 +30,25 @@ Extrude {0,0,h} {
// (-Pi/2):
// (-Pi/2):
Extrude
{
{
0
,
1
,
0
}
,
{
-
0.1
,
0
,
0.1
}
,
-
Pi
/
2
}
{
Extrude
{
{
0
,
1
,
0
}
,
{
-
0.1
,
0
,
0.1
}
,
-
Pi
/
2
}
{
Surface
{
122
};
Layers
{
7
,
9004
,
1
};
Recombine
;
Surface
{
122
};
Layers
{
7
,
1
};
Recombine
;
}
}
// Note that a translation ({-2*h,0,0}) and a rotation ({1,0,0},
// Note that a translation ({-2*h,0,0}) and a rotation ({1,0,0},
// {0,0.15,0.25}, Pi/2) can also be combined:
// {0,0.15,0.25}, Pi/2) can also be combined:
aa
[]
=
Extrude
{
{
-
2
*
h
,
0
,
0
},
{
1
,
0
,
0
}
,
{
0
,
0.15
,
0.25
}
,
Pi
/
2
}
{
out
[]
=
Extrude
{
{
-
2
*
h
,
0
,
0
},
{
1
,
0
,
0
}
,
{
0
,
0.15
,
0.25
}
,
Pi
/
2
}
{
Surface
{
news
-
1
};
Layers
{
10
,
1
};
Recombine
;
Surface
{
news
-
1
};
Layers
{
10
,
1
};
Recombine
;
};
};
// In th
is
last extrusion command we
didn't specify an explicit
// In th
e
last extrusion command we
retrieved the volume
//
volume number (which is equivalent to setting it to "0"),
//
number programatically by saving the output of the command
//
which means that the elements will simply belong the automatically
//
into an array. This array will contain the "top" of the extruded
//
created volume (whose number we get from the aa[] list)
.
//
surface as well as the newly created volume
.
// We
finally
define a new physical volume to save all
the tetrahedra
// We
can then
define a new physical volume to save all
// with a common region number (101):
//
the tetrahedra
with a common region number (101):
Physical
Volume
(
101
)
=
{
9000
:
9004
,
aa
[
1
]};
Physical
Volume
(
101
)
=
{
1
,
2
,
out
[
1
]};
// Let us now change some options... Since all interactive options are
// Let us now change some options... Since all interactive options are
// accessible in Gmsh's scripting language, we can for example define
// accessible in Gmsh's scripting language, we can for example define
...
...
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