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
8c0da225
Commit
8c0da225
authored
8 years ago
by
Christophe Geuzaine
Browse files
Options
Downloads
Patches
Plain Diff
new "Units" attribute
parent
780f910a
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
Common/GmshMessage.cpp
+1
-0
1 addition, 0 deletions
Common/GmshMessage.cpp
Common/onelab.h
+14
-5
14 additions, 5 deletions
Common/onelab.h
with
15 additions
and
5 deletions
Common/GmshMessage.cpp
+
1
−
0
View file @
8c0da225
...
@@ -1011,6 +1011,7 @@ static void _setStandardOptions(onelab::parameter *p,
...
@@ -1011,6 +1011,7 @@ static void _setStandardOptions(onelab::parameter *p,
if
(
copt
.
count
(
"Highlight"
))
p
->
setAttribute
(
"Highlight"
,
copt
[
"Highlight"
][
0
]);
if
(
copt
.
count
(
"Highlight"
))
p
->
setAttribute
(
"Highlight"
,
copt
[
"Highlight"
][
0
]);
if
(
copt
.
count
(
"Macro"
))
p
->
setAttribute
(
"Macro"
,
copt
[
"Macro"
][
0
]);
if
(
copt
.
count
(
"Macro"
))
p
->
setAttribute
(
"Macro"
,
copt
[
"Macro"
][
0
]);
if
(
copt
.
count
(
"GmshOption"
))
p
->
setAttribute
(
"GmshOption"
,
copt
[
"GmshOption"
][
0
]);
if
(
copt
.
count
(
"GmshOption"
))
p
->
setAttribute
(
"GmshOption"
,
copt
[
"GmshOption"
][
0
]);
if
(
copt
.
count
(
"Units"
))
p
->
setAttribute
(
"Units"
,
copt
[
"Units"
][
0
]);
if
(
copt
.
count
(
"AutoCheck"
))
// for backward compatibility
if
(
copt
.
count
(
"AutoCheck"
))
// for backward compatibility
p
->
setAttribute
(
"AutoCheck"
,
copt
[
"AutoCheck"
][
0
]);
p
->
setAttribute
(
"AutoCheck"
,
copt
[
"AutoCheck"
][
0
]);
...
...
This diff is collapsed.
Click to expand it.
Common/onelab.h
+
14
−
5
View file @
8c0da225
...
@@ -137,7 +137,13 @@ namespace onelab{
...
@@ -137,7 +137,13 @@ namespace onelab{
}
}
std
::
string
getShortName
()
const
std
::
string
getShortName
()
const
{
{
if
(
_label
.
size
())
return
_label
;
std
::
string
units
=
getAttribute
(
"Units"
);
if
(
_label
.
size
()){
if
(
units
.
empty
())
return
_label
;
else
return
_label
+
" ["
+
units
+
"]"
;
}
std
::
string
s
=
_name
;
std
::
string
s
=
_name
;
// remove path
// remove path
std
::
string
::
size_type
last
=
_name
.
find_last_of
(
'/'
);
std
::
string
::
size_type
last
=
_name
.
find_last_of
(
'/'
);
...
@@ -154,7 +160,10 @@ namespace onelab{
...
@@ -154,7 +160,10 @@ namespace onelab{
// start'
// start'
while
(
s
.
size
()
&&
s
[
0
]
>=
'0'
&&
s
[
0
]
<=
'9'
)
while
(
s
.
size
()
&&
s
[
0
]
>=
'0'
&&
s
[
0
]
<=
'9'
)
s
=
s
.
substr
(
1
);
s
=
s
.
substr
(
1
);
return
s
;
if
(
units
.
empty
())
return
s
;
else
return
s
+
" ["
+
units
+
"]"
;
}
}
int
getChanged
(
const
std
::
string
&
client
=
""
)
const
int
getChanged
(
const
std
::
string
&
client
=
""
)
const
{
{
...
@@ -1277,9 +1286,9 @@ namespace onelab{
...
@@ -1277,9 +1286,9 @@ namespace onelab{
void
runNonBlockingSubClient
(
const
std
::
string
&
name
,
const
std
::
string
&
command
)
void
runNonBlockingSubClient
(
const
std
::
string
&
name
,
const
std
::
string
&
command
)
{
{
if
(
!
_gmshClient
){
if
(
!
_gmshClient
){
int
res
=
system
(
command
.
c_str
());
int
res
=
system
(
command
.
c_str
());
if
(
res
)
if
(
res
)
{
{
//
error
// report
error
}
}
return
;
return
;
}
}
...
...
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