3 ! Contributed by Hossein Talebi <talebi.hossein@gmail.com>
6 Module part_base2_class
13 integer,parameter :: MAX_NUM_ELEMENT_TYPE
=32
15 type :: ty_element_index2
17 class(ty_moc1
),allocatable
:: element
18 class(ty_moc1
),allocatable
:: element_th(:)
20 endtype ty_element_index2
23 type(ty_element_index2
)::element_index(MAX_NUM_ELEMENT_TYPE
)
24 end type ty_part_base2
26 class(ty_part_base2
),allocatable
:: part_tmp_obj
28 End Module part_base2_class
31 allocate (part_tmp_obj
)
32 allocate (part_tmp_obj
%element_index(1)%element
, source
= ty_moc1(1))
33 allocate (part_tmp_obj
%element_index(1)%element_th(1), source
= ty_moc1(99))
34 allocate (part_tmp_obj
%element_index(32)%element_th(1), source
= ty_moc1(999))
36 do i
= 1, MAX_NUM_ELEMENT_TYPE
37 if (allocated (part_tmp_obj
%element_index(i
)%element_th
)) then
38 print *, i
, part_tmp_obj
%element_index(i
)%element_th(1)%l
41 deallocate (part_tmp_obj
)