PB3D
[2.45]
Ideal linear high-n MHD stability in 3-D
|
Go to the documentation of this file.
17 elemental character(len=max_str_ln) function i2str(k)
19 integer,
intent(in) :: k
29 elemental character(len=max_str_ln) function ii2str(k)
31 integer(kind=8),
intent(in) :: k
41 elemental character(len=max_str_ln) function r2str(k)
43 real(
dp),
intent(in) :: k
45 write (
r2str,
'(ES23.16)') k
53 elemental character(len=max_str_ln) function r2strt(k)
55 real(
dp),
intent(in) :: k
57 write (
r2strt,
'(ES9.2)') k
65 elemental character(len=max_str_ln) function c2str(k)
67 complex(dp),
intent(in) :: k
70 character(len=max_str_ln) :: dum_str
72 write (
c2str,
'(ES23.16)') rp(k)
73 write (dum_str,
'(ES23.16)') abs(imag(k))
74 if (imag(k).lt.0)
then
87 elemental character(len=max_str_ln) function c2strt(k)
89 complex(dp),
intent(in) :: k
92 character(len=max_str_ln) :: dum_str
94 write (
c2strt,
'(ES9.2)') rp(k)
95 write (dum_str,
'(ES9.2)') abs(imag(k))
96 if (imag(k).lt.0)
then
108 function strh2l(input_string)
result(output_string)
110 character(*),
intent(in) :: input_string
111 character(len(input_string)) :: output_string
115 character(*),
parameter :: lower_case =
'abcdefghijklmnopqrstuvwxyz'
116 character(*),
parameter :: upper_case =
'ABCDEFGHIJKLMNOPQRSTUVWXYZ'
119 output_string = input_string
122 do i = 1, len(output_string)
123 n = index(upper_case, output_string(i:i))
124 if ( n /= 0 ) output_string(i:i) = lower_case(n:n)
130 function strl2h(input_string)
result(output_string)
132 character(*),
intent(in) :: input_string
133 character(len(input_string)) :: output_string
137 character(*),
parameter :: lower_case =
'abcdefghijklmnopqrstuvwxyz'
138 character(*),
parameter :: upper_case =
'ABCDEFGHIJKLMNOPQRSTUVWXYZ'
141 output_string = input_string
144 do i = 1, len(output_string)
145 n = index(lower_case, output_string(i:i))
146 if ( n /= 0 ) output_string(i:i) = upper_case(n:n)
153 character(*),
intent(in) :: input_strings(:)
154 character((len(input_strings)+2)*size(input_strings)) ::
merge_strings
160 if (
size(input_strings).gt.0)
then
164 do id = 2,
size(input_strings)
166 &trim(input_strings(id))
integer, parameter, public dp
double precision
elemental character(len=max_str_ln) function, public ii2str(k)
Convert an integer to string.
Numerical variables used by most other modules.
integer, parameter, public max_str_ln
maximum length of strings
elemental character(len=max_str_ln) function, public i2str(k)
Convert an integer to string.
elemental character(len=max_str_ln) function, public r2strt(k)
Convert a real (double) to string.
character(len(input_string)) function, public strh2l(input_string)
Convert a string to lowercase.
character(len(input_string)) function, public strl2h(input_string)
convert a string to uppercase.
elemental character(len=max_str_ln) function, public r2str(k)
Convert a real (double) to string.
elemental character(len=max_str_ln) function, public c2strt(k)
Convert a complex (double) to string.
character((len(input_strings)+2) *size(input_strings)) function, public merge_strings(input_strings)
Merge array of strings.
elemental character(len=max_str_ln) function, public c2str(k)
Convert a complex (double) to string.