[学习例程1]:/usr/local/AFEPack/example/possion_equation/
问题:-/Delta u = f u |_{/partial /Omega} = u_b
***** $ls
CVS D.d Makefile possion_equation.cfg possion_equation.cpp possion_equation.net README run
------------------------------------------------------------------------------------
***** README (运行步骤)
This example will solve a Possion equation on an easymesh generated data.
The obtained solution
is
saved
in
file
"
u.dx
"
.

Usage:
1
. compile with make [
-
e debug
=
no];
2
. generate the mesh with easymesh
as
:
easymesh D
3
. run with .
/
run;
4
. view the obtained numerical solution with OpenDX;
[补充]
3. 本目录的例子只需运行 $ ./run 或者 $ ./main
(后者需要先设置环境变量 $ export AFEPACK_TEMPLATE_PATH=/usr/local/AFEPack/template/triangle,否则找不到读入文件的路径)
4. OpenDX ——> Edit Visual Programs...——> 选 possion_equation.net
(possion_equation.cfg 是OpenDx用到的配置文件)
双击FileSelector,(若需要)修改输出的数值解位置,保存
Execute ——> 选Execute Once
***** Makefile(略)
***** possion_equation.cpp(略)
可用 $ cat -n possion_equation.cpp 加上行号显示
***** D.d(EasyMesh输入文件,略)
***** run(shell脚本)
#
!
/
bin
问题:-/Delta u = f u |_{/partial /Omega} = u_b
***** $ls
CVS D.d Makefile possion_equation.cfg possion_equation.cpp possion_equation.net README run
------------------------------------------------------------------------------------
***** README (运行步骤)
This example will solve a Possion equation on an easymesh generated data.
The obtained solution
is
saved
in
file
"
u.dx
"
.
Usage:
1
. compile with make [
-
e debug
=
no];
2
. generate the mesh with easymesh
as
:
easymesh D
3
. run with .
/
run;
4
. view the obtained numerical solution with OpenDX;
[补充]
3. 本目录的例子只需运行 $ ./run 或者 $ ./main
(后者需要先设置环境变量 $ export AFEPACK_TEMPLATE_PATH=/usr/local/AFEPack/template/triangle,否则找不到读入文件的路径)
4. OpenDX ——> Edit Visual Programs...——> 选 possion_equation.net
(possion_equation.cfg 是OpenDx用到的配置文件)
双击FileSelector,(若需要)修改输出的数值解位置,保存
Execute ——> 选Execute Once
***** Makefile(略)
***** possion_equation.cpp(略)
可用 $ cat -n possion_equation.cpp 加上行号显示
***** D.d(EasyMesh输入文件,略)
***** run(shell脚本)
#
!
/
bin

这篇博客介绍了如何使用AFEPack解决Poisson方程,包括通过easymesh生成网格,使用OpenDX可视化结果。重点讲解了Vector类的使用,AMGSolver求解器的参数调整,以及如何计算L2误差。还对比了带系数的Poisson方程与标准Poisson方程在矩阵操作上的差异。
最低0.47元/天 解锁文章
5085

被折叠的 条评论
为什么被折叠?



