diff --git a/Matlab/WaveVortexModel/@WVTransform/WVTransform.m b/Matlab/WaveVortexModel/@WVTransform/WVTransform.m index 7582ad36..a9f8ddcb 100644 --- a/Matlab/WaveVortexModel/@WVTransform/WVTransform.m +++ b/Matlab/WaveVortexModel/@WVTransform/WVTransform.m @@ -520,6 +520,7 @@ function u_bar = transformFromSpatialDomainWithFourier(self,u) u_bar = fft(fft(u,self.Nx,1),self.Ny,2)/(self.Nx*self.Ny); + % u_bar = fft2(u)/(self.Nx*self.Ny); u_bar = reshape(u_bar(self.dftPrimaryIndex),[self.Nz self.Nkl]); end @@ -527,6 +528,7 @@ self.dftBuffer(self.dftPrimaryIndex) = u_bar; self.dftBuffer(self.dftConjugateIndex) = conj(u_bar(self.wvConjugateIndex)); u = ifft(ifft(self.dftBuffer,self.Nx,1),self.Ny,2,'symmetric')*(self.Nx*self.Ny); + % u = ifft2(self.dftBuffer,'symmetric')*(self.Nx*self.Ny); end function u = transformToSpatialDomainWithFourierAtPosition(self,u_bar,x,y) diff --git a/Matlab/WaveVortexModel/NonlinearFluxOperations/WVNonlinearFlux.m b/Matlab/WaveVortexModel/NonlinearFluxOperations/WVNonlinearFlux.m index 7f485012..b5233cf4 100644 --- a/Matlab/WaveVortexModel/NonlinearFluxOperations/WVNonlinearFlux.m +++ b/Matlab/WaveVortexModel/NonlinearFluxOperations/WVNonlinearFlux.m @@ -143,6 +143,10 @@ function buildDampingOperator(self) end function varargout = spatialFlux(self,wvt,varargin) + % To count everything: + % 1. (u,v,w,eta) -> 4 transformToSpatialDomainWithFourier + % 2. (u_x,u_y,v_x,v_y,eta_x,eta_y) -> 3 diffX, 3 diffY + % 3. (Ap,Am,A0) -> 3 transformFomSpatialDomainWithFourier % a subclass can override this, and then modify the spatial % fluxes that get returned. phase = exp(wvt.iOmega*(wvt.t-wvt.t0)); diff --git a/Matlab/WaveVortexModel/UnitTests/ProfileableSpeedTest.m b/Matlab/WaveVortexModel/UnitTests/ProfileableSpeedTest.m index 0ed9db68..47aaacb3 100644 --- a/Matlab/WaveVortexModel/UnitTests/ProfileableSpeedTest.m +++ b/Matlab/WaveVortexModel/UnitTests/ProfileableSpeedTest.m @@ -63,7 +63,7 @@ [Fp,Fm,F0] = wvt.nonlinearFlux(); tic -for i=1:10 +for i=1:50 wvt.t = i; [Fp,Fm,F0] = wvt.nonlinearFlux(); end @@ -78,7 +78,7 @@ %% profile on -for i=1:10 +for i=1:20 wvt.t = i; [Fp,Fm,F0] = wvt.nonlinearFlux(); end