ParameterLists.f90 679 KB
Newer Older
1
!++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++!
2
3
4
5
6
7
!                          Futility Development Group                          !
!                             All rights reserved.                             !
!                                                                              !
! Futility is a jointly-maintained, open-source project between the University !
! of Michigan and Oak Ridge National Laboratory.  The copyright and license    !
! can be found in LICENSE.txt in the head directory of this repository.        !
8
!++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++!
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
!> @brief This module defines a parameter type object.
!>
!> The purpose of this object is to facilitate encapsulation of an arbitrary
!> number of parameters that may have varying types of values into one object
!> which can be more easily passed around between different code.
!>
!> The object is self-referential which means it can contain objects of the
!> same type as itself. This allows for nested lists of parameters. A parameter
!> is defined by a name, a datatype, an optional description, and a value.
!> The value attribute is polymorphic so that it can be a single integer
!> or an array of double precision reals or a list of other parameters.
!>
!> This module only makes public the base parameter type and it's assignment
!> operation and the exception handler for the module. The base parameter
!> type includes methods for initialization to a specific type, editing the
!> contents of parameter, clearing the contents of a parameter, getting or
!> setting values of existing parameters (or subparameters) and the ability to
!> add or delete parameters nested within other parameters.
27
!>
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
!> The parameters are searched and matched using the name attribute and the
!> matching is not case sensitive.
!>
!> The supported extended parameter types accept the following types of values:
!>  - a list of parameters
!>  - scalar logicals
!>  - @ref Strings::StringType "StringTypes"
!>  - scalar 32-bit integers
!>  - scalar 64-bit integers
!>  - scalar single precision reals
!>  - scalar double precision reals
!>  - 1-D arrays of logicals
!>  - 1-D arrays of 32-bit integers
!>  - 1-D arrays of 64-bit integers
!>  - 1-D arrays of single precision reals
!>  - 1-D arrays of double precision reals
44
!>  - 1-D arrays of "StringTypes"
45
46
47
48
!>  - 2-D arrays of 32-bit integers
!>  - 2-D arrays of 64-bit integers
!>  - 2-D arrays of single precision reals
!>  - 2-D arrays of double precision reals
49
!>  - 2-D arrays of "StringTypes"
50
51
52
53
!>  - 3-D arrays of 32-bit integers
!>  - 3-D arrays of 64-bit integers
!>  - 3-D arrays of single precision reals
!>  - 3-D arrays of double precision reals
54
!>  - 3-D arrays of "StringTypes"
Graham, Aaron's avatar
Graham, Aaron committed
55
56
57
58
!>  - 4-D arrays of 32-bit integers
!>  - 4-D arrays of 64-bit integers
!>  - 4-D arrays of single precision reals
!>  - 4-D arrays of double precision reals
Graham, Aaron's avatar
Graham, Aaron committed
59
60
61
62
63
64
65
66
67
68
69
70
!>  - 5-D arrays of 32-bit integers
!>  - 5-D arrays of 64-bit integers
!>  - 5-D arrays of single precision reals
!>  - 5-D arrays of double precision reals
!>  - 6-D arrays of 32-bit integers
!>  - 6-D arrays of 64-bit integers
!>  - 6-D arrays of single precision reals
!>  - 6-D arrays of double precision reals
!>  - 7-D arrays of 32-bit integers
!>  - 7-D arrays of 64-bit integers
!>  - 7-D arrays of single precision reals
!>  - 7-D arrays of double precision reals
71
72
!++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++!
MODULE ParameterLists
73
#include "UnitTest.h"
Graham, Aaron's avatar
Graham, Aaron committed
74
75
76
77
78
79
80
USE ISO_FORTRAN_ENV
USE UnitTest
USE IntrType
USE Strings
USE ExceptionHandler
USE IO_Strings
USE FileType_XML
81
#ifdef FUTILITY_HAVE_Trilinos
Graham, Aaron's avatar
Graham, Aaron committed
82
USE ForTeuchos_ParameterList
83
#endif
84

Graham, Aaron's avatar
Graham, Aaron committed
85
86
IMPLICIT NONE
PRIVATE !Default private for module contents
87
88
!
! List of Public items
Graham, Aaron's avatar
Graham, Aaron committed
89
90
PUBLIC :: eParams
PUBLIC :: ParamType
Graham, Aaron's avatar
Graham, Aaron committed
91
PUBLIC :: ParamTypePtr
Graham, Aaron's avatar
Graham, Aaron committed
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
PUBLIC :: ASSIGNMENT(=)
PUBLIC :: OPERATOR(==)

PUBLIC :: char_to_int_array
PUBLIC :: char_to_double_array
PUBLIC :: char_to_string_array

!> The module name
CHARACTER(LEN=*),PARAMETER :: modName='PARAMETERLISTS'
INTEGER(SIK),PARAMETER :: MAX_1D_LEN=10

!> Verification enumerations
INTEGER(SIK),PARAMETER :: VALIDTYPE_VALIDATE=0
INTEGER(SIK),PARAMETER :: VALIDTYPE_VERIFYTEST=1
INTEGER(SIK),PARAMETER :: VALIDTYPE_VERIFYLIST=2

!> Exception handler for the module
TYPE(ExceptionHandlerType),SAVE :: eParams

!> @brief Derived type for a parameter object
!>
!> This is an object which encapsulates a polymorphic value which so that the
!> parameter value can be any number of things e.g.  a real scalar, an integer
!> array, a logical, a string, etc.
!>
!> This type should not have an @c init operation as it logically does not
!> make any sense. For all extended types the @c edit and @c clear methods
!> should be overwritten.
TYPE :: ParamType
  !> @brief The name of the parameter
  !>
  !> Set through input arguments
  TYPE(StringType) :: name
  !> @brief The data type for the parameter
126
  !>
Graham, Aaron's avatar
Graham, Aaron committed
127
128
129
130
131
  !> Set internally.
  TYPE(StringType) :: dataType
  !> An optional description for the parameter
  TYPE(StringType) :: description
  !> @brief The parameter value
132
  !>
Graham, Aaron's avatar
Graham, Aaron committed
133
134
135
136
  !> This is only allocated for variables of TYPE(ParamType) for any
  !> extended type it is the additional attribute that should be
  !> accessed.
  CLASS(ParamType),POINTER :: pdat => NULL()
137
138
!
!List of type bound procedures
Graham, Aaron's avatar
Graham, Aaron committed
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
  CONTAINS
    !> @copybrief ParameterLists::init_ParamType_List
    !> @copydoc ParameterLists::init_ParamType_List
    PROCEDURE,PASS,PRIVATE :: initParamList => init_ParamType_List
    !> @copybrief ParameterLists::init_ParamType_SSK
    !> @copydoc ParameterLists::init_ParamType_SSK
    PROCEDURE,PASS,PRIVATE :: initSSK => init_ParamType_SSK
    !> @copybrief ParameterLists::init_ParamType_SDK
    !> @copydoc ParameterLists::init_ParamType_SDK
    PROCEDURE,PASS,PRIVATE :: initSDK => init_ParamType_SDK
    !> @copybrief ParameterLists::init_ParamType_SNK
    !> @copydoc ParameterLists::init_ParamType_SNK
    PROCEDURE,PASS,PRIVATE :: initSNK => init_ParamType_SNK
    !> @copybrief ParameterLists::init_ParamType_SLK
    !> @copydoc ParameterLists::init_ParamType_SLK
    PROCEDURE,PASS,PRIVATE :: initSLK => init_ParamType_SLK
    !> @copybrief ParameterLists::init_ParamType_SBK
    !> @copydoc ParameterLists::init_ParamType_SBK
    PROCEDURE,PASS,PRIVATE :: initSBK => init_ParamType_SBK
    !> @copybrief ParameterLists::init_ParamType_STR
    !> @copydoc ParameterLists::init_ParamType_STR
    PROCEDURE,PASS,PRIVATE :: initSTR => init_ParamType_STR
    !> @copybrief ParameterLists::init_ParamType_CHAR
    !> @copydoc ParameterLists::init_ParamType_CHAR
    PROCEDURE,PASS,PRIVATE :: initCHAR => init_ParamType_CHAR
    !> @copybrief ParameterLists::init_ParamType_SSK_a1
    !> @copydoc ParameterLists::init_ParamType_SSK_a1
    PROCEDURE,PASS,PRIVATE :: initSSKa1 => init_ParamType_SSK_a1
    !> @copybrief ParameterLists::init_ParamType_SDK_a1
    !> @copydoc ParameterLists::init_ParamType_SDK_a1
    PROCEDURE,PASS,PRIVATE :: initSDKa1 => init_ParamType_SDK_a1
    !> @copybrief ParameterLists::init_ParamType_SNK_a1
    !> @copydoc ParameterLists::init_ParamType_SNK_a1
    PROCEDURE,PASS,PRIVATE :: initSNKa1 => init_ParamType_SNK_a1
    !> @copybrief ParameterLists::init_ParamType_SLK_a1
    !> @copydoc ParameterLists::init_ParamType_SLK_a1
    PROCEDURE,PASS,PRIVATE :: initSLKa1 => init_ParamType_SLK_a1
    !> @copybrief ParameterLists::init_ParamType_SBK_a1
    !> @copydoc ParameterLists::init_ParamType_SBK_a1
    PROCEDURE,PASS,PRIVATE :: initSBKa1 => init_ParamType_SBK_a1
    !> @copybrief ParameterLists::init_ParamType_STR_a1
    !> @copydoc ParameterLists::init_ParamType_STR_a1
    PROCEDURE,PASS,PRIVATE :: initSTRa1 => init_ParamType_STR_a1
    !> @copybrief ParameterLists::init_ParamType_SSK_a2
    !> @copydoc ParameterLists::init_ParamType_SSK_a2
    PROCEDURE,PASS,PRIVATE :: initSSKa2 => init_ParamType_SSK_a2
    !> @copybrief ParameterLists::init_ParamType_SDK_a2
    !> @copydoc ParameterLists::init_ParamType_SDK_a2
    PROCEDURE,PASS,PRIVATE :: initSDKa2 => init_ParamType_SDK_a2
    !> @copybrief ParameterLists::init_ParamType_SNK_a2
    !> @copydoc ParameterLists::init_ParamType_SNK_a2
    PROCEDURE,PASS,PRIVATE :: initSNKa2 => init_ParamType_SNK_a2
    !> @copybrief ParameterLists::init_ParamType_SLK_a2
    !> @copydoc ParameterLists::init_ParamType_SLK_a2
    PROCEDURE,PASS,PRIVATE :: initSLKa2 => init_ParamType_SLK_a2
    !> @copybrief ParameterLists::init_ParamType_STR_a2
    !> @copydoc ParameterLists::init_ParamType_STR_a2
    PROCEDURE,PASS,PRIVATE :: initSTRa2 => init_ParamType_STR_a2
    !> @copybrief ParameterLists::init_ParamType_SSK_a3
    !> @copydoc ParameterLists::init_ParamType_SSK_a3
    PROCEDURE,PASS,PRIVATE :: initSSKa3 => init_ParamType_SSK_a3
    !> @copybrief ParameterLists::init_ParamType_SDK_a3
    !> @copydoc ParameterLists::init_ParamType_SDK_a3
    PROCEDURE,PASS,PRIVATE :: initSDKa3 => init_ParamType_SDK_a3
    !> @copybrief ParameterLists::init_ParamType_SNK_a3
    !> @copydoc ParameterLists::init_ParamType_SNK_a3
    PROCEDURE,PASS,PRIVATE :: initSNKa3 => init_ParamType_SNK_a3
    !> @copybrief ParameterLists::init_ParamType_SLK_a3
    !> @copydoc ParameterLists::init_ParamType_SLK_a3
    PROCEDURE,PASS,PRIVATE :: initSLKa3 => init_ParamType_SLK_a3
209
210
211
    !> @copybrief ParameterLists::init_ParamType_STR_a3
    !> @copydoc ParameterLists::init_ParamType_STR_a3
    PROCEDURE,PASS,PRIVATE :: initSTRa3 => init_ParamType_STR_a3
Graham, Aaron's avatar
Graham, Aaron committed
212
213
214
215
216
217
218
219
220
221
222
223
    !> @copybrief ParameterLists::init_ParamType_SSK_a4
    !> @copydoc ParameterLists::init_ParamType_SSK_a4
    PROCEDURE,PASS,PRIVATE :: initSSKa4 => init_ParamType_SSK_a4
    !> @copybrief ParameterLists::init_ParamType_SDK_a4
    !> @copydoc ParameterLists::init_ParamType_SDK_a4
    PROCEDURE,PASS,PRIVATE :: initSDKa4 => init_ParamType_SDK_a4
    !> @copybrief ParameterLists::init_ParamType_SNK_a4
    !> @copydoc ParameterLists::init_ParamType_SNK_a4
    PROCEDURE,PASS,PRIVATE :: initSNKa4 => init_ParamType_SNK_a4
    !> @copybrief ParameterLists::init_ParamType_SLK_a4
    !> @copydoc ParameterLists::init_ParamType_SLK_a4
    PROCEDURE,PASS,PRIVATE :: initSLKa4 => init_ParamType_SLK_a4
Graham, Aaron's avatar
Graham, Aaron committed
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
    !> @copybrief ParameterLists::init_ParamType_SSK_a5
    !> @copydoc ParameterLists::init_ParamType_SSK_a5
    PROCEDURE,PASS,PRIVATE :: initSSKa5 => init_ParamType_SSK_a5
    !> @copybrief ParameterLists::init_ParamType_SDK_a5
    !> @copydoc ParameterLists::init_ParamType_SDK_a5
    PROCEDURE,PASS,PRIVATE :: initSDKa5 => init_ParamType_SDK_a5
    !> @copybrief ParameterLists::init_ParamType_SNK_a5
    !> @copydoc ParameterLists::init_ParamType_SNK_a5
    PROCEDURE,PASS,PRIVATE :: initSNKa5 => init_ParamType_SNK_a5
    !> @copybrief ParameterLists::init_ParamType_SLK_a5
    !> @copydoc ParameterLists::init_ParamType_SLK_a5
    PROCEDURE,PASS,PRIVATE :: initSLKa5 => init_ParamType_SLK_a5
    !> @copybrief ParameterLists::init_ParamType_SSK_a6
    !> @copydoc ParameterLists::init_ParamType_SSK_a6
    PROCEDURE,PASS,PRIVATE :: initSSKa6 => init_ParamType_SSK_a6
    !> @copybrief ParameterLists::init_ParamType_SDK_a6
    !> @copydoc ParameterLists::init_ParamType_SDK_a6
    PROCEDURE,PASS,PRIVATE :: initSDKa6 => init_ParamType_SDK_a6
    !> @copybrief ParameterLists::init_ParamType_SNK_a6
    !> @copydoc ParameterLists::init_ParamType_SNK_a6
    PROCEDURE,PASS,PRIVATE :: initSNKa6 => init_ParamType_SNK_a6
    !> @copybrief ParameterLists::init_ParamType_SLK_a6
    !> @copydoc ParameterLists::init_ParamType_SLK_a6
    PROCEDURE,PASS,PRIVATE :: initSLKa6 => init_ParamType_SLK_a6
    !> @copybrief ParameterLists::init_ParamType_SSK_a7
    !> @copydoc ParameterLists::init_ParamType_SSK_a7
    PROCEDURE,PASS,PRIVATE :: initSSKa7 => init_ParamType_SSK_a7
    !> @copybrief ParameterLists::init_ParamType_SDK_a7
    !> @copydoc ParameterLists::init_ParamType_SDK_a7
    PROCEDURE,PASS,PRIVATE :: initSDKa7 => init_ParamType_SDK_a7
    !> @copybrief ParameterLists::init_ParamType_SNK_a7
    !> @copydoc ParameterLists::init_ParamType_SNK_a7
    PROCEDURE,PASS,PRIVATE :: initSNKa7 => init_ParamType_SNK_a7
    !> @copybrief ParameterLists::init_ParamType_SLK_a7
    !> @copydoc ParameterLists::init_ParamType_SLK_a7
    PROCEDURE,PASS,PRIVATE :: initSLKa7 => init_ParamType_SLK_a7
Graham, Aaron's avatar
Graham, Aaron committed
260
261
262
263
    !> Generic type bound interface for all @c init operations
    GENERIC :: init => initParamList,initSSK,initSDK,initSNK,initSLK, &
        initSBK,initSTR,initCHAR,initSSKa1,initSDKa1,initSNKa1, &
        initSLKa1,initSBKa1,initSTRa1,initSSKa2,initSDKa2,initSNKa2, &
Graham, Aaron's avatar
Graham, Aaron committed
264
        initSLKa2,initSTRa2,initSSKa3,initSDKa3,initSNKa3,initSLKa3, &
265
266
267
        initSTRa3,initSSKa4,initSDKa4,initSNKa4,initSLKa4,initSSKa5, &
        initSDKa5,initSNKa5,initSLKa5,initSSKa6,initSDKa6,initSNKa6, &
        initSLKa6,initSSKa7,initSDKa7,initSNKa7,initSLKa7
