<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style type="text/css" style="display:none;"><!-- P {margin-top:0;margin-bottom:0;} --></style>
</head>
<body dir="ltr">
<div id="divtagdefaultwrapper" style="font-size:12pt;color:#000000;font-family:Calibri,Helvetica,sans-serif;" dir="ltr">
<p>Dear all</p>
<p>I need to know what is the timestep of simulation, in order to calculate the mean velocity of a particle ( knowing diffusion coefficient). In Simulation/SimulationParams.java I found the parameter dt (<span> /** the increment of time corresponding to a timestep
 */ ) and the method getDt() to get It.</span></p>
<p><span><br>
</span></p>
<p><span>/***** code of SimulationParams.java */</span></p>
<p><span><br>
</span></p>
<p><span></p>
<div>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; /** set the echo time and dt increment properly */<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; double TE=((SimulableScheme)imPars).getDuration();<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; //double halfP90= imPars.getHalfP90(0);<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; //this.dt=(halfP90&#43;TE)/((double)tmax);<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; this.dt=TE/((double)tmax);</div>
....</span>
<p></p>
<p><span>/*************************************************************************/<br>
</span></p>
<p><span><br>
</span></p>
<p><span>I used this method in tool/CL_Initializer.java </span></p>
<p><span>&nbsp;private static double dt=simParams.getDt();&nbsp;&nbsp; <br>
</span></p>
<p><span><br>
</span></p>
<p>and when I executed a datasinth I obtained this error:</p>
<p></p>
<div>Exception in thread &quot;main&quot; java.lang.ExceptionInInitializerError<br>
&nbsp;&nbsp; &nbsp;at apps.SyntheticData.initOptions(SyntheticData.java:46)<br>
&nbsp;&nbsp; &nbsp;at apps.Executable.&lt;init&gt;(Executable.java:24)<br>
&nbsp;&nbsp; &nbsp;at apps.SyntheticData.&lt;init&gt;(SyntheticData.java:34)<br>
&nbsp;&nbsp; &nbsp;at apps.EntryPoint.getExecutable(EntryPoint.java:222)<br>
&nbsp;&nbsp; &nbsp;at apps.EntryPoint.main(EntryPoint.java:282)<br>
Caused by: java.lang.NullPointerException<br>
&nbsp;<span style="color: rgb(255, 0, 0);">&nbsp; &nbsp;at tools.CL_Initializer.&lt;clinit&gt;(CL_Initializer.java:176)</span><u></u><br>
&nbsp;&nbsp; &nbsp;... 5 more</div>
<p></p>
<p>I found<span style="font-size: 20pt;"></span> that method getDuration() is not declared in interface SimulableScheme.. Is this the problem?<span id="result_box" class="short_text" lang="en"><span class=""> &nbsp;What should be the code?</span></span></p>
<p><span id="result_box" class="short_text" lang="en"><span class=""><br>
</span></span></p>
<p><span id="result_box" class="short_text" lang="en"><span class="">Thank you <br>
</span></span></p>
<p><span id="result_box" class="short_text" lang="en"><span class="">Cheers</span></span></p>
<p><span id="result_box" class="short_text" lang="en"><span class=""><br>
</span></span></p>
<p><span id="result_box" class="short_text" lang="en"><span class="">Stefania Oliviero</span></span><br>
</p>
</div>
</body>
</html>