Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Oleksii Turkot
CrystFEL
Commits
38f76574
Commit
38f76574
authored
Nov 14, 2010
by
Thomas White
Committed by
Thomas White
Feb 22, 2012
Browse files
pattern_sim: Add --really-random option
parent
cd88e09b
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/pattern_sim.c
View file @
38f76574
...
...
@@ -80,6 +80,9 @@ static void show_help(const char *s)
" values into account. This is the
\n
"
" most accurate method, but the
\n
"
" slowest.
\n
"
" --really-random Use really random numbers for the orientation and
\n
"
" crystal size. By default, the same sequence
\n
"
" will be used for each new run.
\n
"
"
\n
"
"By default, the simulation aims to be as accurate as possible. For greater
\n
"
"speed, or for testing, you can choose to disable certain things using the
\n
"
...
...
@@ -186,6 +189,7 @@ int main(int argc, char *argv[])
int
config_nonoise
=
0
;
int
config_nosfac
=
0
;
int
config_gpu
=
0
;
int
config_random
=
0
;
char
*
powder_fn
=
NULL
;
char
*
filename
=
NULL
;
char
*
grad_str
=
NULL
;
...
...
@@ -217,6 +221,7 @@ int main(int argc, char *argv[])
{
"output"
,
1
,
NULL
,
'o'
},
{
"geometry"
,
1
,
NULL
,
'g'
},
{
"beam"
,
1
,
NULL
,
'b'
},
{
"really-random"
,
0
,
&
config_random
,
1
},
{
0
,
0
,
NULL
,
0
}
};
...
...
@@ -274,8 +279,7 @@ int main(int argc, char *argv[])
}
/* FIXME: Make this optional */
if
(
1
)
{
if
(
config_random
)
{
FILE
*
fh
;
unsigned
int
seed
;
fh
=
fopen
(
"/dev/urandom"
,
"r"
);
...
...
Write
Preview
Supports
Markdown
0%
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!
Cancel
Please
register
or
sign in
to comment