相关疑难解决方法(0)

为什么(A + B)的FFT与FFT(A)+ FFT(B)不同?

我差不多一个月一直在和一个非常奇怪的虫子打架.问你们这是我最后的希望.我在C中编写了一个程序,它使用傅里叶(或倒数)空间中的隐式欧拉(IE)方案集成了2d Cahn-Hilliard方程:

IE方法

"帽子"意味着我们处于傅里叶空间:h_q(t_n + 1)和h_q(t_n)是时间t_n和t_(n + 1)的h(x,y)的FT,N [h_q]是非线性算子应用于傅立叶空间中的h_q,而L_q是线性的,同样在傅立叶空间中.我不想过多介绍我使用的数值方法的细节,因为我确信问题不是来自那里(我尝试使用其他方案).

我的代码实际上非常简单.这是开始,基本上我声明变量,分配内存并为FFTW例程创建计划.

# include <stdlib.h>
# include <stdio.h>
# include <time.h>
# include <math.h>
# include <fftw3.h>
# define pi M_PI

int main(){

// define lattice size and spacing
int Nx = 150;         // n of points on x
int Ny = 150;         // n of points on y
double dx = 0.5;      // bin size on x and y

// define simulation time and time step
long int Nt = 1000; …
Run Code Online (Sandbox Code Playgroud)

c fftw pde dft

49
推荐指数
1
解决办法
898
查看次数

标签 统计

c ×1

dft ×1

fftw ×1

pde ×1