ParameterLists.f90 434 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
55
56
!>
!> @par Module Dependencies
!>  - @ref IntrType "IntrType": @copybrief IntrType
57
58
59
!>  - @ref Strings "Strings": @copybrief Strings
!>  - @ref ExceptionHandler "ExceptionHandler": @copybrief ExceptionHandler
!>  - @ref IO_Strings "IO_Strings": @copybrief IO_Strings
60
!>  - @ref UnitTest "UnitTest": @copybrief UnitTest
61
62
63
64
!>
!> @par EXAMPLE
!> @code
!> PROGRAM
65
!>
66
!>   IMPLICIT NONE
67
!>
68
69
70
71
!>
!> END PROGRAM
!> @endcode
!>
72
!> @author Brendan Kochunas and Dan Jabaay and Benjamin Collins
73
!>   @date 07/26/2012
74
75
76
77
!> @par Revisions:
!>   (08/14/2012) - Dan Jabaay
!>   - Expanded functionality to scalar, one, two, and three dimensional arrays
!>     of the parameter types listed above.
78
79
!>   (03/07/2013) - Benjamin Collins
!>   - Added has function to return if the parameter list has a given parameter
80
81
!>   (10/22/2013) - Dan Jabaay
!>   - Added the %verify subroutine for validating two parameter lists and then
82
!>     checking that all of the values in the parameter list are equal.
83
84
85
86
!>   (05/18/2016) - Dan Jabaay
!>   - Added the %getString subroutine that returns any parameter as a string
!>     of the same dimension.  (e.g. will return a 1-D array of reals as a 1-D
!>     array of strings.)
87
88
!++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++!
MODULE ParameterLists
89
#include "UnitTest.h"
90
  USE ISO_FORTRAN_ENV
91
  USE UnitTest
92
93
94
  USE IntrType
  USE Strings
  USE ExceptionHandler
95
  USE IO_Strings
Brendan Kochunas's avatar
Brendan Kochunas committed
96
  USE FileType_XML
97
#ifdef FUTILITY_HAVE_Trilinos
98
99
  USE ForTeuchos_ParameterList
#endif
100

101
102
103
104
105
106
  IMPLICIT NONE
  PRIVATE !Default private for module contents
!
! List of Public items
  PUBLIC :: eParams
  PUBLIC :: ParamType
107
  PUBLIC :: ASSIGNMENT(=)
108
  PUBLIC :: OPERATOR(==)
109

110
111
112
113
  PUBLIC :: char_to_int_array
  PUBLIC :: char_to_double_array
  PUBLIC :: char_to_string_array

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

118
119
120
121
122
  !> Verification enumerations
  INTEGER(SIK),PARAMETER :: VALIDTYPE_VALIDATE=0
  INTEGER(SIK),PARAMETER :: VALIDTYPE_VERIFYTEST=1
  INTEGER(SIK),PARAMETER :: VALIDTYPE_VERIFYLIST=2

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

126
127
128
129
130
131
132
133
134
  !> @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.
135
  TYPE :: ParamType
136
137
138
    !> @brief The name of the parameter
    !>
    !> Set through input arguments
139
    TYPE(StringType) :: name
140
141
142
    !> @brief The data type for the parameter
    !>
    !> Set internally.
143
    TYPE(StringType) :: dataType
144
    !> An optional description for the parameter
145
    TYPE(StringType) :: description
146
147
148
149
150
    !> @brief The parameter value
    !>
    !> This is only allocated for variables of TYPE(ParamType) for any
    !> extended type it is the additional attribute that should be
    !> accessed.
151
152
153
154
    CLASS(ParamType),POINTER :: pdat => NULL()
!
!List of type bound procedures
    CONTAINS
155
156
      !> @copybrief ParameterLists::init_ParamType_List
      !> @copydoc ParameterLists::init_ParamType_List
157
      PROCEDURE,PASS,PRIVATE :: initParamList => init_ParamType_List
158
159
      !> @copybrief ParameterLists::init_ParamType_SSK
      !> @copydoc ParameterLists::init_ParamType_SSK
160
      PROCEDURE,PASS,PRIVATE :: initSSK => init_ParamType_SSK
161
162
163
164
165
166
167
168
169
      !> @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
170
171
172
      !> @copybrief ParameterLists::init_ParamType_SBK
      !> @copydoc ParameterLists::init_ParamType_SBK
      PROCEDURE,PASS,PRIVATE :: initSBK => init_ParamType_SBK
