ParameterLists.f90 410 KB
Newer Older
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
!++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++!
!                              Copyright (C) 2012                              !
!                   The Regents of the University of Michigan                  !
!              MPACT Development Group and Prof. Thomas J. Downar              !
!                             All rights reserved.                             !
!                                                                              !
! Copyright is reserved to the University of Michigan for purposes of          !
! controlled dissemination, commercialization through formal licensing, or     !
! other disposition. The University of Michigan nor any of their employees,    !
! makes any warranty, express or implied, or assumes any liability or          !
! responsibility for the accuracy, completeness, or usefulness of any          !
! information, apparatus, product, or process disclosed, or represents that    !
! its use would not infringe privately owned rights. Reference herein to any   !
! specific commercial products, process, or service by trade name, trademark,  !
! manufacturer, or otherwise, does not necessarily constitute or imply its     !
! endorsement, recommendation, or favoring by the University of Michigan.      !
!++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++!
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
!> @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.
36
!>
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
!> 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
53
!>  - 1-D arrays of "StringTypes"
54
55
56
57
!>  - 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
58
!>  - 2-D arrays of "StringTypes"
59
60
61
62
!>  - 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
63
64
65
!>
!> @par Module Dependencies
!>  - @ref IntrType "IntrType": @copybrief IntrType
66
67
68
!>  - @ref Strings "Strings": @copybrief Strings
!>  - @ref ExceptionHandler "ExceptionHandler": @copybrief ExceptionHandler
!>  - @ref IO_Strings "IO_Strings": @copybrief IO_Strings
69
!>  - @ref UnitTest "UnitTest": @copybrief UnitTest
70
71
72
73
!>
!> @par EXAMPLE
!> @code
!> PROGRAM
74
!>
75
!>   IMPLICIT NONE
76
!>
77
78
79
80
!>
!> END PROGRAM
!> @endcode
!>
81
!> @author Brendan Kochunas and Dan Jabaay and Benjamin Collins
82
!>   @date 07/26/2012
83
84
85
86
!> @par Revisions:
!>   (08/14/2012) - Dan Jabaay
!>   - Expanded functionality to scalar, one, two, and three dimensional arrays
!>     of the parameter types listed above.
87
88
!>   (03/07/2013) - Benjamin Collins
!>   - Added has function to return if the parameter list has a given parameter
89
90
!>   (10/22/2013) - Dan Jabaay
!>   - Added the %verify subroutine for validating two parameter lists and then
91
!>     checking that all of the values in the parameter list are equal.
92
93
94
95
!>   (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.)
96
97
!++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++!
MODULE ParameterLists
98
#include "UnitTest.h"
99
  USE ISO_FORTRAN_ENV
100
  USE UnitTest
101
102
103
  USE IntrType
  USE Strings
  USE ExceptionHandler
104
  USE IO_Strings
Brendan Kochunas's avatar
Brendan Kochunas committed
105
  USE FileType_XML
106
#ifdef HAVE_ForTeuchos
107
108
  USE ForTeuchos_ParameterList
#endif
109

110
111
112
113
114
115
  IMPLICIT NONE
  PRIVATE !Default private for module contents
!
! List of Public items
  PUBLIC :: eParams
  PUBLIC :: ParamType
116
  PUBLIC :: ASSIGNMENT(=)
117
  PUBLIC :: OPERATOR(==)
118

119
120
121
122
  PUBLIC :: char_to_int_array
  PUBLIC :: char_to_double_array
  PUBLIC :: char_to_string_array

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

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

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

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

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

543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
  !> @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
558

559
  !> @brief Extended type of a ParamType for defining a parameter that
560
  !> is a 32-bit integer scalar
561
562
563
564
565
566
567
568
569
570
571
572
573
  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
574

575
  !> @brief Extended type of a ParamType for defining a parameter that
576
  !> is a 64-bit integer scalar
577
578
579
580
581
582
583
584
585
586
587
588
589
590
  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

591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
  !> @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

607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
  !> @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
622
623
624
!----------------------------------------------------------------------
!     One-Dimensional Arrays
!----------------------------------------------------------------------
625
  !> @brief Extended type of a ParamType for defining a one dimensional
626
627
628
629
630
631
632
633
634
635
636
637
638
639
  !> 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
640
641

  !> @brief Extended type of a ParamType for defining a one dimensional
642
  !> array parameter of double precision reals
