没有合适的资源?快使用搜索试试~ 我知道了~
1维微分方程的有限元计算源程序(fortran)
需积分: 50 17 下载量 113 浏览量
2014-01-03
16:44:26
上传
评论
收藏 31KB TXT 举报
温馨提示
利用有限元方法对形如- d/dX (P dU/dX) + Q U = F的方程进行计算
资源推荐
资源详情
资源评论
program main
!*****************************************************************************80
!
!! MAIN is the main program for FEM1D.
!
! Discussion:
!
! FEM1D solves a one dimensional ODE using the finite element method.
!
! The differential equation solved is
!
! - d/dX (P dU/dX) + Q U = F
!
! The finite-element method uses piecewise linear basis functions.
!
! Here U is an unknown scalar function of X defined on the
! interval [XL,XR], and P, Q and F are given functions of X.
!
! The values of U or U' at XL and XR are also specified.
!
!
! The interval [XL,XR] is "meshed" with NSUB+1 points,
!
! XN(0) = XL, XN(1)=XL+H, XN(2)=XL+2*H, ..., XN(NSUB)=XR.
!
! This creates NSUB subintervals, with interval number 1
! having endpoints XN(0) and XN(1), and so on up to interval
! NSUB, which has endpoints XN(NSUB-1) and XN(NSUB).
!
!*****************************************************************************80
!
!! MAIN is the main program for FEM1D.
!
! Discussion:
!
! FEM1D solves a one dimensional ODE using the finite element method.
!
! The differential equation solved is
!
! - d/dX (P dU/dX) + Q U = F
!
! The finite-element method uses piecewise linear basis functions.
!
! Here U is an unknown scalar function of X defined on the
! interval [XL,XR], and P, Q and F are given functions of X.
!
! The values of U or U' at XL and XR are also specified.
!
!
! The interval [XL,XR] is "meshed" with NSUB+1 points,
!
! XN(0) = XL, XN(1)=XL+H, XN(2)=XL+2*H, ..., XN(NSUB)=XR.
!
! This creates NSUB subintervals, with interval number 1
! having endpoints XN(0) and XN(1), and so on up to interval
! NSUB, which has endpoints XN(NSUB-1) and XN(NSUB).
!
! Licensing:
!
! This code is distributed under the GNU LGPL license.
!
! Modified:
!
! 01 November 2006
!
! Author:
!
! John Burkardt
!
! Parameters:
!
! real ( kind = 8 ) ADIAG(NU), the "diagonal" coefficients.
! That is, ADIAG(I) is the coefficient of the I-th unknown in
! the I-th equation.
!
! real ( kind = 8 ) ALEFT(NU), the "left hand" coefficients. That is,
! ALEFT(I) is the coefficient of the (I-1)-th unknown in the I-th equation.
! There is no value in ALEFT(1), since the first equation
! does not refer to a "0-th" unknown.
!
! real ( kind = 8 ) ARITE(NU).
! ARITE(I) is the "right hand" coefficient of the I-th
! equation in the linear system. ARITE(I) is the coefficient
! of the (I+1)-th unknown in the I-th equation. There is
! no value in ARITE(NU) because the NU-th equation does not
! refer to an "NU+1"-th unknown.
!
!
! This code is distributed under the GNU LGPL license.
!
! Modified:
!
! 01 November 2006
!
! Author:
!
! John Burkardt
!
! Parameters:
!
! real ( kind = 8 ) ADIAG(NU), the "diagonal" coefficients.
! That is, ADIAG(I) is the coefficient of the I-th unknown in
! the I-th equation.
!
! real ( kind = 8 ) ALEFT(NU), the "left hand" coefficients. That is,
! ALEFT(I) is the coefficient of the (I-1)-th unknown in the I-th equation.
! There is no value in ALEFT(1), since the first equation
! does not refer to a "0-th" unknown.
!
! real ( kind = 8 ) ARITE(NU).
! ARITE(I) is the "right hand" coefficient of the I-th
! equation in the linear system. ARITE(I) is the coefficient
! of the (I+1)-th unknown in the I-th equation. There is
! no value in ARITE(NU) because the NU-th equation does not
! refer to an "NU+1"-th unknown.
!
剩余39页未读,继续阅读
资源评论
fun_GG
- 粉丝: 0
- 资源: 1
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
最新资源
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功