173
174
175
      !> @copybrief ParameterLists::init_ParamType_STR
      !> @copydoc ParameterLists::init_ParamType_STR
      PROCEDURE,PASS,PRIVATE :: initSTR => init_ParamType_STR
176
177
178
      !> @copybrief ParameterLists::init_ParamType_CHAR
      !> @copydoc ParameterLists::init_ParamType_CHAR
      PROCEDURE,PASS,PRIVATE :: initCHAR => init_ParamType_CHAR
179
180
181
182
183
184
      !> @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
185
186
187
188
189
190
      !> @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
191
192
193
      !> @copybrief ParameterLists::init_ParamType_SBK_a1
      !> @copydoc ParameterLists::init_ParamType_SBK_a1
      PROCEDURE,PASS,PRIVATE :: initSBKa1 => init_ParamType_SBK_a1
194
195
196
      !> @copybrief ParameterLists::init_ParamType_STR_a1
      !> @copydoc ParameterLists::init_ParamType_STR_a1
      PROCEDURE,PASS,PRIVATE :: initSTRa1 => init_ParamType_STR_a1
197
198
199
200
201
202
203
204
205
206
207
208
      !> @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
209
210
211
      !> @copybrief ParameterLists::init_ParamType_STR_a2
      !> @copydoc ParameterLists::init_ParamType_STR_a2
      PROCEDURE,PASS,PRIVATE :: initSTRa2 => init_ParamType_STR_a2
212
213
214
215
216
217
218
219
220
221
222
223
      !> @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
224
      !> Generic type bound interface for all @c init operations
225
      GENERIC :: init => initParamList,initSSK,initSDK,initSNK,initSLK, &
226
227
                 initSBK,initSTR,initCHAR,initSSKa1,initSDKa1,initSNKa1, &
                 initSLKa1,initSBKa1,initSTRa1,initSSKa2,initSDKa2,initSNKa2, &
228
                 initSLKa2,initSTRa2,initSSKa3,initSDKa3,initSNKa3,initSLKa3
229
      PROCEDURE,PASS :: initFromXML
230
231
      !> @copybrief ParameterLists::set_ParamType_List
      !> @copydoc ParameterLists::set_ParamType_List
232
      PROCEDURE,PASS,PRIVATE :: setParamList => set_ParamType_List
233
234
      !> @copybrief ParameterLists::set_ParamType_SSK
      !> @copydoc ParameterLists::set_ParamType_SSK
235
      PROCEDURE,PASS,PRIVATE :: setSSK => set_ParamType_SSK
236
237
238
239
240
241
242
243
244
      !> @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
245
246
247
      !> @copybrief ParameterLists::set_ParamType_SBK
      !> @copydoc ParameterLists::set_ParamType_SBK
      PROCEDURE,PASS,PRIVATE :: setSBK => set_ParamType_SBK
248
249
250
      !> @copybrief ParameterLists::set_ParamType_STR
      !> @copydoc ParameterLists::set_ParamType_STR
      PROCEDURE,PASS,PRIVATE :: setSTR => set_ParamType_STR
251
252
253
      !> @copybrief ParameterLists::set_ParamType_CHAR
      !> @copydoc ParameterLists::set_ParamType_CHAR
      PROCEDURE,PASS,PRIVATE :: setCHAR => set_ParamType_CHAR
254
255
256
257
258
259
      !> @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
260
261
262
263
264
265
      !> @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
266
267
268
      !> @copybrief ParameterLists::set_ParamType_SBK_a1
      !> @copydoc ParameterLists::set_ParamType_SBK_a1
      PROCEDURE,PASS,PRIVATE :: setSBKa1 => set_ParamType_SBK_a1
269
270
271
      !> @copybrief ParameterLists::set_ParamType_STR_a1
      !> @copydoc ParameterLists::set_ParamType_STR_a1
      PROCEDURE,PASS,PRIVATE :: setSTRa1 => set_ParamType_STR_a1
272
273
274
275
276
277
278
279
280
281
282
283
      !> @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
284
285
286
      !> @copybrief ParameterLists::set_ParamType_STR_a2
      !> @copydoc ParameterLists::set_ParamType_STR_a2
      PROCEDURE,PASS,PRIVATE :: setSTRa2 => set_ParamType_STR_a2