643
644
645
646
647
648
649
650
651
652
653
654
655
  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
656
657

  !> @brief Extended type of a ParamType for defining a one dimensional
658
  !> array parameter of 32-bit integers
659
660
661
662
663
664
665
666
667
668
669
670
671
  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
672
673

  !> @brief Extended type of a ParamType for defining a one dimensional
674
  !> array parameter of 64-bit integers
675
676
677
678
679
680
681
682
683
684
685
686
687
  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
688
689

  !> @brief Extended type of a ParamType for defining a one dimensional
690
691
692
693
694
695
696
697
698
699
700
701
702
703
  !> 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
704

705
  !> @brief Extended type of a ParamType for defining a one dimensional
706
  !> array parameter that is a string derived type
707
708
709
710
711
712
713
714
715
716
717
718
719
720
  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

721
722
723
!----------------------------------------------------------------------
!     Two-Dimensional Arrays
!----------------------------------------------------------------------
724
  !> @brief Extended type of a ParamType for defining a two dimensional
725
726
727
728
729
730
731
732
733
734
735
736
737
738
  !> 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
739
740

  !> @brief Extended type of a ParamType for defining a two dimensional
741
  !> array parameter of double precision reals
742
743
744
745
746
747
748
749
750
751
752
753
754
  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
755
756

  !> @brief Extended type of a ParamType for defining a two dimensional
757
  !> array parameter of 32-bit integers
758
759
760
761
762
763
764
765
766
767
768
769
770
  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
771
772

  !> @brief Extended type of a ParamType for defining a two dimensional
773
  !> array parameter of 64-bit integers
774
775
776
777
778
779
780
781
782
783
784
785
786
  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
787
788

  !> @brief Extended type of a ParamType for defining a two dimensional
789
790
791
792
793
794
795
796
797
798
799
800
801
802
  !> 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
803
804
805
!----------------------------------------------------------------------
!     Three-Dimensional Arrays
!----------------------------------------------------------------------
806
  !> @brief Extended type of a ParamType for defining a three dimensional
807
808
809
810
811
812
813
814
815
816
817
818
819
820
  !> 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
821
822

  !> @brief Extended type of a ParamType for defining a three dimensional
823
824
825
826
827
828
829
830
831
832
833
834
835
836
  !> 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
837
838

  !> @brief Extended type of a ParamType for defining a three dimensional
839
840
841
842
843
844
845
846
847
848
849
850
851
852
  !> 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
853
854

  !> @brief Extended type of a ParamType for defining a three dimensional
855
856
857
858
859
860
861
862
863
864
865
866
867
868
  !> 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
869
870
!
!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
871
872
  !> Generic interface adds a procedure to overload the intrinsic assignment
  !> operator with the given procedure
873
  INTERFACE ASSIGNMENT(=)
874
875
    !> @copybrief ParameterLists::assign_ParamType
    !> @copydoc ParameterLists::assign_ParamType
876
877
    MODULE PROCEDURE assign_ParamType
  ENDINTERFACE
878
879
880
881
882
883

  INTERFACE OPERATOR(==)
    !> @copybrief ParameterLists::isEqual_ParamType
    !> @copydoc ParameterLists::isEqual_ParamType
    MODULE PROCEDURE isEqual_ParamType
  ENDINTERFACE
884
885
886
!
!===============================================================================
  CONTAINS
887
#ifdef HAVE_ForTeuchos
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
    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
      INTEGER :: t

      nullify(itr)

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

908
909
910
911
912
      IF(level > 10) THEN
        WRITE(*,*)"Too much recursion. Giving up"
        return
      ENDIF

913
914
915
916
917
918
919
920
921
922
      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
923
            WRITE(*,*)associated(nextParam%pdat)
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
            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
945
946
!
!-------------------------------------------------------------------------------
947
948
949
950
!> @brief Defines the assignment operation two @c ParamType objects.
!> @param thisParam the ParamType object to be assigned
!> @param param the ParamType object to assign
!>
951
!> This routine clears the @c thisParam which must be a declared as a
952
953
954
955
956
!> <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.
!>
957
958
    RECURSIVE SUBROUTINE assign_ParamType(thisParam,param)
      CHARACTER(LEN=*),PARAMETER :: myName='assign_ParamType'
959
      CLASS(ParamType),INTENT(INOUT) :: thisParam
960
      CLASS(ParamType),INTENT(IN) :: param
961

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