Graham, Aaron's avatar
Graham, Aaron committed
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
    PROCEDURE,PASS :: initFromXML
    !> @copybrief ParameterLists::set_ParamType_List
    !> @copydoc ParameterLists::set_ParamType_List
    PROCEDURE,PASS,PRIVATE :: setParamList => set_ParamType_List
    !> @copybrief ParameterLists::set_ParamType_SSK
    !> @copydoc ParameterLists::set_ParamType_SSK
    PROCEDURE,PASS,PRIVATE :: setSSK => set_ParamType_SSK
    !> @copybrief ParameterLists::set_ParamType_SDK
    !> @copydoc ParameterLists::set_ParamType_SDK
    PROCEDURE,PASS,PRIVATE :: setSDK => set_ParamType_SDK
    !> @copybrief ParameterLists::set_ParamType_SNK
    !> @copydoc ParameterLists::set_ParamType_SNK
    PROCEDURE,PASS,PRIVATE :: setSNK => set_ParamType_SNK
    !> @copybrief ParameterLists::set_ParamType_SLK
    !> @copydoc ParameterLists::set_ParamType_SLK
    PROCEDURE,PASS,PRIVATE :: setSLK => set_ParamType_SLK
    !> @copybrief ParameterLists::set_ParamType_SBK
    !> @copydoc ParameterLists::set_ParamType_SBK
    PROCEDURE,PASS,PRIVATE :: setSBK => set_ParamType_SBK
    !> @copybrief ParameterLists::set_ParamType_STR
    !> @copydoc ParameterLists::set_ParamType_STR
    PROCEDURE,PASS,PRIVATE :: setSTR => set_ParamType_STR
    !> @copybrief ParameterLists::set_ParamType_CHAR
    !> @copydoc ParameterLists::set_ParamType_CHAR
    PROCEDURE,PASS,PRIVATE :: setCHAR => set_ParamType_CHAR
    !> @copybrief ParameterLists::set_ParamType_SSK_a1
    !> @copydoc ParameterLists::set_ParamType_SSK_a1
    PROCEDURE,PASS,PRIVATE :: setSSKa1 => set_ParamType_SSK_a1
    !> @copybrief ParameterLists::set_ParamType_SDK_a1
    !> @copydoc ParameterLists::set_ParamType_SDK_a1
    PROCEDURE,PASS,PRIVATE :: setSDKa1 => set_ParamType_SDK_a1
    !> @copybrief ParameterLists::set_ParamType_SNK_a1
    !> @copydoc ParameterLists::set_ParamType_SNK_a1
    PROCEDURE,PASS,PRIVATE :: setSNKa1 => set_ParamType_SNK_a1
    !> @copybrief ParameterLists::set_ParamType_SLK_a1
    !> @copydoc ParameterLists::set_ParamType_SLK_a1
    PROCEDURE,PASS,PRIVATE :: setSLKa1 => set_ParamType_SLK_a1
    !> @copybrief ParameterLists::set_ParamType_SBK_a1
    !> @copydoc ParameterLists::set_ParamType_SBK_a1
    PROCEDURE,PASS,PRIVATE :: setSBKa1 => set_ParamType_SBK_a1
    !> @copybrief ParameterLists::set_ParamType_STR_a1
    !> @copydoc ParameterLists::set_ParamType_STR_a1
    PROCEDURE,PASS,PRIVATE :: setSTRa1 => set_ParamType_STR_a1
    !> @copybrief ParameterLists::set_ParamType_SSK_a2
    !> @copydoc ParameterLists::set_ParamType_SSK_a2
    PROCEDURE,PASS,PRIVATE :: setSSKa2 => set_ParamType_SSK_a2
    !> @copybrief ParameterLists::set_ParamType_SDK_a2
    !> @copydoc ParameterLists::set_ParamType_SDK_a2
    PROCEDURE,PASS,PRIVATE :: setSDKa2 => set_ParamType_SDK_a2
    !> @copybrief ParameterLists::set_ParamType_SNK_a2
    !> @copydoc ParameterLists::set_ParamType_SNK_a2
    PROCEDURE,PASS,PRIVATE :: setSNKa2 => set_ParamType_SNK_a2
    !> @copybrief ParameterLists::set_ParamType_SLK_a2
    !> @copydoc ParameterLists::set_ParamType_SLK_a2
    PROCEDURE,PASS,PRIVATE :: setSLKa2 => set_ParamType_SLK_a2
    !> @copybrief ParameterLists::set_ParamType_STR_a2
    !> @copydoc ParameterLists::set_ParamType_STR_a2
    PROCEDURE,PASS,PRIVATE :: setSTRa2 => set_ParamType_STR_a2
    !> @copybrief ParameterLists::set_ParamType_SSK_a3
    !> @copydoc ParameterLists::set_ParamType_SSK_a3
    PROCEDURE,PASS,PRIVATE :: setSSKa3 => set_ParamType_SSK_a3
    !> @copybrief ParameterLists::set_ParamType_SDK_a3
    !> @copydoc ParameterLists::set_ParamType_SDK_a3
    PROCEDURE,PASS,PRIVATE :: setSDKa3 => set_ParamType_SDK_a3
    !> @copybrief ParameterLists::set_ParamType_SNK_a3
    !> @copydoc ParameterLists::set_ParamType_SNK_a3
    PROCEDURE,PASS,PRIVATE :: setSNKa3 => set_ParamType_SNK_a3
    !> @copybrief ParameterLists::set_ParamType_SLK_a3
    !> @copydoc ParameterLists::set_ParamType_SLK_a3
    PROCEDURE,PASS,PRIVATE :: setSLKa3 => set_ParamType_SLK_a3
338
339
340
    !> @copybrief ParameterLists::set_ParamType_STR_a3
    !> @copydoc ParameterLists::set_ParamType_STR_a3
    PROCEDURE,PASS,PRIVATE :: setSTRa3 => set_ParamType_STR_a3
Graham, Aaron's avatar
Graham, Aaron committed
341
342
343
344
345
346
347
348
349
350
351
352
    !> @copybrief ParameterLists::set_ParamType_SSK_a4
    !> @copydoc ParameterLists::set_ParamType_SSK_a4
    PROCEDURE,PASS,PRIVATE :: setSSKa4 => set_ParamType_SSK_a4
    !> @copybrief ParameterLists::set_ParamType_SDK_a4
    !> @copydoc ParameterLists::set_ParamType_SDK_a4
    PROCEDURE,PASS,PRIVATE :: setSDKa4 => set_ParamType_SDK_a4
    !> @copybrief ParameterLists::set_ParamType_SNK_a4
    !> @copydoc ParameterLists::set_ParamType_SNK_a4
    PROCEDURE,PASS,PRIVATE :: setSNKa4 => set_ParamType_SNK_a4
    !> @copybrief ParameterLists::set_ParamType_SLK_a4
    !> @copydoc ParameterLists::set_ParamType_SLK_a4
    PROCEDURE,PASS,PRIVATE :: setSLKa4 => set_ParamType_SLK_a4
Graham, Aaron's avatar
Graham, Aaron committed
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
    !> @copybrief ParameterLists::set_ParamType_SSK_a5
    !> @copydoc ParameterLists::set_ParamType_SSK_a5
    PROCEDURE,PASS,PRIVATE :: setSSKa5 => set_ParamType_SSK_a5
    !> @copybrief ParameterLists::set_ParamType_SDK_a5
    !> @copydoc ParameterLists::set_ParamType_SDK_a5
    PROCEDURE,PASS,PRIVATE :: setSDKa5 => set_ParamType_SDK_a5
    !> @copybrief ParameterLists::set_ParamType_SNK_a5
    !> @copydoc ParameterLists::set_ParamType_SNK_a5
    PROCEDURE,PASS,PRIVATE :: setSNKa5 => set_ParamType_SNK_a5
    !> @copybrief ParameterLists::set_ParamType_SLK_a5
    !> @copydoc ParameterLists::set_ParamType_SLK_a5
    PROCEDURE,PASS,PRIVATE :: setSLKa5 => set_ParamType_SLK_a5
    !> @copybrief ParameterLists::set_ParamType_SSK_a6
    !> @copydoc ParameterLists::set_ParamType_SSK_a6
    PROCEDURE,PASS,PRIVATE :: setSSKa6 => set_ParamType_SSK_a6
    !> @copybrief ParameterLists::set_ParamType_SDK_a6
    !> @copydoc ParameterLists::set_ParamType_SDK_a6
    PROCEDURE,PASS,PRIVATE :: setSDKa6 => set_ParamType_SDK_a6
    !> @copybrief ParameterLists::set_ParamType_SNK_a6
    !> @copydoc ParameterLists::set_ParamType_SNK_a6
    PROCEDURE,PASS,PRIVATE :: setSNKa6 => set_ParamType_SNK_a6
    !> @copybrief ParameterLists::set_ParamType_SLK_a6
    !> @copydoc ParameterLists::set_ParamType_SLK_a6
    PROCEDURE,PASS,PRIVATE :: setSLKa6 => set_ParamType_SLK_a6
    !> @copybrief ParameterLists::set_ParamType_SSK_a7
    !> @copydoc ParameterLists::set_ParamType_SSK_a7
    PROCEDURE,PASS,PRIVATE :: setSSKa7 => set_ParamType_SSK_a7
    !> @copybrief ParameterLists::set_ParamType_SDK_a7
    !> @copydoc ParameterLists::set_ParamType_SDK_a7
    PROCEDURE,PASS,PRIVATE :: setSDKa7 => set_ParamType_SDK_a7
    !> @copybrief ParameterLists::set_ParamType_SNK_a7
    !> @copydoc ParameterLists::set_ParamType_SNK_a7
    PROCEDURE,PASS,PRIVATE :: setSNKa7 => set_ParamType_SNK_a7
    !> @copybrief ParameterLists::set_ParamType_SLK_a7
    !> @copydoc ParameterLists::set_ParamType_SLK_a7
    PROCEDURE,PASS,PRIVATE :: setSLKa7 => set_ParamType_SLK_a7
Graham, Aaron's avatar
Graham, Aaron committed
389
390
391
392
    !> Generic type bound interface for all @c set operations
    GENERIC :: set => setParamList,setSSK,setSDK,setSNK,setSLK, &
        setSBK,setSTR,setCHAR,setSSKa1,setSDKa1,setSNKa1, &
        setSLKa1,setSBKa1,setSTRa1,setSSKa2,setSDKa2,setSNKa2, &
Graham, Aaron's avatar
Graham, Aaron committed
393
        setSLKa2,setSTRa2,setSSKa3,setSDKa3,setSNKa3,setSLKa3, &
394
395
396
        setSTRa3,setSSKa4,setSDKa4,setSNKa4,setSLKa4,setSSKa5, &
        setSDKa5,setSNKa5,setSLKa5,setSSKa6,setSDKa6,setSNKa6, &
        setSLKa6,setSSKa7,setSDKa7,setSNKa7,setSLKa7
Graham, Aaron's avatar
Graham, Aaron committed
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
    !> @copybrief ParameterLists::get_ParamType
    !> @copydoc ParameterLists::get_ParamType
    PROCEDURE,PASS,PRIVATE :: getParam => get_ParamType
    !> @copybrief ParameterLists::get_ParamType_List
    !> @copydoc ParameterLists::get_ParamType_List
    PROCEDURE,PASS,PRIVATE :: getParamList => get_ParamType_List
    !> @copybrief ParameterLists::get_ParamType_SSK
    !> @copydoc ParameterLists::get_ParamType_SSK
    PROCEDURE,PASS,PRIVATE :: getSSK => get_ParamType_SSK
    !> @copybrief ParameterLists::get_ParamType_SDK
    !> @copydoc ParameterLists::get_ParamType_SDK
    PROCEDURE,PASS,PRIVATE :: getSDK => get_ParamType_SDK
    !> @copybrief ParameterLists::get_ParamType_SNK
    !> @copydoc ParameterLists::get_ParamType_SNK
    PROCEDURE,PASS,PRIVATE :: getSNK => get_ParamType_SNK
    !> @copybrief ParameterLists::get_ParamType_SLK
    !> @copydoc ParameterLists::get_ParamType_SLK
    PROCEDURE,PASS,PRIVATE :: getSLK => get_ParamType_SLK
    !> @copybrief ParameterLists::get_ParamType_SBK
    !> @copydoc ParameterLists::get_ParamType_SBK
    PROCEDURE,PASS,PRIVATE :: getSBK => get_ParamType_SBK
    !> @copybrief ParameterLists::get_ParamType_STR
    !> @copydoc ParameterLists::get_ParamType_STR
    PROCEDURE,PASS,PRIVATE :: getSTR => get_ParamType_STR
    !> @copybrief ParameterLists::get_ParamType_CHAR
    !> @copydoc ParameterLists::get_ParamType_CHAR
    PROCEDURE,PASS,PRIVATE :: getCHAR => get_ParamType_CHAR
    !> @copybrief ParameterLists::get_ParamType_SSK_a1
    !> @copydoc ParameterLists::get_ParamType_SSK_a1
    PROCEDURE,PASS,PRIVATE :: getSSKa1 => get_ParamType_SSK_a1
    !> @copybrief ParameterLists::get_ParamType_SDK_a1
    !> @copydoc ParameterLists::get_ParamType_SDK_a1
    PROCEDURE,PASS,PRIVATE :: getSDKa1 => get_ParamType_SDK_a1
    !> @copybrief ParameterLists::get_ParamType_SNK_a1
    !> @copydoc ParameterLists::get_ParamType_SNK_a1
    PROCEDURE,PASS,PRIVATE :: getSNKa1 => get_ParamType_SNK_a1
    !> @copybrief ParameterLists::get_ParamType_SLK_a1
    !> @copydoc ParameterLists::get_ParamType_SLK_a1
    PROCEDURE,PASS,PRIVATE :: getSLKa1 => get_ParamType_SLK_a1
    !> @copybrief ParameterLists::get_ParamType_SBK_a1
    !> @copydoc ParameterLists::get_ParamType_SBK_a1
    PROCEDURE,PASS,PRIVATE :: getSBKa1 => get_ParamType_SBK_a1
    !> @copybrief ParameterLists::get_ParamType_STR_a1
    !> @copydoc ParameterLists::get_ParamType_STR_a1
    PROCEDURE,PASS,PRIVATE :: getSTRa1 => get_ParamType_STR_a1
    !> @copybrief ParameterLists::get_ParamType_SSK_a2
    !> @copydoc ParameterLists::get_ParamType_SSK_a2
    PROCEDURE,PASS,PRIVATE :: getSSKa2 => get_ParamType_SSK_a2
    !> @copybrief ParameterLists::get_ParamType_SDK_a2
    !> @copydoc ParameterLists::get_ParamType_SDK_a2
    PROCEDURE,PASS,PRIVATE :: getSDKa2 => get_ParamType_SDK_a2
    !> @copybrief ParameterLists::get_ParamType_SNK_a2
    !> @copydoc ParameterLists::get_ParamType_SNK_a2
    PROCEDURE,PASS,PRIVATE :: getSNKa2 => get_ParamType_SNK_a2
    !> @copybrief ParameterLists::get_ParamType_SLK_a2
    !> @copydoc ParameterLists::get_ParamType_SLK_a2
    PROCEDURE,PASS,PRIVATE :: getSLKa2 => get_ParamType_SLK_a2
    !> @copybrief ParameterLists::get_ParamType_STR_a2
    !> @copydoc ParameterLists::get_ParamType_STR_a2
    PROCEDURE,PASS,PRIVATE :: getSTRa2 => get_ParamType_STR_a2
    !> @copybrief ParameterLists::get_ParamType_SSK_a3
    !> @copydoc ParameterLists::get_ParamType_SSK_a3
    PROCEDURE,PASS,PRIVATE :: getSSKa3 => get_ParamType_SSK_a3
    !> @copybrief ParameterLists::get_ParamType_SDK_a3
    !> @copydoc ParameterLists::get_ParamType_SDK_a3
    PROCEDURE,PASS,PRIVATE :: getSDKa3 => get_ParamType_SDK_a3
    !> @copybrief ParameterLists::get_ParamType_SNK_a3
    !> @copydoc ParameterLists::get_ParamType_SNK_a3
    PROCEDURE,PASS,PRIVATE :: getSNKa3 => get_ParamType_SNK_a3
    !> @copybrief ParameterLists::get_ParamType_SLK_a3
    !> @copydoc ParameterLists::get_ParamType_SLK_a3
    PROCEDURE,PASS,PRIVATE :: getSLKa3 => get_ParamType_SLK_a3
469
470
471
    !> @copybrief ParameterLists::get_ParamType_STR_a3
    !> @copydoc ParameterLists::get_ParamType_STR_a3
    PROCEDURE,PASS,PRIVATE :: getSTRa3 => get_ParamType_STR_a3
Graham, Aaron's avatar
Graham, Aaron committed
472
473
474
475
476
477
478
479
480
481
482
483
    !> @copybrief ParameterLists::get_ParamType_SSK_a4
    !> @copydoc ParameterLists::get_ParamType_SSK_a4
    PROCEDURE,PASS,PRIVATE :: getSSKa4 => get_ParamType_SSK_a4
    !> @copybrief ParameterLists::get_ParamType_SDK_a4
    !> @copydoc ParameterLists::get_ParamType_SDK_a4
    PROCEDURE,PASS,PRIVATE :: getSDKa4 => get_ParamType_SDK_a4
    !> @copybrief ParameterLists::get_ParamType_SNK_a4
    !> @copydoc ParameterLists::get_ParamType_SNK_a4
    PROCEDURE,PASS,PRIVATE :: getSNKa4 => get_ParamType_SNK_a4
    !> @copybrief ParameterLists::get_ParamType_SLK_a4
    !> @copydoc ParameterLists::get_ParamType_SLK_a4
    PROCEDURE,PASS,PRIVATE :: getSLKa4 => get_ParamType_SLK_a4
Graham, Aaron's avatar
Graham, Aaron committed
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
    !> @copybrief ParameterLists::get_ParamType_SSK_a5
    !> @copydoc ParameterLists::get_ParamType_SSK_a5
    PROCEDURE,PASS,PRIVATE :: getSSKa5 => get_ParamType_SSK_a5
    !> @copybrief ParameterLists::get_ParamType_SDK_a5
    !> @copydoc ParameterLists::get_ParamType_SDK_a5
    PROCEDURE,PASS,PRIVATE :: getSDKa5 => get_ParamType_SDK_a5
    !> @copybrief ParameterLists::get_ParamType_SNK_a5
    !> @copydoc ParameterLists::get_ParamType_SNK_a5
    PROCEDURE,PASS,PRIVATE :: getSNKa5 => get_ParamType_SNK_a5
    !> @copybrief ParameterLists::get_ParamType_SLK_a5
    !> @copydoc ParameterLists::get_ParamType_SLK_a5
    PROCEDURE,PASS,PRIVATE :: getSLKa5 => get_ParamType_SLK_a5
    !> @copybrief ParameterLists::get_ParamType_SSK_a6
    !> @copydoc ParameterLists::get_ParamType_SSK_a6
    PROCEDURE,PASS,PRIVATE :: getSSKa6 => get_ParamType_SSK_a6
    !> @copybrief ParameterLists::get_ParamType_SDK_a6
    !> @copydoc ParameterLists::get_ParamType_SDK_a6
    PROCEDURE,PASS,PRIVATE :: getSDKa6 => get_ParamType_SDK_a6
    !> @copybrief ParameterLists::get_ParamType_SNK_a6
    !> @copydoc ParameterLists::get_ParamType_SNK_a6
    PROCEDURE,PASS,PRIVATE :: getSNKa6 => get_ParamType_SNK_a6
    !> @copybrief ParameterLists::get_ParamType_SLK_a6
    !> @copydoc ParameterLists::get_ParamType_SLK_a6
    PROCEDURE,PASS,PRIVATE :: getSLKa6 => get_ParamType_SLK_a6
    !> @copybrief ParameterLists::get_ParamType_SSK_a7
    !> @copydoc ParameterLists::get_ParamType_SSK_a7
    PROCEDURE,PASS,PRIVATE :: getSSKa7 => get_ParamType_SSK_a7
    !> @copybrief ParameterLists::get_ParamType_SDK_a7
    !> @copydoc ParameterLists::get_ParamType_SDK_a7
    PROCEDURE,PASS,PRIVATE :: getSDKa7 => get_ParamType_SDK_a7
    !> @copybrief ParameterLists::get_ParamType_SNK_a7
    !> @copydoc ParameterLists::get_ParamType_SNK_a7
    PROCEDURE,PASS,PRIVATE :: getSNKa7 => get_ParamType_SNK_a7
    !> @copybrief ParameterLists::get_ParamType_SLK_a7
    !> @copydoc ParameterLists::get_ParamType_SLK_a7
    PROCEDURE,PASS,PRIVATE :: getSLKa7 => get_ParamType_SLK_a7
Graham, Aaron's avatar
Graham, Aaron committed
520
521
522
523
    !> Generic type bound interface for all @c get operations
    GENERIC :: get => getParam,getParamList,getSSK,getSDK,getSNK, &
        getSLK,getSBK,getSTR,getCHAR,getSSKa1,getSDKa1,getSNKa1, &
        getSBKa1,getSLKa1,getSTRa1,getSSKa2,getSDKa2,getSNKa2, &
Graham, Aaron's avatar
Graham, Aaron committed
524
        getSLKa2,getSTRa2,getSSKa3,getSDKa3,getSNKa3,getSLKa3, &
