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
Package registry
Model registry
Operate
Terraform modules
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
Romin Tomasetti
gmsh
Commits
2fb727c8
Commit
2fb727c8
authored
May 11, 2018
by
Christophe Geuzaine
Browse files
Options
Downloads
Patches
Plain Diff
pp
parent
84845e89
No related branches found
No related tags found
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
demos/api/t1.jl
+7
-8
7 additions, 8 deletions
demos/api/t1.jl
demos/api/t1.py
+6
-6
6 additions, 6 deletions
demos/api/t1.py
with
13 additions
and
14 deletions
demos/api/t1.jl
+
7
−
8
View file @
2fb727c8
...
@@ -12,17 +12,17 @@ gmsh.initialize()
...
@@ -12,17 +12,17 @@ gmsh.initialize()
# By default Gmsh will not print out any messages: in order to output messages
# By default Gmsh will not print out any messages: in order to output messages
# on the terminal, just set the standard Gmsh option "General.Terminal" (same
# on the terminal, just set the standard Gmsh option "General.Terminal" (same
# format and meaning as in .geo files)
using gmshOptionSetNumber()
:
# format and meaning as in .geo files):
gmsh
.
option
.
setNumber
(
"General.Terminal"
,
1
)
gmsh
.
option
.
setNumber
(
"General.Terminal"
,
1
)
#
This creates
a new model
,
named "t1"
. I
f gmsh
M
odel
Create
() is not called
,
a
#
Next we add
a new model named "t1"
(i
f gmsh
.m
odel
.add
() is not called a
new
#
new default (
unnamed
)
model will be created on the fly, if necessary
.
# unnamed model will be created on the fly, if necessary
):
gmsh
.
model
.
add
(
"t1"
)
gmsh
.
model
.
add
(
"t1"
)
# The Julia API provides direct access to the internal CAD kernels. The
# The Julia API provides direct access to the internal CAD kernels. The
# built-in CAD kernel was used in t1.geo: the corresponding API functions have
# built-in CAD kernel was used in t1.geo: the corresponding API functions have
# the "gmsh
M
ode
G
eo" prefix. To create geometrical points with the built-in
CAD
# the "gmsh
.m
ode
l.g
eo" prefix. To create geometrical points with the built-in
# kernel, one thus uses gmsh
M
odel
GeoA
ddPoint():
#
CAD
kernel, one thus uses gmsh
.m
odel
.geo.a
ddPoint():
#
#
# - the first 3 arguments are the point coordinates (x, y, z)
# - the first 3 arguments are the point coordinates (x, y, z)
#
#
...
@@ -43,7 +43,6 @@ gmsh.model.geo.addLine(3, 2, 2)
...
@@ -43,7 +43,6 @@ gmsh.model.geo.addLine(3, 2, 2)
gmsh
.
model
.
geo
.
addLine
(
3
,
4
,
3
)
gmsh
.
model
.
geo
.
addLine
(
3
,
4
,
3
)
gmsh
.
model
.
geo
.
addLine
(
4
,
1
,
4
)
gmsh
.
model
.
geo
.
addLine
(
4
,
1
,
4
)
# The philosophy to construct curve loops and surfaces is similar: the first
# The philosophy to construct curve loops and surfaces is similar: the first
# argument is now a vector of integers.
# argument is now a vector of integers.
gmsh
.
model
.
geo
.
addCurveLoop
([
4
,
1
,
-
2
,
3
],
1
)
gmsh
.
model
.
geo
.
addCurveLoop
([
4
,
1
,
-
2
,
3
],
1
)
...
@@ -63,7 +62,7 @@ gmsh.model.setPhysicalName(2, 6, "My surface")
...
@@ -63,7 +62,7 @@ gmsh.model.setPhysicalName(2, 6, "My surface")
# Before it can be meshed, the internal CAD representation must be synchronized
# Before it can be meshed, the internal CAD representation must be synchronized
# with the Gmsh model, which will create the relevant Gmsh data structures. This
# with the Gmsh model, which will create the relevant Gmsh data structures. This
# is achieved by the gmsh
M
odel
GeoS
ynchronize() API call for the built-in CAD
# is achieved by the gmsh
.m
odel
.geo.s
ynchronize() API call for the built-in CAD
# kernel. Synchronizations can be called at any time, but they involve a non
# kernel. Synchronizations can be called at any time, but they involve a non
# trivial amount of processing; so while you could synchronize the internal CAD
# trivial amount of processing; so while you could synchronize the internal CAD
# data after every CAD command, it is usually better to minimize the number of
# data after every CAD command, it is usually better to minimize the number of
...
...
This diff is collapsed.
Click to expand it.
demos/api/t1.py
+
6
−
6
View file @
2fb727c8
...
@@ -12,17 +12,17 @@ gmsh.initialize()
...
@@ -12,17 +12,17 @@ gmsh.initialize()
# By default Gmsh will not print out any messages: in order to output messages
# By default Gmsh will not print out any messages: in order to output messages
# on the terminal, just set the standard Gmsh option "General.Terminal" (same
# on the terminal, just set the standard Gmsh option "General.Terminal" (same
# format and meaning as in .geo files)
using gmshOptionSetNumber()
:
# format and meaning as in .geo files):
gmsh
.
option
.
setNumber
(
"
General.Terminal
"
,
1
)
gmsh
.
option
.
setNumber
(
"
General.Terminal
"
,
1
)
#
This creates
a new model
,
named "t1"
. I
f gmsh
M
odel
Create
() is not called
,
a
#
Next we add
a new model named "t1"
(i
f gmsh
.m
odel
.add
() is not called a
new
#
new default (
unnamed
)
model will be created on the fly, if necessary
.
# unnamed model will be created on the fly, if necessary
):
gmsh
.
model
.
add
(
"
t1
"
)
gmsh
.
model
.
add
(
"
t1
"
)
# The Python API provides direct access to the internal CAD kernels. The
# The Python API provides direct access to the internal CAD kernels. The
# built-in CAD kernel was used in t1.geo: the corresponding API functions have
# built-in CAD kernel was used in t1.geo: the corresponding API functions have
# the "gmsh
M
ode
G
eo" prefix. To create geometrical points with the built-in
CAD
# the "gmsh
.m
ode
l.g
eo" prefix. To create geometrical points with the built-in
# kernel, one thus uses gmsh
M
odel
GeoA
ddPoint():
#
CAD
kernel, one thus uses gmsh
.m
odel
.geo.a
ddPoint():
#
#
# - the first 3 arguments are the point coordinates (x, y, z)
# - the first 3 arguments are the point coordinates (x, y, z)
#
#
...
@@ -62,7 +62,7 @@ gmsh.model.setPhysicalName(2, 6, "My surface")
...
@@ -62,7 +62,7 @@ gmsh.model.setPhysicalName(2, 6, "My surface")
# Before it can be meshed, the internal CAD representation must be synchronized
# Before it can be meshed, the internal CAD representation must be synchronized
# with the Gmsh model, which will create the relevant Gmsh data structures. This
# with the Gmsh model, which will create the relevant Gmsh data structures. This
# is achieved by the gmsh
M
odel
GeoS
ynchronize() API call for the built-in CAD
# is achieved by the gmsh
.m
odel
.geo.s
ynchronize() API call for the built-in CAD
# kernel. Synchronizations can be called at any time, but they involve a non
# kernel. Synchronizations can be called at any time, but they involve a non
# trivial amount of processing; so while you could synchronize the internal CAD
# trivial amount of processing; so while you could synchronize the internal CAD
# data after every CAD command, it is usually better to minimize the number of
# data after every CAD command, it is usually better to minimize the number of
...
...
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