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
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Romin Tomasetti
gmsh
Commits
c686b931
Commit
c686b931
authored
7 years ago
by
Christophe Geuzaine
Browse files
Options
Downloads
Patches
Plain Diff
basic stuff working
parent
cf4e41ed
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/CommandLine.cpp
+1
-1
1 addition, 1 deletion
Common/CommandLine.cpp
Common/gmsh.cpp
+10
-4
10 additions, 4 deletions
Common/gmsh.cpp
with
11 additions
and
5 deletions
Common/CommandLine.cpp
+
1
−
1
View file @
c686b931
...
@@ -1033,11 +1033,11 @@ void GetOptions(int argc, char *argv[])
...
@@ -1033,11 +1033,11 @@ void GetOptions(int argc, char *argv[])
else
else
Msg
::
Fatal
(
"Missing number"
);
Msg
::
Fatal
(
"Missing number"
);
}
}
#if defined(HAVE_FLTK)
else
if
(
!
strcmp
(
argv
[
i
]
+
1
,
"term"
))
{
else
if
(
!
strcmp
(
argv
[
i
]
+
1
,
"term"
))
{
terminal
=
1
;
terminal
=
1
;
i
++
;
i
++
;
}
}
#if defined(HAVE_FLTK)
else
if
(
!
strcmp
(
argv
[
i
]
+
1
,
"dual"
))
{
else
if
(
!
strcmp
(
argv
[
i
]
+
1
,
"dual"
))
{
CTX
::
instance
()
->
mesh
.
dual
=
1
;
CTX
::
instance
()
->
mesh
.
dual
=
1
;
i
++
;
i
++
;
...
...
This diff is collapsed.
Click to expand it.
Common/gmsh.cpp
+
10
−
4
View file @
c686b931
...
@@ -47,18 +47,24 @@ static void splitOptionName(const std::string &fullName, std::string &category,
...
@@ -47,18 +47,24 @@ static void splitOptionName(const std::string &fullName, std::string &category,
std
::
string
&
name
,
int
&
index
)
std
::
string
&
name
,
int
&
index
)
{
{
std
::
string
::
size_type
d
=
fullName
.
find_first_of
(
'.'
);
std
::
string
::
size_type
d
=
fullName
.
find_first_of
(
'.'
);
if
(
d
==
std
::
string
::
npos
){
name
=
fullName
;
return
;
}
category
=
fullName
.
substr
(
0
,
d
);
category
=
fullName
.
substr
(
0
,
d
);
std
::
string
::
size_type
b1
=
fullName
.
find_first_of
(
'['
);
std
::
string
::
size_type
b1
=
fullName
.
find_first_of
(
'['
);
std
::
string
::
size_type
b2
=
fullName
.
find_last_of
(
']'
);
std
::
string
::
size_type
b2
=
fullName
.
find_last_of
(
']'
);
if
(
b1
!=
std
::
string
::
npos
&&
b2
!=
std
::
string
::
npos
){
if
(
b1
!=
std
::
string
::
npos
&&
b2
!=
std
::
string
::
npos
){
std
::
string
id
=
fullName
.
substr
(
b1
,
b2
-
b1
);
std
::
string
id
=
fullName
.
substr
(
b1
+
1
,
b2
-
b1
-
1
);
name
=
fullName
.
substr
(
d
,
b1
-
d
);
index
=
atoi
(
id
.
c_str
());
category
=
fullName
.
substr
(
0
,
b1
);
name
=
fullName
.
substr
(
d
+
1
,
b1
-
d
);
}
}
else
{
else
{
index
=
0
;
index
=
0
;
name
=
fullName
.
substr
(
d
);
name
=
fullName
.
substr
(
d
+
1
);
}
}
Msg
::
Debug
(
"Decoded option name '%s' . '%s'
'[%d]'
"
,
category
.
c_str
(),
Msg
::
Debug
(
"Decoded option name '%s' . '%s'
(index %d)
"
,
category
.
c_str
(),
name
.
c_str
(),
index
);
name
.
c_str
(),
index
);
}
}
...
...
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