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
3ec352da
Commit
3ec352da
authored
10 years ago
by
Christophe Geuzaine
Browse files
Options
Downloads
Patches
Plain Diff
doc
parent
af536ce0
No related branches found
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
doc/texinfo/gmsh.texi
+23
-13
23 additions, 13 deletions
doc/texinfo/gmsh.texi
with
23 additions
and
13 deletions
doc/texinfo/gmsh.texi
+
23
−
13
View file @
3ec352da
...
...
@@ -997,8 +997,9 @@ parsing of the script file:
TextAttributes(@var
{
char-expression
}
<,@var
{
char-expression
}
@dots
{}
>) |
Exists(@var
{
string
}
) | Exists(@var
{
string
}
~@
{
@var
{
expression
}
@
}
) |
FileExists(@var
{
char-expression
}
) |
Define
Number(@var
{
expression
}
, @var
{
onelab-options
}
)
Get
Number(@var
{
char-
expression
}
) |
GetValue("@var
{
string
}
", @var
{
expression
}
) |
DefineNumber(@var
{
expression
}
, @var
{
onelab-options
}
) |
@end example
Such @w
{
@var
{
expression
}
s
}
are used in most of Gmsh's scripting
...
...
@@ -1036,7 +1037,14 @@ the first string is greater than, equal to, or less than the second
string). @code
{
TextAttributes
}
creates attributes for text
strings. @code
{
Exists
}
checks if a variable with the given name exists
(i.e., has been defined previously), and @code
{
FileExists
}
checks if the
file with the given name exists.
file with the given name exists. @code
{
GetNumber
}
allows to get the
value of a ONELAB variable (the argument is the name of the
variable). @code
{
GetValue
}
allows to ask the user for a value
interactively. For example, inserting @code
{
GetValue("Value of parameter
alpha?", 5.76)
}
in an input file will query the user for the value of a
certain parameter alpha, assuming the default value is 5.76. If the
option @code
{
General.NoPopup
}
is set (@pxref
{
General options list
}
), no
question is asked and the default value is automatically used.
@code
{
DefineNumber
}
allows to define a ONELAB variable in-line. The
@var
{
expression
}
given as the first argument is the default value; this
...
...
@@ -1044,13 +1052,6 @@ is followed by the various ONELAB options. See
@uref
{
http://onelab.info/wiki/ONELAB
_
Syntax
_
for
_
Gmsh
_
and
_
GetDP
}
for more
information.
The last case in the definition allows to ask the user for a value
interactively. For example, inserting @code
{
GetValue("Value of parameter
alpha?", 5.76)
}
in an input file will query the user for the value of a
certain parameter alpha, assuming the default value is 5.76. If the
option @code
{
General.NoPopup
}
is set (@pxref
{
General options list
}
), no
question is asked and the default value is automatically used.
@cindex Expressions, lists
List of expressions are also widely used, and are defined as:
...
...
@@ -1122,7 +1123,7 @@ Character expressions are defined as:
@example
@var
{
char-expression
}
:
"@var
{
string
}
" |
Today | OnelabAction |
Today | OnelabAction |
GmshExecutableName |
StrPrefix ( @var
{
char-expression
}
) |
StrRelative ( @var
{
char-expression
}
) |
StrCat ( @var
{
char-expression
}
<,@dots
{}
> ) |
...
...
@@ -1132,6 +1133,7 @@ Character expressions are defined as:
Sprintf ( @var
{
char-expression
}
) |
Sprintf ( @var
{
char-option
}
) |
GetEnv ( @var
{
char-expression
}
) |
GetString ( @var
{
char-expression
}
) |
GetString ( @var
{
char-expression
}
, @var
{
char-expression
}
) |
StrReplace ( @var
{
char-expression
}
, @var
{
char-expression
}
, @var
{
char-expression
}
)
DefineString(@var
{
char-expression
}
, @var
{
onelab-options
}
)
...
...
@@ -1146,9 +1148,11 @@ function (where @var{char-expression} is a format string that can
contain floating point formatting characters: @code
{
%e}, @code{%g},
etc.) The various @w
{
@var
{
char-option
}
s
}
are listed in
@ref
{
Options
}
. @code
{
GetEnvThe
}
gets the value of an environment
variable from the operating system. @code
{
GetString
}
allows to ask the
user for a value interactively. @code
{
StrReplace
}
's arguments are: input
string, old substring, new substring.@footnote
{
For compatibility with GetDP
variable from the operating system. @code
{
GetString
}
allows to get a
ONELAB string value (with one argument, the name of the ONELAB
variable), or ask the user for a value interactively (with two
arguments). @code
{
StrReplace
}
's arguments are: input string, old
substring, new substring.@footnote
{
For compatibility with GetDP
(@uref
{
http://geuz.org/getdp/
}
), parentheses can be replaced by brackets
@code
{
[]
}
in @code
{
Str
}
and @code
{
Sprintf
}
.
}
...
...
@@ -1657,6 +1661,12 @@ with the ONELAB database if it has not been defined before. See
@uref
{
http://onelab.info/wiki/ONELAB
_
Syntax
_
for
_
Gmsh
_
and
_
GetDP
}
for more
information.
@item SetNumber( @var
{
char-expression
}
, @var
{
expression
}
);
Sets the value a numeric ONELAB variable @var
{
char-expression
}
.
@item SetString( @var
{
char-expression
}
, @var
{
char-expression
}
);
Sets the value a string ONELAB variable @var
{
char-expression
}
.
@item @var
{
real-option
}
= @var
{
expression
}
;
Affects @var
{
expression
}
to a real option.
...
...
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