<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
<html>
Hy Philip,
<p>I have looked at that 'sqrt: DOMAIN error' error printed while running
your simulation.
<br>I could not reproduce it on my Dec Compaq computer, but I think I know
what is the reason for the error.
<p>Indeed, it may come from the lib/share/mcstas-r.c:mcestimate_error function
while computing the intensity error estimate.
<br>If your computer does not handle 'double' numbers with enough digits
(64 bytes), then an error is reported when computing the sqr and then the
sqrt.
<br>This is, I think, a numerical over or under flow depending on the number
accuracy of your system.
<p>To test that, you may, for instance, divide your source flux by, say
10^10.
<p>Cheers, Emmanuel.
<p>Philip Wilk wrote:
<blockquote TYPE=CITE>Dear Emmanuel,
<p>I have also found the same error when using the Monitor_nD component.
The
<br>output from the monitor looks fine and seems to be accurate, but the
DOMAIN
<br>error is troubling.
<p>The monitor dimentions are small in this example, but I get the error
with a
<br>larger monitor as well. I call the component with the following code
(one
<br>example):
<p>----- begin -------
<br>COMPONENT lambda_end2 = Monitor_nD(
<br> xmin = -0.002, xmax = 0.002,
<br> ymin = -0.002, ymax = 0.002,
<br> options="lambda bins=50 auto limits",
<br> filename="erg5.dat")
<br> AT (0, 0, 3.05) RELATIVE cguide ROTATED (0, 0, 0) RELATIVE
cguide
<br>----- end -------
<p>And the following is the output to the screen while running a simulation
<br>with 10^9 neutrons and a series of 8 wavelength monitors via the Monitor_nD
<br>component:
<p>----- begin -------
<br>sqrt: DOMAIN error
<br>Detector: lamda_begin_I=3.11197e+17 lamda_begin_ERR=1.92993e+13
<br>lamda_begin_N=3.
<br>63473e+08 "erg1.dat"
<br>Detector: lambda_middle_I=3.95513e+16 lambda_middle_ERR=6.03749e+12
<br>lambda_middl
<br>e_N=1.68336e+08 "erg2.dat"
<br>Detector: lambda_middle2_I=1.43218e+16 lambda_middle2_ERR=3.13988e+12
<br>lambda_mid
<br>dle2_N=1.08399e+08 "erg3.dat"
<br>Detector: lambda_end1_I=3.4155e+14 lambda_end1_ERR=4.58569e+11
<br>lambda_end1_N=1.6
<br>5878e+06 "erg4.dat"
<p>sqrt: DOMAIN error
<br>Detector: lambda_end2_I=3.87996e+14 lambda_end2_ERR=4.8729e+11
<br>lambda_end2_N=1.8
<br>729e+06 "erg5.dat"
<br>Detector: lambda_end3_I=4.37953e+14 lambda_end3_ERR=5.27462e+11
<br>lambda_end3_N=1.
<br>39967e+06 "erg6.dat"
<p>sqrt: DOMAIN error
<br>Detector: lambda_end4_I=3.60408e+14 lambda_end4_ERR=5.30696e+11
<br>lambda_end4_N=75
<br>1711 "erg7.dat"
<p>sqrt: DOMAIN error
<br>Detector: lambda_end5_I=2.45439e+14 lambda_end5_ERR=4.64571e+11
<br>lambda_end5_N=44
<br>5504 "erg8.dat"
<br>----- end -------
<p>Regards,
<br>Philip
<p>----- Original Message -----
<br>From: Emmanuel Farhi
<br>To: pwilk-radiochem@hahnium.com ; neutron-mc@risoe.dk
<br>Sent: Tuesday, August 26, 2003 3:17 PM
<p>Hy Philip,
<br>You probably have some zero velocity neutrons or such huge velocities
that
<br>the square gets hawfull (before getting the sqrt), else I can not figure
out
<br>how the 'sqrt' can fail in the speed in L_monitor.comp.
<br>You may copy this component locally and change the line #76 so that
it tests
<br>the speed norm to be non zero or reasonable value (not huge).
<br>You may also try replacing with the Monitor_nD(options="auto lambda",
<br>filename="...")
<br>Cheers, Emmanuel.
<p>Philip Wilk wrote:
<br>Hi,
<br>I am using the new version 1.7
<br>I keep getting "sqrt: DOMAIN error"
<br>Just like I was getting with version 1.6.4 , should I be worried about
this?
<br>It seems to be associated with the wavelength detector component.
<br>See example output:
<br>Detector: psd_begin_I=75.9887 psd_begin_ERR=0.0701353
<br>psd_begin_N=3.65191e+06 "p
<br>sd1.dat"
<br>Detector: lambda_begin_I=75.9887 lambda_begin_ERR=0.0701353
<br>lambda_begin_N=3.651
<br>91e+06 "erg1.dat"
<br>Detector: psd_middle_I=6.2552 psd_middle_ERR=0.017862
<br>psd_middle_N=1.68387e+06 "
<br>psd2.dat"
<br>sqrt: DOMAIN error
<br>Detector: lambda_middle_I=6.2552 lambda_middle_ERR=0.017862
<br>lambda_middle_N=1.68
<br>387e+06 "erg2.dat"
<br>Detector: psd_middle2_I=1.20321 psd_middle2_ERR=0.00418768
<br>psd_middle2_N=1.08584
<br>e+06 "psd3.dat"
<br>Detector: lambda_middle2_I=1.20321 lambda_middle2_ERR=0.00418768
<br>lambda_middle2_
<br>N=1.08584e+06 "erg3.dat"
<br>Detector: psd_end_I=0.65266 psd_end_ERR=0.002805 psd_end_N=389221 "psd4.dat"
<br>Detector: lambda_end_I=0.65266 lambda_end_ERR=0.002805 lambda_end_N=389221
<br>"erg4
<br>.dat"
<br>Cheers,
<br>Philip
<br>--</blockquote>
<pre>--
What's up Doc ?
--------------------------------------------
Emmanuel FARHI, <A HREF="http://www.ill.fr/tas/people/Farhi.html">http://www.ill.fr/tas/people/Farhi.html</A> \|/ ____ \|/
CS-Group ILL4/156, Institut Laue-Langevin (ILL) Grenoble ~@-/ oO \-@~
6 rue J. Horowitz, BP 156, 38042 Grenoble Cedex 9,France /_( \__/ )_\
Work :Tel (33/0) 4 76 20 71 35. Fax (33/0) 4 76 20 76 48 \__U_/</pre>
</html>