525
526
527
        getSTRa3,getSSKa4,getSDKa4,getSNKa4,getSLKa4,getSSKa5, &
        getSDKa5,getSNKa5,getSLKa5,getSSKa6,getSDKa6,getSNKa6, &
        getSLKa6,getSSKa7,getSDKa7,getSNKa7,getSLKa7
Graham, Aaron's avatar
Graham, Aaron committed
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
    !> @copybrief ParameterLists::add_ParamType
    !> @copydoc ParameterLists::add_ParamType
    PROCEDURE,PASS,PRIVATE :: addParam => add_ParamType
    !> @copybrief ParameterLists::add_ParamType_List
    !> @copydoc ParameterLists::add_ParamType_List
    PROCEDURE,PASS,PRIVATE :: addList => add_ParamType_List
    !> @copybrief ParameterLists::add_ParamType_SSK
    !> @copydoc ParameterLists::add_ParamType_SSK
    PROCEDURE,PASS,PRIVATE :: addSSK => add_ParamType_SSK
    !> @copybrief ParameterLists::add_ParamType_SDK
    !> @copydoc ParameterLists::add_ParamType_SDK
    PROCEDURE,PASS,PRIVATE :: addSDK => add_ParamType_SDK
    !> @copybrief ParameterLists::add_ParamType_SNK
    !> @copydoc ParameterLists::add_ParamType_SNK
    PROCEDURE,PASS,PRIVATE :: addSNK => add_ParamType_SNK
    !> @copybrief ParameterLists::add_ParamType_SLK
    !> @copydoc ParameterLists::add_ParamType_SLK
    PROCEDURE,PASS,PRIVATE :: addSLK => add_ParamType_SLK
    !> @copybrief ParameterLists::add_ParamType_SBK
    !> @copydoc ParameterLists::add_ParamType_SBK
    PROCEDURE,PASS,PRIVATE :: addSBK => add_ParamType_SBK
    !> @copybrief ParameterLists::add_ParamType_STR
    !> @copydoc ParameterLists::add_ParamType_STR
    PROCEDURE,PASS,PRIVATE :: addSTR => add_ParamType_STR
    !> @copybrief ParameterLists::add_ParamType_CHAR
    !> @copydoc ParameterLists::add_ParamType_CHAR
    PROCEDURE,PASS,PRIVATE :: addCHAR => add_ParamType_CHAR
    !> @copybrief ParameterLists::add_ParamType_SSK_a1
    !> @copydoc ParameterLists::add_ParamType_SSK_a1
    PROCEDURE,PASS,PRIVATE :: addSSKa1 => add_ParamType_SSK_a1
    !> @copybrief ParameterLists::add_ParamType_SDK_a1
    !> @copydoc ParameterLists::add_ParamType_SDK_a1
    PROCEDURE,PASS,PRIVATE :: addSDKa1 => add_ParamType_SDK_a1
    !> @copybrief ParameterLists::add_ParamType_SNK_a1
    !> @copydoc ParameterLists::add_ParamType_SNK_a1
    PROCEDURE,PASS,PRIVATE :: addSNKa1 => add_ParamType_SNK_a1
    !> @copybrief ParameterLists::add_ParamType_SLK_a1
    !> @copydoc ParameterLists::add_ParamType_SLK_a1
    PROCEDURE,PASS,PRIVATE :: addSLKa1 => add_ParamType_SLK_a1
    !> @copybrief ParameterLists::add_ParamType_SBK_a1
    !> @copydoc ParameterLists::add_ParamType_SBK_a1
    PROCEDURE,PASS,PRIVATE :: addSBKa1 => add_ParamType_SBK_a1
    !> @copybrief ParameterLists::add_ParamType_STR_a1
    !> @copydoc ParameterLists::add_ParamType_STR_a1
    PROCEDURE,PASS,PRIVATE :: addSTRa1 => add_ParamType_STR_a1
    !> @copybrief ParameterLists::add_ParamType_SSK_a2
    !> @copydoc ParameterLists::add_ParamType_SSK_a2
    PROCEDURE,PASS,PRIVATE :: addSSKa2 => add_ParamType_SSK_a2
    !> @copybrief ParameterLists::add_ParamType_SDK_a2
    !> @copydoc ParameterLists::add_ParamType_SDK_a2
    PROCEDURE,PASS,PRIVATE :: addSDKa2 => add_ParamType_SDK_a2
    !> @copybrief ParameterLists::add_ParamType_SNK_a2
    !> @copydoc ParameterLists::add_ParamType_SNK_a2
    PROCEDURE,PASS,PRIVATE :: addSNKa2 => add_ParamType_SNK_a2
    !> @copybrief ParameterLists::add_ParamType_SLK_a2
    !> @copydoc ParameterLists::add_ParamType_SLK_a2
    PROCEDURE,PASS,PRIVATE :: addSLKa2 => add_ParamType_SLK_a2
    !> @copybrief ParameterLists::add_ParamType_STR_a2
    !> @copydoc ParameterLists::add_ParamType_STR_a2
    PROCEDURE,PASS,PRIVATE :: addSTRa2 => add_ParamType_STR_a2
    !> @copybrief ParameterLists::add_ParamType_SSK_a3
    !> @copydoc ParameterLists::add_ParamType_SSK_a3
    PROCEDURE,PASS,PRIVATE :: addSSKa3 => add_ParamType_SSK_a3
    !> @copybrief ParameterLists::add_ParamType_SDK_a3
    !> @copydoc ParameterLists::add_ParamType_SDK_a3
    PROCEDURE,PASS,PRIVATE :: addSDKa3 => add_ParamType_SDK_a3
    !> @copybrief ParameterLists::add_ParamType_SNK_a3
    !> @copydoc ParameterLists::add_ParamType_SNK_a3
    PROCEDURE,PASS,PRIVATE :: addSNKa3 => add_ParamType_SNK_a3
    !> @copybrief ParameterLists::add_ParamType_SLK_a3
    !> @copydoc ParameterLists::add_ParamType_SLK_a3
    PROCEDURE,PASS,PRIVATE :: addSLKa3 => add_ParamType_SLK_a3
600
601
602
    !> @copybrief ParameterLists::add_ParamType_STR_a3
    !> @copydoc ParameterLists::add_ParamType_STR_a3
    PROCEDURE,PASS,PRIVATE :: addSTRa3 => add_ParamType_STR_a3
Graham, Aaron's avatar
Graham, Aaron committed
603
604
605
606
607
608
609
610
611
612
613
614
    !> @copybrief ParameterLists::add_ParamType_SSK_a4
    !> @copydoc ParameterLists::add_ParamType_SSK_a4
    PROCEDURE,PASS,PRIVATE :: addSSKa4 => add_ParamType_SSK_a4
    !> @copybrief ParameterLists::add_ParamType_SDK_a4
    !> @copydoc ParameterLists::add_ParamType_SDK_a4
    PROCEDURE,PASS,PRIVATE :: addSDKa4 => add_ParamType_SDK_a4
    !> @copybrief ParameterLists::add_ParamType_SNK_a4
    !> @copydoc ParameterLists::add_ParamType_SNK_a4
    PROCEDURE,PASS,PRIVATE :: addSNKa4 => add_ParamType_SNK_a4
    !> @copybrief ParameterLists::add_ParamType_SLK_a4
    !> @copydoc ParameterLists::add_ParamType_SLK_a4
    PROCEDURE,PASS,PRIVATE :: addSLKa4 => add_ParamType_SLK_a4
Graham, Aaron's avatar
Graham, Aaron committed
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
    !> @copybrief ParameterLists::add_ParamType_SSK_a5
    !> @copydoc ParameterLists::add_ParamType_SSK_a5
    PROCEDURE,PASS,PRIVATE :: addSSKa5 => add_ParamType_SSK_a5
    !> @copybrief ParameterLists::add_ParamType_SDK_a5
    !> @copydoc ParameterLists::add_ParamType_SDK_a5
    PROCEDURE,PASS,PRIVATE :: addSDKa5 => add_ParamType_SDK_a5
    !> @copybrief ParameterLists::add_ParamType_SNK_a5
    !> @copydoc ParameterLists::add_ParamType_SNK_a5
    PROCEDURE,PASS,PRIVATE :: addSNKa5 => add_ParamType_SNK_a5
    !> @copybrief ParameterLists::add_ParamType_SLK_a5
    !> @copydoc ParameterLists::add_ParamType_SLK_a5
    PROCEDURE,PASS,PRIVATE :: addSLKa5 => add_ParamType_SLK_a5
    !> @copybrief ParameterLists::add_ParamType_SSK_a6
    !> @copydoc ParameterLists::add_ParamType_SSK_a6
    PROCEDURE,PASS,PRIVATE :: addSSKa6 => add_ParamType_SSK_a6
    !> @copybrief ParameterLists::add_ParamType_SDK_a6
    !> @copydoc ParameterLists::add_ParamType_SDK_a6
    PROCEDURE,PASS,PRIVATE :: addSDKa6 => add_ParamType_SDK_a6
    !> @copybrief ParameterLists::add_ParamType_SNK_a6
    !> @copydoc ParameterLists::add_ParamType_SNK_a6
    PROCEDURE,PASS,PRIVATE :: addSNKa6 => add_ParamType_SNK_a6
    !> @copybrief ParameterLists::add_ParamType_SLK_a6
    !> @copydoc ParameterLists::add_ParamType_SLK_a6
    PROCEDURE,PASS,PRIVATE :: addSLKa6 => add_ParamType_SLK_a6
    !> @copybrief ParameterLists::add_ParamType_SSK_a7
    !> @copydoc ParameterLists::add_ParamType_SSK_a7
    PROCEDURE,PASS,PRIVATE :: addSSKa7 => add_ParamType_SSK_a7
    !> @copybrief ParameterLists::add_ParamType_SDK_a7
    !> @copydoc ParameterLists::add_ParamType_SDK_a7
    PROCEDURE,PASS,PRIVATE :: addSDKa7 => add_ParamType_SDK_a7
    !> @copybrief ParameterLists::add_ParamType_SNK_a7
    !> @copydoc ParameterLists::add_ParamType_SNK_a7
    PROCEDURE,PASS,PRIVATE :: addSNKa7 => add_ParamType_SNK_a7
    !> @copybrief ParameterLists::add_ParamType_SLK_a7
    !> @copydoc ParameterLists::add_ParamType_SLK_a7
    PROCEDURE,PASS,PRIVATE :: addSLKa7 => add_ParamType_SLK_a7
Graham, Aaron's avatar
Graham, Aaron committed
651
652
653
654
    !> Generic type bound interface for all @c add operations
    GENERIC :: add => addParam,addList,addSSK,addSDK, &
        addSNK,addSLK,addSBK,addSTR,addCHAR,addSSKa1,addSDKa1, &
        addSNKa1,addSLKa1,addSBKa1,addSTRa1,addSSKa2,addSDKa2, &
Graham, Aaron's avatar
Graham, Aaron committed
655
        addSNKa2,addSLKa2,addSTRa2,addSSKa3,addSDKa3,addSNKa3,addSLKa3, &
656
657
658
        addSTRa3,addSSKa4,addSDKa4,addSNKa4,addSLKa4,addSSKa5, &
        addSDKa5,addSNKa5,addSLKa5,addSSKa6,addSDKa6,addSNKa6, &
        addSLKa6,addSSKa7,addSDKa7,addSNKa7,addSLKa7
Graham, Aaron's avatar
Graham, Aaron committed
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
    !> @copybrief ParameterLists::remove_ParamType
    !> @copydoc ParameterLists::remove_ParamType
    PROCEDURE,PASS :: remove => remove_ParamType
    !> @copybrief ParameterLists::getString_ParamType_scalar
    !> @copydoc ParameterLists::getString_scalar_ParamType_scalar
    PROCEDURE,PASS,PRIVATE :: getString_scalar => getString_ParamType_scalar
    !> @copybrief ParameterLists::getString_ParamType_a1
    !> @copydoc ParameterLists::getString_ParamType_a1
    PROCEDURE,PASS,PRIVATE :: getString_a1 => getString_ParamType_a1
    !> @copybrief ParameterLists::getString_ParamType_a2
    !> @copydoc ParameterLists::getString_ParamType_a2
    PROCEDURE,PASS,PRIVATE :: getString_a2 => getString_ParamType_a2
    !> @copybrief ParameterLists::getString_ParamType_a3
    !> @copydoc ParameterLists::getString_ParamType_a3
    PROCEDURE,PASS,PRIVATE :: getString_a3 => getString_ParamType_a3
    !> Generic type bound interface for all @c getString operations
    GENERIC :: getString => getString_scalar,getString_a1,getString_a2,getString_a3
    !> @copybrief ParameterLists::has_ParamType
    !> @copydoc ParameterLists::has_ParamType
    PROCEDURE,PASS :: has => has_ParamType
    !> @copybrief ParameterLists::convertTo2DStringArray_ParamType
    !> @copydoc ParameterLists::convertTo2DStringArray_ParamType
    PROCEDURE,PASS :: convertTo2DStringArray => convertTo2DStringArray_ParamType
    !> @copybrief ParameterLists::getNextParam_ParamType
    !> @copydoc ParameterLists::getNextParam_ParamType
    PROCEDURE,PASS :: getNextParam => getNextParam_ParamType
    !> @copybrief ParameterLists::getSubParam_List
    !> @copydoc ParameterLists::getSubParam_List
    PROCEDURE,PASS :: getSubPL => getSubParam_List
    !> @copybrief ParameterLists::getSubParams
    !> @copydoc ParameterLists::getSubParams
    PROCEDURE,PASS :: getSubParams => getSubParams
    !> @copybrief ParameterLists::validate_ParamType
    !> @copydoc ParameterLists::validate_ParamType
    PROCEDURE,PASS :: validate => validate_ParamType
    !> @copybrief ParameterLists::verifyTest_ParamType
    !> @copydoc ParameterLists::verifyTest_ParamType
    PROCEDURE,PASS :: verify => verifyTest_ParamType
    !> @copybrief ParameterLists::verifyTest_ParamType
    !> @copydoc ParameterLists::verifyTest_ParamType
    PROCEDURE,PASS :: verifyList => verifyList_ParamType
    !> @copybrief ParameterLists::edit_ParamType
    !> @copydoc ParameterLists::edit_ParamType
    PROCEDURE,PASS :: edit => edit_ParamType
    !> @copybrief ParameterLists::editToXML_ParamType
    !> @copydoc ParameterLists::editToXML_ParamType
    PROCEDURE,PASS :: editToXML => editToXML_ParamType
    !> @copybrief ParameterLists::clear_ParamType
    !> @copydoc ParameterLists::clear_ParamType
    PROCEDURE,PASS :: clear => clear_ParamType
709
#ifdef FUTILITY_HAVE_Trilinos
Graham, Aaron's avatar
Graham, Aaron committed
710
    PROCEDURE,PASS :: toTeuchosPlist
711
#endif
Graham, Aaron's avatar
Graham, Aaron committed
712
PROCEDURE :: procXMLTree
William Gurecky's avatar
William Gurecky committed
713
PROCEDURE :: procFMUXMLTree
Graham, Aaron's avatar
Graham, Aaron committed
714
ENDTYPE ParamType
715

Graham, Aaron's avatar
Graham, Aaron committed
716
717
718
719
720
721
!> @brief Wrapper type for an array of ParamType pointers
TYPE :: ParamTypePtr
  !> Pointer to the ParamType
  CLASS(ParamType),POINTER :: p => NULL()
ENDTYPE ParamTypePtr

Graham, Aaron's avatar
Graham, Aaron committed
722
723
724
725
!> @brief Extended type of a ParamType for defining a list of parameters
TYPE,EXTENDS(ParamType) :: ParamType_List
  !> The list of parameters
  TYPE(ParamType),ALLOCATABLE :: pList(:)
726
727
!
!List of type bound procedures
Graham, Aaron's avatar
Graham, Aaron committed
728
729
730
731
732
733
734
735
736
737
738
739
740
741
  CONTAINS
    !> @copybrief ParameterLists::edit_ParamType_List
    !> @copydoc ParameterLists::edit_ParamType_List
    PROCEDURE,PASS :: edit => edit_ParamType_List
    !> @copybrief ParameterLists::clear_ParamType_List
    !> @copydoc ParameterLists::clear_ParamType_List
    PROCEDURE,PASS :: clear => clear_ParamType_List
ENDTYPE ParamType_List

!> @brief Extended type of a ParamType for defining a parameter that
!> is a single precision real scalar
TYPE,EXTENDS(ParamType) :: ParamType_SSK
  !> The value of the parameter
  REAL(SSK) :: val=0.0_SSK
742
743
!
!List of type bound procedures
Graham, Aaron's avatar
Graham, Aaron committed
744
745
746
747
748
749
750
751
752
753
754
755
756
757
  CONTAINS
    !> @copybrief ParameterLists::edit_ParamType_SSK
    !> @copydoc ParameterLists::edit_ParamType_SSK
    PROCEDURE,PASS :: edit => edit_ParamType_SSK
    !> @copybrief ParameterLists::clear_ParamType_SSK
    !> @copydoc ParameterLists::clear_ParamType_SSK
    PROCEDURE,PASS :: clear => clear_ParamType_SSK
ENDTYPE ParamType_SSK

!> @brief Extended type of a ParamType for defining a parameter that
!> is a double precision real scalar
TYPE,EXTENDS(ParamType) :: ParamType_SDK
  !> The value of the parameter
  REAL(SDK) :: val=0.0_SDK
758
759
!
!List of type bound procedures
Graham, Aaron's avatar
Graham, Aaron committed
760
761
762
763
764
765
766
767
768
769
770
771
772
773
  CONTAINS
    !> @copybrief ParameterLists::edit_ParamType_SDK
    !> @copydoc ParameterLists::edit_ParamType_SDK
    PROCEDURE,PASS :: edit => edit_ParamType_SDK
    !> @copybrief ParameterLists::clear_ParamType_SDK
    !> @copydoc ParameterLists::clear_ParamType_SDK
    PROCEDURE,PASS :: clear => clear_ParamType_SDK
ENDTYPE ParamType_SDK

!> @brief Extended type of a ParamType for defining a parameter that
!> is a 32-bit integer scalar
TYPE,EXTENDS(ParamType) :: ParamType_SNK
  !> The value of the parameter
  INTEGER(SNK) :: val=0_SNK
774
775
!
!List of type bound procedures
Graham, Aaron's avatar
Graham, Aaron committed
776
777
778
779
780
781
782
783
784
785
786
787
788
789
  CONTAINS
    !> @copybrief ParameterLists::edit_ParamType_SNK
    !> @copydoc ParameterLists::edit_ParamType_SNK
    PROCEDURE,PASS :: edit => edit_ParamType_SNK
    !> @copybrief ParameterLists::clear_ParamType_SNK
    !> @copydoc ParameterLists::clear_ParamType_SNK
    PROCEDURE,PASS :: clear => clear_ParamType_SNK
ENDTYPE ParamType_SNK

!> @brief Extended type of a ParamType for defining a parameter that
!> is a 64-bit integer scalar
TYPE,EXTENDS(ParamType) :: ParamType_SLK
  !> The value of the parameter
  INTEGER(SLK) :: val=0_SLK
