void Prepare() { fft = isf.fft; fft.init(); isf.hbar = HBar; isf.estimate_dt = 1.0f / InvDt; isf.InitComputeShader(); isf.InitISF(); InitComputeShader(); var N = isf.N; psi1 = FFT.CreateRenderTexture3D(N[0], N[1], N[2], RenderTextureFormat.RGFloat); psi2 = FFT.CreateRenderTexture3D(N[0], N[1], N[2], RenderTextureFormat.RGFloat); psi_mask = FFT.CreateRenderTexture3D(N[0], N[1], N[2], RenderTextureFormat.RFloat); isf.InitializePsi(ref psi1, ref psi2); //for(int i = 0; i < 10; ++i) //{ //UpdatePsi(ref psi1, ref psi2); //} //fft.ExportComplex3D(psi1, "test/ink.psi1.json"); InitilizeParticles(); }
void Start() { result = new BenchmarkResult(); fft = isf.fft; fft.init(); isf.InitComputeShader(); for (int i = 3; i < 10; ++i) { for (int j = i; j < 10; ++j) { for (int k = j; k < 10; ++k) { int s = 1 << i; int l = 1 << j; int m = 1 << k; TakeTestN(new Vector3Int(s, l, m)); } } } //for (int i = 8; i < 9; ++i) //{ // int k = 1 << i; // TakeTestN(new Vector3Int(k, k, k)); // Debug.Log(k.ToString() + " Done"); //} var ch = Newtonsoft.Json.JsonConvert.SerializeObject(result); File.WriteAllText("test/bench.isf.json", ch); }
void Prepare() { InitScale(); fft = isf.fft; fft.init(); isf.hbar = HBar; isf.size = Size; isf.N = N; isf.estimate_dt = 1.0f / DtInv; NFloat = ISFUtils.IntToFloat(N); isf.InitComputeShader(); 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); InitComputeShader(); InitPsi(ref psi1, ref psi2); InitParticles(); }
void PrepareNozzle() { fft = isf.fft; fft.init(); isf.InitComputeShader(); isf.InitISF(); InitComputeShader(); var N = isf.N; psi1 = FFT.CreateRenderTexture3D(N[0], N[1], N[2], RenderTextureFormat.RGFloat); psi2 = FFT.CreateRenderTexture3D(N[0], N[1], N[2], RenderTextureFormat.RGFloat); UpdateNozzles(); isf.InitializePsi(ref psi1, ref psi2); for (int i = 0; i < 10; ++i) { InitilizeNozzlePsi(ref psi1, ref psi2); } CreateShpereObstacleMask(); InitilizeParticles(); // fft.ExportFloat4_3D(particles.GetParticlePostion(), "test/part.init.json"); }