287
288
289
290
291
292
293
294
295
296
297
298
      !> @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
299
      !> Generic type bound interface for all @c set operations
300
      GENERIC :: set => setParamList,setSSK,setSDK,setSNK,setSLK, &
301
302
                 setSBK,setSTR,setCHAR,setSSKa1,setSDKa1,setSNKa1, &
                 setSLKa1,setSBKa1,setSTRa1,setSSKa2,setSDKa2,setSNKa2, &
303
                 setSLKa2,setSTRa2,setSSKa3,setSDKa3,setSNKa3,setSLKa3
304
305
      !> @copybrief ParameterLists::get_ParamType
      !> @copydoc ParameterLists::get_ParamType
306
      PROCEDURE,PASS,PRIVATE :: getParam => get_ParamType
307
308
      !> @copybrief ParameterLists::get_ParamType_List
      !> @copydoc ParameterLists::get_ParamType_List
309
      PROCEDURE,PASS,PRIVATE :: getParamList => get_ParamType_List
310
311
      !> @copybrief ParameterLists::get_ParamType_SSK
      !> @copydoc ParameterLists::get_ParamType_SSK
312
      PROCEDURE,PASS,PRIVATE :: getSSK => get_ParamType_SSK
313
314
315
316
317
318
319
320
321
      !> @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
322
323
324
      !> @copybrief ParameterLists::get_ParamType_SBK
      !> @copydoc ParameterLists::get_ParamType_SBK
      PROCEDURE,PASS,PRIVATE :: getSBK => get_ParamType_SBK
325
326
327
      !> @copybrief ParameterLists::get_ParamType_STR
      !> @copydoc ParameterLists::get_ParamType_STR
      PROCEDURE,PASS,PRIVATE :: getSTR => get_ParamType_STR
328
329
330
      !> @copybrief ParameterLists::get_ParamType_CHAR
      !> @copydoc ParameterLists::get_ParamType_CHAR
      PROCEDURE,PASS,PRIVATE :: getCHAR => get_ParamType_CHAR
331
332
333
334
335
336
      !> @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
337
338
339
340
341
342
      !> @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
343
344
345
      !> @copybrief ParameterLists::get_ParamType_SBK_a1
      !> @copydoc ParameterLists::get_ParamType_SBK_a1
      PROCEDURE,PASS,PRIVATE :: getSBKa1 => get_ParamType_SBK_a1
346
347
348
      !> @copybrief ParameterLists::get_ParamType_STR_a1
      !> @copydoc ParameterLists::get_ParamType_STR_a1
      PROCEDURE,PASS,PRIVATE :: getSTRa1 => get_ParamType_STR_a1
349
350
351
352
353
354
355
356
357
358
359
360
      !> @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
361
362
363
      !> @copybrief ParameterLists::get_ParamType_STR_a2
      !> @copydoc ParameterLists::get_ParamType_STR_a2
      PROCEDURE,PASS,PRIVATE :: getSTRa2 => get_ParamType_STR_a2
364
365
366
367
368
369
370
371
372
373
374
375
      !> @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
376
      !> Generic type bound interface for all @c get operations
377
      GENERIC :: get => getParam,getParamList,getSSK,getSDK,getSNK, &
378
                 getSLK,getSBK,getSTR,getCHAR,getSSKa1,getSDKa1,getSNKa1, &
379
380
                 getSBKa1,getSLKa1,getSTRa1,getSSKa2,getSDKa2,getSNKa2, &
                 getSLKa2,getSTRa2,getSSKa3,getSDKa3,getSNKa3,getSLKa3
381
382
      !> @copybrief ParameterLists::add_ParamType
      !> @copydoc ParameterLists::add_ParamType
383
      PROCEDURE,PASS,PRIVATE :: addParam => add_ParamType
384
385
      !> @copybrief ParameterLists::add_ParamType_List
      !> @copydoc ParameterLists::add_ParamType_List
386
      PROCEDURE,PASS,PRIVATE :: addList => add_ParamType_List
387
388
      !> @copybrief ParameterLists::add_ParamType_SSK
      !> @copydoc ParameterLists::add_ParamType_SSK
389
      PROCEDURE,PASS,PRIVATE :: addSSK => add_ParamType_SSK