790
791
!
!List of type bound procedures
Graham, Aaron's avatar
Graham, Aaron committed
792
793
794
795
796
797
798
799
800
801
802
803
804
805
  CONTAINS
    !> @copybrief ParameterLists::edit_ParamType_SLK
    !> @copydoc ParameterLists::edit_ParamType_SLK
    PROCEDURE,PASS :: edit => edit_ParamType_SLK
    !> @copybrief ParameterLists::clear_ParamType_SLK
    !> @copydoc ParameterLists::clear_ParamType_SLK
    PROCEDURE,PASS :: clear => clear_ParamType_SLK
ENDTYPE ParamType_SLK

!> @brief Extended type of a ParamType for defining a parameter that
!> is a logical scalar
TYPE,EXTENDS(ParamType) :: ParamType_SBK
  !> The value of the parameter
  LOGICAL(SBK) :: val=.FALSE.
806
807
!
!List of type bound procedures
Graham, Aaron's avatar
Graham, Aaron committed
808
809
810
811
812
813
814
815
816
817
818
819
820
821
  CONTAINS
    !> @copybrief ParameterLists::edit_ParamType_SBK
    !> @copydoc ParameterLists::edit_ParamType_SBK
    PROCEDURE,PASS :: edit => edit_ParamType_SBK
    !> @copybrief ParameterLists::clear_ParamType_SBK
    !> @copydoc ParameterLists::clear_ParamType_SBK
    PROCEDURE,PASS :: clear => clear_ParamType_SBK
ENDTYPE ParamType_SBK

!> @brief Extended type of a ParamType for defining a parameter that
!> is a string derived type
TYPE,EXTENDS(ParamType) :: ParamType_STR
  !> The value of the parameter
  TYPE(StringType) :: val
822
823
!
!List of type bound procedures
Graham, Aaron's avatar
Graham, Aaron committed
824
825
826
827
828
829
830
831
  CONTAINS
    !> @copybrief ParameterLists::edit_ParamType_STR
    !> @copydoc ParameterLists::edit_ParamType_STR
    PROCEDURE,PASS :: edit => edit_ParamType_STR
    !> @copybrief ParameterLists::clear_ParamType_STR
    !> @copydoc ParameterLists::clear_ParamType_STR
    PROCEDURE,PASS :: clear => clear_ParamType_STR
ENDTYPE ParamType_STR
832
833
834
!----------------------------------------------------------------------
!     One-Dimensional Arrays
!----------------------------------------------------------------------
Graham, Aaron's avatar
Graham, Aaron committed
835
836
837
838
839
!> @brief Extended type of a ParamType for defining a one dimensional
!> array parameter of single precision reals
TYPE,EXTENDS(ParamType) :: ParamType_SSK_a1
  !> The value of the parameter
  REAL(SSK),ALLOCATABLE :: val(:)
840
841
!
!List of type bound procedures
Graham, Aaron's avatar
Graham, Aaron committed
842
843
844
845
846
847
848
849
850
851
852
853
854
855
  CONTAINS
    !> @copybrief ParameterLists::edit_ParamType_SSK_a1
    !> @copydoc ParameterLists::edit_ParamType_SSK_a1
    PROCEDURE,PASS :: edit => edit_ParamType_SSK_a1
    !> @copybrief ParameterLists::clear_ParamType_SSK_a1
    !> @copydoc ParameterLists::clear_ParamType_SSK_a1
    PROCEDURE,PASS :: clear => clear_ParamType_SSK_a1
ENDTYPE ParamType_SSK_a1

!> @brief Extended type of a ParamType for defining a one dimensional
!> array parameter of double precision reals
TYPE,EXTENDS(ParamType) :: ParamType_SDK_a1
  !> The value of the parameter
  REAL(SDK),ALLOCATABLE :: val(:)
856
857
!
!List of type bound procedures
Graham, Aaron's avatar
Graham, Aaron committed
858
859
860
861
862
863
864
865
866
867
868
869
870
871
  CONTAINS
    !> @copybrief ParameterLists::edit_ParamType_SDK_a1
    !> @copydoc ParameterLists::edit_ParamType_SDK_a1
    PROCEDURE,PASS :: edit => edit_ParamType_SDK_a1
    !> @copybrief ParameterLists::clear_ParamType_SDK_a1
    !> @copydoc ParameterLists::clear_ParamType_SDK_a1
    PROCEDURE,PASS :: clear => clear_ParamType_SDK_a1
ENDTYPE ParamType_SDK_a1

!> @brief Extended type of a ParamType for defining a one dimensional
!> array parameter of 32-bit integers
TYPE,EXTENDS(ParamType) :: ParamType_SNK_a1
  !> The value of the parameter
  INTEGER(SNK),ALLOCATABLE :: val(:)
872
873
!
!List of type bound procedures
Graham, Aaron's avatar
Graham, Aaron committed
874
875
876
877
878
879
880
881
882
883
884
885
886
887
  CONTAINS
    !> @copybrief ParameterLists::edit_ParamType_SNK_a1
    !> @copydoc ParameterLists::edit_ParamType_SNK_a1
    PROCEDURE,PASS :: edit => edit_ParamType_SNK_a1
    !> @copybrief ParameterLists::clear_ParamType_SNK_a1
    !> @copydoc ParameterLists::clear_ParamType_SNK_a1
    PROCEDURE,PASS :: clear => clear_ParamType_SNK_a1
ENDTYPE ParamType_SNK_a1

!> @brief Extended type of a ParamType for defining a one dimensional
!> array parameter of 64-bit integers
TYPE,EXTENDS(ParamType) :: ParamType_SLK_a1
  !> The value of the parameter
  INTEGER(SLK),ALLOCATABLE :: val(:)
888
889
!
!List of type bound procedures
Graham, Aaron's avatar
Graham, Aaron committed
890
891
892
893
894
895
896
897
898
899
900
901
902
903
  CONTAINS
    !> @copybrief ParameterLists::edit_ParamType_SLK_a1
    !> @copydoc ParameterLists::edit_ParamType_SLK_a1
    PROCEDURE,PASS :: edit => edit_ParamType_SLK_a1
    !> @copybrief ParameterLists::clear_ParamType_SLK_a1
    !> @copydoc ParameterLists::clear_ParamType_SLK_a1
    PROCEDURE,PASS :: clear => clear_ParamType_SLK_a1
ENDTYPE ParamType_SLK_a1

!> @brief Extended type of a ParamType for defining a one dimensional
!> array parameter of single precision reals
TYPE,EXTENDS(ParamType) :: ParamType_SBK_a1
  !> The value of the parameter
  LOGICAL(SBK),ALLOCATABLE :: val(:)
904
905
!
!List of type bound procedures
Graham, Aaron's avatar
Graham, Aaron committed
906
907
908
909
910
911
912
913
914
915
916
917
918
919
  CONTAINS
    !> @copybrief ParameterLists::edit_ParamType_SBK_a1
    !> @copydoc ParameterLists::edit_ParamType_SBK_a1
    PROCEDURE,PASS :: edit => edit_ParamType_SBK_a1
    !> @copybrief ParameterLists::clear_ParamType_SBK_a1
    !> @copydoc ParameterLists::clear_ParamType_SBK_a1
    PROCEDURE,PASS :: clear => clear_ParamType_SBK_a1
ENDTYPE ParamType_SBK_a1

!> @brief Extended type of a ParamType for defining a one dimensional
!> array parameter that is a string derived type
TYPE,EXTENDS(ParamType) :: ParamType_STR_a1
  !> The value of the parameter
  TYPE(StringType),ALLOCATABLE :: val(:)
920
921
!
!List of type bound procedures
Graham, Aaron's avatar
Graham, Aaron committed
922
923
924
925
926
927
928
929
  CONTAINS
    !> @copybrief ParameterLists::edit_ParamType_STR_a1
    !> @copydoc ParameterLists::edit_ParamType_STR_a1
    PROCEDURE,PASS :: edit => edit_ParamType_STR_a1
    !> @copybrief ParameterLists::clear_ParamType_STR_a1
    !> @copydoc ParameterLists::clear_ParamType_STR_a1
    PROCEDURE,PASS :: clear => clear_ParamType_STR_a1
ENDTYPE ParamType_STR_a1
930

931
932
933
!----------------------------------------------------------------------
!     Two-Dimensional Arrays
!----------------------------------------------------------------------
Graham, Aaron's avatar
Graham, Aaron committed
934
935
936
937
938
!> @brief Extended type of a ParamType for defining a two dimensional
!> array parameter of single precision reals
TYPE,EXTENDS(ParamType) :: ParamType_SSK_a2
  !> The value of the parameter
  REAL(SSK),ALLOCATABLE :: val(:,:)
939
940
!
!List of type bound procedures
Graham, Aaron's avatar
Graham, Aaron committed
941
942
943
944
945
946
947
948
949
950
951
952
953
954
  CONTAINS
    !> @copybrief ParameterLists::edit_ParamType_SSK_a2
    !> @copydoc ParameterLists::edit_ParamType_SSK_a2
    PROCEDURE,PASS :: edit => edit_ParamType_SSK_a2
    !> @copybrief ParameterLists::clear_ParamType_SSK_a2
    !> @copydoc ParameterLists::clear_ParamType_SSK_a2
    PROCEDURE,PASS :: clear => clear_ParamType_SSK_a2
ENDTYPE ParamType_SSK_a2

!> @brief Extended type of a ParamType for defining a two dimensional
!> array parameter of double precision reals
TYPE,EXTENDS(ParamType) :: ParamType_SDK_a2
  !> The value of the parameter
  REAL(SDK),ALLOCATABLE :: val(:,:)
955
956
!
!List of type bound procedures
Graham, Aaron's avatar
Graham, Aaron committed
957
958
959
960
961
962
963
964
965
966
967
968
969
970
  CONTAINS
    !> @copybrief ParameterLists::edit_ParamType_SDK_a2
    !> @copydoc ParameterLists::edit_ParamType_SDK_a2
    PROCEDURE,PASS :: edit => edit_ParamType_SDK_a2
    !> @copybrief ParameterLists::clear_ParamType_SDK_a2
    !> @copydoc ParameterLists::clear_ParamType_SDK_a2
    PROCEDURE,PASS :: clear => clear_ParamType_SDK_a2
ENDTYPE ParamType_SDK_a2

!> @brief Extended type of a ParamType for defining a two dimensional
!> array parameter of 32-bit integers
TYPE,EXTENDS(ParamType) :: ParamType_SNK_a2
  !> The value of the parameter
  INTEGER(SNK),ALLOCATABLE :: val(:,:)
971
972
!
!List of type bound procedures
Graham, Aaron's avatar
Graham, Aaron committed
973
974
975
976
977
978
979
980
981
982
983
984
985
986
  CONTAINS
    !> @copybrief ParameterLists::edit_ParamType_SNK_a2
    !> @copydoc ParameterLists::edit_ParamType_SNK_a2
    PROCEDURE,PASS :: edit => edit_ParamType_SNK_a2
    !> @copybrief ParameterLists::clear_ParamType_SNK_a2
    !> @copydoc ParameterLists::clear_ParamType_SNK_a2
    PROCEDURE,PASS :: clear => clear_ParamType_SNK_a2
ENDTYPE ParamType_SNK_a2

!> @brief Extended type of a ParamType for defining a two dimensional
!> array parameter of 64-bit integers
TYPE,EXTENDS(ParamType) :: ParamType_SLK_a2
  !> The value of the parameter
  INTEGER(SLK),ALLOCATABLE :: val(:,:)
987
988
!
!List of type bound procedures
Graham, Aaron's avatar
Graham, Aaron committed
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
  CONTAINS
    !> @copybrief ParameterLists::edit_ParamType_SLK_a2
    !> @copydoc ParameterLists::edit_ParamType_SLK_a2
    PROCEDURE,PASS :: edit => edit_ParamType_SLK_a2
    !> @copybrief ParameterLists::clear_ParamType_SLK_a2
    !> @copydoc ParameterLists::clear_ParamType_SLK_a2
    PROCEDURE,PASS :: clear => clear_ParamType_SLK_a2
ENDTYPE ParamType_SLK_a2

!> @brief Extended type of a ParamType for defining a two dimensional
!> array parameter that is a string derived type
TYPE,EXTENDS(ParamType) :: ParamType_STR_a2
  !> The value of the parameter
  TYPE(StringType),ALLOCATABLE :: val(:,:)
1003
1004
!
!List of type bound procedures
Graham, Aaron's avatar
Graham, Aaron committed
1005
1006
1007
1008
1009
1010
1011
1012
  CONTAINS
    !> @copybrief ParameterLists::edit_ParamType_STR_a2
    !> @copydoc ParameterLists::edit_ParamType_STR_a2
    PROCEDURE,PASS :: edit => edit_ParamType_STR_a2
    !> @copybrief ParameterLists::clear_ParamType_STR_a2
    !> @copydoc ParameterLists::clear_ParamType_STR_a2
    PROCEDURE,PASS :: clear => clear_ParamType_STR_a2
ENDTYPE ParamType_STR_a2
1013
1014
1015
!----------------------------------------------------------------------
!     Three-Dimensional Arrays
!----------------------------------------------------------------------
Graham, Aaron's avatar
Graham, Aaron committed
1016
1017
1018
1019
1020
!> @brief Extended type of a ParamType for defining a three dimensional
!> array parameter of single precision reals
TYPE,EXTENDS(ParamType) :: ParamType_SSK_a3
  !> The value of the parameter
  REAL(SSK),ALLOCATABLE :: val(:,:,:)
1021
1022
!
!List of type bound procedures
Graham, Aaron's avatar
Graham, Aaron committed
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
  CONTAINS
    !> @copybrief ParameterLists::edit_ParamType_SSK_a3
    !> @copydoc ParameterLists::edit_ParamType_SSK_a3
    PROCEDURE,PASS :: edit => edit_ParamType_SSK_a3
    !> @copybrief ParameterLists::clear_ParamType_SSK_a3
    !> @copydoc ParameterLists::clear_ParamType_SSK_a3
    PROCEDURE,PASS :: clear => clear_ParamType_SSK_a3
ENDTYPE ParamType_SSK_a3

!> @brief Extended type of a ParamType for defining a three dimensional
!> array parameter of double precision reals
TYPE,EXTENDS(ParamType) :: ParamType_SDK_a3
  !> The value of the parameter
  REAL(SDK),ALLOCATABLE :: val(:,:,:)
1037
1038
!
!List of type bound procedures
Graham, Aaron's avatar
Graham, Aaron committed
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
  CONTAINS
    !> @copybrief ParameterLists::edit_ParamType_SDK_a3
    !> @copydoc ParameterLists::edit_ParamType_SDK_a3
    PROCEDURE,PASS :: edit => edit_ParamType_SDK_a3
    !> @copybrief ParameterLists::clear_ParamType_SDK_a3
    !> @copydoc ParameterLists::clear_ParamType_SDK_a3
    PROCEDURE,PASS :: clear => clear_ParamType_SDK_a3
ENDTYPE ParamType_SDK_a3

!> @brief Extended type of a ParamType for defining a three dimensional
!> array parameter of 32-bit integers
TYPE,EXTENDS(ParamType) :: ParamType_SNK_a3
  !> The value of the parameter
  INTEGER(SNK),ALLOCATABLE :: val(:,:,:)
1053
1054
!
!List of type bound procedures
Graham, Aaron's avatar
Graham, Aaron committed
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
  CONTAINS
    !> @copybrief ParameterLists::edit_ParamType_SNK_a3
    !> @copydoc ParameterLists::edit_ParamType_SNK_a3
    PROCEDURE,PASS :: edit => edit_ParamType_SNK_a3
    !> @copybrief ParameterLists::clear_ParamType_SNK_a3
    !> @copydoc ParameterLists::clear_ParamType_SNK_a3
    PROCEDURE,PASS :: clear => clear_ParamType_SNK_a3
ENDTYPE ParamType_SNK_a3

!> @brief Extended type of a ParamType for defining a three dimensional
!> array parameter of 64-bit integers
TYPE,EXTENDS(ParamType) :: ParamType_SLK_a3
  !> The value of the parameter
  INTEGER(SLK),ALLOCATABLE :: val(:,:,:)
1069
1070
!
!List of type bound procedures
Graham, Aaron's avatar
Graham, Aaron committed
1071
1072
1073
1074
1075
1076
1077
1078
  CONTAINS
    !> @copybrief ParameterLists::edit_ParamType_SLK_a3
    !> @copydoc ParameterLists::edit_ParamType_SLK_a3
    PROCEDURE,PASS :: edit => edit_ParamType_SLK_a3
    !> @copybrief ParameterLists::clear_ParamType_SLK_a3
    !> @copydoc ParameterLists::clear_ParamType_SLK_a3
    PROCEDURE,PASS :: clear => clear_ParamType_SLK_a3
ENDTYPE ParamType_SLK_a3
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094

!> @brief Extended type of a ParamType for defining a three dimensional
!> array parameter that is a string derived type
TYPE,EXTENDS(ParamType) :: ParamType_STR_a3
  !> The value of the parameter
  TYPE(StringType),ALLOCATABLE :: val(:,:,:)
!
!List of type bound procedures
  CONTAINS
    !> @copybrief ParameterLists::edit_ParamType_STR_a3
    !> @copydoc ParameterLists::edit_ParamType_STR_a3
    PROCEDURE,PASS :: edit => edit_ParamType_STR_a3
    !> @copybrief ParameterLists::clear_ParamType_STR_a3
    !> @copydoc ParameterLists::clear_ParamType_STR_a3
    PROCEDURE,PASS :: clear => clear_ParamType_STR_a3
ENDTYPE ParamType_STR_a3
Graham, Aaron's avatar
Graham, Aaron committed
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
!----------------------------------------------------------------------
!     Four-Dimensional Arrays
!----------------------------------------------------------------------
!> @brief Extended type of a ParamType for defining a four dimensional
!> array parameter of single precision reals
TYPE,EXTENDS(ParamType) :: ParamType_SSK_a4
  !> The value of the parameter
  REAL(SSK),ALLOCATABLE :: val(:,:,:,:)
!
!List of type bound procedures
  CONTAINS
    !> @copybrief ParameterLists::edit_ParamType_SSK_a4
    !> @copydoc ParameterLists::edit_ParamType_SSK_a4
    PROCEDURE,PASS :: edit => edit_ParamType_SSK_a4
    !> @copybrief ParameterLists::clear_ParamType_SSK_a4
    !> @copydoc ParameterLists::clear_ParamType_SSK_a4
    PROCEDURE,PASS :: clear => clear_ParamType_SSK_a4
ENDTYPE ParamType_SSK_a4

!> @brief Extended type of a ParamType for defining a four dimensional
!> array parameter of double precision reals
TYPE,EXTENDS(ParamType) :: ParamType_SDK_a4
  !> The value of the parameter
  REAL(SDK),ALLOCATABLE :: val(:,:,:,:)
!
!List of type bound procedures
  CONTAINS
    !> @copybrief ParameterLists::edit_ParamType_SDK_a4
    !> @copydoc ParameterLists::edit_ParamType_SDK_a4
    PROCEDURE,PASS :: edit => edit_ParamType_SDK_a4
    !> @copybrief ParameterLists::clear_ParamType_SDK_a4
    !> @copydoc ParameterLists::clear_ParamType_SDK_a4
    PROCEDURE,PASS :: clear => clear_ParamType_SDK_a4
