Ejemplo n.º 1
0
    // Update is called once per frame
    void Update()
    {
        isf.current_tick += 1;

        isf.ShroedingerIntegration(ref psi1, ref psi2);
        isf.Normalize(ref psi1, ref psi2);
        isf.PressureProject(ref psi1, ref psi2);

        isf.VelocityOneForm(ref psi1, ref psi2, isf.hbar);
        isf.ReprojectToGrid();

        particleMan.Emulate();
        particleMan.DoRender();

        // Cam.transform.position = CameraPosition;
    }
Ejemplo n.º 2
0
    // Update is called once per frame
    void Update()
    {
        isf.current_tick += 1;

        isf.ShroedingerIntegration(ref psi1, ref psi2);
        isf.Normalize(ref psi1, ref psi2);
        isf.PressureProject(ref psi1, ref psi2);

        InitilizeNozzlePsi(ref psi1, ref psi2);
        // UpdateObstacle();

        isf.VelocityOneForm(ref psi1, ref psi2, isf.hbar);
        isf.ReprojectToGrid();

        particles.Emulate();
        ClampParticles();

        particles.DoRender();
    }
Ejemplo n.º 3
0
    // Update is called once per frame
    void Update()
    {
        isf.current_tick += 1;

        isf.ShroedingerIntegration(ref psi1, ref psi2);
        isf.Normalize(ref psi1, ref psi2);
        isf.PressureProject(ref psi1, ref psi2);

        //DispatchCS(kernelFlushPsiMask);
        //ComputePsiMask();
        //UpdateGlabalMaskedPsi(ref psi1, ref psi2);
        UpdateGlabalMaskedPsi(ref psi1, ref psi2);
        // UpdatePsi(ref psi1, ref psi2);

        isf.VelocityOneForm(ref psi1, ref psi2, isf.hbar);
        isf.ReprojectToGrid();

        particles.Emulate();
        // Clamp();

        particles.DoRender();
    }
Ejemplo n.º 4
0
    void TakeTestN(Vector3Int N)
    {
        isf.N = N;


        isf.InitISF();

        psi1 = FFT.CreateRenderTexture3D(N[0], N[1], N[2], RenderTextureFormat.RGFloat);
        psi2 = FFT.CreateRenderTexture3D(N[0], N[1], N[2], RenderTextureFormat.RGFloat);
        isf.InitializePsi(ref psi1, ref psi2);

        var watch = new System.Diagnostics.Stopwatch();

        watch.Start();

        for (int i = 0; i < 5; ++i)
        {
            isf.current_tick += 1;

            isf.ShroedingerIntegration(ref psi1, ref psi2);
            isf.Normalize(ref psi1, ref psi2);
            isf.PressureProject(ref psi1, ref psi2);
            fft.ExportComplex3D(psi1, null);
            Debug.Log("  At: " + i.ToString());
        }

        watch.Stop();
        BenchmarkSingleResult ben = new BenchmarkSingleResult();

        ben.milli = watch.ElapsedMilliseconds / 5.0;
        ben.Nx    = N.x;
        ben.Ny    = N.y;
        ben.Nz    = N.z;
        ben.scale = N.x * N.y * N.z;

        result.results.Add(ben);
    }