summaryrefslogtreecommitdiff
path: root/xmds2
diff options
context:
space:
mode:
authorEugeniy Mikhailov <evgmik@gmail.com>2012-11-27 14:15:55 -0500
committerEugeniy Mikhailov <evgmik@gmail.com>2012-11-27 14:15:55 -0500
commit6c574f5f886e0614a415593e2e12494e21469c6c (patch)
treec574a2cef7c2dc486f3e46f7633c8c2f8c2d3e0b /xmds2
parent9a8ad258a0629b391d8239edf1a8e272039b5c93 (diff)
downloadNresonances-6c574f5f886e0614a415593e2e12494e21469c6c.tar.gz
Nresonances-6c574f5f886e0614a415593e2e12494e21469c6c.zip
move Maxwell distribution from computed vector to just a vector
Thanks to suggestion of Graham Dennis, this skip unnecessary calculations of the Maxwell probability distributions at every step since. Thus avoids recalculation. Below the original comment: Your computed_vector's "Maxwell_distribution_probabilities" and "Maxwell_distribution_probabilities_norm" are constant.  If you just change them to be <vector> elements changing the <evaluation> tags to <initialisation> tags, this will ensure that they are not evaluated every time they are needed.
Diffstat (limited to 'xmds2')
-rw-r--r--xmds2/realistic_Rb/realistic_Rb.xmds16
1 files changed, 8 insertions, 8 deletions
diff --git a/xmds2/realistic_Rb/realistic_Rb.xmds b/xmds2/realistic_Rb/realistic_Rb.xmds
index 94b398c..57e7425 100644
--- a/xmds2/realistic_Rb/realistic_Rb.xmds
+++ b/xmds2/realistic_Rb/realistic_Rb.xmds
@@ -185,29 +185,29 @@ const double rt2 = 1.4142135623730951;
</vector>
<!--Maxwell distribution probability p(v)-->
- <computed_vector name="Maxwell_distribution_probabilities" dimensions="v" type="real">
+ <vector name="Maxwell_distribution_probabilities" dimensions="v" type="real">
<components>probability_v</components>
- <evaluation>
+ <initialisation>
<![CDATA[
// TODO: move to the global space/function. This reevaluated many times since it called from dependency requests but it never changes during the script lifetime since 'v' is fixed.
probability_v=1.0/(v_thermal_averaged*sqrt(2*M_PI)) * exp( - mod2(v/v_thermal_averaged)/2.0 );
]]>
- </evaluation>
- </computed_vector>
+ </initialisation>
+ </vector>
<!--Maxwell distribution norm sum(p(v))
Needed since we sum over the grid instead of true integral,
we also have finite cut off velocities-->
- <computed_vector name="Maxwell_distribution_probabilities_norm" dimensions="" type="real">
+ <vector name="Maxwell_distribution_probabilities_norm" dimensions="" type="real">
<components>probability_v_norm</components>
- <evaluation>
+ <initialisation>
<dependencies basis="v">Maxwell_distribution_probabilities</dependencies>
<![CDATA[
// TODO: move to the global space/function. This reevaluated many times since it called from dependency requests but it never changes during the script lifetime since 'v' is fixed.
probability_v_norm=probability_v;
]]>
- </evaluation>
- </computed_vector>
+ </initialisation>
+ </vector>
<!-- Averaged across Maxwell distribution fields amplitudes -->