fortran问题?
我在运行程序时老是出现这个错误提示,是什么意思?还请大家明示一下!User breakpoint called from code at 0x77f813b1
Re:fortran问题?
是不是断点引起的?把断点去掉看看Re:fortran问题?
什么意思?什么是断点?我好像没有设置断点呀!很是愚昧,实在是找不到原因!
Re:fortran问题?
我的程序有个大循环,不过可以循环三次都没有问题,到第四次就出现如上的错误了!也就是说在前三次循环都是正常的!希望多多指点!Re:fortran问题?
如果是可以的话,贴上原程序,或许大家可以帮你看一下!Re:fortran问题?
看样子是程序的毛病,把原程序贴来看看btw: huahua这头像是哪一位?看起来很面熟啊,呵呵
Re:fortran问题?
program mainformuse global
implicit none
integer(kind=2)::e,p,q,i,j
beta=0.75
si6=.false.!是否按以前的算法
call readdata
tempy=yd+yu
allocate(c_k(2*elementtype,2*elementtype),c_increment_disp(2*elementtype,1),c_cumulate_disp(2*elementtype,1))
allocate(c_a(2*elementtype))
call redim
do e=1,sn
if (aa(e)>maxsn) then
maxsn=aa( e)
end if
aa(e )=aa( e-1)+aa( e)+1
end do
maxsn=maxsn+1
sl=aa(sn)
allocate(one_dimen_k(sl ),one_dimen_ink(sl ))
do e=1,c_ne
c_e( e,1)=xe;c_e( e,2)=ye;c_v( e)=cv
end do
if (problemtype==.false.) then
do e=1,c_ne
c_e( e,1)=c_e( e,1)/(1-c_v( e)*c_v( e));c_e( e,2)=c_e( e,2)/(1-c_v( e)*c_v( e))
c_v( e)=c_v( e)/(1-c_v( e))
end do
end if
spring_e_h( 1)=10000000
spring_e_v=10000000
bar_side_s=barnum*pi*bard*beam_long/xn
do e=2,xn
spring_e_h(e )=530*sqrt(cfc/40.7)*bar_side_s
end do
do e=1,xn
bar_e(e ) =bare
end do
nn=0 !大循环标志
bar_s=barnum*pi*(bard/2)**2
do e=1,xn
if (tempy+1==int((tempy+1)/2)*2) then
zero_stress_axis(e )=(tempy+1)/2+(e-1)*(tempy+1)
else
zero_stress_axis(e )=int((tempy+1)/2)+1+(e-1)*(tempy+1)
end if
end do
if (cfrp_bent==.true.) then
if (cfrpth<=0.121)then
cfrpnum=1
elseif (cfrpth<=0.24) then
cfrpnum=2
end if
end if
write(*,*)"=======下面运行的是小玉工作室编制的钢筋混凝土非线性有限元程序!======"
write(*,*)" 工程名字"," ",projectname
write(*,*)" 钢筋的直径",bard," cfrp的层数",cfrpnum,"层"
write(*,*)"按回车开始计算"
read(*,*)
pte=(bar_s+beam_width*cfrpth)/(0.5*beam_width*beam_hight)
if (pte<0.01) then
pte=0.01
end if
lcr=1.9*beam_proth+0.08*bard/(0.7*pte)
lcr=int(0.75*lcr) !平均裂缝间距
element_long=beam_long/(2*xn);element_hi1=beam_proth/(2*yd);
element_hi2=(beam_hight-beam_proth)/(2*yu) !单个单元高度和宽度的一半
! 变量辅初值
cumulate_load=0;ccumulate_main_stress=0;structhunequalload=0;prestructhunequalload=0
cumulate_out_disp=0;cumulate_disp=0;precumulate_disp=0;cfailure_sign=0;precfailure_sign=0
barfailure_sign=0;cfrpcumulate_stress=0;barreal_stress=0;c_w_real_instress=0
precequ_main_strain=0;cequ_main_strain=0;c_tangent_e=0;c_fail_f=0;c_p_real_stress=0
max_increment_disp=0;max_disp=0
!大循环从此开始
load_f=30 !开始加的荷载
outer: do
nn=nn+1
if (nn==2) then
!write(*,*)cfailure_sign
!exit outer
end if
if (nn/=1) then
tv=0
end if
if (counttype==1) then
do e=1,sn
cumulate_load(e )=cumulate_load(e )+fv(e )+tv(e )
end do
elseif (counttype==0) then
do e=1,sn
increment_disp(e )=tv(e )+fv(e )+structhunequalload(e )
end do
structhunequalload=0
end if
one_dimen_k=0
do e=1,c_ne
if (c_e( e,1)<=0) then
c_e(e,1)=xe*0.1
end if
if (c_e( e,2)<=0) then
c_e( e,2)=xe*0.1
end if
end do
call single_k
do e=1,sn
if (one_dimen_k(aa(e ))==0) then
write(*,*)" 总纲度矩阵奇异,计算结束"
write(*,*)" 一共循环了",nn,"次"
exit outer
end if
end do
do e=1,sn
structhunequalload( e)=fv(e )+tv(e )
end do
nnn=0 !迭代次数变量
do e=0,sn
cumulate_disp(e )=cumulate_out_disp(nn-1,e )
end do
do e=1,c_ne
do i=1,3
c_w_real_instress(e,i )=c_w_real_stress(nn-1,e,i )
end do
end do
do e=1,xn
barcumulate_strain( e)=barcumulate_out_strain(nn-1 ,e)
barreal_stress( e)=barreal_out_stress(nn-1,e )
cfrpcumulate_stress( e)=cfrpcumulate_out_stress(nn-1, e)
cfrpcumulate_strain( e)=cfrpcumulate_out_strain(nn-1,e )
do i=1,2
spring_real_stress(e,i )=spring_out_real_stress(nn-1,e,i )
end do
end do
!下面进行迭代计算
inner: do
nnn=nnn+1
write(*,*)"下面进行第",nn,"次循环的","第",nnn,"次迭代"
precumulate_disp=cumulate_disp;precfailure_sign=cfailure_sign
precequ_main_strain=cequ_main_strain
preccumulate_main_stress=ccumulate_main_stress
cfrp_unequal_f=0;bar_unequal_f=0;c_initial_unequal_f=0
c_remain_unequal_f=0;spring_unequal_f=0;max_increment_disp=0
max_disp=0
one_dimen_ink=one_dimen_k!因为在计算是one_dimen_k发生了变化
do e=1,sn
increment_disp(e )=structhunequalload(e )
end do
!计算位移增量
call compute
do e=0,sn
cumulate_disp(e )=cumulate_disp(e )+increment_disp( e)
end do
open (unit=12,file="D:\study\sunyuyong\program\program\\result\increment_disp.txt")
write(12,*)increment_disp
close(12)
open (unit=11,file="D:\study\sunyuyong\program\program\\result\cumulate_disp.txt")
write(11,*)cumulate_disp
close(11)
cumulate_disp(0)=0;precumulate_disp(0)=0!???????
!判断迭代是否结束 注意:可能有问题???????????
do e=0,sn
if (max_increment_disp<abs(increment_disp(e ))) then
max_increment_disp=abs(increment_disp(e ))
end if
if (max_disp<abs(cumulate_disp(e ) )) then
max_disp=abs(cumulate_disp(e ))
end if
end do
if ((max_increment_disp<admiterror*max_disp).or.(nnn>=iteratenum)) then
exit inner
end if
!求混凝土应变
call computestrain
!下面计算单元的应力
call computestress
!下面计算切线模量中的参数
call tangent_e
!本级荷载增量末的材料性态判断和真实应力的计算
call realstress
!不平衡应力和不平衡节点力的计算
call unequalstress
end do inner
do e=1,xn
barcumulate_out_strain(nn, e)=barcumulate_strain(e )
barreal_out_stress(nn,e )=barreal_stress(e )
cfrpcumulate_out_stress(nn,e )=cfrpcumulate_stress(e )
cfrpcumulate_out_strain(nn,e )=cfrpcumulate_strain(e )
do i=1,2
spring_out_real_stress(nn,e,i )=spring_real_stress(e, i)
end do
end do
do e=1,c_ne
do i=1,3
c_w_real_stress(nn,e,i )=c_w_real_instress(e,i )
end do
end do
do e=0,sn
cumulate_out_disp(nn,e )=cumulate_disp(e )
end do
end do outer
write(*,*)" 按回车退出计算"
read(*,*)
end program
这就是主要程序,高手多多指点,谢谢了!
Re:fortran问题?
FORTRAN90啊,看来我帮不了你啊TO版主: 这是观音菩萨啊,想知道具体谁演的,看我的签名档啊,哈哈!
Re:fortran问题?
sunyuyong99 wrote:program mainform
use global
implicit none
integer(kind=2)::e,p,q,i,j
beta=0.75
si6=.false.!是否按以前的算法
call readdata
tempy=yd+yu
allocate(c_k(2*elementtype,2*elementtype),c_increment_disp(2*elementtype,1),c_cumulate_disp(2*elementtype,1))
allocate(c_a(2*elementtype))
call redim
do e=1,sn
if (aa(e)>maxsn) then
maxsn=aa( e)
end if
aa(e )=aa( e-1)+aa( e)+1
end do
maxsn=maxsn+1
sl=aa(sn)
allocate(one_dimen_k(sl ),one_dimen_ink(sl ))
do e=1,c_ne
c_e( e,1)=xe;c_e( e,2)=ye;c_v( e)=cv
end do
if (problemtype==.false.) then
do e=1,c_ne
c_e( e,1)=c_e( e,1)/(1-c_v( e)*c_v( e));c_e( e,2)=c_e( e,2)/(1-c_v( e)*c_v( e))
c_v( e)=c_v( e)/(1-c_v( e))
end do
end if
spring_e_h( 1)=10000000
spring_e_v=10000000
bar_side_s=barnum*pi*bard*beam_long/xn
do e=2,xn
spring_e_h(e )=530*sqrt(cfc/40.7)*bar_side_s
end do
do e=1,xn
bar_e(e ) =bare
end do
nn=0 !大循环标志
bar_s=barnum*pi*(bard/2)**2
do e=1,xn
if (tempy+1==int((tempy+1)/2)*2) then
zero_stress_axis(e )=(tempy+1)/2+(e-1)*(tempy+1)
else
zero_stress_axis(e )=int((tempy+1)/2)+1+(e-1)*(tempy+1)
end if
end do
if (cfrp_bent==.true.) then
if (cfrpth<=0.121)then
cfrpnum=1
elseif (cfrpth<=0.24) then
cfrpnum=2
end if
end if
write(*,*)"=======下面运行的是小玉工作室编制的钢筋混凝土非线性有限元程序!======"
write(*,*)" 工程名字"," ",projectname
write(*,*)" 钢筋的直径",bard," cfrp的层数",cfrpnum,"层"
write(*,*)"按回车开始计算"
read(*,*)
pte=(bar_s+beam_width*cfrpth)/(0.5*beam_width*beam_hight)
if (pte<0.01) then
pte=0.01
end if
lcr=1.9*beam_proth+0.08*bard/(0.7*pte)
lcr=int(0.75*lcr) !平均裂缝间距
element_long=beam_long/(2*xn);element_hi1=beam_proth/(2*yd);
element_hi2=(beam_hight-beam_proth)/(2*yu) !单个单元高度和宽度的一半
! 变量辅初值
cumulate_load=0;ccumulate_main_stress=0;structhunequalload=0;prestructhunequalload=0
cumulate_out_disp=0;cumulate_disp=0;precumulate_disp=0;cfailure_sign=0;precfailure_sign=0
barfailure_sign=0;cfrpcumulate_stress=0;barreal_stress=0;c_w_real_instress=0
precequ_main_strain=0;cequ_main_strain=0;c_tangent_e=0;c_fail_f=0;c_p_real_stress=0
max_increment_disp=0;max_disp=0
!大循环从此开始
load_f=30 !开始加的荷载
outer: do
nn=nn+1
if (nn==2) then
!write(*,*)cfailure_sign
!exit outer
end if
if (nn/=1) then
tv=0
end if
if (counttype==1) then
do e=1,sn
cumulate_load(e )=cumulate_load(e )+fv(e )+tv(e )
end do
elseif (counttype==0) then
do e=1,sn
increment_disp(e )=tv(e )+fv(e )+structhunequalload(e )
end do
structhunequalload=0
end if
one_dimen_k=0
do e=1,c_ne
if (c_e( e,1)<=0) then
c_e(e,1)=xe*0.1
end if
if (c_e( e,2)<=0) then
c_e( e,2)=xe*0.1
end if
end do
call single_k
do e=1,sn
if (one_dimen_k(aa(e ))==0) then
write(*,*)" 总纲度矩阵奇异,计算结束"
write(*,*)" 一共循环了",nn,"次"
exit outer
end if
end do
do e=1,sn
structhunequalload( e)=fv(e )+tv(e )
end do
nnn=0 !迭代次数变量
do e=0,sn
cumulate_disp(e )=cumulate_out_disp(nn-1,e )
end do
do e=1,c_ne
do i=1,3
c_w_real_instress(e,i )=c_w_real_stress(nn-1,e,i )
end do
end do
do e=1,xn
barcumulate_strain( e)=barcumulate_out_strain(nn-1 ,e)
barreal_stress( e)=barreal_out_stress(nn-1,e )
cfrpcumulate_stress( e)=cfrpcumulate_out_stress(nn-1, e)
cfrpcumulate_strain( e)=cfrpcumulate_out_strain(nn-1,e )
do i=1,2
spring_real_stress(e,i )=spring_out_real_stress(nn-1,e,i )
end do
end do
!下面进行迭代计算
inner: do
nnn=nnn+1
write(*,*)"下面进行第",nn,"次循环的","第",nnn,"次迭代"
precumulate_disp=cumulate_disp;precfailure_sign=cfailure_sign
precequ_main_strain=cequ_main_strain
preccumulate_main_stress=ccumulate_main_stress
cfrp_unequal_f=0;bar_unequal_f=0;c_initial_unequal_f=0
c_remain_unequal_f=0;spring_unequal_f=0;max_increment_disp=0
max_disp=0
one_dimen_ink=one_dimen_k!因为在计算是one_dimen_k发生了变化
do e=1,sn
increment_disp(e )=structhunequalload(e )
end do
!计算位移增量
call compute
do e=0,sn
cumulate_disp(e )=cumulate_disp(e )+increment_disp( e)
end do
open (unit=12,file="D:\study\sunyuyong\program\program\\result\increment_disp.txt")
write(12,*)increment_disp
close(12)
open (unit=11,file="D:\study\sunyuyong\program\program\\result\cumulate_disp.txt")
write(11,*)cumulate_disp
close(11)
cumulate_disp(0)=0;precumulate_disp(0)=0!???????
!判断迭代是否结束 注意:可能有问题???????????
do e=0,sn
if (max_increment_disp<abs(increment_disp(e ))) then
max_increment_disp=abs(increment_disp(e ))
end if
if (max_disp<abs(cumulate_disp(e ) )) then
max_disp=abs(cumulate_disp(e ))
end if
end do
if ((max_increment_disp<admiterror*max_disp).or.(nnn>=iteratenum)) then
exit inner
end if
!求混凝土应变
call computestrain
!下面计算单元的应力
call computestress
!下面计算切线模量中的参数
call tangent_e
!本级荷载增量末的材料性态判断和真实应力的计算
call realstress
!不平衡应力和不平衡节点力的计算
call unequalstress
end do inner
do e=1,xn
barcumulate_out_strain(nn, e)=barcumulate_strain(e )
barreal_out_stress(nn,e )=barreal_stress(e )
cfrpcumulate_out_stress(nn,e )=cfrpcumulate_stress(e )
cfrpcumulate_out_strain(nn,e )=cfrpcumulate_strain(e )
do i=1,2
spring_out_real_stress(nn,e,i )=spring_real_stress(e, i)
end do
end do
do e=1,c_ne
do i=1,3
c_w_real_stress(nn,e,i )=c_w_real_instress(e,i )
end do
end do
do e=0,sn
cumulate_out_disp(nn,e )=cumulate_disp(e )
end do
end do outer
write(*,*)" 按回车退出计算"
read(*,*)
end program
这就是主要程序,高手多多指点,谢谢了!
太多了,你把关键的出错误的地方粘上就行了,要不想帮你也很困难,很费劲啊
Re:fortran问题?
我也不知道具体那一部分出错了,只是每次运行的时候出现User breakpoint called from code at 0x77f813b1 这样的错误提示,然后就不能运行了!所以我才把所有的程序都贴上了,多多帮帮忙!谢谢了!
Re:fortran问题?
版主帮忙看看吧!我实在是找不到问题呀!谢谢了!那个意思是不是说设置的跳出循环的语句不对呀?可是跳出循环的语句就是那样呀! 太难了
学习
我也是初学者
页:
[1]