ParaMonte Fortran 2.0.0
Parallel Monte Carlo and Machine Learning Library
See the latest version documentation.
test_pm_mathRoot.F90
Go to the documentation of this file.
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
24
25!%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
26
28
29 use pm_mathRoot
30 use pm_test, only: test_type, LK
31 implicit none
32
33 private
34 public :: setTest
35 type(test_type) :: test
36
37!%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
38
39 !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
40
41 interface
42#if RK5_ENABLED
43 module function test_getRootDef_RK5() result(assertion); logical(LK) :: assertion; end function
44#endif
45#if RK4_ENABLED
46 module function test_getRootDef_RK4() result(assertion); logical(LK) :: assertion; end function
47#endif
48#if RK3_ENABLED
49 module function test_getRootDef_RK3() result(assertion); logical(LK) :: assertion; end function
50#endif
51#if RK2_ENABLED
52 module function test_getRootDef_RK2() result(assertion); logical(LK) :: assertion; end function
53#endif
54#if RK1_ENABLED
55 module function test_getRootDef_RK1() result(assertion); logical(LK) :: assertion; end function
56#endif
57 end interface
58
59 !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
60
61!%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
62
63 !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
64
65 interface
66#if RK5_ENABLED
67 module function test_getRootFalse_RK5() result(assertion); logical(LK) :: assertion; end function
68#endif
69#if RK4_ENABLED
70 module function test_getRootFalse_RK4() result(assertion); logical(LK) :: assertion; end function
71#endif
72#if RK3_ENABLED
73 module function test_getRootFalse_RK3() result(assertion); logical(LK) :: assertion; end function
74#endif
75#if RK2_ENABLED
76 module function test_getRootFalse_RK2() result(assertion); logical(LK) :: assertion; end function
77#endif
78#if RK1_ENABLED
79 module function test_getRootFalse_RK1() result(assertion); logical(LK) :: assertion; end function
80#endif
81 end interface
82
83 !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
84
85 interface
86#if RK5_ENABLED
87 module function test_setRootFalse_RK5() result(assertion); logical(LK) :: assertion; end function
88#endif
89#if RK4_ENABLED
90 module function test_setRootFalse_RK4() result(assertion); logical(LK) :: assertion; end function
91#endif
92#if RK3_ENABLED
93 module function test_setRootFalse_RK3() result(assertion); logical(LK) :: assertion; end function
94#endif
95#if RK2_ENABLED
96 module function test_setRootFalse_RK2() result(assertion); logical(LK) :: assertion; end function
97#endif
98#if RK1_ENABLED
99 module function test_setRootFalse_RK1() result(assertion); logical(LK) :: assertion; end function
100#endif
101 end interface
102
103 !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
104
105!%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
106
107 !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
108
109 interface
110#if RK5_ENABLED
111 module function test_getRootBisection_RK5() result(assertion); logical(LK) :: assertion; end function
112#endif
113#if RK4_ENABLED
114 module function test_getRootBisection_RK4() result(assertion); logical(LK) :: assertion; end function
115#endif
116#if RK3_ENABLED
117 module function test_getRootBisection_RK3() result(assertion); logical(LK) :: assertion; end function
118#endif
119#if RK2_ENABLED
120 module function test_getRootBisection_RK2() result(assertion); logical(LK) :: assertion; end function
121#endif
122#if RK1_ENABLED
123 module function test_getRootBisection_RK1() result(assertion); logical(LK) :: assertion; end function
124#endif
125 end interface
126
127 !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
128
129 interface
130#if RK5_ENABLED
131 module function test_setRootBisection_RK5() result(assertion); logical(LK) :: assertion; end function
132#endif
133#if RK4_ENABLED
134 module function test_setRootBisection_RK4() result(assertion); logical(LK) :: assertion; end function
135#endif
136#if RK3_ENABLED
137 module function test_setRootBisection_RK3() result(assertion); logical(LK) :: assertion; end function
138#endif
139#if RK2_ENABLED
140 module function test_setRootBisection_RK2() result(assertion); logical(LK) :: assertion; end function
141#endif
142#if RK1_ENABLED
143 module function test_setRootBisection_RK1() result(assertion); logical(LK) :: assertion; end function
144#endif
145 end interface
146
147 !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
148
149!%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
150
151 !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
152
153 interface
154#if RK5_ENABLED
155 module function test_getRootSecant_RK5() result(assertion); logical(LK) :: assertion; end function
156#endif
157#if RK4_ENABLED
158 module function test_getRootSecant_RK4() result(assertion); logical(LK) :: assertion; end function
159#endif
160#if RK3_ENABLED
161 module function test_getRootSecant_RK3() result(assertion); logical(LK) :: assertion; end function
162#endif
163#if RK2_ENABLED
164 module function test_getRootSecant_RK2() result(assertion); logical(LK) :: assertion; end function
165#endif
166#if RK1_ENABLED
167 module function test_getRootSecant_RK1() result(assertion); logical(LK) :: assertion; end function
168#endif
169 end interface
170
171 !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
172
173 interface
174#if RK5_ENABLED
175 module function test_setRootSecant_RK5() result(assertion); logical(LK) :: assertion; end function
176#endif
177#if RK4_ENABLED
178 module function test_setRootSecant_RK4() result(assertion); logical(LK) :: assertion; end function
179#endif
180#if RK3_ENABLED
181 module function test_setRootSecant_RK3() result(assertion); logical(LK) :: assertion; end function
182#endif
183#if RK2_ENABLED
184 module function test_setRootSecant_RK2() result(assertion); logical(LK) :: assertion; end function
185#endif
186#if RK1_ENABLED
187 module function test_setRootSecant_RK1() result(assertion); logical(LK) :: assertion; end function
188#endif
189 end interface
190
191 !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
192
193!%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
194
195 !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
196
197 interface
198#if RK5_ENABLED
199 module function test_getRootBrent_RK5() result(assertion); logical(LK) :: assertion; end function
200#endif
201#if RK4_ENABLED
202 module function test_getRootBrent_RK4() result(assertion); logical(LK) :: assertion; end function
203#endif
204#if RK3_ENABLED
205 module function test_getRootBrent_RK3() result(assertion); logical(LK) :: assertion; end function
206#endif
207#if RK2_ENABLED
208 module function test_getRootBrent_RK2() result(assertion); logical(LK) :: assertion; end function
209#endif
210#if RK1_ENABLED
211 module function test_getRootBrent_RK1() result(assertion); logical(LK) :: assertion; end function
212#endif
213 end interface
214
215 !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
216
217 interface
218#if RK5_ENABLED
219 module function test_setRootBrent_RK5() result(assertion); logical(LK) :: assertion; end function
220#endif
221#if RK4_ENABLED
222 module function test_setRootBrent_RK4() result(assertion); logical(LK) :: assertion; end function
223#endif
224#if RK3_ENABLED
225 module function test_setRootBrent_RK3() result(assertion); logical(LK) :: assertion; end function
226#endif
227#if RK2_ENABLED
228 module function test_setRootBrent_RK2() result(assertion); logical(LK) :: assertion; end function
229#endif
230#if RK1_ENABLED
231 module function test_setRootBrent_RK1() result(assertion); logical(LK) :: assertion; end function
232#endif
233 end interface
234
235 !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
236
237!%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
238
239 !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
240
241 interface
242#if RK5_ENABLED
243 module function test_getRootRidders_RK5() result(assertion); logical(LK) :: assertion; end function
244#endif
245#if RK4_ENABLED
246 module function test_getRootRidders_RK4() result(assertion); logical(LK) :: assertion; end function
247#endif
248#if RK3_ENABLED
249 module function test_getRootRidders_RK3() result(assertion); logical(LK) :: assertion; end function
250#endif
251#if RK2_ENABLED
252 module function test_getRootRidders_RK2() result(assertion); logical(LK) :: assertion; end function
253#endif
254#if RK1_ENABLED
255 module function test_getRootRidders_RK1() result(assertion); logical(LK) :: assertion; end function
256#endif
257 end interface
258
259 !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
260
261 interface
262#if RK5_ENABLED
263 module function test_setRootRidders_RK5() result(assertion); logical(LK) :: assertion; end function
264#endif
265#if RK4_ENABLED
266 module function test_setRootRidders_RK4() result(assertion); logical(LK) :: assertion; end function
267#endif
268#if RK3_ENABLED
269 module function test_setRootRidders_RK3() result(assertion); logical(LK) :: assertion; end function
270#endif
271#if RK2_ENABLED
272 module function test_setRootRidders_RK2() result(assertion); logical(LK) :: assertion; end function
273#endif
274#if RK1_ENABLED
275 module function test_setRootRidders_RK1() result(assertion); logical(LK) :: assertion; end function
276#endif
277 end interface
278
279 !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
280
281!%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
282
283 !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
284
285 interface
286#if RK5_ENABLED
287 module function test_getRootTOMS748_RK5() result(assertion); logical(LK) :: assertion; end function
288#endif
289#if RK4_ENABLED
290 module function test_getRootTOMS748_RK4() result(assertion); logical(LK) :: assertion; end function
291#endif
292#if RK3_ENABLED
293 module function test_getRootTOMS748_RK3() result(assertion); logical(LK) :: assertion; end function
294#endif
295#if RK2_ENABLED
296 module function test_getRootTOMS748_RK2() result(assertion); logical(LK) :: assertion; end function
297#endif
298#if RK1_ENABLED
299 module function test_getRootTOMS748_RK1() result(assertion); logical(LK) :: assertion; end function
300#endif
301 end interface
302
303 !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
304
305 interface
306#if RK5_ENABLED
307 module function test_setRootTOMS748_RK5() result(assertion); logical(LK) :: assertion; end function
308#endif
309#if RK4_ENABLED
310 module function test_setRootTOMS748_RK4() result(assertion); logical(LK) :: assertion; end function
311#endif
312#if RK3_ENABLED
313 module function test_setRootTOMS748_RK3() result(assertion); logical(LK) :: assertion; end function
314#endif
315#if RK2_ENABLED
316 module function test_setRootTOMS748_RK2() result(assertion); logical(LK) :: assertion; end function
317#endif
318#if RK1_ENABLED
319 module function test_setRootTOMS748_RK1() result(assertion); logical(LK) :: assertion; end function
320#endif
321 end interface
322
323 !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
324
325!%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
326
327 !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
328
329 interface
330#if RK5_ENABLED
331 module function test_getRootNewton_RK5() result(assertion); logical(LK) :: assertion; end function
332#endif
333#if RK4_ENABLED
334 module function test_getRootNewton_RK4() result(assertion); logical(LK) :: assertion; end function
335#endif
336#if RK3_ENABLED
337 module function test_getRootNewton_RK3() result(assertion); logical(LK) :: assertion; end function
338#endif
339#if RK2_ENABLED
340 module function test_getRootNewton_RK2() result(assertion); logical(LK) :: assertion; end function
341#endif
342#if RK1_ENABLED
343 module function test_getRootNewton_RK1() result(assertion); logical(LK) :: assertion; end function
344#endif
345 end interface
346
347 !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
348
349 interface
350#if RK5_ENABLED
351 module function test_setRootNewton_RK5() result(assertion); logical(LK) :: assertion; end function
352#endif
353#if RK4_ENABLED
354 module function test_setRootNewton_RK4() result(assertion); logical(LK) :: assertion; end function
355#endif
356#if RK3_ENABLED
357 module function test_setRootNewton_RK3() result(assertion); logical(LK) :: assertion; end function
358#endif
359#if RK2_ENABLED
360 module function test_setRootNewton_RK2() result(assertion); logical(LK) :: assertion; end function
361#endif
362#if RK1_ENABLED
363 module function test_setRootNewton_RK1() result(assertion); logical(LK) :: assertion; end function
364#endif
365 end interface
366
367 !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
368
369!%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
370
371 !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
372
373 interface
374#if RK5_ENABLED
375 module function test_getRootHalley_RK5() result(assertion); logical(LK) :: assertion; end function
376#endif
377#if RK4_ENABLED
378 module function test_getRootHalley_RK4() result(assertion); logical(LK) :: assertion; end function
379#endif
380#if RK3_ENABLED
381 module function test_getRootHalley_RK3() result(assertion); logical(LK) :: assertion; end function
382#endif
383#if RK2_ENABLED
384 module function test_getRootHalley_RK2() result(assertion); logical(LK) :: assertion; end function
385#endif
386#if RK1_ENABLED
387 module function test_getRootHalley_RK1() result(assertion); logical(LK) :: assertion; end function
388#endif
389 end interface
390
391 !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
392
393 interface
394#if RK5_ENABLED
395 module function test_setRootHalley_RK5() result(assertion); logical(LK) :: assertion; end function
396#endif
397#if RK4_ENABLED
398 module function test_setRootHalley_RK4() result(assertion); logical(LK) :: assertion; end function
399#endif
400#if RK3_ENABLED
401 module function test_setRootHalley_RK3() result(assertion); logical(LK) :: assertion; end function
402#endif
403#if RK2_ENABLED
404 module function test_setRootHalley_RK2() result(assertion); logical(LK) :: assertion; end function
405#endif
406#if RK1_ENABLED
407 module function test_setRootHalley_RK1() result(assertion); logical(LK) :: assertion; end function
408#endif
409 end interface
410
411 !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
412
413!%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
414
415 !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
416
417 interface
418#if RK5_ENABLED
419 module function test_getRootSchroder_RK5() result(assertion); logical(LK) :: assertion; end function
420#endif
421#if RK4_ENABLED
422 module function test_getRootSchroder_RK4() result(assertion); logical(LK) :: assertion; end function
423#endif
424#if RK3_ENABLED
425 module function test_getRootSchroder_RK3() result(assertion); logical(LK) :: assertion; end function
426#endif
427#if RK2_ENABLED
428 module function test_getRootSchroder_RK2() result(assertion); logical(LK) :: assertion; end function
429#endif
430#if RK1_ENABLED
431 module function test_getRootSchroder_RK1() result(assertion); logical(LK) :: assertion; end function
432#endif
433 end interface
434
435 !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
436
437 interface
438#if RK5_ENABLED
439 module function test_setRootSchroder_RK5() result(assertion); logical(LK) :: assertion; end function
440#endif
441#if RK4_ENABLED
442 module function test_setRootSchroder_RK4() result(assertion); logical(LK) :: assertion; end function
443#endif
444#if RK3_ENABLED
445 module function test_setRootSchroder_RK3() result(assertion); logical(LK) :: assertion; end function
446#endif
447#if RK2_ENABLED
448 module function test_setRootSchroder_RK2() result(assertion); logical(LK) :: assertion; end function
449#endif
450#if RK1_ENABLED
451 module function test_setRootSchroder_RK1() result(assertion); logical(LK) :: assertion; end function
452#endif
453 end interface
454
455 !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
456
457!%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
458
459contains
460
461!%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
462
463 subroutine setTest()
464
465 implicit none
467
468 !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
469
470 !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
471
472#if RK5_ENABLED
473 call test%run(test_getRootDef_RK5, SK_"test_getRootDef_RK5")
474#endif
475#if RK4_ENABLED
476 call test%run(test_getRootDef_RK4, SK_"test_getRootDef_RK4")
477#endif
478#if RK3_ENABLED
479 call test%run(test_getRootDef_RK3, SK_"test_getRootDef_RK3")
480#endif
481#if RK2_ENABLED
482 call test%run(test_getRootDef_RK2, SK_"test_getRootDef_RK2")
483#endif
484#if RK1_ENABLED
485 call test%run(test_getRootDef_RK1, SK_"test_getRootDef_RK1")
486#endif
487
488 !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
489
490 !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
491
492 !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
493
494#if RK5_ENABLED
495 call test%run(test_getRootFalse_RK5, SK_"test_getRootFalse_RK5")
496#endif
497#if RK4_ENABLED
498 call test%run(test_getRootFalse_RK4, SK_"test_getRootFalse_RK4")
499#endif
500#if RK3_ENABLED
501 call test%run(test_getRootFalse_RK3, SK_"test_getRootFalse_RK3")
502#endif
503#if RK2_ENABLED
504 call test%run(test_getRootFalse_RK2, SK_"test_getRootFalse_RK2")
505#endif
506#if RK1_ENABLED
507 call test%run(test_getRootFalse_RK1, SK_"test_getRootFalse_RK1")
508#endif
509
510 !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
511
512#if RK5_ENABLED
513 call test%run(test_setRootFalse_RK5, SK_"test_setRootFalse_RK5")
514#endif
515#if RK4_ENABLED
516 call test%run(test_setRootFalse_RK4, SK_"test_setRootFalse_RK4")
517#endif
518#if RK3_ENABLED
519 call test%run(test_setRootFalse_RK3, SK_"test_setRootFalse_RK3")
520#endif
521#if RK2_ENABLED
522 call test%run(test_setRootFalse_RK2, SK_"test_setRootFalse_RK2")
523#endif
524#if RK1_ENABLED
525 call test%run(test_setRootFalse_RK1, SK_"test_setRootFalse_RK1")
526#endif
527
528 !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
529
530 !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
531
532 !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
533
534#if RK5_ENABLED
535 call test%run(test_getRootBisection_RK5, SK_"test_getRootBisection_RK5")
536#endif
537#if RK4_ENABLED
538 call test%run(test_getRootBisection_RK4, SK_"test_getRootBisection_RK4")
539#endif
540#if RK3_ENABLED
541 call test%run(test_getRootBisection_RK3, SK_"test_getRootBisection_RK3")
542#endif
543#if RK2_ENABLED
544 call test%run(test_getRootBisection_RK2, SK_"test_getRootBisection_RK2")
545#endif
546#if RK1_ENABLED
547 call test%run(test_getRootBisection_RK1, SK_"test_getRootBisection_RK1")
548#endif
549
550 !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
551
552#if RK5_ENABLED
553 call test%run(test_setRootBisection_RK5, SK_"test_setRootBisection_RK5")
554#endif
555#if RK4_ENABLED
556 call test%run(test_setRootBisection_RK4, SK_"test_setRootBisection_RK4")
557#endif
558#if RK3_ENABLED
559 call test%run(test_setRootBisection_RK3, SK_"test_setRootBisection_RK3")
560#endif
561#if RK2_ENABLED
562 call test%run(test_setRootBisection_RK2, SK_"test_setRootBisection_RK2")
563#endif
564#if RK1_ENABLED
565 call test%run(test_setRootBisection_RK1, SK_"test_setRootBisection_RK1")
566#endif
567
568 !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
569
570 !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
571
572 !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
573
574#if RK5_ENABLED
575 call test%run(test_getRootSecant_RK5, SK_"test_getRootSecant_RK5")
576#endif
577#if RK4_ENABLED
578 call test%run(test_getRootSecant_RK4, SK_"test_getRootSecant_RK4")
579#endif
580#if RK3_ENABLED
581 call test%run(test_getRootSecant_RK3, SK_"test_getRootSecant_RK3")
582#endif
583#if RK2_ENABLED
584 call test%run(test_getRootSecant_RK2, SK_"test_getRootSecant_RK2")
585#endif
586#if RK1_ENABLED
587 call test%run(test_getRootSecant_RK1, SK_"test_getRootSecant_RK1")
588#endif
589
590 !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
591
592#if RK5_ENABLED
593 call test%run(test_setRootSecant_RK5, SK_"test_setRootSecant_RK5")
594#endif
595#if RK4_ENABLED
596 call test%run(test_setRootSecant_RK4, SK_"test_setRootSecant_RK4")
597#endif
598#if RK3_ENABLED
599 call test%run(test_setRootSecant_RK3, SK_"test_setRootSecant_RK3")
600#endif
601#if RK2_ENABLED
602 call test%run(test_setRootSecant_RK2, SK_"test_setRootSecant_RK2")
603#endif
604#if RK1_ENABLED
605 call test%run(test_setRootSecant_RK1, SK_"test_setRootSecant_RK1")
606#endif
607
608 !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
609
610 !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
611
612 !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
613
614#if RK5_ENABLED
615 call test%run(test_getRootBrent_RK5, SK_"test_getRootBrent_RK5")
616#endif
617#if RK4_ENABLED
618 call test%run(test_getRootBrent_RK4, SK_"test_getRootBrent_RK4")
619#endif
620#if RK3_ENABLED
621 call test%run(test_getRootBrent_RK3, SK_"test_getRootBrent_RK3")
622#endif
623#if RK2_ENABLED
624 call test%run(test_getRootBrent_RK2, SK_"test_getRootBrent_RK2")
625#endif
626#if RK1_ENABLED
627 call test%run(test_getRootBrent_RK1, SK_"test_getRootBrent_RK1")
628#endif
629
630 !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
631
632#if RK5_ENABLED
633 call test%run(test_setRootBrent_RK5, SK_"test_setRootBrent_RK5")
634#endif
635#if RK4_ENABLED
636 call test%run(test_setRootBrent_RK4, SK_"test_setRootBrent_RK4")
637#endif
638#if RK3_ENABLED
639 call test%run(test_setRootBrent_RK3, SK_"test_setRootBrent_RK3")
640#endif
641#if RK2_ENABLED
642 call test%run(test_setRootBrent_RK2, SK_"test_setRootBrent_RK2")
643#endif
644#if RK1_ENABLED
645 call test%run(test_setRootBrent_RK1, SK_"test_setRootBrent_RK1")
646#endif
647
648 !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
649
650 !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
651
652 !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
653
654#if RK5_ENABLED
655 call test%run(test_getRootRidders_RK5, SK_"test_getRootRidders_RK5")
656#endif
657#if RK4_ENABLED
658 call test%run(test_getRootRidders_RK4, SK_"test_getRootRidders_RK4")
659#endif
660#if RK3_ENABLED
661 call test%run(test_getRootRidders_RK3, SK_"test_getRootRidders_RK3")
662#endif
663#if RK2_ENABLED
664 call test%run(test_getRootRidders_RK2, SK_"test_getRootRidders_RK2")
665#endif
666#if RK1_ENABLED
667 call test%run(test_getRootRidders_RK1, SK_"test_getRootRidders_RK1")
668#endif
669
670 !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
671
672#if RK5_ENABLED
673 call test%run(test_setRootRidders_RK5, SK_"test_setRootRidders_RK5")
674#endif
675#if RK4_ENABLED
676 call test%run(test_setRootRidders_RK4, SK_"test_setRootRidders_RK4")
677#endif
678#if RK3_ENABLED
679 call test%run(test_setRootRidders_RK3, SK_"test_setRootRidders_RK3")
680#endif
681#if RK2_ENABLED
682 call test%run(test_setRootRidders_RK2, SK_"test_setRootRidders_RK2")
683#endif
684#if RK1_ENABLED
685 call test%run(test_setRootRidders_RK1, SK_"test_setRootRidders_RK1")
686#endif
687
688 !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
689
690 !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
691
692 !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
693
694#if RK5_ENABLED
695 call test%run(test_getRootTOMS748_RK5, SK_"test_getRootTOMS748_RK5")
696#endif
697#if RK4_ENABLED
698 call test%run(test_getRootTOMS748_RK4, SK_"test_getRootTOMS748_RK4")
699#endif
700#if RK3_ENABLED
701 call test%run(test_getRootTOMS748_RK3, SK_"test_getRootTOMS748_RK3")
702#endif
703#if RK2_ENABLED
704 call test%run(test_getRootTOMS748_RK2, SK_"test_getRootTOMS748_RK2")
705#endif
706#if RK1_ENABLED
707 call test%run(test_getRootTOMS748_RK1, SK_"test_getRootTOMS748_RK1")
708#endif
709
710 !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
711
712#if RK5_ENABLED
713 call test%run(test_setRootTOMS748_RK5, SK_"test_setRootTOMS748_RK5")
714#endif
715#if RK4_ENABLED
716 call test%run(test_setRootTOMS748_RK4, SK_"test_setRootTOMS748_RK4")
717#endif
718#if RK3_ENABLED
719 call test%run(test_setRootTOMS748_RK3, SK_"test_setRootTOMS748_RK3")
720#endif
721#if RK2_ENABLED
722 call test%run(test_setRootTOMS748_RK2, SK_"test_setRootTOMS748_RK2")
723#endif
724#if RK1_ENABLED
725 call test%run(test_setRootTOMS748_RK1, SK_"test_setRootTOMS748_RK1")
726#endif
727
728 !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
729
730 !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
731
732 !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
733
734#if RK5_ENABLED
735 call test%run(test_getRootNewton_RK5, SK_"test_getRootNewton_RK5")
736#endif
737#if RK4_ENABLED
738 call test%run(test_getRootNewton_RK4, SK_"test_getRootNewton_RK4")
739#endif
740#if RK3_ENABLED
741 call test%run(test_getRootNewton_RK3, SK_"test_getRootNewton_RK3")
742#endif
743#if RK2_ENABLED
744 call test%run(test_getRootNewton_RK2, SK_"test_getRootNewton_RK2")
745#endif
746#if RK1_ENABLED
747 call test%run(test_getRootNewton_RK1, SK_"test_getRootNewton_RK1")
748#endif
749
750 !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
751
752#if RK5_ENABLED
753 call test%run(test_setRootNewton_RK5, SK_"test_setRootNewton_RK5")
754#endif
755#if RK4_ENABLED
756 call test%run(test_setRootNewton_RK4, SK_"test_setRootNewton_RK4")
757#endif
758#if RK3_ENABLED
759 call test%run(test_setRootNewton_RK3, SK_"test_setRootNewton_RK3")
760#endif
761#if RK2_ENABLED
762 call test%run(test_setRootNewton_RK2, SK_"test_setRootNewton_RK2")
763#endif
764#if RK1_ENABLED
765 call test%run(test_setRootNewton_RK1, SK_"test_setRootNewton_RK1")
766#endif
767
768 !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
769
770 !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
771
772 !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
773
774#if RK5_ENABLED
775 call test%run(test_getRootHalley_RK5, SK_"test_getRootHalley_RK5")
776#endif
777#if RK4_ENABLED
778 call test%run(test_getRootHalley_RK4, SK_"test_getRootHalley_RK4")
779#endif
780#if RK3_ENABLED
781 call test%run(test_getRootHalley_RK3, SK_"test_getRootHalley_RK3")
782#endif
783#if RK2_ENABLED
784 call test%run(test_getRootHalley_RK2, SK_"test_getRootHalley_RK2")
785#endif
786#if RK1_ENABLED
787 call test%run(test_getRootHalley_RK1, SK_"test_getRootHalley_RK1")
788#endif
789
790 !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
791
792#if RK5_ENABLED
793 call test%run(test_setRootHalley_RK5, SK_"test_setRootHalley_RK5")
794#endif
795#if RK4_ENABLED
796 call test%run(test_setRootHalley_RK4, SK_"test_setRootHalley_RK4")
797#endif
798#if RK3_ENABLED
799 call test%run(test_setRootHalley_RK3, SK_"test_setRootHalley_RK3")
800#endif
801#if RK2_ENABLED
802 call test%run(test_setRootHalley_RK2, SK_"test_setRootHalley_RK2")
803#endif
804#if RK1_ENABLED
805 call test%run(test_setRootHalley_RK1, SK_"test_setRootHalley_RK1")
806#endif
807
808 !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
809
810 !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
811
812 !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
813
814#if RK5_ENABLED
815 call test%run(test_getRootSchroder_RK5, SK_"test_getRootSchroder_RK5")
816#endif
817#if RK4_ENABLED
818 call test%run(test_getRootSchroder_RK4, SK_"test_getRootSchroder_RK4")
819#endif
820#if RK3_ENABLED
821 call test%run(test_getRootSchroder_RK3, SK_"test_getRootSchroder_RK3")
822#endif
823#if RK2_ENABLED
824 call test%run(test_getRootSchroder_RK2, SK_"test_getRootSchroder_RK2")
825#endif
826#if RK1_ENABLED
827 call test%run(test_getRootSchroder_RK1, SK_"test_getRootSchroder_RK1")
828#endif
829
830 !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
831
832#if RK5_ENABLED
833 call test%run(test_setRootSchroder_RK5, SK_"test_setRootSchroder_RK5")
834#endif
835#if RK4_ENABLED
836 call test%run(test_setRootSchroder_RK4, SK_"test_setRootSchroder_RK4")
837#endif
838#if RK3_ENABLED
839 call test%run(test_setRootSchroder_RK3, SK_"test_setRootSchroder_RK3")
840#endif
841#if RK2_ENABLED
842 call test%run(test_setRootSchroder_RK2, SK_"test_setRootSchroder_RK2")
843#endif
844#if RK1_ENABLED
845 call test%run(test_setRootSchroder_RK1, SK_"test_setRootSchroder_RK1")
846#endif
847
848 !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
849
850 !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
851
852 call test%summarize()
853
854 end subroutine setTest
855
856!%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
857
858end module test_pm_mathRoot ! LCOV_EXCL_LINE
This module contains classes and procedures for computing the roots of one-dimensional continuous mat...
character(*, SK), parameter MODULE_NAME
This module contains a simple unit-testing framework for the Fortran libraries, including the ParaMon...
Definition: pm_test.F90:42
This module contains tests of the module pm_mathRoot.
type(test_type) test
This is the derived type test_type for generating objects that facilitate testing of a series of proc...
Definition: pm_test.F90:209