390
391
      !> @copybrief ParameterLists::add_ParamType_SDK
      !> @copydoc ParameterLists::add_ParamType_SDK
392
      PROCEDURE,PASS,PRIVATE :: addSDK => add_ParamType_SDK
393
394
      !> @copybrief ParameterLists::add_ParamType_SNK
      !> @copydoc ParameterLists::add_ParamType_SNK
395
      PROCEDURE,PASS,PRIVATE :: addSNK => add_ParamType_SNK
396
397
      !> @copybrief ParameterLists::add_ParamType_SLK
      !> @copydoc ParameterLists::add_ParamType_SLK
398
399
400
401
      PROCEDURE,PASS,PRIVATE :: addSLK => add_ParamType_SLK
      !> @copybrief ParameterLists::add_ParamType_SBK
      !> @copydoc ParameterLists::add_ParamType_SBK
      PROCEDURE,PASS,PRIVATE :: addSBK => add_ParamType_SBK
402
403
      !> @copybrief ParameterLists::add_ParamType_STR
      !> @copydoc ParameterLists::add_ParamType_STR
404
      PROCEDURE,PASS,PRIVATE :: addSTR => add_ParamType_STR
405
406
407
      !> @copybrief ParameterLists::add_ParamType_CHAR
      !> @copydoc ParameterLists::add_ParamType_CHAR
      PROCEDURE,PASS,PRIVATE :: addCHAR => add_ParamType_CHAR
408
409
410
411
412
413
      !> @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
414
415
416
417
418
419
      !> @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
420
421
422
      !> @copybrief ParameterLists::add_ParamType_SBK_a1
      !> @copydoc ParameterLists::add_ParamType_SBK_a1
      PROCEDURE,PASS,PRIVATE :: addSBKa1 => add_ParamType_SBK_a1
423
424
425
      !> @copybrief ParameterLists::add_ParamType_STR_a1
      !> @copydoc ParameterLists::add_ParamType_STR_a1
      PROCEDURE,PASS,PRIVATE :: addSTRa1 => add_ParamType_STR_a1
426
427
428
429
430
431
432
433
434
435
436
437
      !> @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
438
439
440
      !> @copybrief ParameterLists::add_ParamType_STR_a2
      !> @copydoc ParameterLists::add_ParamType_STR_a2
      PROCEDURE,PASS,PRIVATE :: addSTRa2 => add_ParamType_STR_a2
441
442
443
444
445
446
447
448
449
450
451
452
      !> @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
453
      !> Generic type bound interface for all @c add operations
454
      GENERIC :: add => addParam,addList,addSSK,addSDK, &
455
         addSNK,addSLK,addSBK,addSTR,addCHAR,addSSKa1,addSDKa1, &
456
         addSNKa1,addSLKa1,addSBKa1,addSTRa1,addSSKa2,addSDKa2, &
457
         addSNKa2,addSLKa2,addSTRa2,addSSKa3,addSDKa3,addSNKa3,addSLKa3
458
459
460
      !> @copybrief ParameterLists::remove_ParamType
      !> @copydoc ParameterLists::remove_ParamType
      PROCEDURE,PASS :: remove => remove_ParamType
461
462
463
464
465
466
467
468
469
470
471
472
473
474
      !> @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
475
476
      !> @copybrief ParameterLists::has_ParamType
      !> @copydoc ParameterLists::has_ParamType
477
478
479
      PROCEDURE,PASS :: has => has_ParamType
      !> @copybrief ParameterLists::getNextParam_ParamType
      !> @copydoc ParameterLists::getNextParam_ParamType
480
      PROCEDURE,PASS :: getNextParam => getNextParam_ParamType
481
482
      !> @copybrief ParameterLists::getSubParam_List
      !> @copydoc ParameterLists::getSubParam_List
483
      PROCEDURE,PASS :: getSubPL => getSubParam_List
484
485
486
      !> @copybrief ParameterLists::getSubParams
      !> @copydoc ParameterLists::getSubParams
      PROCEDURE,PASS :: getSubParams => getSubParams
487
488
489
      !> @copybrief ParameterLists::validate_ParamType
      !> @copydoc ParameterLists::validate_ParamType
      PROCEDURE,PASS :: validate => validate_ParamType
490
491
492
493
494
495
      !> @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
496
497
      !> @copybrief ParameterLists::edit_ParamType
      !> @copydoc ParameterLists::edit_ParamType
