示例#1
0
        /// <summary>
        /// Evolves the wavefunction and saves keyframes to disk.
        /// </summary>
        private void CreateAnimationFrames()
        {
            // Get a fresh output directory
            m_outputDir = CreateOutputDir();

            // Write the run parameters to a file
            string paramsFile = Path.Combine(m_outputDir, "Params.txt");

            File.WriteAllText(paramsFile, m_params.ToString().Replace("\n", "\r\n"));

            // Create an Evolver and run it in the background
            Evolver.VDelegate V = (x, y, z, m, sx, sy, sz) => { return(m_VBuilder.V(x, y, z, m, sx, sy, sz)); };

            m_evolver = new Evolver(m_params, V, m_outputDir);
            m_evolver.ProgressEvent   += Evolver_ProgressEvent;
            m_evolver.CompletionEvent += Evolver_CompletionEvent;

            m_evolver.RunInBackground();
        }