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
6ba9a24a
Commit
6ba9a24a
authored
12 years ago
by
Christophe Geuzaine
Browse files
Options
Downloads
Patches
Plain Diff
API to get message handler + never intiialize twice
parent
7ab9ecd6
No related branches found
No related tags found
No related merge requests found
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
CMakeLists.txt
+4
-1
4 additions, 1 deletion
CMakeLists.txt
Common/Gmsh.cpp
+9
-0
9 additions, 0 deletions
Common/Gmsh.cpp
Common/Gmsh.h
+1
-0
1 addition, 0 deletions
Common/Gmsh.h
Common/GmshMessage.h
+1
-0
1 addition, 0 deletions
Common/GmshMessage.h
with
15 additions
and
1 deletion
CMakeLists.txt
+
4
−
1
View file @
6ba9a24a
...
...
@@ -472,7 +472,7 @@ endif(ENABLE_BUILD_ANDROID)
if
(
HAVE_FLTK OR HAVE_QT OR ENABLE_GRAPHICS
)
if
(
NOT HAVE_MESH OR NOT HAVE_POST OR NOT HAVE_PLUGINS OR NOT HAVE_ONELAB
)
message
(
SEND_ERROR
"Cannot compile GUI without Mesh, Post, Plugin
or
OneLab"
)
message
(
SEND_ERROR
"Cannot compile GUI without Mesh, Post, Plugin
and
OneLab"
)
endif
(
NOT HAVE_MESH OR NOT HAVE_POST OR NOT HAVE_PLUGINS OR NOT HAVE_ONELAB
)
if
(
FLTK_JPEG
)
...
...
@@ -1281,6 +1281,9 @@ if(ENABLE_BUILD_LIB)
endif
(
ENABLE_BUILD_LIB
)
if
(
ENABLE_BUILD_SHARED OR ENABLE_BUILD_DYNAMIC
)
install
(
TARGETS shared DESTINATION
${
GMSH_LIB
}
OPTIONAL
)
if
(
WIN32 OR CYGWIN
)
endif
(
WIN32 OR CYGWIN
)
endif
(
ENABLE_BUILD_SHARED OR ENABLE_BUILD_DYNAMIC
)
install
(
FILES
${
ONELAB_PY
}
DESTINATION
${
GMSH_BIN
}
)
...
...
This diff is collapsed.
Click to expand it.
Common/Gmsh.cpp
+
9
−
0
View file @
6ba9a24a
...
...
@@ -45,6 +45,10 @@
int
GmshInitialize
(
int
argc
,
char
**
argv
)
{
static
bool
isInitialized
=
false
;
if
(
isInitialized
)
return
1
;
isInitialized
=
true
;
#if defined(HAVE_FLTK)
RedirectIOToConsole
();
#endif
...
...
@@ -83,6 +87,11 @@ int GmshSetMessageHandler(GmshMessage *callback)
return
1
;
}
GmshMessage
*
GmshGetMessageHandler
()
{
return
Msg
::
GetCallback
();
}
int
GmshSetBoundingBox
(
double
xmin
,
double
xmax
,
double
ymin
,
double
ymax
,
double
zmin
,
double
zmax
)
...
...
This diff is collapsed.
Click to expand it.
Common/Gmsh.h
+
1
−
0
View file @
6ba9a24a
...
...
@@ -11,6 +11,7 @@
int
GmshInitialize
(
int
argc
=
0
,
char
**
argv
=
0
);
int
GmshSetMessageHandler
(
GmshMessage
*
callback
);
GmshMessage
*
GmshGetMessageHandler
();
int
GmshSetBoundingBox
(
double
xmin
,
double
xmax
,
double
ymin
,
double
ymax
,
double
zmin
,
double
zmax
);
...
...
This diff is collapsed.
Click to expand it.
Common/GmshMessage.h
+
1
−
0
View file @
6ba9a24a
...
...
@@ -56,6 +56,7 @@ class Msg {
static
void
SetCommRank
(
int
val
){
_commRank
=
val
;
}
static
void
SetCommSize
(
int
val
){
_commSize
=
val
;
}
static
void
SetCallback
(
GmshMessage
*
callback
){
_callback
=
callback
;
}
static
GmshMessage
*
GetCallback
(){
return
_callback
;
}
static
void
Barrier
();
static
int
GetNumThreads
();
static
int
GetMaxThreads
();
...
...
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