498
      PROCEDURE,PASS :: edit => edit_ParamType
499
500
501
      !> @copybrief ParameterLists::editToXML_ParamType
      !> @copydoc ParameterLists::editToXML_ParamType
      PROCEDURE,PASS :: editToXML => editToXML_ParamType
502
503
      !> @copybrief ParameterLists::clear_ParamType
      !> @copydoc ParameterLists::clear_ParamType
504
      PROCEDURE,PASS :: clear => clear_ParamType
505
#ifdef FUTILITY_HAVE_Trilinos
506
507
      PROCEDURE,PASS :: toTeuchosPlist
#endif
508
  PROCEDURE :: procXMLTree
509
  ENDTYPE ParamType
510

511
512
513
  !> @brief Extended type of a ParamType for defining a list of parameters
  TYPE,EXTENDS(ParamType) :: ParamType_List
    !> The list of parameters
514
    TYPE(ParamType),ALLOCATABLE :: pList(:)
515
516
!
!List of type bound procedures
517
    CONTAINS
518
519
      !> @copybrief ParameterLists::edit_ParamType_List
      !> @copydoc ParameterLists::edit_ParamType_List
520
      PROCEDURE,PASS :: edit => edit_ParamType_List
521
522
      !> @copybrief ParameterLists::clear_ParamType_List
      !> @copydoc ParameterLists::clear_ParamType_List
523
      PROCEDURE,PASS :: clear => clear_ParamType_List
524
  ENDTYPE ParamType_List
525

526
527
  !> @brief Extended type of a ParamType for defining a parameter that
  !> is a single precision real scalar
528
  TYPE,EXTENDS(ParamType) :: ParamType_SSK
529
    !> The value of the parameter
530
    REAL(SSK) :: val=0.0_SSK
531
532
!
!List of type bound procedures
533
    CONTAINS
534
535
      !> @copybrief ParameterLists::edit_ParamType_SSK
      !> @copydoc ParameterLists::edit_ParamType_SSK
536
      PROCEDURE,PASS :: edit => edit_ParamType_SSK
537
538
      !> @copybrief ParameterLists::clear_ParamType_SSK
      !> @copydoc ParameterLists::clear_ParamType_SSK
539
540
      PROCEDURE,PASS :: clear => clear_ParamType_SSK
  ENDTYPE ParamType_SSK
541

542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
  !> @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
!
!List of type bound procedures
    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
557

558
  !> @brief Extended type of a ParamType for defining a parameter that
559
  !> is a 32-bit integer scalar
560
561
562
563
564
565
566
567
568
569
570
571
572
  TYPE,EXTENDS(ParamType) :: ParamType_SNK
    !> The value of the parameter
    INTEGER(SNK) :: val=0_SNK
!
!List of type bound procedures
    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
573

574
  !> @brief Extended type of a ParamType for defining a parameter that
575
  !> is a 64-bit integer scalar
576
577
578
579
580
581
582
583
584
585
586
587
588
589
  TYPE,EXTENDS(ParamType) :: ParamType_SLK
    !> The value of the parameter
    INTEGER(SLK) :: val=0_SLK
!
!List of type bound procedures
    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

590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
  !> @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.
!
!List of type bound procedures
    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

606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
  !> @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
!
!List of type bound procedures
    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
621
622
623
!----------------------------------------------------------------------
!     One-Dimensional Arrays
!----------------------------------------------------------------------
624
  !> @brief Extended type of a ParamType for defining a one dimensional
625
626
627
628
629
630
631
632
633
634
635
636
637
638
  !> array parameter of single precision reals
  TYPE,EXTENDS(ParamType) :: ParamType_SSK_a1
    !> The value of the parameter
    REAL(SSK),ALLOCATABLE :: val(:)
!
!List of type bound procedures
    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
639
640

  !> @brief Extended type of a ParamType for defining a one dimensional
641
  !> array parameter of double precision reals
642
643
644
645
646
647
648
649
650
651
652
653
654
  TYPE,EXTENDS(ParamType) :: ParamType_SDK_a1
    !> The value of the parameter
    REAL(SDK),ALLOCATABLE :: val(:)
!
!List of type bound procedures
    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
655
656

  !> @brief Extended type of a ParamType for defining a one dimensional
657
  !> array parameter of 32-bit integers
