Skip to content

Commit a3bf638

Browse files
committed
merge origin/double-precision
1 parent a3065a9 commit a3bf638

File tree

2 files changed

+35
-19
lines changed

2 files changed

+35
-19
lines changed

src/intrinsic_array_m.F90

Lines changed: 18 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -7,23 +7,26 @@ module intrinsic_array_m
77
public :: intrinsic_array_t
88

99
type, extends(characterizable_t) :: intrinsic_array_t
10-
complex, allocatable :: complex_1D(:)
11-
integer, allocatable :: integer_1D(:)
12-
logical, allocatable :: logical_1D(:)
13-
real, allocatable :: real_1D(:)
14-
double precision, allocatable :: double_precision_1D(:)
10+
complex, allocatable :: complex_1D(:)
11+
complex(kind(1.D0)), allocatable :: complex_double_1D(:)
12+
integer, allocatable :: integer_1D(:)
13+
logical, allocatable :: logical_1D(:)
14+
real, allocatable :: real_1D(:)
15+
double precision, allocatable :: double_precision_1D(:)
1516

16-
complex, allocatable :: complex_2D(:,:)
17-
integer, allocatable :: integer_2D(:,:)
18-
logical, allocatable :: logical_2D(:,:)
19-
real, allocatable :: real_2D(:,:)
20-
double precision, allocatable :: double_precision_2D(:,:)
17+
complex, allocatable :: complex_2D(:,:)
18+
complex(kind(1.D0)), allocatable :: complex_double_2D(:,:)
19+
integer, allocatable :: integer_2D(:,:)
20+
logical, allocatable :: logical_2D(:,:)
21+
real, allocatable :: real_2D(:,:)
22+
double precision, allocatable :: double_precision_2D(:,:)
2123

22-
complex, allocatable :: complex_3D(:,:,:)
23-
integer, allocatable :: integer_3D(:,:,:)
24-
logical, allocatable :: logical_3D(:,:,:)
25-
real, allocatable :: real_3D(:,:,:)
26-
double precision, allocatable :: double_precision_3D(:,:,:)
24+
complex, allocatable :: complex_3D(:,:,:)
25+
complex(kind(1.D0)), allocatable :: complex_double_3D(:,:,:)
26+
integer, allocatable :: integer_3D(:,:,:)
27+
logical, allocatable :: logical_3D(:,:,:)
28+
real, allocatable :: real_3D(:,:,:)
29+
double precision, allocatable :: double_precision_3D(:,:,:)
2730
contains
2831
procedure :: as_character
2932
end type

src/intrinsic_array_s.F90

Lines changed: 17 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
module procedure construct
77

88
#ifndef NAGFOR
9-
select rank(array)
9+
select rank(array)
1010
rank(1)
1111
#endif
1212
select type(array)
@@ -67,13 +67,20 @@
6767
integer, parameter :: single_number_width=32
6868

6969
if (1 /= count( &
70-
[ allocated(self%complex_1D), allocated(self%integer_1D), allocated(self%logical_1D), allocated(self%real_1D) &
71-
,allocated(self%complex_2D), allocated(self%integer_2D), allocated(self%logical_2D), allocated(self%real_2D) &
70+
[ allocated(self%complex_1D), allocated(self%complex_double_1D), allocated(self%integer_1D), &
71+
allocated(self%logical_1D), allocated(self%real_1D), &
72+
allocated(self%complex_2D), allocated(self%complex_double_2D), allocated(self%integer_2D), &
73+
allocated(self%logical_2D), allocated(self%real_2D), &
74+
allocated(self%complex_3D), allocated(self%complex_double_3D), allocated(self%integer_3D), &
75+
allocated(self%logical_3D), allocated(self%real_3D) &
7276
])) error stop "intrinsic_array_t as_character: ambiguous component allocation status."
7377

7478
if (allocated(self%complex_1D)) then
7579
character_self = repeat(" ", ncopies = single_number_width*size(self%complex_1D))
7680
write(character_self, *) self%complex_1D
81+
else if (allocated(self%complex_double_1D)) then
82+
character_self = repeat(" ", ncopies = single_number_width*size(self%complex_double_1D))
83+
write(character_self, *) self%complex_double_1D
7784
else if (allocated(self%integer_1D)) then
7885
character_self = repeat(" ", ncopies = single_number_width*size(self%integer_1D))
7986
write(character_self, *) self%integer_1D
@@ -89,6 +96,9 @@
8996
else if (allocated(self%complex_2D)) then
9097
character_self = repeat(" ", ncopies = single_number_width*size(self%complex_2D))
9198
write(character_self, *) self%complex_2D
99+
else if (allocated(self%complex_double_2D)) then
100+
character_self = repeat(" ", ncopies = single_number_width*size(self%complex_double_2D))
101+
write(character_self, *) self%complex_double_2D
92102
else if (allocated(self%integer_2D)) then
93103
character_self = repeat(" ", ncopies = single_number_width*size(self%integer_2D))
94104
write(character_self, *) self%integer_2D
@@ -101,9 +111,12 @@
101111
else if (allocated(self%double_precision_2D)) then
102112
character_self = repeat(" ", ncopies = single_number_width*size(self%double_precision_2D))
103113
write(character_self, *) self%double_precision_2D
104-
else if (allocated(self%complex_2D)) then
114+
else if (allocated(self%complex_3D)) then
105115
character_self = repeat(" ", ncopies = single_number_width*size(self%complex_3D))
106116
write(character_self, *) self%complex_3D
117+
else if (allocated(self%complex_double_3D)) then
118+
character_self = repeat(" ", ncopies = single_number_width*size(self%complex_double_3D))
119+
write(character_self, *) self%complex_double_3D
107120
else if (allocated(self%integer_3D)) then
108121
character_self = repeat(" ", ncopies = single_number_width*size(self%integer_3D))
109122
write(character_self, *) self%integer_3D

0 commit comments

Comments
 (0)