Line data Source code
1 : !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
2 : !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
3 : !!!! !!!!
4 : !!!! ParaMonte: Parallel Monte Carlo and Machine Learning Library. !!!!
5 : !!!! !!!!
6 : !!!! Copyright (C) 2012-present, The Computational Data Science Lab !!!!
7 : !!!! !!!!
8 : !!!! This file is part of the ParaMonte library. !!!!
9 : !!!! !!!!
10 : !!!! LICENSE !!!!
11 : !!!! !!!!
12 : !!!! https://github.com/cdslaborg/paramonte/blob/main/LICENSE.md !!!!
13 : !!!! !!!!
14 : !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
15 : !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
16 :
17 : !> \brief
18 : !> This file contains procedure implementations of [pm_matrixLUP](@ref pm_matrixLUP).
19 : !>
20 : !> \finmain
21 : !>
22 : !> \author
23 : !> \AmirShahmoradi, Apr 21, 2017, 1:54 AM, Institute for Computational Engineering and Sciences (ICES), The University of Texas at Austin
24 :
25 : !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
26 :
27 : submodule (pm_matrixLUP) routines ! LCOV_EXCL_LINE
28 :
29 : #if CHECK_ENABLED
30 : use pm_err, only: getFine
31 : use pm_val2str, only: getStr
32 : use pm_err, only: setAsserted
33 : #define CHECK_ASSERTION(LINE,ASSERTION,MSG) \
34 : call setAsserted(ASSERTION,getFine(__FILE__,LINE)//MODULE_NAME//MSG);
35 : #else
36 : #define CHECK_ASSERTION(LINE,ASSERTION,MSG) continue;
37 : #endif
38 :
39 : use pm_lapack, only: lapackGETRF
40 : implicit none
41 :
42 : !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
43 :
44 : contains
45 :
46 : !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
47 :
48 : #define setMatLUP_ENABLED 1
49 :
50 : !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
51 : !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
52 : !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
53 :
54 : #define IMP_ENABLED 1
55 :
56 : !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
57 : !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
58 : !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
59 :
60 : #define SQM_ENABLED 1
61 :
62 : !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
63 :
64 : #define CK_ENABLED 1
65 :
66 : #if CK5_ENABLED
67 : module procedure setMatLUP_IMP_SQM_CK5
68 : use pm_kind, only: TKC => CK5
69 : #include "pm_matrixLUP@routines.inc.F90"
70 : end procedure
71 : #endif
72 :
73 : #if CK4_ENABLED
74 61 : module procedure setMatLUP_IMP_SQM_CK4
75 : use pm_kind, only: TKC => CK4
76 : #include "pm_matrixLUP@routines.inc.F90"
77 : end procedure
78 : #endif
79 :
80 : #if CK3_ENABLED
81 0 : module procedure setMatLUP_IMP_SQM_CK3
82 : use pm_kind, only: TKC => CK3
83 : #include "pm_matrixLUP@routines.inc.F90"
84 : end procedure
85 : #endif
86 :
87 : #if CK2_ENABLED
88 16 : module procedure setMatLUP_IMP_SQM_CK2
89 : use pm_kind, only: TKC => CK2
90 : #define DISPATCH_ENABLED 1
91 : #include "pm_matrixLUP@routines.inc.F90"
92 : #undef DISPATCH_ENABLED
93 : end procedure
94 : #endif
95 :
96 : #if CK1_ENABLED
97 10 : module procedure setMatLUP_IMP_SQM_CK1
98 : use pm_kind, only: TKC => CK1
99 : #define DISPATCH_ENABLED 1
100 : #include "pm_matrixLUP@routines.inc.F90"
101 : #undef DISPATCH_ENABLED
102 : end procedure
103 : #endif
104 :
105 : #undef CK_ENABLED
106 :
107 : !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
108 :
109 : #define RK_ENABLED 1
110 :
111 : #if RK5_ENABLED
112 : module procedure setMatLUP_IMP_SQM_RK5
113 : use pm_kind, only: TKC => RK5
114 : #include "pm_matrixLUP@routines.inc.F90"
115 : end procedure
116 : #endif
117 :
118 : #if RK4_ENABLED
119 61 : module procedure setMatLUP_IMP_SQM_RK4
120 : use pm_kind, only: TKC => RK4
121 : #include "pm_matrixLUP@routines.inc.F90"
122 : end procedure
123 : #endif
124 :
125 : #if RK3_ENABLED
126 0 : module procedure setMatLUP_IMP_SQM_RK3
127 : use pm_kind, only: TKC => RK3
128 : #include "pm_matrixLUP@routines.inc.F90"
129 : end procedure
130 : #endif
131 :
132 : #if RK2_ENABLED
133 1 : module procedure setMatLUP_IMP_SQM_RK2
134 : use pm_kind, only: TKC => RK2
135 : #define DISPATCH_ENABLED 1
136 : #include "pm_matrixLUP@routines.inc.F90"
137 : #undef DISPATCH_ENABLED
138 : end procedure
139 : #endif
140 :
141 : #if RK1_ENABLED
142 187 : module procedure setMatLUP_IMP_SQM_RK1
143 : use pm_kind, only: TKC => RK1
144 : #define DISPATCH_ENABLED 1
145 : #include "pm_matrixLUP@routines.inc.F90"
146 : #undef DISPATCH_ENABLED
147 : end procedure
148 : #endif
149 :
150 : #undef RK_ENABLED
151 :
152 : !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
153 :
154 : #undef SQM_ENABLED
155 :
156 : !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
157 : !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
158 : !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
159 : #if 0
160 : #define ITE_ENABLED 1
161 :
162 : !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
163 :
164 : #define RK_ENABLED 1
165 :
166 : #if RK5_ENABLED
167 : module procedure setMatLUP_IMP_ITE_RK5
168 : use pm_kind, only: TKC => RK5
169 : #include "pm_matrixLUP@routines.inc.F90"
170 : end procedure
171 : #endif
172 :
173 : #if RK4_ENABLED
174 : module procedure setMatLUP_IMP_ITE_RK4
175 : use pm_kind, only: TKC => RK4
176 : #include "pm_matrixLUP@routines.inc.F90"
177 : end procedure
178 : #endif
179 :
180 : #if RK3_ENABLED
181 : module procedure setMatLUP_IMP_ITE_RK3
182 : use pm_kind, only: TKC => RK3
183 : #include "pm_matrixLUP@routines.inc.F90"
184 : end procedure
185 : #endif
186 :
187 : #if RK2_ENABLED
188 : module procedure setMatLUP_IMP_ITE_RK2
189 : use pm_kind, only: TKC => RK2
190 : #include "pm_matrixLUP@routines.inc.F90"
191 : end procedure
192 : #endif
193 :
194 : #if RK1_ENABLED
195 : module procedure setMatLUP_IMP_ITE_RK1
196 : use pm_kind, only: TKC => RK1
197 : #include "pm_matrixLUP@routines.inc.F90"
198 : end procedure
199 : #endif
200 :
201 : #undef RK_ENABLED
202 :
203 : !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
204 :
205 : #undef ITE_ENABLED
206 :
207 : !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
208 : !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
209 : !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
210 :
211 : #define REC_ENABLED 1
212 :
213 : !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
214 :
215 : #define RK_ENABLED 1
216 :
217 : #if RK5_ENABLED
218 : module procedure setMatLUP_IMP_REC_RK5
219 : use pm_kind, only: TKC => RK5
220 : #include "pm_matrixLUP@routines.inc.F90"
221 : end procedure
222 : #endif
223 :
224 : #if RK4_ENABLED
225 : module procedure setMatLUP_IMP_REC_RK4
226 : use pm_kind, only: TKC => RK4
227 : #include "pm_matrixLUP@routines.inc.F90"
228 : end procedure
229 : #endif
230 :
231 : #if RK3_ENABLED
232 : module procedure setMatLUP_IMP_REC_RK3
233 : use pm_kind, only: TKC => RK3
234 : #include "pm_matrixLUP@routines.inc.F90"
235 : end procedure
236 : #endif
237 :
238 : #if RK2_ENABLED
239 : module procedure setMatLUP_IMP_REC_RK2
240 : use pm_kind, only: TKC => RK2
241 : #include "pm_matrixLUP@routines.inc.F90"
242 : end procedure
243 : #endif
244 :
245 : #if RK1_ENABLED
246 : module procedure setMatLUP_IMP_REC_RK1
247 : use pm_kind, only: TKC => RK1
248 : #include "pm_matrixLUP@routines.inc.F90"
249 : end procedure
250 : #endif
251 :
252 : #undef RK_ENABLED
253 :
254 : !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
255 :
256 : #undef REC_ENABLED
257 :
258 : !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
259 : !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
260 : !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
261 :
262 : #undef IMP_ENABLED
263 :
264 : !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
265 : !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
266 : !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
267 :
268 : #define EXP_ENABLED 1
269 :
270 : !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
271 : !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
272 : !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
273 :
274 : #define SQM_ENABLED 1
275 :
276 : !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
277 :
278 : #define RK_ENABLED 1
279 :
280 : #if RK5_ENABLED
281 : module procedure setMatLUP_EXP_SQM_RK5
282 : use pm_kind, only: TKC => RK5
283 : #include "pm_matrixLUP@routines.inc.F90"
284 : end procedure
285 : #endif
286 :
287 : #if RK4_ENABLED
288 : module procedure setMatLUP_EXP_SQM_RK4
289 : use pm_kind, only: TKC => RK4
290 : #include "pm_matrixLUP@routines.inc.F90"
291 : end procedure
292 : #endif
293 :
294 : #if RK3_ENABLED
295 : module procedure setMatLUP_EXP_SQM_RK3
296 : use pm_kind, only: TKC => RK3
297 : #include "pm_matrixLUP@routines.inc.F90"
298 : end procedure
299 : #endif
300 :
301 : #if RK2_ENABLED
302 : module procedure setMatLUP_EXP_SQM_RK2
303 : use pm_kind, only: TKC => RK2
304 : #include "pm_matrixLUP@routines.inc.F90"
305 : end procedure
306 : #endif
307 :
308 : #if RK1_ENABLED
309 : module procedure setMatLUP_EXP_SQM_RK1
310 : use pm_kind, only: TKC => RK1
311 : #include "pm_matrixLUP@routines.inc.F90"
312 : end procedure
313 : #endif
314 :
315 : #undef RK_ENABLED
316 :
317 : !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
318 :
319 : #undef SQM_ENABLED
320 :
321 : !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
322 : !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
323 : !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
324 :
325 : #define ITE_ENABLED 1
326 :
327 : !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
328 :
329 : #define RK_ENABLED 1
330 :
331 : #if RK5_ENABLED
332 : module procedure setMatLUP_EXP_ITE_RK5
333 : use pm_kind, only: TKC => RK5
334 : #include "pm_matrixLUP@routines.inc.F90"
335 : end procedure
336 : #endif
337 :
338 : #if RK4_ENABLED
339 : module procedure setMatLUP_EXP_ITE_RK4
340 : use pm_kind, only: TKC => RK4
341 : #include "pm_matrixLUP@routines.inc.F90"
342 : end procedure
343 : #endif
344 :
345 : #if RK3_ENABLED
346 : module procedure setMatLUP_EXP_ITE_RK3
347 : use pm_kind, only: TKC => RK3
348 : #include "pm_matrixLUP@routines.inc.F90"
349 : end procedure
350 : #endif
351 :
352 : #if RK2_ENABLED
353 : module procedure setMatLUP_EXP_ITE_RK2
354 : use pm_kind, only: TKC => RK2
355 : #include "pm_matrixLUP@routines.inc.F90"
356 : end procedure
357 : #endif
358 :
359 : #if RK1_ENABLED
360 : module procedure setMatLUP_EXP_ITE_RK1
361 : use pm_kind, only: TKC => RK1
362 : #include "pm_matrixLUP@routines.inc.F90"
363 : end procedure
364 : #endif
365 :
366 : #undef RK_ENABLED
367 :
368 : !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
369 :
370 : #undef ITE_ENABLED
371 :
372 : !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
373 : !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
374 : !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
375 :
376 : #define REC_ENABLED 1
377 :
378 : !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
379 :
380 : #define RK_ENABLED 1
381 :
382 : #if RK5_ENABLED
383 : module procedure setMatLUP_EXP_REC_RK5
384 : use pm_kind, only: TKC => RK5
385 : #include "pm_matrixLUP@routines.inc.F90"
386 : end procedure
387 : #endif
388 :
389 : #if RK4_ENABLED
390 : module procedure setMatLUP_EXP_REC_RK4
391 : use pm_kind, only: TKC => RK4
392 : #include "pm_matrixLUP@routines.inc.F90"
393 : end procedure
394 : #endif
395 :
396 : #if RK3_ENABLED
397 : module procedure setMatLUP_EXP_REC_RK3
398 : use pm_kind, only: TKC => RK3
399 : #include "pm_matrixLUP@routines.inc.F90"
400 : end procedure
401 : #endif
402 :
403 : #if RK2_ENABLED
404 : module procedure setMatLUP_EXP_REC_RK2
405 : use pm_kind, only: TKC => RK2
406 : #include "pm_matrixLUP@routines.inc.F90"
407 : end procedure
408 : #endif
409 :
410 : #if RK1_ENABLED
411 : module procedure setMatLUP_EXP_REC_RK1
412 : use pm_kind, only: TKC => RK1
413 : #include "pm_matrixLUP@routines.inc.F90"
414 : end procedure
415 : #endif
416 :
417 : #undef RK_ENABLED
418 :
419 : !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
420 :
421 : #undef REC_ENABLED
422 :
423 : !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
424 : !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
425 : !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
426 :
427 : #undef EXP_ENABLED
428 : #endif
429 : !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
430 : !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
431 : !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
432 :
433 : #undef setMatLUP_ENABLED
434 :
435 : !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
436 :
437 : #undef CHECK_ASSERTION
438 :
439 : end submodule routines
|