ENDTYPE ParamType_SDK_a4

!> @brief Extended type of a ParamType for defining a four dimensional
!> array parameter of 32-bit integers
TYPE,EXTENDS(ParamType) :: ParamType_SNK_a4
  !> The value of the parameter
  INTEGER(SNK),ALLOCATABLE :: val(:,:,:,:)
!
!List of type bound procedures
  CONTAINS
    !> @copybrief ParameterLists::edit_ParamType_SNK_a4
    !> @copydoc ParameterLists::edit_ParamType_SNK_a4
    PROCEDURE,PASS :: edit => edit_ParamType_SNK_a4
    !> @copybrief ParameterLists::clear_ParamType_SNK_a4
    !> @copydoc ParameterLists::clear_ParamType_SNK_a4
    PROCEDURE,PASS :: clear => clear_ParamType_SNK_a4
ENDTYPE ParamType_SNK_a4

!> @brief Extended type of a ParamType for defining a four dimensional
!> array parameter of 64-bit integers
TYPE,EXTENDS(ParamType) :: ParamType_SLK_a4
  !> The value of the parameter
  INTEGER(SLK),ALLOCATABLE :: val(:,:,:,:)
!
!List of type bound procedures
  CONTAINS
    !> @copybrief ParameterLists::edit_ParamType_SLK_a4
    !> @copydoc ParameterLists::edit_ParamType_SLK_a4
    PROCEDURE,PASS :: edit => edit_ParamType_SLK_a4
    !> @copybrief ParameterLists::clear_ParamType_SLK_a4
    !> @copydoc ParameterLists::clear_ParamType_SLK_a4
    PROCEDURE,PASS :: clear => clear_ParamType_SLK_a4
ENDTYPE ParamType_SLK_a4
Graham, Aaron's avatar
Graham, Aaron committed
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
!----------------------------------------------------------------------
!     Five-Dimensional Arrays
!----------------------------------------------------------------------
!> @brief Extended type of a ParamType for defining a five dimensional
!> array parameter of single precision reals
TYPE,EXTENDS(ParamType) :: ParamType_SSK_a5
  !> The value of the parameter
  REAL(SSK),ALLOCATABLE :: val(:,:,:,:,:)
!
!List of type bound procedures
  CONTAINS
    !> @copybrief ParameterLists::edit_ParamType_SSK_a5
    !> @copydoc ParameterLists::edit_ParamType_SSK_a5
    PROCEDURE,PASS :: edit => edit_ParamType_SSK_a5
    !> @copybrief ParameterLists::clear_ParamType_SSK_a5
    !> @copydoc ParameterLists::clear_ParamType_SSK_a5
    PROCEDURE,PASS :: clear => clear_ParamType_SSK_a5
ENDTYPE ParamType_SSK_a5

!> @brief Extended type of a ParamType for defining a five dimensional
!> array parameter of double precision reals
TYPE,EXTENDS(ParamType) :: ParamType_SDK_a5
  !> The value of the parameter
  REAL(SDK),ALLOCATABLE :: val(:,:,:,:,:)
!
!List of type bound procedures
  CONTAINS
    !> @copybrief ParameterLists::edit_ParamType_SDK_a5
    !> @copydoc ParameterLists::edit_ParamType_SDK_a5
    PROCEDURE,PASS :: edit => edit_ParamType_SDK_a5
    !> @copybrief ParameterLists::clear_ParamType_SDK_a5
    !> @copydoc ParameterLists::clear_ParamType_SDK_a5
    PROCEDURE,PASS :: clear => clear_ParamType_SDK_a5
ENDTYPE ParamType_SDK_a5

!> @brief Extended type of a ParamType for defining a five dimensional
!> array parameter of 32-bit integers
TYPE,EXTENDS(ParamType) :: ParamType_SNK_a5
  !> The value of the parameter
  INTEGER(SNK),ALLOCATABLE :: val(:,:,:,:,:)
!
!List of type bound procedures
  CONTAINS
    !> @copybrief ParameterLists::edit_ParamType_SNK_a5
    !> @copydoc ParameterLists::edit_ParamType_SNK_a5
    PROCEDURE,PASS :: edit => edit_ParamType_SNK_a5
    !> @copybrief ParameterLists::clear_ParamType_SNK_a5
    !> @copydoc ParameterLists::clear_ParamType_SNK_a5
    PROCEDURE,PASS :: clear => clear_ParamType_SNK_a5
ENDTYPE ParamType_SNK_a5

!> @brief Extended type of a ParamType for defining a five dimensional
!> array parameter of 64-bit integers
TYPE,EXTENDS(ParamType) :: ParamType_SLK_a5
  !> The value of the parameter
  INTEGER(SLK),ALLOCATABLE :: val(:,:,:,:,:)
!
!List of type bound procedures
  CONTAINS
    !> @copybrief ParameterLists::edit_ParamType_SLK_a5
    !> @copydoc ParameterLists::edit_ParamType_SLK_a5
    PROCEDURE,PASS :: edit => edit_ParamType_SLK_a5
    !> @copybrief ParameterLists::clear_ParamType_SLK_a5
    !> @copydoc ParameterLists::clear_ParamType_SLK_a5
    PROCEDURE,PASS :: clear => clear_ParamType_SLK_a5
ENDTYPE ParamType_SLK_a5
!----------------------------------------------------------------------
!     Six-Dimensional Arrays
!----------------------------------------------------------------------
!> @brief Extended type of a ParamType for defining a six dimensional
!> array parameter of single precision reals
TYPE,EXTENDS(ParamType) :: ParamType_SSK_a6
  !> The value of the parameter
  REAL(SSK),ALLOCATABLE :: val(:,:,:,:,:,:)
!
!List of type bound procedures
  CONTAINS
    !> @copybrief ParameterLists::edit_ParamType_SSK_a6
    !> @copydoc ParameterLists::edit_ParamType_SSK_a6
    PROCEDURE,PASS :: edit => edit_ParamType_SSK_a6
    !> @copybrief ParameterLists::clear_ParamType_SSK_a6
    !> @copydoc ParameterLists::clear_ParamType_SSK_a6
    PROCEDURE,PASS :: clear => clear_ParamType_SSK_a6
ENDTYPE ParamType_SSK_a6

!> @brief Extended type of a ParamType for defining a six dimensional
!> array parameter of double precision reals
TYPE,EXTENDS(ParamType) :: ParamType_SDK_a6
  !> The value of the parameter
  REAL(SDK),ALLOCATABLE :: val(:,:,:,:,:,:)
!
!List of type bound procedures
  CONTAINS
    !> @copybrief ParameterLists::edit_ParamType_SDK_a6
    !> @copydoc ParameterLists::edit_ParamType_SDK_a6
    PROCEDURE,PASS :: edit => edit_ParamType_SDK_a6
    !> @copybrief ParameterLists::clear_ParamType_SDK_a6
    !> @copydoc ParameterLists::clear_ParamType_SDK_a6
    PROCEDURE,PASS :: clear => clear_ParamType_SDK_a6
ENDTYPE ParamType_SDK_a6

!> @brief Extended type of a ParamType for defining a six dimensional
!> array parameter of 32-bit integers
TYPE,EXTENDS(ParamType) :: ParamType_SNK_a6
  !> The value of the parameter
  INTEGER(SNK),ALLOCATABLE :: val(:,:,:,:,:,:)
!
!List of type bound procedures
  CONTAINS
    !> @copybrief ParameterLists::edit_ParamType_SNK_a6
    !> @copydoc ParameterLists::edit_ParamType_SNK_a6
    PROCEDURE,PASS :: edit => edit_ParamType_SNK_a6
    !> @copybrief ParameterLists::clear_ParamType_SNK_a6
    !> @copydoc ParameterLists::clear_ParamType_SNK_a6
    PROCEDURE,PASS :: clear => clear_ParamType_SNK_a6
ENDTYPE ParamType_SNK_a6

!> @brief Extended type of a ParamType for defining a six dimensional
!> array parameter of 64-bit integers
TYPE,EXTENDS(ParamType) :: ParamType_SLK_a6
  !> The value of the parameter
  INTEGER(SLK),ALLOCATABLE :: val(:,:,:,:,:,:)
!
!List of type bound procedures
  CONTAINS
    !> @copybrief ParameterLists::edit_ParamType_SLK_a6
    !> @copydoc ParameterLists::edit_ParamType_SLK_a6
    PROCEDURE,PASS :: edit => edit_ParamType_SLK_a6
    !> @copybrief ParameterLists::clear_ParamType_SLK_a6
    !> @copydoc ParameterLists::clear_ParamType_SLK_a6
    PROCEDURE,PASS :: clear => clear_ParamType_SLK_a6
ENDTYPE ParamType_SLK_a6
!----------------------------------------------------------------------
!     Seven-Dimensional Arrays
!----------------------------------------------------------------------
!> @brief Extended type of a ParamType for defining a seven dimensional
!> array parameter of single precision reals
TYPE,EXTENDS(ParamType) :: ParamType_SSK_a7
  !> The value of the parameter
  REAL(SSK),ALLOCATABLE :: val(:,:,:,:,:,:,:)
!
!List of type bound procedures
  CONTAINS
    !> @copybrief ParameterLists::edit_ParamType_SSK_a7
    !> @copydoc ParameterLists::edit_ParamType_SSK_a7
    PROCEDURE,PASS :: edit => edit_ParamType_SSK_a7
    !> @copybrief ParameterLists::clear_ParamType_SSK_a7
    !> @copydoc ParameterLists::clear_ParamType_SSK_a7
    PROCEDURE,PASS :: clear => clear_ParamType_SSK_a7
ENDTYPE ParamType_SSK_a7

!> @brief Extended type of a ParamType for defining a seven dimensional
!> array parameter of double precision reals
TYPE,EXTENDS(ParamType) :: ParamType_SDK_a7
  !> The value of the parameter
  REAL(SDK),ALLOCATABLE :: val(:,:,:,:,:,:,:)
!
!List of type bound procedures
  CONTAINS
    !> @copybrief ParameterLists::edit_ParamType_SDK_a7
    !> @copydoc ParameterLists::edit_ParamType_SDK_a7
    PROCEDURE,PASS :: edit => edit_ParamType_SDK_a7
    !> @copybrief ParameterLists::clear_ParamType_SDK_a7
    !> @copydoc ParameterLists::clear_ParamType_SDK_a7
    PROCEDURE,PASS :: clear => clear_ParamType_SDK_a7
ENDTYPE ParamType_SDK_a7

!> @brief Extended type of a ParamType for defining a seven dimensional
!> array parameter of 32-bit integers
TYPE,EXTENDS(ParamType) :: ParamType_SNK_a7
  !> The value of the parameter
  INTEGER(SNK),ALLOCATABLE :: val(:,:,:,:,:,:,:)
!
!List of type bound procedures
  CONTAINS
    !> @copybrief ParameterLists::edit_ParamType_SNK_a7
    !> @copydoc ParameterLists::edit_ParamType_SNK_a7
    PROCEDURE,PASS :: edit => edit_ParamType_SNK_a7
    !> @copybrief ParameterLists::clear_ParamType_SNK_a7
    !> @copydoc ParameterLists::clear_ParamType_SNK_a7
    PROCEDURE,PASS :: clear => clear_ParamType_SNK_a7
ENDTYPE ParamType_SNK_a7

!> @brief Extended type of a ParamType for defining a seven dimensional
!> array parameter of 64-bit integers
TYPE,EXTENDS(ParamType) :: ParamType_SLK_a7
  !> The value of the parameter
  INTEGER(SLK),ALLOCATABLE :: val(:,:,:,:,:,:,:)
!
!List of type bound procedures
  CONTAINS
    !> @copybrief ParameterLists::edit_ParamType_SLK_a7
    !> @copydoc ParameterLists::edit_ParamType_SLK_a7
    PROCEDURE,PASS :: edit => edit_ParamType_SLK_a7
    !> @copybrief ParameterLists::clear_ParamType_SLK_a7
    !> @copydoc ParameterLists::clear_ParamType_SLK_a7
    PROCEDURE,PASS :: clear => clear_ParamType_SLK_a7
ENDTYPE ParamType_SLK_a7
1359
1360
!
!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Graham, Aaron's avatar
Graham, Aaron committed
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
!> Generic interface adds a procedure to overload the intrinsic assignment
!> operator with the given procedure
INTERFACE ASSIGNMENT(=)
  !> @copybrief ParameterLists::assign_ParamType
  !> @copydoc ParameterLists::assign_ParamType
  MODULE PROCEDURE assign_ParamType
ENDINTERFACE

INTERFACE OPERATOR(==)
  !> @copybrief ParameterLists::isEqual_ParamType
  !> @copydoc ParameterLists::isEqual_ParamType
  MODULE PROCEDURE isEqual_ParamType
ENDINTERFACE

INTEGER(SIK),PARAMETER :: PARAM_MAX_DAT_LEN=26
1376
1377
!
!===============================================================================
Graham, Aaron's avatar
Graham, Aaron committed
1378
CONTAINS
1379
#ifdef FUTILITY_HAVE_Trilinos
Graham, Aaron's avatar
Graham, Aaron committed
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
RECURSIVE SUBROUTINE toTeuchosPlist(this, that, n)
  CLASS(ParamType),INTENT(IN) :: this
  TYPE(ForTeuchos_ParameterList_ID),INTENT(IN) :: that
  INTEGER(SNK),INTENT(IN),OPTIONAL :: n
  !
  CLASS(ParamType), POINTER :: itr
  Type(ParamType) :: nextParam
  TYPE(ForTeuchos_ParameterList_ID) :: new
  INTEGER(C_INT) :: ierr
  INTEGER(SNK) :: level
  TYPE(StringType) :: path

  nullify(itr)

  level = 0
  IF(PRESENT(n)) THEN
    level = n
  ENDIF

  path = ''
  CALL this%getSubParams(path, itr)

  DO WHILE(ASSOCIATED(itr))
    SELECT TYPE(itr)
    TYPE IS(ParamType_List)
      ! This node is its own parameter list
      new = ForTeuchos_PL_sublist(that, CHAR(itr%name), 0, &
          "Imported from MPACT PList", ierr)
      nextParam = itr
      CALL toTeuchosPlist(nextParam, new, level+1)
    TYPE IS(ParamType_SBK)
      CALL ForTeuchos_PL_set_bool(that, CHAR(itr%name), itr%val,&
          CHAR(itr%description), ierr)
    TYPE IS(ParamType_SDK)
      CALL ForTeuchos_PL_set_double(that, CHAR(itr%name), itr%val,&
          CHAR(itr%description), ierr)
    TYPE IS(ParamType_SNK)
      CALL ForTeuchos_PL_set_int(that, CHAR(itr%name), itr%val,&
          CHAR(itr%description), ierr)
    TYPE IS(ParamType_STR)
      CALL ForTeuchos_PL_set_string(that, CHAR(itr%name), CHAR(itr%val),&
          CHAR(itr%description), ierr)
    CLASS DEFAULT
      CALL eParams%raiseError(&
          "Unsupported PARAMETER TYPE for Teuchos conversion.")
    ENDSELECT
    CALL this%getSubParams(path, itr)
  ENDDO
ENDSUBROUTINE
1429
#endif
1430
1431
!
!-------------------------------------------------------------------------------
1432
1433
1434
1435
!> @brief Defines the assignment operation two @c ParamType objects.
!> @param thisParam the ParamType object to be assigned
!> @param param the ParamType object to assign
!>
1436
!> This routine clears the @c thisParam which must be a declared as a
1437
1438
1439
1440
1441
!> <TT>TYPE(ParamType)</TT> in the client code. @c param may be anything. As
!> new extended types of the @c ParamType are defined in this module this
!> will need to be updated with a new <TT>TYPE IS()</TT> block. This should
!> be the only routine that knows about all the extended types of @c ParamType.
!>
Graham, Aaron's avatar
Graham, Aaron committed
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
RECURSIVE SUBROUTINE assign_ParamType(thisParam,param)
  CHARACTER(LEN=*),PARAMETER :: myName='assign_ParamType'
  CLASS(ParamType),INTENT(INOUT) :: thisParam
  CLASS(ParamType),INTENT(IN) :: param

  SELECTTYPE(thisParam)
  TYPE IS(ParamType)
    IF(ASSOCIATED(thisParam%pdat)) CALL thisParam%clear()
    SELECTTYPE(p=>param)
    TYPE IS(ParamType)
      !Assign the parameter value using a recursive call
      IF(ASSOCIATED(p%pdat)) CALL assign_ParamType(thisParam,p%pdat)
    TYPE IS(ParamType_SSK)
      CALL thisParam%init(CHAR(p%name),p%val, &
          CHAR(p%description))
    TYPE IS(ParamType_SDK)
      CALL thisParam%init(CHAR(p%name),p%val, &
          CHAR(p%description))
    TYPE IS(ParamType_SNK)
      CALL thisParam%init(CHAR(p%name),p%val, &
          CHAR(p%description))
    TYPE IS(ParamType_SLK)
      CALL thisParam%init(CHAR(p%name),p%val, &
          CHAR(p%description))
    TYPE IS(ParamType_SBK)
      CALL thisParam%init(CHAR(p%name),p%val, &
          CHAR(p%description))
    TYPE IS(ParamType_STR)
      CALL thisParam%init(CHAR(p%name),p%val, &
          CHAR(p%description))
    TYPE IS(ParamType_SSK_a1)
      CALL thisParam%init(CHAR(p%name),p%val, &
          CHAR(p%description))
    TYPE IS(ParamType_SDK_a1)
      CALL thisParam%init(CHAR(p%name),p%val, &
          CHAR(p%description))
    TYPE IS(ParamType_SNK_a1)
      CALL thisParam%init(CHAR(p%name),p%val, &
          CHAR(p%description))
    TYPE IS(ParamType_SLK_a1)
      CALL thisParam%init(CHAR(p%name),p%val, &
          CHAR(p%description))
    TYPE IS(ParamType_SBK_a1)
      CALL thisParam%init(CHAR(p%name),p%val, &
          CHAR(p%description))
    TYPE IS(ParamType_STR_a1)
      CALL thisParam%init(CHAR(p%name),p%val, &
          CHAR(p%description))
    TYPE IS(ParamType_SSK_a2)
      CALL thisParam%init(CHAR(p%name),p%val, &
          CHAR(p%description))
    TYPE IS(ParamType_SDK_a2)
      CALL thisParam%init(CHAR(p%name),p%val, &
          CHAR(p%description))
    TYPE IS(ParamType_SNK_a2)
      CALL thisParam%init(CHAR(p%name),p%val, &
          CHAR(p%description))
    TYPE IS(ParamType_SLK_a2)
      CALL thisParam%init(CHAR(p%name),p%val, &
          CHAR(p%description))
    TYPE IS(ParamType_STR_a2)
      CALL thisParam%init(CHAR(p%name),p%val, &
          CHAR(p%description))
    TYPE IS(ParamType_SSK_a3)
      CALL thisParam%init(CHAR(p%name),p%val, &
          CHAR(p%description))
    TYPE IS(ParamType_SDK_a3)
      CALL thisParam%init(CHAR(p%name),p%val, &
          CHAR(p%description))
    TYPE IS(ParamType_SNK_a3)
      CALL thisParam%init(CHAR(p%name),p%val, &
          CHAR(p%description))
    TYPE IS(ParamType_SLK_a3)
      CALL thisParam%init(CHAR(p%name),p%val, &
          CHAR(p%description))