658
659
660
661
662
663
664
665
666
667
668
669
670
  TYPE,EXTENDS(ParamType) :: ParamType_SNK_a1
    !> The value of the parameter
    INTEGER(SNK),ALLOCATABLE :: val(:)
!
!List of type bound procedures
    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
671
672

  !> @brief Extended type of a ParamType for defining a one dimensional
673
  !> array parameter of 64-bit integers
674
675
676
677
678
679
680
681
682
683
684
685
686
  TYPE,EXTENDS(ParamType) :: ParamType_SLK_a1
    !> The value of the parameter
    INTEGER(SLK),ALLOCATABLE :: val(:)
!
!List of type bound procedures
    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
687
688

  !> @brief Extended type of a ParamType for defining a one dimensional
689
690
691
692
693
694
695
696
697
698
699
700
701
702
  !> array parameter of single precision reals
  TYPE,EXTENDS(ParamType) :: ParamType_SBK_a1
    !> The value of the parameter
    LOGICAL(SBK),ALLOCATABLE :: val(:)
!
!List of type bound procedures
    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
703

704
  !> @brief Extended type of a ParamType for defining a one dimensional
705
  !> array parameter that is a string derived type
706
707
708
709
710
711
712
713
714
715
716
717
718
719
  TYPE,EXTENDS(ParamType) :: ParamType_STR_a1
    !> The value of the parameter
    TYPE(StringType),ALLOCATABLE :: val(:)
!
!List of type bound procedures
    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

720
721
722
!----------------------------------------------------------------------
!     Two-Dimensional Arrays
!----------------------------------------------------------------------
723
  !> @brief Extended type of a ParamType for defining a two dimensional
724
725
726
727
728
729
730
731
732
733
734
735
736
737
  !> array parameter of single precision reals
  TYPE,EXTENDS(ParamType) :: ParamType_SSK_a2
    !> The value of the parameter
    REAL(SSK),ALLOCATABLE :: val(:,:)
!
!List of type bound procedures
    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
738
739

  !> @brief Extended type of a ParamType for defining a two dimensional
740
  !> array parameter of double precision reals
741
742
743
744
745
746
747
748
749
750
751
752
753
  TYPE,EXTENDS(ParamType) :: ParamType_SDK_a2
    !> The value of the parameter
    REAL(SDK),ALLOCATABLE :: val(:,:)
!
!List of type bound procedures
    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
754
755

  !> @brief Extended type of a ParamType for defining a two dimensional
756
  !> array parameter of 32-bit integers
757
758
759
760
761
762
763
764
765
766
767
768
769
  TYPE,EXTENDS(ParamType) :: ParamType_SNK_a2
    !> The value of the parameter
    INTEGER(SNK),ALLOCATABLE :: val(:,:)
!
!List of type bound procedures
    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
770
771

  !> @brief Extended type of a ParamType for defining a two dimensional
772
  !> array parameter of 64-bit integers
773
774
775
776
777
778
779
780
781
782
783
784
785
  TYPE,EXTENDS(ParamType) :: ParamType_SLK_a2
    !> The value of the parameter
    INTEGER(SLK),ALLOCATABLE :: val(:,:)
!
!List of type bound procedures
    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
786
787

  !> @brief Extended type of a ParamType for defining a two dimensional
788
789
790
791
792
793
794
795
796
797
798
799
800
801
  !> array parameter that is a string derived type
  TYPE,EXTENDS(ParamType) :: ParamType_STR_a2
    !> The value of the parameter
    TYPE(StringType),ALLOCATABLE :: val(:,:)
!
!List of type bound procedures
    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
802
803
804
!----------------------------------------------------------------------
!     Three-Dimensional Arrays
!----------------------------------------------------------------------
805
  !> @brief Extended type of a ParamType for defining a three dimensional
806
807
808
809
810
811
812
813
814
815
816
817
818
819
  !> array parameter of single precision reals
  TYPE,EXTENDS(ParamType) :: ParamType_SSK_a3
    !> The value of the parameter
    REAL(SSK),ALLOCATABLE :: val(:,:,:)
!
!List of type bound procedures
    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
820
821

  !> @brief Extended type of a ParamType for defining a three dimensional
822
823
824
825
826
827
828
829
830
831
832
833
834
835
  !> array parameter of double precision reals
  TYPE,EXTENDS(ParamType) :: ParamType_SDK_a3
    !> The value of the parameter
    REAL(SDK),ALLOCATABLE :: val(:,:,:)
