Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Open sidebar
ext-edelen_a
src
Commits
cc1bea27
Commit
cc1bea27
authored
Nov 17, 2018
by
kraus
Browse files
moving from free floating variables defined somewhere in the input file to proper options
parent
b802c9f9
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
26 additions
and
4 deletions
+26
-4
src/Algorithms/ParallelTTracker.cpp
src/Algorithms/ParallelTTracker.cpp
+3
-3
src/BasicActions/Option.cpp
src/BasicActions/Option.cpp
+11
-1
src/Classic/Utilities/Options.cpp
src/Classic/Utilities/Options.cpp
+6
-0
src/Classic/Utilities/Options.h
src/Classic/Utilities/Options.h
+6
-0
No files found.
src/Algorithms/ParallelTTracker.cpp
View file @
cc1bea27
...
...
@@ -965,13 +965,13 @@ void ParallelTTracker::dumpStats(long long step, bool psDump, bool statDump) {
void
ParallelTTracker
::
setOptionalVariables
()
{
Inform
msg
(
"ParallelTTracker "
,
*
gmsg
);
minBinEmitted_m
=
10
;
minBinEmitted_m
=
Options
::
minBinEmitted
;
RealVariable
*
ar
=
dynamic_cast
<
RealVariable
*>
(
OpalData
::
getInstance
()
->
find
(
"MINBINEMITTED"
));
if
(
ar
)
minBinEmitted_m
=
static_cast
<
size_t
>
(
ar
->
getReal
());
msg
<<
level2
<<
"MINBINEMITTED "
<<
minBinEmitted_m
<<
endl
;
minStepforReBin_m
=
200
;
minStepforReBin_m
=
Options
::
minStepForRebin
;
RealVariable
*
br
=
dynamic_cast
<
RealVariable
*>
(
OpalData
::
getInstance
()
->
find
(
"MINSTEPFORREBIN"
));
if
(
br
)
minStepforReBin_m
=
static_cast
<
int
>
(
br
->
getReal
());
...
...
@@ -981,7 +981,7 @@ void ParallelTTracker::setOptionalVariables() {
if
(
Ippl
::
getNodes
()
==
1
)
{
repartFreq_m
=
numeric_limits
<
unsigned
int
>::
max
();
}
else
{
repartFreq_m
=
1
0
00
;
repartFreq_m
=
Options
::
repartFreq
*
100
;
RealVariable
*
rep
=
dynamic_cast
<
RealVariable
*>
(
OpalData
::
getInstance
()
->
find
(
"REPARTFREQ"
));
if
(
rep
)
repartFreq_m
=
static_cast
<
int
>
(
rep
->
getReal
());
...
...
src/BasicActions/Option.cpp
View file @
cc1bea27
...
...
@@ -86,6 +86,8 @@ namespace {
AMR_YT_DUMP_FREQ
,
#endif
MEMORYDUMP
,
MINBINEMITTED
,
MINSTEPFORREBIN
,
SIZE
};
}
...
...
@@ -160,7 +162,15 @@ Option::Option():
itsAttr
[
REPARTFREQ
]
=
Attributes
::
makeReal
(
"REPARTFREQ"
,
"The frequency to do particles repartition "
"for better load balance between nodes, its "
"default value is 10."
,
repartFreq
);
"default value is "
+
std
::
to_string
(
repartFreq
)
+
"."
,
repartFreq
);
itsAttr
[
MINBINEMITTED
]
=
Attributes
::
makeReal
(
"MINBINEMITTED"
,
"The number of bins that have to be emitted before the bins are squashed into "
"a single bin; the default value is "
+
std
::
to_string
(
minBinEmitted
)
+
"."
,
minBinEmitted
);
itsAttr
[
MINSTEPFORREBIN
]
=
Attributes
::
makeReal
(
"MINSTEPFORREBIN"
,
"The number of steps into the simulation before the bins are squashed into "
"a single bin; the default value is "
+
std
::
to_string
(
minStepForRebin
)
+
"."
,
minStepForRebin
);
itsAttr
[
REBINFREQ
]
=
Attributes
::
makeReal
(
"REBINFREQ"
,
"The frequency to reset energy bin ID for "
...
...
src/Classic/Utilities/Options.cpp
View file @
cc1bea27
...
...
@@ -60,6 +60,12 @@ namespace Options {
// The frequency to do particles repartition for better load balance between nodes
int
repartFreq
=
10
;
// The number of bins that have to be emitted before the bin are squashed into a single bin
int
minBinEmitted
=
10
;
// The number of steps into the simulation before the bins are squashed into a single bin
int
minStepForRebin
=
200
;
// The frequency to reset energy bin ID for all particles
int
rebinFreq
=
100
;
...
...
src/Classic/Utilities/Options.h
View file @
cc1bea27
...
...
@@ -89,6 +89,12 @@ namespace Options {
/// The frequency to do particles repartition for better load balance between nodes
extern
int
repartFreq
;
/// The number of bins that have to be emitted before the bin are squashed into a single bin
extern
int
minBinEmitted
;
/// The number of steps into the simulation before the bins are squashed into a single bin
extern
int
minStepForRebin
;
/// The frequency to reset energy bin ID for all particles
extern
int
rebinFreq
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a 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