1517
1518
1519
    TYPE IS(ParamType_STR_a3)
      CALL thisParam%init(CHAR(p%name),p%val, &
          CHAR(p%description))
Graham, Aaron's avatar
Graham, Aaron committed
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
1531
    TYPE IS(ParamType_SSK_a4)
      CALL thisParam%init(CHAR(p%name),p%val, &
          CHAR(p%description))
    TYPE IS(ParamType_SDK_a4)
      CALL thisParam%init(CHAR(p%name),p%val, &
          CHAR(p%description))
    TYPE IS(ParamType_SNK_a4)
      CALL thisParam%init(CHAR(p%name),p%val, &
          CHAR(p%description))
    TYPE IS(ParamType_SLK_a4)
      CALL thisParam%init(CHAR(p%name),p%val, &
          CHAR(p%description))
Graham, Aaron's avatar
Graham, Aaron committed
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
    TYPE IS(ParamType_SSK_a5)
      CALL thisParam%init(CHAR(p%name),p%val, &
          CHAR(p%description))
    TYPE IS(ParamType_SDK_a5)
      CALL thisParam%init(CHAR(p%name),p%val, &
          CHAR(p%description))
    TYPE IS(ParamType_SNK_a5)
      CALL thisParam%init(CHAR(p%name),p%val, &
          CHAR(p%description))
    TYPE IS(ParamType_SLK_a5)
      CALL thisParam%init(CHAR(p%name),p%val, &
          CHAR(p%description))
    TYPE IS(ParamType_SSK_a6)
      CALL thisParam%init(CHAR(p%name),p%val, &
          CHAR(p%description))
    TYPE IS(ParamType_SDK_a6)
      CALL thisParam%init(CHAR(p%name),p%val, &
          CHAR(p%description))
    TYPE IS(ParamType_SNK_a6)
      CALL thisParam%init(CHAR(p%name),p%val, &
          CHAR(p%description))
    TYPE IS(ParamType_SLK_a6)
      CALL thisParam%init(CHAR(p%name),p%val, &
          CHAR(p%description))
    TYPE IS(ParamType_SSK_a7)
      CALL thisParam%init(CHAR(p%name),p%val, &
          CHAR(p%description))
    TYPE IS(ParamType_SDK_a7)
      CALL thisParam%init(CHAR(p%name),p%val, &
          CHAR(p%description))
    TYPE IS(ParamType_SNK_a7)
      CALL thisParam%init(CHAR(p%name),p%val, &
          CHAR(p%description))
    TYPE IS(ParamType_SLK_a7)
      CALL thisParam%init(CHAR(p%name),p%val, &
          CHAR(p%description))
Graham, Aaron's avatar
Graham, Aaron committed
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
    TYPE IS(ParamType_List)
      IF(ALLOCATED(p%pList)) THEN
        CALL thisParam%init(CHAR(p%name),p%pList, &
            CHAR(p%description))
      ELSE
        !Allocate an empty list
        ALLOCATE(ParamType_List :: thisParam%pdat)
        thisParam%pdat%dataType='TYPE(ParamType_List)'
        thisParam%pdat%name=p%name
        thisParam%pdat%description=p%description
      ENDIF
    ENDSELECT
  CLASS DEFAULT
    CALL eParams%raiseError(modName//'::'//myName// &
        ' - cannot assign parameter data to a type extension of ParamType!')
  ENDSELECT
ENDSUBROUTINE assign_ParamType
1585
1586
!
!-------------------------------------------------------------------------------
1587
1588
1589
1590
!> @brief
!> @param p1
!> @param p2
!> @returns bool
1591
!>
Graham, Aaron's avatar
Graham, Aaron committed
1592
1593
1594
1595
RECURSIVE PURE FUNCTION isEqual_ParamType(p1,p2) RESULT(bool)
  CLASS(ParamType),INTENT(IN) :: p1
  CLASS(ParamType),INTENT(IN) :: p2
  LOGICAL(SBK) :: bool
1596
  INTEGER(SIK) :: i,dims1(7),dims2(7)
Graham, Aaron's avatar
Graham, Aaron committed
1597
1598
1599
1600
1601
1602
1603
1604
1605
1606
1607
  bool=.FALSE.
  IF(p1%name == p2%name) THEN
    IF(SAME_TYPE_AS(p1,p2)) THEN
      dims1=0
      dims2=0
      SELECTTYPE(p1)
      TYPE IS(ParamType)
        IF(ASSOCIATED(p1%pdat) .AND. ASSOCIATED(p2%pdat)) THEN
          bool=isEqual_ParamType(p1%pdat,p2%pdat)
        ELSE
          bool=(ASSOCIATED(p1%pdat) .EQV. ASSOCIATED(p2%pdat))
1608
        ENDIF
Graham, Aaron's avatar
Graham, Aaron committed
1609
1610
1611
1612
1613
1614
1615
1616
1617
1618
1619
1620
1621
1622
1623
1624
1625
1626
1627
1628
1629
1630
1631
1632
1633
1634
1635
1636
1637
1638
1639
1640
1641
1642
1643
1644
1645
1646
1647
1648
1649
1650
1651
1652
1653
1654
1655
1656
1657
1658
1659
1660
1661
1662
1663
1664
1665
1666
1667
1668
1669
1670
1671
1672
1673
1674
1675
1676
1677
1678
1679
1680
1681
1682
1683
1684
1685
1686
1687
1688
1689
1690
1691
1692
1693
1694
1695
1696
1697
1698
1699
1700
1701
1702
1703
1704
1705
1706
1707
1708
1709
1710
1711
1712
1713
1714
1715
1716
1717
1718
1719
1720
1721
1722
1723
1724
1725
1726
1727
1728
1729
1730
1731
1732
1733
1734
      TYPE IS(ParamType_List)
        SELECTTYPE(p2); TYPE IS(ParamType_List)
          bool=(ALLOCATED(p1%pList) .EQV. ALLOCATED(p2%pList))
          IF(ALLOCATED(p1%pList) .AND. ALLOCATED(p2%pList)) THEN
            IF(SIZE(p1%pList) == SIZE(p2%pList)) THEN
              DO i=1,SIZE(p1%pList)
                bool=(isEqual_ParamType(p1%pList(i),p2%pList(i)).AND.bool)
                IF(.NOT.bool) EXIT
              ENDDO
            ENDIF
          ENDIF
        ENDSELECT
      TYPE IS(ParamType_SSK)
        SELECTTYPE(p2); TYPE IS(ParamType_SSK)
          bool=(p1%val == p2%val)
        ENDSELECT
      TYPE IS(ParamType_SDK)
        SELECTTYPE(p2); TYPE IS(ParamType_SDK)
          bool=(p1%val == p2%val)
        ENDSELECT
      TYPE IS(ParamType_SNK)
        SELECTTYPE(p2); TYPE IS(ParamType_SNK)
          bool=(p1%val == p2%val)
        ENDSELECT
      TYPE IS(ParamType_SLK)
        SELECTTYPE(p2); TYPE IS(ParamType_SLK)
          bool=(p1%val == p2%val)
        ENDSELECT
      TYPE IS(ParamType_SBK)
        SELECTTYPE(p2); TYPE IS(ParamType_SBK)
          bool=(p1%val == p2%val)
        ENDSELECT
      TYPE IS(ParamType_STR)
        SELECTTYPE(p2); TYPE IS(ParamType_STR)
          bool=(p1%val == p2%val)
        ENDSELECT
      TYPE IS(ParamType_SSK_a1)
        SELECTTYPE(p2); TYPE IS(ParamType_SSK_a1)
          bool=(ALLOCATED(p1%val) .EQV. ALLOCATED(p2%val))
          IF(ALLOCATED(p1%val) .AND. ALLOCATED(p1%val)) THEN
            IF(SIZE(p1%val) == SIZE(p2%val)) bool=ALL(p1%val == p2%val)
          ENDIF
        ENDSELECT
      TYPE IS(ParamType_SDK_a1)
        SELECTTYPE(p2); TYPE IS(ParamType_SDK_a1)
          bool=(ALLOCATED(p1%val) .EQV. ALLOCATED(p2%val))
          IF(ALLOCATED(p1%val) .AND. ALLOCATED(p1%val)) THEN
            IF(SIZE(p1%val) == SIZE(p2%val)) bool=ALL(p1%val == p2%val)
          ENDIF
        ENDSELECT
      TYPE IS(ParamType_SNK_a1)
        SELECTTYPE(p2); TYPE IS(ParamType_SNK_a1)
          bool=(ALLOCATED(p1%val) .EQV. ALLOCATED(p2%val))
          IF(ALLOCATED(p1%val) .AND. ALLOCATED(p1%val)) THEN
            IF(SIZE(p1%val) == SIZE(p2%val)) bool=ALL(p1%val == p2%val)
          ENDIF
        ENDSELECT
      TYPE IS(ParamType_SLK_a1)
        SELECTTYPE(p2); TYPE IS(ParamType_SLK_a1)
          bool=(ALLOCATED(p1%val) .EQV. ALLOCATED(p2%val))
          IF(ALLOCATED(p1%val) .AND. ALLOCATED(p1%val)) THEN
            IF(SIZE(p1%val) == SIZE(p2%val)) bool=ALL(p1%val == p2%val)
          ENDIF
        ENDSELECT
      TYPE IS(ParamType_SBK_a1)
        SELECTTYPE(p2); TYPE IS(ParamType_SBK_a1)
          bool=(ALLOCATED(p1%val) .EQV. ALLOCATED(p2%val))
          IF(ALLOCATED(p1%val) .AND. ALLOCATED(p1%val)) THEN
            IF(SIZE(p1%val) == SIZE(p2%val)) bool=ALL(p1%val .EQV. p2%val)
          ENDIF
        ENDSELECT
      TYPE IS(ParamType_STR_a1)
        SELECTTYPE(p2); TYPE IS(ParamType_STR_a1)
          bool=(ALLOCATED(p1%val) .EQV. ALLOCATED(p2%val))
          IF(ALLOCATED(p1%val) .AND. ALLOCATED(p1%val)) THEN
            IF(SIZE(p1%val) == SIZE(p2%val)) THEN
              DO i=1,SIZE(p1%val)
                bool=(bool .AND. p1%val(i) == p2%val(i))
                IF(.NOT.bool) EXIT
              ENDDO
            ENDIF
          ENDIF
        ENDSELECT
      TYPE IS(ParamType_SSK_a2)
        SELECTTYPE(p2); TYPE IS(ParamType_SSK_a2)
          bool=(ALLOCATED(p1%val) .EQV. ALLOCATED(p2%val))
          IF(ALLOCATED(p1%val) .AND. ALLOCATED(p1%val)) THEN
            dims1(1:2)=SHAPE(p1%val)
            dims2(1:2)=SHAPE(p2%val)
            IF(ALL(dims1(1:2) == dims2(1:2))) bool=ALL(p1%val == p2%val)
          ENDIF
        ENDSELECT
      TYPE IS(ParamType_SDK_a2)
        SELECTTYPE(p2); TYPE IS(ParamType_SDK_a2)
          bool=(ALLOCATED(p1%val) .EQV. ALLOCATED(p2%val))
          IF(ALLOCATED(p1%val) .AND. ALLOCATED(p1%val)) THEN
            dims1(1:2)=SHAPE(p1%val)
            dims2(1:2)=SHAPE(p2%val)
            IF(ALL(dims1(1:2) == dims2(1:2))) bool=ALL(p1%val == p2%val)
          ENDIF
        ENDSELECT
      TYPE IS(ParamType_SNK_a2)
        SELECTTYPE(p2); TYPE IS(ParamType_SNK_a2)
          bool=(ALLOCATED(p1%val) .EQV. ALLOCATED(p2%val))
          IF(ALLOCATED(p1%val) .AND. ALLOCATED(p1%val)) THEN
            dims1(1:2)=SHAPE(p1%val)
            dims2(1:2)=SHAPE(p2%val)
            IF(ALL(dims1(1:2) == dims2(1:2))) bool=ALL(p1%val == p2%val)
          ENDIF
        ENDSELECT
      TYPE IS(ParamType_SLK_a2)
        SELECTTYPE(p2); TYPE IS(ParamType_SLK_a2)
          bool=(ALLOCATED(p1%val) .EQV. ALLOCATED(p2%val))
          IF(ALLOCATED(p1%val) .AND. ALLOCATED(p1%val)) THEN
            dims1(1:2)=SHAPE(p1%val)
            dims2(1:2)=SHAPE(p2%val)
            IF(ALL(dims1(1:2) == dims2(1:2))) bool=ALL(p1%val == p2%val)
          ENDIF
        ENDSELECT
      TYPE IS(ParamType_STR_a2)
        SELECTTYPE(p2); TYPE IS(ParamType_STR_a2)
          bool=(ALLOCATED(p1%val) .EQV. ALLOCATED(p2%val))
          IF(ALLOCATED(p1%val) .AND. ALLOCATED(p1%val)) THEN
            dims1(1:2)=SHAPE(p1%val)
            dims2(1:2)=SHAPE(p2%val)
            IF(ALL(dims1(1:2) == dims2(1:2))) THEN
1735
              bool = ALL(p1%val == p2%val)
Graham, Aaron's avatar
Graham, Aaron committed
1736
1737
1738
1739
1740
1741
1742
1743
1744
1745
1746
1747
1748
1749
1750
1751
1752
1753
1754
1755
1756
1757
1758
1759
1760
1761
1762
1763
1764
1765
1766
1767
1768
1769
1770
1771
1772
1773
1774
            ENDIF
          ENDIF
        ENDSELECT
      TYPE IS(ParamType_SSK_a3)
        SELECTTYPE(p2); TYPE IS(ParamType_SSK_a3)
          bool=(ALLOCATED(p1%val) .EQV. ALLOCATED(p2%val))
          IF(ALLOCATED(p1%val) .AND. ALLOCATED(p1%val)) THEN
            dims1(1:3)=SHAPE(p1%val)
            dims2(1:3)=SHAPE(p2%val)
            IF(ALL(dims1(1:3) == dims2(1:3))) bool=ALL(p1%val == p2%val)
          ENDIF
        ENDSELECT
      TYPE IS(ParamType_SDK_a3)
        SELECTTYPE(p2); TYPE IS(ParamType_SDK_a3)
          bool=(ALLOCATED(p1%val) .EQV. ALLOCATED(p2%val))
          IF(ALLOCATED(p1%val) .AND. ALLOCATED(p1%val)) THEN
            dims1(1:3)=SHAPE(p1%val)
            dims2(1:3)=SHAPE(p2%val)
            IF(ALL(dims1(1:3) == dims2(1:3))) bool=ALL(p1%val == p2%val)
          ENDIF
        ENDSELECT
      TYPE IS(ParamType_SNK_a3)
        SELECTTYPE(p2); TYPE IS(ParamType_SNK_a3)
          bool=(ALLOCATED(p1%val) .EQV. ALLOCATED(p2%val))
          IF(ALLOCATED(p1%val) .AND. ALLOCATED(p1%val)) THEN
            dims1(1:3)=SHAPE(p1%val)
            dims2(1:3)=SHAPE(p2%val)
            IF(ALL(dims1(1:3) == dims2(1:3))) bool=ALL(p1%val == p2%val)
          ENDIF
        ENDSELECT
      TYPE IS(ParamType_SLK_a3)
        SELECTTYPE(p2); TYPE IS(ParamType_SLK_a3)
          bool=(ALLOCATED(p1%val) .EQV. ALLOCATED(p2%val))
          IF(ALLOCATED(p1%val) .AND. ALLOCATED(p1%val)) THEN
            dims1(1:3)=SHAPE(p1%val)
            dims2(1:3)=SHAPE(p2%val)
            IF(ALL(dims1(1:3) == dims2(1:3))) bool=ALL(p1%val == p2%val)
          ENDIF
        ENDSELECT
1775
1776
1777
1778
1779
1780
1781
1782
1783
1784
1785
      TYPE IS(ParamType_STR_a3)
        SELECTTYPE(p2); TYPE IS(ParamType_STR_a3)
          bool=(ALLOCATED(p1%val) .EQV. ALLOCATED(p2%val))
          IF(ALLOCATED(p1%val) .AND. ALLOCATED(p1%val)) THEN
            dims1(1:3)=SHAPE(p1%val)
            dims2(1:3)=SHAPE(p2%val)
            IF(ALL(dims1(1:3) == dims2(1:3))) THEN
              bool = ALL(p1%val == p2%val)
            ENDIF
          ENDIF
        ENDSELECT
Graham, Aaron's avatar
Graham, Aaron committed
1786
1787
1788
1789
1790
1791
1792
1793
1794
1795
1796
1797
1798
1799
1800
1801
1802
1803
1804
1805
1806
1807
1808
1809
1810
1811
1812
1813
1814
1815
1816
1817
1818
1819
1820
1821
      TYPE IS(ParamType_SSK_a4)
        SELECTTYPE(p2); TYPE IS(ParamType_SSK_a4)
          bool=(ALLOCATED(p1%val) .EQV. ALLOCATED(p2%val))
          IF(ALLOCATED(p1%val) .AND. ALLOCATED(p1%val)) THEN
            dims1(1:4)=SHAPE(p1%val)
            dims2(1:4)=SHAPE(p2%val)
            IF(ALL(dims1(1:4) == dims2(1:4))) bool=ALL(p1%val == p2%val)
          ENDIF
        ENDSELECT
      TYPE IS(ParamType_SDK_a4)
        SELECTTYPE(p2); TYPE IS(ParamType_SDK_a4)
          bool=(ALLOCATED(p1%val) .EQV. ALLOCATED(p2%val))
          IF(ALLOCATED(p1%val) .AND. ALLOCATED(p1%val)) THEN
            dims1(1:4)=SHAPE(p1%val)
            dims2(1:4)=SHAPE(p2%val)
            IF(ALL(dims1(1:4) == dims2(1:4))) bool=ALL(p1%val == p2%val)
          ENDIF
        ENDSELECT
      TYPE IS(ParamType_SNK_a4)
        SELECTTYPE(p2); TYPE IS(ParamType_SNK_a4)
          bool=(ALLOCATED(p1%val) .EQV. ALLOCATED(p2%val))
          IF(ALLOCATED(p1%val) .AND. ALLOCATED(p1%val)) THEN
            dims1(1:4)=SHAPE(p1%val)
            dims2(1:4)=SHAPE(p2%val)
            IF(ALL(dims1(1:4) == dims2(1:4))) bool=ALL(p1%val == p2%val)
          ENDIF
        ENDSELECT
      TYPE IS(ParamType_SLK_a4)
        SELECTTYPE(p2); TYPE IS(ParamType_SLK_a4)
          bool=(ALLOCATED(p1%val) .EQV. ALLOCATED(p2%val))
          IF(ALLOCATED(p1%val) .AND. ALLOCATED(p1%val)) THEN
            dims1(1:4)=SHAPE(p1%val)
            dims2(1:4)=SHAPE(p2%val)
            IF(ALL(dims1(1:4) == dims2(1:4))) bool=ALL(p1%val == p2%val)
          ENDIF
        ENDSELECT
