网站大量收购独家精品文档,联系QQ:2885784924

稳定性计算r=511和r=59偏微分方程.doc

  1. 1、本文档共3页,可阅读全部内容。
  2. 2、原创力文档(book118)网站文档一经付费(服务费),不意味着购买了该文档的版权,仅供个人/单位学习、研究之用,不得用于商业用途,未经授权,严禁复制、发行、汇编、翻译或者网络传播等,侵权必究。
  3. 3、本站所有内容均由合作方或网友上传,本站不对文档的完整性、权威性及其观点立场正确性做任何保证或承诺!文档内容仅供研究参考,付费前请自行鉴别。如您付费,意味着您自己接受本站规则且自行承担风险,本站不退款、不进行额外附加服务;查看《如何避免下载的几个坑》。如果您已付费下载过本站文档,您可以点击 这里二次下载
  4. 4、如文档侵犯商业秘密、侵犯著作权、侵犯人身权等,请点击“版权申诉”(推荐),也可以打举报电话:400-050-0827(电话支持时间:9:00-18:30)。
查看更多
稳定性计算r=511和r=59偏微分方程

扬州大学数学科学学院《偏微分方程数值解法》实验报告 班级 姓名 学号 实验 名称 验证最简查分格式的稳定性 实验目的:就r=5/11,5/9用显格式,作树值试验,观察误差的增长规律,并说明r=5/11时稳定,r=5/9时不稳定。 实验所用软件:JCreator 实验过程记录(含:源程序(带注释)及异常情况记录等) r=5/11时 import java.text.DecimalFormat; import java.util.Arrays; import java.lang.ArrayIndexOutOfBoundsException; public class A { public static void main(String[] args) throws ArrayIndexOutOfBoundsException{ double[][] a = new double[7][11]; for(int i = 0;i7;i++){ for (int j = 0;j11;j++){ a[0][5] = 1.0; } } for(int h = 0;h6;h++){ for(int k = 1;k10;k++){ a[h+1][k]=(5*a[h][k+1]+a[h][k]+5*a[h][k-1])/11; DecimalFormat df=new DecimalFormat(0.0000); double tmp=a[h][k]; System.out.print(df.format(tmp)+ ); } System.out.println(); } } } r=5/9时 import java.text.DecimalFormat; import java.util.Arrays; import java.lang.ArrayIndexOutOfBoundsException; public class A { public static void main(String[] args) throws ArrayIndexOutOfBoundsException{ double[][] a = new double[7][11]; for(int i = 0;i7;i++){ for (int j = 0;j11;j++){ a[0][5] = 1.0; } } for(int h = 0;h6;h++){ for(int k = 1;k10;k++){ a[h+1][k] = (5*a[h][k+1]+a[h][k]+5*a[h][k-1])/9; DecimalFormat df=new DecimalFormat(0.0000); double tmp=a[h][k]; System.out.print(df.format(tmp)+ ); } System.out.println(); } } } 实验结果(实验的输入数据和输出结果) r=5/11时 0.0000 0.0000 0.0000 0.0000 1.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.4545 0.0909 0.4545 0.0000 0.0000 0.0000 0.0000 0.0000 0.2066 0.0826 0.4215 0.0826 0.2066 0.0000 0.0000 0.0000 0.0939 0.0563 0.2930 0.1134 0.2930 0.0563 0.0939 0.0000 0.0427 0.0342 0.1810 0.1038 0.2767 0.1038 0.1810 0.0342 0.0427 0.0194 0.1048 0.0792 0.2175 0.1195 0.2175 0.0792 0.1048 0.0194 r=5/9时 0.0000 0.0000 0.0000 0.0000 1.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.5556 0.1111 0.5556 0.0000 0.0000 0.0000 0.0000 0.0000 0.3086 0.1235 0.6296 0.123

文档评论(0)

hhuiws1482 + 关注
实名认证
内容提供者

该用户很懒,什么也没介绍

版权声明书
用户编号:5024214302000003

1亿VIP精品文档

相关文档