Freefem ++を使用してポアソン方程式を解いています
Grad^2 u(x,y,z) = -f(x,y,z)
f の分析式がある場合はうまく機能しますが、数値的に定義された f (つまり、メッシュで定義されたデータのセット) があり、Freefem++ を引き続き使用できるかどうか疑問に思っています。
つまり、典型的なコード (この場合の 2D 問題) は、次のようになります。
mesh Sh= square(10,10); // mesh generation of a square
fespace Vh(Sh,P1); // space of P1 Finite Elements
Vh u,v; // u and v belongs to Vh
func f=cos(x)*y; // analytical function
problem Poisson(u,v)= // Definition of the problem
int2d(Sh)(dx(u)*dx(v)+dy(u)*dy(v)) // bilinear form
-int2d(Sh)(f*v) // linear form
+on(1,2,3,4,u=0); // Dirichlet Conditions
Poisson; // Solve Poisson Equation
plot(u); // Plot the result
f を解析的にではなく、数値的に定義できるかどうか疑問に思っています。