Graham, Aaron's avatar
Graham, Aaron committed
1822
1823
1824
1825
1826
1827
1828
1829
1830
1831
1832
1833
1834
1835
1836
1837
1838
1839
1840
1841
1842
1843
1844
1845
1846
1847
1848
1849
1850
1851
1852
1853
1854
1855
1856
1857
1858
1859
1860
1861
1862
1863
1864
1865
1866
1867
1868
1869
1870
1871
1872
1873
1874
1875
1876
1877
1878
1879
1880
1881
1882
1883
1884
1885
1886
1887
1888
1889
1890
1891
1892
1893
1894
1895
1896
1897
1898
1899
1900
1901
1902
1903
1904
1905
1906
1907
1908
1909
1910
1911
1912
1913
1914
1915
1916
1917
1918
1919
1920
1921
1922
1923
1924
1925
1926
1927
1928
1929
      TYPE IS(ParamType_SSK_a5)
        SELECTTYPE(p2); TYPE IS(ParamType_SSK_a5)
          bool=(ALLOCATED(p1%val) .EQV. ALLOCATED(p2%val))
          IF(ALLOCATED(p1%val) .AND. ALLOCATED(p1%val)) THEN
            dims1(1:5)=SHAPE(p1%val)
            dims2(1:5)=SHAPE(p2%val)
            IF(ALL(dims1(1:5) == dims2(1:5))) bool=ALL(p1%val == p2%val)
          ENDIF
        ENDSELECT
      TYPE IS(ParamType_SDK_a5)
        SELECTTYPE(p2); TYPE IS(ParamType_SDK_a5)
          bool=(ALLOCATED(p1%val) .EQV. ALLOCATED(p2%val))
          IF(ALLOCATED(p1%val) .AND. ALLOCATED(p1%val)) THEN
            dims1(1:5)=SHAPE(p1%val)
            dims2(1:5)=SHAPE(p2%val)
            IF(ALL(dims1(1:5) == dims2(1:5))) bool=ALL(p1%val == p2%val)
          ENDIF
        ENDSELECT
      TYPE IS(ParamType_SNK_a5)
        SELECTTYPE(p2); TYPE IS(ParamType_SNK_a5)
          bool=(ALLOCATED(p1%val) .EQV. ALLOCATED(p2%val))
          IF(ALLOCATED(p1%val) .AND. ALLOCATED(p1%val)) THEN
            dims1(1:5)=SHAPE(p1%val)
            dims2(1:5)=SHAPE(p2%val)
            IF(ALL(dims1(1:5) == dims2(1:5))) bool=ALL(p1%val == p2%val)
          ENDIF
        ENDSELECT
      TYPE IS(ParamType_SLK_a5)
        SELECTTYPE(p2); TYPE IS(ParamType_SLK_a5)
          bool=(ALLOCATED(p1%val) .EQV. ALLOCATED(p2%val))
          IF(ALLOCATED(p1%val) .AND. ALLOCATED(p1%val)) THEN
            dims1(1:5)=SHAPE(p1%val)
            dims2(1:5)=SHAPE(p2%val)
            IF(ALL(dims1(1:5) == dims2(1:5))) bool=ALL(p1%val == p2%val)
          ENDIF
        ENDSELECT
      TYPE IS(ParamType_SSK_a6)
        SELECTTYPE(p2); TYPE IS(ParamType_SSK_a6)
          bool=(ALLOCATED(p1%val) .EQV. ALLOCATED(p2%val))
          IF(ALLOCATED(p1%val) .AND. ALLOCATED(p1%val)) THEN
            dims1(1:6)=SHAPE(p1%val)
            dims2(1:6)=SHAPE(p2%val)
            IF(ALL(dims1(1:6) == dims2(1:6))) bool=ALL(p1%val == p2%val)
          ENDIF
        ENDSELECT
      TYPE IS(ParamType_SDK_a6)
        SELECTTYPE(p2); TYPE IS(ParamType_SDK_a6)
          bool=(ALLOCATED(p1%val) .EQV. ALLOCATED(p2%val))
          IF(ALLOCATED(p1%val) .AND. ALLOCATED(p1%val)) THEN
            dims1(1:6)=SHAPE(p1%val)
            dims2(1:6)=SHAPE(p2%val)
            IF(ALL(dims1(1:6) == dims2(1:6))) bool=ALL(p1%val == p2%val)
          ENDIF
        ENDSELECT
      TYPE IS(ParamType_SNK_a6)
        SELECTTYPE(p2); TYPE IS(ParamType_SNK_a6)
          bool=(ALLOCATED(p1%val) .EQV. ALLOCATED(p2%val))
          IF(ALLOCATED(p1%val) .AND. ALLOCATED(p1%val)) THEN
            dims1(1:6)=SHAPE(p1%val)
            dims2(1:6)=SHAPE(p2%val)
            IF(ALL(dims1(1:6) == dims2(1:6))) bool=ALL(p1%val == p2%val)
          ENDIF
        ENDSELECT
      TYPE IS(ParamType_SLK_a6)
        SELECTTYPE(p2); TYPE IS(ParamType_SLK_a6)
          bool=(ALLOCATED(p1%val) .EQV. ALLOCATED(p2%val))
          IF(ALLOCATED(p1%val) .AND. ALLOCATED(p1%val)) THEN
            dims1(1:6)=SHAPE(p1%val)
            dims2(1:6)=SHAPE(p2%val)
            IF(ALL(dims1(1:6) == dims2(1:6))) bool=ALL(p1%val == p2%val)
          ENDIF
        ENDSELECT
      TYPE IS(ParamType_SSK_a7)
        SELECTTYPE(p2); TYPE IS(ParamType_SSK_a7)
          bool=(ALLOCATED(p1%val) .EQV. ALLOCATED(p2%val))
          IF(ALLOCATED(p1%val) .AND. ALLOCATED(p1%val)) THEN
            dims1(1:7)=SHAPE(p1%val)
            dims2(1:7)=SHAPE(p2%val)
            IF(ALL(dims1(1:7) == dims2(1:7))) bool=ALL(p1%val == p2%val)
          ENDIF
        ENDSELECT
      TYPE IS(ParamType_SDK_a7)
        SELECTTYPE(p2); TYPE IS(ParamType_SDK_a7)
          bool=(ALLOCATED(p1%val) .EQV. ALLOCATED(p2%val))
          IF(ALLOCATED(p1%val) .AND. ALLOCATED(p1%val)) THEN
            dims1(1:7)=SHAPE(p1%val)
            dims2(1:7)=SHAPE(p2%val)
            IF(ALL(dims1(1:7) == dims2(1:7))) bool=ALL(p1%val == p2%val)
          ENDIF
        ENDSELECT
      TYPE IS(ParamType_SNK_a7)
        SELECTTYPE(p2); TYPE IS(ParamType_SNK_a7)
          bool=(ALLOCATED(p1%val) .EQV. ALLOCATED(p2%val))
          IF(ALLOCATED(p1%val) .AND. ALLOCATED(p1%val)) THEN
            dims1(1:7)=SHAPE(p1%val)
            dims2(1:7)=SHAPE(p2%val)
            IF(ALL(dims1(1:7) == dims2(1:7))) bool=ALL(p1%val == p2%val)
          ENDIF
        ENDSELECT
      TYPE IS(ParamType_SLK_a7)
        SELECTTYPE(p2); TYPE IS(ParamType_SLK_a7)
          bool=(ALLOCATED(p1%val) .EQV. ALLOCATED(p2%val))
          IF(ALLOCATED(p1%val) .AND. ALLOCATED(p1%val)) THEN
            dims1(1:7)=SHAPE(p1%val)
            dims2(1:7)=SHAPE(p2%val)
            IF(ALL(dims1(1:7) == dims2(1:7))) bool=ALL(p1%val == p2%val)
          ENDIF
        ENDSELECT
Graham, Aaron's avatar
Graham, Aaron committed
1930
1931
1932
1933
      ENDSELECT
    ENDIF
  ENDIF
ENDFUNCTION isEqual_ParamType
1934
1935
!
!-------------------------------------------------------------------------------
1936
1937
1938
1939
1940
1941
1942
1943
1944
1945
1946
1947
1948
1949
1950
1951
1952
1953
1954
1955
1956
1957
!> @brief Routine can be used as an "iterator". It takes an absolute list
!>        address and returns the next parameter encountered from the address.
!> @param thisParam the parameter list to obtain the next parameter from
!> @param addr the absolute address from which to find the next parameter
!> @param param a pointer to the next parameter, value is null if the next
!>        parameter does not exist.
!>
!> When @c addr is passed in empty then the root address is returned. To use
!> This routine as an iterator, a loop of the following form should be written
!> in the client code:
!> @code
!> TYPE(StringType) :: addr
!> TYPE(ParameType) :: paramList
!> CLASS(ParamType),POINTER :: nextParam
!> addr=''
!> CALL paramList%getNextParam(addr,nextParam)
!> DO WHILE(ASSOCIATED(nextParam))
!>   !Do stuff with nextParam
!>   !...
!>   CALL paramList%getNextParam(addr,nextParam)
!> ENDDO
!> @endcode
1958
!>
Graham, Aaron's avatar
Graham, Aaron committed
1959
1960
1961
1962
1963
1964
1965
1966
1967
1968
1969
1970
1971
1972
1973
1974
1975
1976
1977
1978
1979
1980
1981
1982
1983
1984
1985
1986
1987
1988
1989
1990
1991
1992
1993
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
SUBROUTINE getNextParam_ParamType(thisParam,addr,param)
  CLASS(ParamType),TARGET,INTENT(IN) :: thisParam
  TYPE(StringType),INTENT(INOUT) :: addr
  CLASS(ParamType),POINTER,INTENT(OUT) :: param

  CHARACTER(LEN=LEN_TRIM(addr)) :: addrIn,newAddr
  INTEGER(SIK) :: istp,ip
  TYPE(StringType) :: tmpAddr
  CLASS(ParamType),POINTER :: tmpParam,nextParam,parentParam

  nextParam => NULL()
  tmpAddr=''
  addrIn=TRIM(addr)
  IF(LEN_TRIM(addrIn) > 0) THEN
    CALL get_ParamType(thisParam,TRIM(addrIn),tmpParam)
    IF(ASSOCIATED(tmpParam)) THEN
      !Check to make sure param is in thisParam
      !if param is null that's ok too because we're guaranteed to
      !be within thisParam

      SELECTTYPE(tp => tmpParam)
      TYPE IS(ParamType_List)
        !Return the first entry in the list
        IF(ALLOCATED(tp%pList)) THEN
          nextParam => tp%pList(1)%pdat
          tmpAddr=TRIM(addrIn)//'->'//nextParam%name
        ELSE
          !This could be a null list within a list that still has
          !entries so get the parent and
          !Get the parent list
          newAddr=''
          istp=INDEX(addrIn,'->',.TRUE.)-1
          parentParam => NULL()
          IF(istp > 0) THEN
            newAddr=addrIn(1:istp)
            CALL get_ParamType(thisParam,TRIM(newAddr),parentParam)
          ENDIF
          !Search for the next parameter or parameter list
          parentSearch1: DO WHILE(ASSOCIATED(parentParam))

            !Search the parent list
            SELECTTYPE(pp => parentParam); TYPE IS(ParamType_List)
              DO ip=1,SIZE(pp%pList)-1
                IF(ASSOCIATED(pp%pList(ip)%pdat,tmpParam)) THEN
                  !Get the next parameter in the list
                  nextParam => pp%pList(ip+1)%pdat
                  tmpAddr=TRIM(newAddr)//'->'//nextParam%name
                  EXIT parentSearch1
                ENDIF
              ENDDO

              !Special case for when the current parameter is the
              !last parameter in the list
              IF(ASSOCIATED(pp%pList(ip)%pdat,tmpParam)) THEN
                !Go up another level and update the search
                tmpParam => parentParam
                istp=INDEX(newAddr,'->',.TRUE.)-1
2016
2017
2018
2019
2020
2021
                parentParam => NULL()
                IF(istp > 0) THEN
                  newAddr=addrIn(1:istp)
                  CALL get_ParamType(thisParam,TRIM(newAddr),parentParam)
                ENDIF
              ENDIF
Graham, Aaron's avatar
Graham, Aaron committed
2022
2023
2024
2025
2026
2027
2028
2029
2030
2031
2032
2033
2034
2035
2036
2037
2038
2039
2040
2041
2042
2043
2044
2045
2046
2047
2048
2049
2050
2051
2052
2053
2054
            ENDSELECT
          ENDDO parentSearch1
        ENDIF
      CLASS DEFAULT
        !All other types
        IF(ASSOCIATED(tp%pdat)) THEN
          !Append the address and return the next parameter
          nextParam => tp%pdat
          tmpAddr=TRIM(addrIn)//'->'//nextParam%name
        ELSE
          !This was a leaf parameter, so move up one level in the list

          !Get the parent list
          istp=INDEX(addrIn,'->',.TRUE.)-1
          parentParam => NULL()
          IF(istp > 0) THEN
            newAddr=addrIn(1:istp)
            CALL get_ParamType(thisParam,TRIM(newAddr),parentParam)
          ENDIF

          !Search for the next parameter or parameter list
          parentSearch2: DO WHILE(ASSOCIATED(parentParam))

            !Search the parent list
            SELECTTYPE(pp => parentParam); TYPE IS(ParamType_List)
              DO ip=1,SIZE(pp%pList)-1
                IF(ASSOCIATED(pp%pList(ip)%pdat,tmpParam)) THEN
                  !Get the next parameter in the list
                  nextParam => pp%pList(ip+1)%pdat
                  tmpAddr=TRIM(newAddr)//'->'//nextParam%name
                  EXIT parentSearch2
                ENDIF
              ENDDO
2055

Graham, Aaron's avatar
Graham, Aaron committed
2056
2057
2058
2059
2060
2061
              !Special case for when the current parameter is the
              !last parameter in the list
              IF(ASSOCIATED(pp%pList(ip)%pdat,tmpParam)) THEN
                !Go up another level and update the search
                tmpParam => parentParam
                istp=INDEX(newAddr,'->',.TRUE.)-1
2062
2063
2064
2065
2066
2067
                parentParam => NULL()
                IF(istp > 0) THEN
                  newAddr=addrIn(1:istp)
                  CALL get_ParamType(thisParam,TRIM(newAddr),parentParam)
                ENDIF
              ENDIF
Graham, Aaron's avatar
Graham, Aaron committed
2068
2069
            ENDSELECT
          ENDDO parentSearch2
2070
        ENDIF
Graham, Aaron's avatar
Graham, Aaron committed
2071
2072
2073
2074
2075
2076
2077
2078
2079
2080
2081
      ENDSELECT
    ENDIF
  ELSE
    !No address is given so assume the client wants to start at the root
    IF(LEN_TRIM(thisParam%name) > 0) THEN
      tmpAddr=thisParam%name
      nextParam => thisParam
    ELSE
      IF(ASSOCIATED(thisParam%pdat)) THEN
        tmpAddr=thisParam%pdat%name
        nextParam => thisParam%pdat
2082
      ENDIF
Graham, Aaron's avatar
Graham, Aaron committed
2083
2084
2085
2086
2087
    ENDIF
  ENDIF
  addr=tmpAddr
  param => nextParam
ENDSUBROUTINE getNextParam_ParamType
2088
2089
2090

!
!-------------------------------------------------------------------------------
2091
2092
2093
2094
2095
2096
2097
2098
2099
2100
2101
2102
2103
2104
2105
2106
2107
2108
2109
2110
2111
2112
2113
2114
2115
2116
!> @brief Routine can be used as an "iterator" over sublists one level deep.
!>        It takes an absolute list address a sublist and returns the next
!>        sublist
!> @param thisParam the parent parameter list to obtain the next sublist from
!> @param addr the absolute address of the parent list
!> @param param a pointer to the next sublist, if null the first sublist will
!>        be returned
!>
!> To use this routine as an iterator, a loop of the following form should be
!> written in the client code:
!> @code
!> TYPE(StringType) :: addr
!> TYPE(ParameType) :: paramList
!> CLASS(ParamType),POINTER :: nextParam
!> TYPE(ParamType) :: iterPL
!> addr=''
!> nextParam => NULL()
!> CALL paramList%getSubPL(addr,nextParam)
!> DO WHILE(ASSOCIATED(nextParam))
!>   iterPL=nextParam
!>   !Do stuff with nextParam
!>   !...
!>   CALL paramList%getSubPL(addr,nextParam)
!> ENDDO
!> @endcode
!>
Graham, Aaron's avatar
Graham, Aaron committed
2117
2118
2119
2120
2121
2122
2123
2124
2125
2126
2127
2128
2129
2130
2131
2132
2133
2134
2135
2136
2137
SUBROUTINE getSubParam_List(thisParam,addr,param)
  CLASS(ParamType),TARGET,INTENT(IN) :: thisParam
  TYPE(StringType),INTENT(IN) :: addr
  CLASS(ParamType),POINTER,INTENT(INOUT) :: param

  INTEGER(SIK) :: i,istt
  CLASS(ParamType),POINTER :: aParam,nextParam,tmpPtr

  nextParam => NULL()
  IF(LEN_TRIM(addr) > 0) THEN
    CALL get_ParamType(thisParam,CHAR(addr),aParam)
    IF(ASSOCIATED(aParam)) THEN
      SELECTTYPE(aParam); TYPE IS(ParamType_List)
        !Sublists only exist for lists
        IF(ALLOCATED(aParam%pList)) THEN
          istt=1
          DO i=1,SIZE(aParam%pList)
            tmpPtr => aParam%pList(i)%pdat
            IF(ASSOCIATED(tmpPtr,param)) THEN
              istt=i+1
              EXIT
2138
            ENDIF
Graham, Aaron's avatar
Graham, Aaron committed
2139
2140
2141
2142
2143
2144
2145
          ENDDO
          DO i=istt,SIZE(aParam%pList)
            SELECTTYPE(p => aParam%pList(i)%pdat); TYPE IS(ParamType_List)
              nextParam => aParam%pList(i)%pdat
              EXIT
            ENDSELECT
          ENDDO
2146
        ENDIF
Graham, Aaron's avatar
Graham, Aaron committed
2147
2148
2149
2150
2151
2152
2153
2154
2155
2156
2157
2158
      ENDSELECT
    ENDIF
  ELSE
    SELECTTYPE(p => thisParam)
    TYPE IS(ParamType_List)
       tmpPtr => thisParam
      IF(.NOT.ASSOCIATED(tmpPtr,param)) nextParam => thisParam
    CLASS DEFAULT
      tmpPtr => thisParam%pdat
      IF(.NOT.ASSOCIATED(tmpPtr,param)) THEN
        SELECTTYPE(pdat => thisParam%pdat); TYPE IS(ParamType_List)
          nextParam => thisParam%pdat
2159
        ENDSELECT
2160
      ENDIF
Graham, Aaron's avatar
Graham, Aaron committed
2161
2162
2163
2164
    ENDSELECT
  ENDIF
  param => nextParam
