主题:请教有关派生类型TYPE问题
我接触的有关派生类型应用基本都是用来说明一维的变量,派生类型有用于二维的么?例如:我要定义一个积分点,信息如下:
type coordinate_type !定义三个坐标值,其中L是总的积分点数
real(kind=8)::EIC(L,X),EIC(L,Y),EIC(L,Z)
end type coordinate_type
type Stress component_type !定义每个积分点的6个应力分量
real(kind=8)::EISC(L,1),EISC(L,2),EISC(L,3),EISC(L,4),
# EISC(L,5),EISC(L,6)
end type stress component_type
type principal stress_type !定义每个积分点的3个主应力
real(kind=8)::EISP(L,1),EISP(L,2),EISP(L,3)
end type principal stress_type
type point_type !定义积分点
integer::NE,NEI
type(coordinate_type)::c
type(stress component_type)::sc
type(principal stress_type)::sp
end type point_type
我想通过读入NE,NEI的值来得到相应的EIC,EISP,EISC但是不知道该怎么定义得到,是要再定义一个type么?还是在type point类型中直接定义type::p(NE,NEI)这样一个二维变量?
PS:我是才接触这些知识,不知道派生类型的变量说明是否正确,请求各位前辈高人指点,帮助,非常感谢
type coordinate_type !定义三个坐标值,其中L是总的积分点数
real(kind=8)::EIC(L,X),EIC(L,Y),EIC(L,Z)
end type coordinate_type
type Stress component_type !定义每个积分点的6个应力分量
real(kind=8)::EISC(L,1),EISC(L,2),EISC(L,3),EISC(L,4),
# EISC(L,5),EISC(L,6)
end type stress component_type
type principal stress_type !定义每个积分点的3个主应力
real(kind=8)::EISP(L,1),EISP(L,2),EISP(L,3)
end type principal stress_type
type point_type !定义积分点
integer::NE,NEI
type(coordinate_type)::c
type(stress component_type)::sc
type(principal stress_type)::sp
end type point_type
我想通过读入NE,NEI的值来得到相应的EIC,EISP,EISC但是不知道该怎么定义得到,是要再定义一个type么?还是在type point类型中直接定义type::p(NE,NEI)这样一个二维变量?
PS:我是才接触这些知识,不知道派生类型的变量说明是否正确,请求各位前辈高人指点,帮助,非常感谢