!
!List of type bound procedures
    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
836
837

  !> @brief Extended type of a ParamType for defining a three dimensional
838
839
840
841
842
843
844
845
846
847
848
849
850
851
  !> array parameter of 32-bit integers
  TYPE,EXTENDS(ParamType) :: ParamType_SNK_a3
    !> The value of the parameter
    INTEGER(SNK),ALLOCATABLE :: val(:,:,:)
!
!List of type bound procedures
    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
852
853

  !> @brief Extended type of a ParamType for defining a three dimensional
854
855
856
857
858
859
860
861
862
863
864
865
866
867
  !> array parameter of 64-bit integers
  TYPE,EXTENDS(ParamType) :: ParamType_SLK_a3
    !> The value of the parameter
    INTEGER(SLK),ALLOCATABLE :: val(:,:,:)
!
!List of type bound procedures
    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
868
869
!
!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
870
871
  !> Generic interface adds a procedure to overload the intrinsic assignment
  !> operator with the given procedure
872
  INTERFACE ASSIGNMENT(=)
873
874
    !> @copybrief ParameterLists::assign_ParamType
    !> @copydoc ParameterLists::assign_ParamType
875
876
    MODULE PROCEDURE assign_ParamType
  ENDINTERFACE
877
878
879
880
881
882

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

  INTEGER(SIK),PARAMETER :: PARAM_MAX_DAT_LEN=26
885
886
887
!
!===============================================================================
  CONTAINS
888
#ifdef FUTILITY_HAVE_Trilinos
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
    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
#endif
939
940
!
!-------------------------------------------------------------------------------
941
942
943
944
!> @brief Defines the assignment operation two @c ParamType objects.
!> @param thisParam the ParamType object to be assigned
!> @param param the ParamType object to assign
!>
945
!> This routine clears the @c thisParam which must be a declared as a
946
947
948
949
950
!> <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.
!>
951
952
    RECURSIVE SUBROUTINE assign_ParamType(thisParam,param)
      CHARACTER(LEN=*),PARAMETER :: myName='assign_ParamType'
953
      CLASS(ParamType),INTENT(INOUT) :: thisParam
954
      CLASS(ParamType),INTENT(IN) :: param
955

956
957
958
959
960
961
962
963
      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)
964
965
              CALL thisParam%init(CHAR(p%name),p%val, &
                CHAR(p%description))
966
            TYPE IS(ParamType_SDK)
967
968
              CALL thisParam%init(CHAR(p%name),p%val, &
                CHAR(p%description))
969
            TYPE IS(ParamType_SNK)
970
971
              CALL thisParam%init(CHAR(p%name),p%val, &
                CHAR(p%description))
972
            TYPE IS(ParamType_SLK)
973
974
              CALL thisParam%init(CHAR(p%name),p%val, &
                CHAR(p%description))
975
            TYPE IS(ParamType_SBK)
976
977
              CALL thisParam%init(CHAR(p%name),p%val, &
                CHAR(p%description))
978
            TYPE IS(ParamType_STR)
979
980
              CALL thisParam%init(CHAR(p%name),p%val, &
                CHAR(p%description))
981
            TYPE IS(ParamType_SSK_a1)
982
983
              CALL thisParam%init(CHAR(p%name),p%val, &
                CHAR(p%description))
984
            TYPE IS(ParamType_SDK_a1)
985
986
              CALL thisParam%init(CHAR(p%name),p%val, &
                CHAR(p%description))
987
            TYPE IS(ParamType_SNK_a1)
988
989
              CALL thisParam%init(CHAR(p%name),p%val, &
                CHAR(p%description))
990
            TYPE IS(ParamType_SLK_a1)
991
992
              CALL thisParam%init(CHAR(p%name),p%val, &
                CHAR(p%description))
993
            TYPE IS(ParamType_SBK_a1)
994
995
              CALL thisParam%init(CHAR(p%name),p%val, &
                CHAR(p%description))
996
            TYPE IS(ParamType_STR_a1)
997
998
              CALL thisParam%init(CHAR(p%name),p%val, &
                CHAR(p%description))
999
            TYPE IS(ParamType_SSK_a2)
1000
              CALL thisParam%init(CHAR(p%name),p%val, &
For faster browsing, not all history is shown. View entire blame