ENDSUBROUTINE getSubParam_List
2165
2166
2167
2168
2169
2170
2171
2172
2173
2174
2175
2176
2177
2178
2179
2180
2181
2182
2183
2184
2185
2186
2187
2188
2189
2190
2191
2192
!
!-------------------------------------------------------------------------------
!> @brief Routine can be used as an "iterator" over parameters(not just lists)
!>        one level deep. It takes an absolute list address a parameter and
!>        returns the next parameter
!> @param thisParam the parent parameter list to obtain the next sublist from
!> @param addr the absolute address of the parent list
!> @param param a pointer to the next parameter(1-level deep), if null the first
!>        sub-parameter will be returned
!>
!> To use this routine as an iterator, a loop of the following form should be
!> written in the client code:
!> @code
!> TYPE(StringType) :: addr
!> TYPE(ParameType) :: paramList
!> CLASS(ParamType),POINTER :: nextParam
!> TYPE(ParamType) :: iterPL
!> addr=''
!> nextParam => NULL()
!> CALL paramList%getSubParams(addr,nextParam)
!> DO WHILE(ASSOCIATED(nextParam))
!>   iterPL=nextParam
!>   !Do stuff with nextParam
!>   !...
!>   CALL paramList%getSubParams(addr,nextParam)
!> ENDDO
!> @endcode
!>
Graham, Aaron's avatar
Graham, Aaron committed
2193
2194
2195
2196
2197
2198
2199
2200
2201
2202
2203
2204
2205
2206
2207
2208
2209
2210
2211
2212
2213
2214
2215
2216
2217
2218
2219
2220
2221
2222
2223
2224
2225
2226
2227
2228
SUBROUTINE getSubParams(thisParam,addr,param)
  CLASS(ParamType),TARGET,INTENT(IN) :: thisParam
  TYPE(StringType),INTENT(IN) :: addr
  CLASS(ParamType),POINTER,INTENT(INOUT) :: param

  INTEGER(SIK) :: i
  CLASS(ParamType),POINTER :: tmpParam,nextParam

  nextParam => NULL()
  tmpParam => NULL()
  IF(LEN_TRIM(addr) > 0) THEN
    !Address passed in is the parent list
    CALL get_ParamType(thisParam,TRIM(addr),tmpParam)
  ELSE
    !No Address so assume root
    IF(LEN_TRIM(thisParam%name) > 0) THEN
      tmpParam => thisParam
    ELSE
      tmpParam => thisParam%pdat
    ENDIF
  ENDIF

  IF(ASSOCIATED(tmpParam)) THEN
    !Check to make sure param is in thisParam
    !if param is null that's ok too because we're guaranteed to
    !be within thisParam
    SELECTTYPE(tp => tmpParam); TYPE IS(ParamType_List)
      IF(ALLOCATED(tp%pList)) THEN
        !Search the PL for an element
        IF(ASSOCIATED(param)) THEN
          DO i=1,SIZE(tp%pList)
            IF(ASSOCIATED(tp%pList(i)%pdat,param)) THEN
              IF(i+1 <= SIZE(tp%pList)) THEN
                nextParam => tp%pList(i+1)%pdat
              ELSE
                nextParam => NULL()
2229
              ENDIF
Graham, Aaron's avatar
Graham, Aaron committed
2230
              EXIT
2231
            ENDIF
Graham, Aaron's avatar
Graham, Aaron committed
2232
2233
2234
2235
2236
          ENDDO
        ELSE
          !Return first element
          IF(SIZE(tp%pList) > 0) THEN
            nextParam => tp%pList(1)%pdat
2237
          ENDIF
Graham, Aaron's avatar
Graham, Aaron committed
2238
2239
2240
2241
        ENDIF
      ELSE
        !Return NULL if parent list is empty
        nextParam => NULL()
2242
      ENDIF
Graham, Aaron's avatar
Graham, Aaron committed
2243
2244
2245
2246
    ENDSELECT
  ENDIF
  param => nextParam
ENDSUBROUTINE getSubParams
2247
2248
!
!-------------------------------------------------------------------------------
2249
!> @brief Returns a pointer to a parameter whose name matches the given input
2250
!>        name.
2251
2252
2253
2254
2255
2256
2257
2258
2259
2260
2261
!> @param thisParam the parameter object to search for @c name
!> @param name the name to locate in the parameter object
!> @param param the pointer to the parameter object whose name matches @c name
!>
!> If the name cannot be matched then @c param is returned as null. The search
!> name can be any full or partial path to a parameter object name. If it is
!> a partial path then the first occurence of this name is returned.
!>
!> To indicate accessing a parameter in a sublist the symbol "->" is used. For
!> example "Some list -> some parameter". Name matching is @b not case sensitive
!> and names can have spaces and leading or trailing whitespace. Input names to
2262
!> this procedure cannot be blank or "->somename" or
2263
2264
!> "firstname -> -> secondname".
!>
2265
!> This routine is primarily used by all @c set and @c get routines of the
2266
2267
!> extended types.
!>
Graham, Aaron's avatar
Graham, Aaron committed
2268
2269
2270
2271
2272
2273
2274
2275
2276
2277
2278
2279
2280
2281
2282
2283
2284
2285
2286
2287
2288
2289
2290
2291
2292
2293
2294
2295
2296
2297
2298
2299
2300
2301
2302
2303
2304
2305
2306
2307
2308
2309
2310
2311
2312
2313
2314
2315
2316
2317
2318
2319
2320
2321
2322
RECURSIVE SUBROUTINE get_ParamType(thisParam,name,param)
  CHARACTER(LEN=*),PARAMETER :: myName='get_ParamType'
  CLASS(ParamType),TARGET,INTENT(IN) :: thisParam
  CHARACTER(LEN=*),INTENT(IN) :: name
  CLASS(ParamType),POINTER,INTENT(INOUT) :: param
  CHARACTER(LEN=LEN(name)) :: thisname,nextname
  CHARACTER(LEN=:),ALLOCATABLE :: pname
  INTEGER(SIK) :: ipos,i
  CLASS(ParamType),POINTER :: tmpParam
  LOGICAL(SBK),SAVE :: partial_match=.TRUE.

  ipos=INDEX(name,'->')
  thisname=name
  nextname=''
  IF(ipos > 0) THEN
    thisname=ADJUSTL(name(1:ipos-1))
    nextname=ADJUSTL(name(ipos+2:LEN(name)))
  ENDIF

  param => NULL()
  IF(LEN_TRIM(thisname) > 0) THEN
    SELECTTYPE(thisParam)
    TYPE IS(ParamType_List)
      CALL toUPPER(thisname)
      IF(LEN_TRIM(nextname) > 0) THEN
        !Set names to upper case for matching
        pname=CHAR(thisParam%name%upper())
        !Search the list for nextname (thisname must match parameter name)
        IF(TRIM(pname) == TRIM(thisname) .AND. &
            ALLOCATED(thisParam%pList)) THEN
          DO i=1,SIZE(thisParam%pList)
            !CALL thisParam%pList(i)%getParam(TRIM(nextname),param)
            IF(ASSOCIATED(thisParam%pList(i)%pdat)) &
                CALL get_ParamType(thisParam%pList(i)%pdat, &
                TRIM(nextname),param)
            IF(ASSOCIATED(param)) EXIT !Found it, stop searching
          ENDDO
        ENDIF
      ELSE
        !End of search list, check search name against list name
        pname=CHAR(thisParam%name%upper())
        IF(TRIM(pname) == TRIM(thisname)) THEN
          !Search name is thisParam's name
          param => thisParam
        ELSE
          !Search for thisname within the list
          IF(ALLOCATED(thisParam%pList) .AND. partial_match) THEN
            DO i=1,SIZE(thisParam%pList)
              IF(ASSOCIATED(thisParam%pList(i)%pdat)) &
                  CALL get_ParamType(thisParam%pList(i)%pdat, &
                  TRIM(thisname),param)
              IF(ASSOCIATED(param)) EXIT !Found it, stop searching
            ENDDO
          ENDIF
        ENDIF
2323
      ENDIF
Graham, Aaron's avatar
Graham, Aaron committed
2324
2325
2326
2327
2328
2329
2330
2331
2332
2333
2334
2335
2336
2337
2338
2339
2340
2341
2342
2343
2344
2345
2346
2347
2348
2349
    CLASS DEFAULT
      CALL toUPPER(thisname)
      IF(ASSOCIATED(thisParam%pdat)) THEN
        !Set names to upper case for matching
        pname=CHAR(thisParam%pdat%name%upper())
        IF(TRIM(pname) == TRIM(thisname)) THEN
          !Found the match
          tmpParam => thisParam%pdat
          IF(LEN_TRIM(nextname) > 0) THEN
            !Set partial matching to off
            partial_match=.FALSE.
            CALL get_ParamType(tmpParam,name,param)
            partial_match=.TRUE.
          ELSE
            param => tmpParam
            NULLIFY(tmpParam)
          ENDIF
        ELSE
          !Search 1-level down
          CALL thisParam%pdat%getParam(thisname,param)
          IF(ASSOCIATED(param) .AND. LEN_TRIM(nextname) > 0) THEN
            tmpParam => param
            param => NULL()
            CALL get_ParamType(tmpParam,name,param)
          ENDIF
        ENDIF
2350
      ELSE
Graham, Aaron's avatar
Graham, Aaron committed
2351
2352
2353
        pname=CHAR(thisParam%name%upper())
        IF(TRIM(pname) == TRIM(thisname) .AND. LEN_TRIM(nextName) == 0) &
            param => thisParam
2354
      ENDIF
Graham, Aaron's avatar
Graham, Aaron committed
2355
2356
2357
2358
2359
2360
    ENDSELECT
  ELSE
    CALL eParams%raiseError(modName//'::'//myName// &
        ' - cannot search for a blank name!')
  ENDIF
ENDSUBROUTINE get_ParamType
2361
!
2362
!-------------------------------------------------------------------------------
2363
2364
2365
2366
2367
!> @brief Adds a new parameter to a parameter object
!> @param thisParam the parameter object to add a parameter to
!> @param name the name of the parameter list within @c thisParam to put the new
!>        parameter
!> @param newParam the new parameter to add to thisParam
2368
!>
2369
2370
2371
2372
!> If @c name contains directions to sublists that do not exist these parameter
!> lists will automatically be created. Full paths should be used with this
!> routine to avoid unintentional matching or partial paths of parameters that
!> may have the same names in different lists. When accessing sublists names can
2373
!> be repeated, so long as the full path is still unique. If @c name matches a
2374
2375
2376
2377
2378
2379
!> parameter name that is not a list it will produce an error. When @c name is
!> blank it is added to the list at the current level.
!>
!> This routine is primarily used by all the @c add routines of the extended
!> types.
!>
Graham, Aaron's avatar
Graham, Aaron committed
2380
2381
2382
2383
2384
2385
2386
2387
2388
2389
2390
2391
2392
2393
2394
2395
2396
2397
2398
2399
2400
2401
2402
2403
2404
2405
2406
2407
2408
2409
2410
2411
2412
2413
2414
2415
2416
2417
2418
2419
2420
2421
2422
2423
2424
2425
2426
2427
2428
2429
RECURSIVE SUBROUTINE add_ParamType(thisParam,name,newParam)
  CHARACTER(LEN=*),PARAMETER :: myName='add_ParamType'
  CLASS(ParamType),INTENT(INOUT) :: thisParam
  CHARACTER(LEN=*),INTENT(IN) :: name
  CLASS(ParamType),INTENT(IN) :: newParam
  LOGICAL(SBK),SAVE :: lsubListSearch=.TRUE.
  TYPE(StringType) :: thisname,nextname,pname,listName
  INTEGER(SIK) :: ipos,i,np
  TYPE(ParamType),ALLOCATABLE :: tmpList(:)
  CLASS(ParamType),POINTER :: tmpParam

  SELECTTYPE(thisParam)
  TYPE IS(ParamType)
    IF(ASSOCIATED(thisParam%pdat)) THEN
      CALL add_ParamType(thisParam%pdat,name,newParam)
    ELSE
      !thisParam is not initialized
      IF(LEN_TRIM(name) > 0) THEN
        !Create a new list on thisParam
        ALLOCATE(ParamType_List :: thisParam%pdat)
        thisParam%pdat%datatype='TYPE(ParamType_List)'

        !Determine the name for the list and the next name
        ipos=INDEX(name,'->')
        IF(ipos > 0) THEN
          thisParam%pdat%name=TRIM(ADJUSTL(name(1:ipos-1)))
          nextname=ADJUSTL(name(ipos+2:LEN(name)))
        ELSE
          thisParam%pdat%name=TRIM(ADJUSTL(name))
          nextname=''
        ENDIF
        CALL add_ParamType(thisParam%pdat,TRIM(nextname),newParam)
      ELSE
        !assign newParam to thisParam
        CALL assign_ParamType(thisParam,newParam)
      ENDIF
    ENDIF
  TYPE IS(ParamType_List)
    np=0
    IF(ALLOCATED(thisParam%pList)) np=SIZE(thisParam%pList)
    IF(LEN_TRIM(name) > 0) THEN
      !Check if the name matches this list
      ipos=INDEX(name,'->')
      IF(ipos > 0) THEN
        thisname=TRIM(ADJUSTL(name(1:ipos-1)))
        nextname=ADJUSTL(name(ipos+2:LEN(name)))
      ELSE
        thisname=TRIM(ADJUSTL(name))
        nextname=''
      ENDIF
2430

Graham, Aaron's avatar
Graham, Aaron committed
2431
2432
2433
2434
2435
2436
2437
2438
2439
2440
2441
2442
2443
2444
2445
2446
2447
2448
2449
2450
2451
2452
2453
2454
2455
2456
2457
      pname=thisParam%name%upper()
      thisname = thisname%upper()
      IF(TRIM(pname) == TRIM(thisname)) THEN
        !only search if it's not the last name in the
        !full address. last name is guaranteed not to exist
        !and this prevents accidental partial matching in sublists.
        lsubListSearch=.FALSE.
        CALL add_ParamType(thisParam,TRIM(nextname),newParam)
        lsubListSearch=.TRUE.
      ELSE
        !Search for thisname within...
        NULLIFY(tmpParam)
        IF(lsubListSearch) THEN
          !...all sub-entries.
          CALL get_ParamType(thisParam,TRIM(thisname),tmpParam)
        ELSE
          !...just this list
          DO i=1,np
            listName=''
            IF(ASSOCIATED(thisParam%pList(i)%pdat)) &
                listName=TRIM(thisParam%pList(i)%pdat%name%upper())
            IF(TRIM(listName) == TRIM(thisName)) THEN
              tmpParam => thisParam%pList(i)%pdat
              EXIT
            ENDIF
          ENDDO
        ENDIF
2458

Graham, Aaron's avatar
Graham, Aaron committed
2459
2460
2461
2462
2463
2464
2465
2466
2467
2468
2469
2470
        IF(ASSOCIATED(tmpParam)) THEN
          !Found parameter with matching name
          CALL add_ParamType(tmpParam,TRIM(nextname),newParam)
        ELSE
          !Create a new entry in the list for the new parameter
          IF(np > 0) THEN
            !Copy the parameter list to a temporary
            ALLOCATE(tmpList(np))
            DO i=1,np
              CALL assign_ParamType(tmpList(i),thisParam%pList(i))
              CALL clear_ParamType(thisParam%pList(i))
            ENDDO
2471

Graham, Aaron's avatar
Graham, Aaron committed
2472
2473
2474
2475
2476
2477
2478
2479
2480
            !Reallocate the parameter list and copy everything back
            DEALLOCATE(thisParam%pList)
            ALLOCATE(thisParam%pList(np+1))
            DO i=1,np
              CALL assign_ParamType(thisParam%pList(i),tmpList(i))
              CALL clear_ParamType(tmpList(i))
            ENDDO
            DEALLOCATE(tmpList)
            i=np+1
2481
          ELSE
Graham, Aaron's avatar
Graham, Aaron committed
2482
2483
2484
2485
            !Allocate the list to 1 element
            ALLOCATE(thisParam%pList(1))
            i=1
          ENDIF
2486

Graham, Aaron's avatar
Graham, Aaron committed
2487
2488
2489
2490
2491
2492
2493
          !Make recursive call to add the parameter in the new empty parameter
          CALL add_ParamType(thisParam%pList(i),name,newParam)
        ENDIF
      ENDIF
    ELSE
      !Create a new entry in the list for the new parameter
      IF(np > 0) THEN
2494

Graham, Aaron's avatar
Graham, Aaron committed
2495
2496
2497
2498
2499
2500
2501
2502
2503
2504
2505
2506
2507
2508
        !Search within the list to avoid duplicates.
        IF(LEN_TRIM(newParam%name) == 0 .AND. ASSOCIATED(newParam%pdat)) THEN
          thisname=newParam%pdat%name%upper()
        ELSE
          thisname=newParam%name%upper()
        ENDIF
        NULLIFY(tmpParam)
        DO i=1,np
          listName=''
          IF(ASSOCIATED(thisParam%pList(i)%pdat)) &
              listName=TRIM(thisParam%pList(i)%pdat%name%upper())
          IF(TRIM(listName) == TRIM(thisName)) THEN
            tmpParam => thisParam%pList(i)%pdat
            EXIT
2509
          ENDIF
Graham, Aaron's avatar
Graham, Aaron committed
2510
2511
2512
2513
2514
2515
2516
2517
2518
2519
2520
2521
2522
2523
2524
2525
2526
2527
2528
2529
2530
        ENDDO

        IF(.NOT.ASSOCIATED(tmpParam)) THEN
          !Copy the parameter list to a temporary
          ALLOCATE(tmpList(np))
          DO i=1,np
            CALL assign_ParamType(tmpList(i),thisParam%pList(i))
            CALL thisParam%pList(i)%clear()
          ENDDO

          !Reallocate the parameter list and copy everything back
          DEALLOCATE(thisParam%pList)
          ALLOCATE(thisParam%pList(np+1))
          DO i=1,np
            CALL assign_ParamType(thisParam%pList(i),tmpList(i))
            CALL tmpList(i)%clear()
          ENDDO
          DEALLOCATE(tmpList)
          i=np+1
          CALL add_ParamType(thisParam%pList(i),name,newParam)
        ELSE
2531
          CALL eParams%raiseError(modName//'::'//myName// &
Graham, Aaron's avatar
Graham, Aaron committed
2532
2533
2534
2535
2536
2537
2538
2539
2540
2541
2542
2543
2544
2545
              ' - parameter name "'//TRIM(thisname)// &
            '" already exists! Use set method!')
        ENDIF
      ELSE
        !Allocate the list to 1 element
        ALLOCATE(thisParam%pList(1))
        CALL add_ParamType(thisParam%pList(1),name,newParam)
      ENDIF
    ENDIF
  CLASS DEFAULT
    CALL eParams%raiseError(modName//'::'//myName// &
        ' - cannot add parameter to type "'//thisParam%datatype//'"!')
  ENDSELECT
ENDSUBROUTINE add_ParamType
2546
!
2547
!-------------------------------------------------------------------------------
2548
2549
2550
2551
2552
2553
!> @brief Removes a parameter with a given name from a parameter object.
!> @param thisParam the host parameter to remo