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
1560132f
Commit
1560132f
authored
13 years ago
by
Francois Henrotte
Browse files
Options
Downloads
Patches
Plain Diff
modifs pour les metamodeles ONELAB
parent
db513cbc
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
Common/CommandLine.cpp
+1
-1
1 addition, 1 deletion
Common/CommandLine.cpp
Common/GmshSocket.h
+3
-1
3 additions, 1 deletion
Common/GmshSocket.h
Common/onelab.h
+17
-3
17 additions, 3 deletions
Common/onelab.h
with
21 additions
and
5 deletions
Common/CommandLine.cpp
+
1
−
1
View file @
1560132f
...
...
@@ -149,7 +149,7 @@ void GetOptions(int argc, char *argv[])
Msg
::
InitializeOnelab
(
"GmshOnelab"
,
argv
[
i
++
]);
else
Msg
::
Fatal
(
"Missing string"
);
CTX
::
instance
()
->
batch
=
-
4
;
//
CTX::instance()->batch = -4;
}
else
if
(
!
strcmp
(
argv
[
i
]
+
1
,
"socket"
))
{
i
++
;
...
...
This diff is collapsed.
Click to expand it.
Common/GmshSocket.h
+
3
−
1
View file @
1560132f
...
...
@@ -73,6 +73,8 @@ class GmshSocket{
GMSH_VERTEX_ARRAY
=
22
,
GMSH_PARAMETER
=
23
,
GMSH_PARAMETER_QUERY
=
24
,
GMSH_PARAM_QUERY_ALL
=
25
,
GMSH_PARAM_QUERY_END
=
26
,
GMSH_SPEED_TEST
=
30
,
GMSH_OPTION_1
=
100
,
GMSH_OPTION_2
=
101
,
...
...
@@ -391,7 +393,7 @@ class GmshServer : public GmshSocket{
#if !defined(WIN32)
cmd
+=
" &"
;
#endif
SystemCall
(
cmd
.
c_str
());
// start the solver
SystemCall
(
cmd
.
c_str
());
// start
s
the solver
}
else
{
timeout
=
0.
;
// no command launched: don't set a timeout
...
...
This diff is collapsed.
Click to expand it.
Common/onelab.h
+
17
−
3
View file @
1560132f
...
...
@@ -581,7 +581,7 @@ namespace onelab{
// and interacts with onelab clients.
class
server
{
private:
// the unique server
// the unique server
(singleton behaviour due to the "static" specifier)
static
server
*
_server
;
// the address of the server
std
::
string
_address
;
...
...
@@ -610,6 +610,7 @@ namespace onelab{
typedef
std
::
map
<
std
::
string
,
client
*>::
iterator
citer
;
citer
firstClient
(){
return
_clients
.
begin
();
}
citer
lastClient
(){
return
_clients
.
end
();
}
int
nbClients
()
{
return
_clients
.
size
();
};
citer
findClient
(
const
std
::
string
&
name
){
return
_clients
.
find
(
name
);
}
void
registerClient
(
client
*
c
)
{
...
...
@@ -712,7 +713,11 @@ namespace onelab{
if
(
!
_gmshClient
)
return
false
;
T
p
(
name
);
std
::
string
msg
=
p
.
toChar
();
_gmshClient
->
SendMessage
(
GmshSocket
::
GMSH_PARAMETER_QUERY
,
msg
.
size
(),
&
msg
[
0
]);
if
(
name
.
size
())
_gmshClient
->
SendMessage
(
GmshSocket
::
GMSH_PARAMETER_QUERY
,
msg
.
size
(),
&
msg
[
0
]);
else
//get all parameters
_gmshClient
->
SendMessage
(
GmshSocket
::
GMSH_PARAM_QUERY_ALL
,
msg
.
size
(),
&
msg
[
0
]);
while
(
1
){
// stop if we have no communications for 10 secs
int
ret
=
_gmshClient
->
Select
(
10
,
0
);
...
...
@@ -740,8 +745,17 @@ namespace onelab{
ps
.
push_back
(
p
);
return
true
;
}
if
(
type
==
GmshSocket
::
GMSH_PARAM_QUERY_ALL
){
T
p
;
p
.
fromChar
(
msg
);
ps
.
push_back
(
p
);
// do NOT return until all parameters have been downloaded
}
else
if
(
type
==
GmshSocket
::
GMSH_PARAM_QUERY_END
){
return
true
;
}
else
if
(
type
==
GmshSocket
::
GMSH_INFO
){
// parameter not found
// parameter not found
or all aparameters have been sent
return
true
;
}
else
{
...
...
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