爱气象,爱气象家园! 

气象家园

 找回密码
 立即注册

QQ登录

只需一步,快速开始

新浪微博登陆

只需一步, 快速开始

搜索
查看: 2417|回复: 1

[求助] fortran 结构体复制问题。。。

[复制链接]

新浪微博达人勋

发表于 2013-6-16 18:06:23 | 显示全部楼层 |阅读模式

登录后查看更多精彩内容~

您需要 登录 才可以下载或查看,没有帐号?立即注册 新浪微博登陆

x
type energy
sequence
real(dp) :: & ! all energies in Rydbergs
inputfermi, & ! fermi energy as given by input
afmagmom, & ! antiferromagnetic sublattice moment in Bohr
vxc0(2), & ! spin up and down of the xc potential at G=0
magnetic, & ! magnetic energy due to external field
hxc, & ! hartree exchange-correlation correction
xc, & ! the exchange-correlation energy
ewald, & ! ewald energy, with compensating background
eband, & ! band energy
ion, & ! ion-electron energy
nloc, & ! nonlocal energy contribution
hartree, & ! hartree electron-electron energy
ektot, & ! total kinetic energy
esmear, & ! smearing energy contribution
efermi(2), & ! fermi energy for both spins
evalshift(2), & ! shift of the energy eigenvalues
total, & ! the total energy
totnonv, & ! etot - 1/2 TS term, is not variational
! it is the estimate of the zero T energy
alpha ! the alpha term which contains divergences
end type energy

type(energy) oldenergs
constants.f90: real(dp), parameter :: dzero = 0.0d0

oldenergs=dzero

这个居然可以这么赋值。。。。
是不是整体赋值?
我以为编译不成功了。。可是ifort居然可以编译成功

这可惜gfortran 编译不成功?我要怎么做?gfortran 也可以编译成功?类型转换?
密码修改失败请联系微信:mofangbao

新浪微博达人勋

 楼主| 发表于 2013-6-16 18:35:55 | 显示全部楼层
{:eb503:}{:eb503:}{:eb503:}{:eb503:}{:eb503:}
密码修改失败请联系微信:mofangbao
您需要登录后才可以回帖 登录 | 立即注册 新浪微博登陆

本版积分规则

Copyright ©2011-2014 bbs.06climate.com All Rights Reserved.  Powered by Discuz! (京ICP-10201084)

本站信息均由会员发表,不代表气象家园立场,禁止在本站发表与国家法律相抵触言论

快速回复 返回顶部 返回列表