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
73438d9c
Commit
73438d9c
authored
8 years ago
by
Christophe Geuzaine
Browse files
Options
Downloads
Patches
Plain Diff
up
parent
4ffbf5a9
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
Common/GmshAPI.cpp
+22
-4
22 additions, 4 deletions
Common/GmshAPI.cpp
Common/GmshAPI.h
+9
-13
9 additions, 13 deletions
Common/GmshAPI.h
with
31 additions
and
17 deletions
Common/GmshAPI.cpp
+
22
−
4
View file @
73438d9c
...
...
@@ -18,6 +18,7 @@
extern
"C"
{
/* Gmsh */
int
gmshInitialize
(
int
argc
,
char
**
argv
)
{
return
!
GmshInitialize
(
argc
,
argv
);
...
...
@@ -40,61 +41,78 @@ extern "C"
int
gmshExport
(
const
char
*
fileName
)
{
return
1
;
}
int
gmshClear
()
{
return
1
;
}
/* Gmsh Options */
int
gmshOptionsSetNumber
(
const
char
*
name
,
double
value
)
{
return
1
;
}
int
gmshOptionsGetNumber
(
const
char
*
name
,
double
*
value
)
{
return
1
;
}
/* Gmsh Model */
int
gmshModelCreate
(
const
char
*
name
)
{
return
1
;
}
int
gmshModelSetCurrent
(
const
char
*
name
)
{
return
1
;
}
int
gmshModelDestroy
()
{
return
1
;
}
int
gmshModelMesh
(
int
dim
)
{
return
1
;
}
int
gmshModel
GeoCreate
(
)
int
gmshModel
AddEmbeddedVertex
(
int
tag
,
int
inDim
,
int
inTag
)
{
return
1
;
}
/* Gmsh Model Geo Internals */
int
gmshModelGeoAddPoint
(
int
*
tag
,
double
x
,
double
y
,
double
z
,
double
lc
)
{
return
1
;
}
int
gmshModelGeoAddLine
(
int
*
tag
,
int
startVertexTag
,
int
endVertexTag
)
{
return
1
;
}
int
gmshModelGeoSynchronize
()
{
return
1
;
}
int
gmshModelOCCCreate
()
{
}
/* Gmsh Model OCC Internals */
int
gmshModelOCCAddPoint
(
int
*
tag
,
double
x
,
double
y
,
double
z
,
double
lc
)
{
return
1
;
}
int
gmshModelOCCSynchronize
()
{
return
1
;
}
}
This diff is collapsed.
Click to expand it.
Common/GmshAPI.h
+
9
−
13
View file @
73438d9c
...
...
@@ -22,43 +22,39 @@ typedef struct gmshIntVector{ int n; int *v; };
typedef
struct
gmshDoubleVector
{
int
n
;
double
*
v
;
};
typedef
struct
gmshEntityVector
{
int
n
;
gmshEntity
*
v
;
};
/
/
all functions return 0 on successful completion
/
*
all functions return 0 on successful completion
*/
extern
"C"
{
// initialize Gmsh (argc and argv are processed like command line arguments);
// no other API function should be called before this one
/* Gmsh */
int
gmshInitialize
(
int
argc
,
char
**
argv
);
// finalize Gmsh; no other API function should be called after this one
int
gmshFinalize
();
// open a new project (same as File->Open in the interactive version)
int
gmshOpen
(
const
char
*
fileName
);
// merge a file (same as File->Merge in the interactive version)
int
gmshMerge
(
const
char
*
fileName
);
// export a file
int
gmshExport
(
const
char
*
fileName
);
// clears everything (models, post-processing views)
int
gmshClear
();
/* Gmsh Options */
int
gmshOptionsSetNumber
(
const
char
*
name
,
double
value
);
int
gmshOptionsGetNumber
(
const
char
*
name
,
double
*
value
);
/* Gmsh Model */
int
gmshModelCreate
(
const
char
*
name
);
int
gmshModelSetCurrent
(
const
char
*
name
);
int
gmshModelDestroy
();
int
gmshModelMesh
(
int
dim
);
int
gmshModelAddEmbeddedVertex
(
int
tag
,
int
inDim
,
int
inTag
);
int
g
mshModelGeo
Create
();
int
gmshModelGeoAdd
Point
(
int
*
tag
,
double
x
,
double
y
,
double
z
,
double
lc
);
/* G
msh
Model
Geo
Internals */
int
gmshModelGeoAdd
Vertex
(
int
*
tag
,
double
x
,
double
y
,
double
z
,
double
lc
);
int
gmshModelGeoAddLine
(
int
*
tag
,
int
startVertexTag
,
int
endVertexTag
);
int
gmshModelGeoAddPolyLine
(
int
*
tag
,
const
gmshIntVector
*
vertexTags
);
int
gmshModelGeoExtrude
(
gmshEntityVector
*
in
,
double
dx
,
double
dy
,
double
dz
,
gmshEntityVector
*
out
);
int
gmshModelGeoSynchronize
();
int
g
mshModelOCC
Create
();
int
gmshModelOCCAdd
Point
(
int
*
tag
,
double
x
,
double
y
,
double
z
,
double
lc
);
/* G
msh
Model
OCC
Internals */
int
gmshModelOCCAdd
Vertex
(
int
*
tag
,
double
x
,
double
y
,
double
z
,
double
lc
);
int
gmshModelOCCAddLine
(
int
*
tag
,
int
startVertexTag
,
int
endVertexTag
);
int
gmshModelOCCExtrude
(
const
gmshEntityVector
*
in
,
double
dx
,
double
dy
,
double
dz
,
gmshEntityVector
*
out
);
...
...
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