File: esys.escript.pdetools.html

package info (click to toggle)
python-escript 5.6-10
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 144,304 kB
  • sloc: python: 592,074; cpp: 136,909; ansic: 18,675; javascript: 9,411; xml: 3,384; sh: 738; makefile: 207
file content (1334 lines) | stat: -rw-r--r-- 95,277 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
  <head>
    <meta http-equiv="X-UA-Compatible" content="IE=Edge" />
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>esys.escript.pdetools Package &#8212; esys.escript 5.6 documentation</title>
    <link rel="stylesheet" href="_static/classic.css" type="text/css" />
    <link rel="stylesheet" href="_static/pygments.css" type="text/css" />
    
    <script type="text/javascript" id="documentation_options" data-url_root="./" src="_static/documentation_options.js"></script>
    <script type="text/javascript" src="_static/jquery.js"></script>
    <script type="text/javascript" src="_static/underscore.js"></script>
    <script type="text/javascript" src="_static/doctools.js"></script>
    <script type="text/javascript" src="_static/language_data.js"></script>
    
    <link rel="index" title="Index" href="genindex.html" />
    <link rel="search" title="Search" href="search.html" /> 
  </head><body>
    <div class="related" role="navigation" aria-label="related navigation">
      <h3>Navigation</h3>
      <ul>
        <li class="right" style="margin-right: 10px">
          <a href="genindex.html" title="General Index"
             accesskey="I">index</a></li>
        <li class="right" >
          <a href="py-modindex.html" title="Python Module Index"
             >modules</a> |</li>
        <li class="nav-item nav-item-0"><a href="index.html">esys.escript 5.6 documentation</a> &#187;</li> 
      </ul>
    </div>  

    <div class="document">
      <div class="documentwrapper">
        <div class="bodywrapper">
          <div class="body" role="main">
            
  <div class="section" id="module-esys.escript.pdetools">
<span id="esys-escript-pdetools-package"></span><h1>esys.escript.pdetools Package<a class="headerlink" href="#module-esys.escript.pdetools" title="Permalink to this headline">¶</a></h1>
<ul class="simple">
<li></li>
</ul>
<div class="section" id="classes">
<h2>Classes<a class="headerlink" href="#classes" title="Permalink to this headline">¶</a></h2>
<ul class="simple">
<li><a class="reference internal" href="#esys.escript.pdetools.ArithmeticTuple" title="esys.escript.pdetools.ArithmeticTuple"><code class="xref py py-obj docutils literal notranslate"><span class="pre">ArithmeticTuple</span></code></a></li>
<li><a class="reference internal" href="#esys.escript.pdetools.CorrectionFailed" title="esys.escript.pdetools.CorrectionFailed"><code class="xref py py-obj docutils literal notranslate"><span class="pre">CorrectionFailed</span></code></a></li>
<li><a class="reference internal" href="#esys.escript.pdetools.Defect" title="esys.escript.pdetools.Defect"><code class="xref py py-obj docutils literal notranslate"><span class="pre">Defect</span></code></a></li>
<li><a class="reference internal" href="#esys.escript.pdetools.HomogeneousSaddlePointProblem" title="esys.escript.pdetools.HomogeneousSaddlePointProblem"><code class="xref py py-obj docutils literal notranslate"><span class="pre">HomogeneousSaddlePointProblem</span></code></a></li>
<li><a class="reference internal" href="#esys.escript.pdetools.IndefinitePreconditioner" title="esys.escript.pdetools.IndefinitePreconditioner"><code class="xref py py-obj docutils literal notranslate"><span class="pre">IndefinitePreconditioner</span></code></a></li>
<li><a class="reference internal" href="#esys.escript.pdetools.IterationBreakDown" title="esys.escript.pdetools.IterationBreakDown"><code class="xref py py-obj docutils literal notranslate"><span class="pre">IterationBreakDown</span></code></a></li>
<li><a class="reference internal" href="#esys.escript.pdetools.Locator" title="esys.escript.pdetools.Locator"><code class="xref py py-obj docutils literal notranslate"><span class="pre">Locator</span></code></a></li>
<li><a class="reference internal" href="#esys.escript.pdetools.MaxIterReached" title="esys.escript.pdetools.MaxIterReached"><code class="xref py py-obj docutils literal notranslate"><span class="pre">MaxIterReached</span></code></a></li>
<li><a class="reference internal" href="#esys.escript.pdetools.NegativeNorm" title="esys.escript.pdetools.NegativeNorm"><code class="xref py py-obj docutils literal notranslate"><span class="pre">NegativeNorm</span></code></a></li>
<li><a class="reference internal" href="#esys.escript.pdetools.NoPDE" title="esys.escript.pdetools.NoPDE"><code class="xref py py-obj docutils literal notranslate"><span class="pre">NoPDE</span></code></a></li>
<li><a class="reference internal" href="#esys.escript.pdetools.Projector" title="esys.escript.pdetools.Projector"><code class="xref py py-obj docutils literal notranslate"><span class="pre">Projector</span></code></a></li>
<li><a class="reference internal" href="#esys.escript.pdetools.SolverSchemeException" title="esys.escript.pdetools.SolverSchemeException"><code class="xref py py-obj docutils literal notranslate"><span class="pre">SolverSchemeException</span></code></a></li>
<li><a class="reference internal" href="#esys.escript.pdetools.TimeIntegrationManager" title="esys.escript.pdetools.TimeIntegrationManager"><code class="xref py py-obj docutils literal notranslate"><span class="pre">TimeIntegrationManager</span></code></a></li>
</ul>
<dl class="class">
<dt id="esys.escript.pdetools.ArithmeticTuple">
<em class="property">class </em><code class="descclassname">esys.escript.pdetools.</code><code class="descname">ArithmeticTuple</code><span class="sig-paren">(</span><em>*args</em><span class="sig-paren">)</span><a class="headerlink" href="#esys.escript.pdetools.ArithmeticTuple" title="Permalink to this definition">¶</a></dt>
<dd><p>Bases: <code class="xref py py-class docutils literal notranslate"><span class="pre">object</span></code></p>
<p>Tuple supporting inplace update x+=y and scaling x=a*y where <code class="docutils literal notranslate"><span class="pre">x,y</span></code> is an
ArithmeticTuple and <code class="docutils literal notranslate"><span class="pre">a</span></code> is a float.</p>
<p>Example of usage:</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="kn">from</span> <span class="nn">esys.escript</span> <span class="k">import</span> <span class="n">Data</span>
<span class="kn">from</span> <span class="nn">numpy</span> <span class="k">import</span> <span class="n">array</span>
<span class="n">a</span><span class="o">=</span><span class="n">eData</span><span class="p">(</span><span class="o">...</span><span class="p">)</span>
<span class="n">b</span><span class="o">=</span><span class="n">array</span><span class="p">([</span><span class="mf">1.</span><span class="p">,</span><span class="mf">4.</span><span class="p">])</span>
<span class="n">x</span><span class="o">=</span><span class="n">ArithmeticTuple</span><span class="p">(</span><span class="n">a</span><span class="p">,</span><span class="n">b</span><span class="p">)</span>
<span class="n">y</span><span class="o">=</span><span class="mf">5.</span><span class="o">*</span><span class="n">x</span>
</pre></div>
</div>
<dl class="method">
<dt id="esys.escript.pdetools.ArithmeticTuple.__init__">
<code class="descname">__init__</code><span class="sig-paren">(</span><em>*args</em><span class="sig-paren">)</span><a class="headerlink" href="#esys.escript.pdetools.ArithmeticTuple.__init__" title="Permalink to this definition">¶</a></dt>
<dd><p>Initializes object with elements <code class="docutils literal notranslate"><span class="pre">args</span></code>.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>args</strong> – tuple of objects that support inplace add (x+=y) and
scaling (x=a*y)</td>
</tr>
</tbody>
</table>
</dd></dl>

</dd></dl>

<dl class="class">
<dt id="esys.escript.pdetools.CorrectionFailed">
<em class="property">class </em><code class="descclassname">esys.escript.pdetools.</code><code class="descname">CorrectionFailed</code><a class="headerlink" href="#esys.escript.pdetools.CorrectionFailed" title="Permalink to this definition">¶</a></dt>
<dd><p>Bases: <code class="xref py py-class docutils literal notranslate"><span class="pre">esys.escriptcore.pdetools.SolverSchemeException</span></code></p>
<p>Exception thrown if no convergence has been achieved in the solution
correction scheme.</p>
<dl class="method">
<dt id="esys.escript.pdetools.CorrectionFailed.__init__">
<code class="descname">__init__</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#esys.escript.pdetools.CorrectionFailed.__init__" title="Permalink to this definition">¶</a></dt>
<dd><p>Initialize self.  See help(type(self)) for accurate signature.</p>
</dd></dl>

<dl class="attribute">
<dt id="esys.escript.pdetools.CorrectionFailed.args">
<code class="descname">args</code><a class="headerlink" href="#esys.escript.pdetools.CorrectionFailed.args" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="method">
<dt id="esys.escript.pdetools.CorrectionFailed.with_traceback">
<code class="descname">with_traceback</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#esys.escript.pdetools.CorrectionFailed.with_traceback" title="Permalink to this definition">¶</a></dt>
<dd><p>Exception.with_traceback(tb) –
set self.__traceback__ to tb and return self.</p>
</dd></dl>

</dd></dl>

<dl class="class">
<dt id="esys.escript.pdetools.Defect">
<em class="property">class </em><code class="descclassname">esys.escript.pdetools.</code><code class="descname">Defect</code><a class="headerlink" href="#esys.escript.pdetools.Defect" title="Permalink to this definition">¶</a></dt>
<dd><p>Bases: <code class="xref py py-class docutils literal notranslate"><span class="pre">object</span></code></p>
<p>Defines a non-linear defect F(x) of a variable x. This class includes
two functions (bilinearform and eval) that must be overridden by subclassing
before use.</p>
<dl class="method">
<dt id="esys.escript.pdetools.Defect.__init__">
<code class="descname">__init__</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#esys.escript.pdetools.Defect.__init__" title="Permalink to this definition">¶</a></dt>
<dd><p>Initializes defect.</p>
</dd></dl>

<dl class="method">
<dt id="esys.escript.pdetools.Defect.bilinearform">
<code class="descname">bilinearform</code><span class="sig-paren">(</span><em>x0</em>, <em>x1</em><span class="sig-paren">)</span><a class="headerlink" href="#esys.escript.pdetools.Defect.bilinearform" title="Permalink to this definition">¶</a></dt>
<dd><p>Returns the inner product of x0 and x1</p>
<p>NOTE: MUST BE OVERRIDDEN BY A SUBCLASS</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
<li><strong>x0</strong> – value for x0</li>
<li><strong>x1</strong> – value for x1</li>
</ul>
</td>
</tr>
<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first">the inner product of x0 and x1</p>
</td>
</tr>
<tr class="field-odd field"><th class="field-name">Return type:</th><td class="field-body"><p class="first last"><code class="docutils literal notranslate"><span class="pre">float</span></code></p>
</td>
</tr>
</tbody>
</table>
</dd></dl>

<dl class="method">
<dt id="esys.escript.pdetools.Defect.derivative">
<code class="descname">derivative</code><span class="sig-paren">(</span><em>F0</em>, <em>x0</em>, <em>v</em>, <em>v_is_normalised=True</em><span class="sig-paren">)</span><a class="headerlink" href="#esys.escript.pdetools.Defect.derivative" title="Permalink to this definition">¶</a></dt>
<dd><p>Returns the directional derivative at <code class="docutils literal notranslate"><span class="pre">x0</span></code> in the direction of <code class="docutils literal notranslate"><span class="pre">v</span></code>.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
<li><strong>F0</strong> – value of this defect at x0</li>
<li><strong>x0</strong> – value at which derivative is calculated</li>
<li><strong>v</strong> – direction</li>
<li><strong>v_is_normalised</strong> – True to indicate that <code class="docutils literal notranslate"><span class="pre">v</span></code> is nomalized
(self.norm(v)=0)</li>
</ul>
</td>
</tr>
<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first">derivative of this defect at x0 in the direction of <code class="docutils literal notranslate"><span class="pre">v</span></code></p>
</td>
</tr>
<tr class="field-odd field"><th class="field-name">Note:</th><td class="field-body"><p class="first last">by default numerical evaluation (self.eval(x0+eps*v)-F0)/eps is
used but this method maybe overwritten to use exact evaluation.</p>
</td>
</tr>
</tbody>
</table>
</dd></dl>

<dl class="method">
<dt id="esys.escript.pdetools.Defect.eval">
<code class="descname">eval</code><span class="sig-paren">(</span><em>x</em><span class="sig-paren">)</span><a class="headerlink" href="#esys.escript.pdetools.Defect.eval" title="Permalink to this definition">¶</a></dt>
<dd><p>Returns the value F of a given <code class="docutils literal notranslate"><span class="pre">x</span></code>.</p>
<p>NOTE: MUST BE OVERRIDDEN BY A SUBCLASS</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>x</strong> – value for which the defect <code class="docutils literal notranslate"><span class="pre">F</span></code> is evaluated</td>
</tr>
<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body">value of the defect at <code class="docutils literal notranslate"><span class="pre">x</span></code></td>
</tr>
</tbody>
</table>
</dd></dl>

<dl class="method">
<dt id="esys.escript.pdetools.Defect.getDerivativeIncrementLength">
<code class="descname">getDerivativeIncrementLength</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#esys.escript.pdetools.Defect.getDerivativeIncrementLength" title="Permalink to this definition">¶</a></dt>
<dd><p>Returns the relative increment length used to approximate the
derivative of the defect.
:return: value of the defect at <code class="docutils literal notranslate"><span class="pre">x</span></code>
:rtype: positive <code class="docutils literal notranslate"><span class="pre">float</span></code></p>
</dd></dl>

<dl class="method">
<dt id="esys.escript.pdetools.Defect.norm">
<code class="descname">norm</code><span class="sig-paren">(</span><em>x</em><span class="sig-paren">)</span><a class="headerlink" href="#esys.escript.pdetools.Defect.norm" title="Permalink to this definition">¶</a></dt>
<dd><p>Returns the norm of argument <code class="docutils literal notranslate"><span class="pre">x</span></code>.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>x</strong> – a value</td>
</tr>
<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body">norm of argument x</td>
</tr>
<tr class="field-odd field"><th class="field-name">Return type:</th><td class="field-body"><code class="docutils literal notranslate"><span class="pre">float</span></code></td>
</tr>
<tr class="field-even field"><th class="field-name">Note:</th><td class="field-body">by default <code class="docutils literal notranslate"><span class="pre">sqrt(self.bilinearform(x,x)</span></code> is returned.</td>
</tr>
</tbody>
</table>
</dd></dl>

<dl class="method">
<dt id="esys.escript.pdetools.Defect.setDerivativeIncrementLength">
<code class="descname">setDerivativeIncrementLength</code><span class="sig-paren">(</span><em>inc=1.4901161193847656e-05</em><span class="sig-paren">)</span><a class="headerlink" href="#esys.escript.pdetools.Defect.setDerivativeIncrementLength" title="Permalink to this definition">¶</a></dt>
<dd><p>Sets the relative length of the increment used to approximate the
derivative of the defect. The increment is inc*norm(x)/norm(v)*v in the
direction of v with x as a starting point.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>inc</strong> (positive <code class="docutils literal notranslate"><span class="pre">float</span></code>) – relative increment length</td>
</tr>
</tbody>
</table>
</dd></dl>

</dd></dl>

<dl class="class">
<dt id="esys.escript.pdetools.HomogeneousSaddlePointProblem">
<em class="property">class </em><code class="descclassname">esys.escript.pdetools.</code><code class="descname">HomogeneousSaddlePointProblem</code><span class="sig-paren">(</span><em>**kwargs</em><span class="sig-paren">)</span><a class="headerlink" href="#esys.escript.pdetools.HomogeneousSaddlePointProblem" title="Permalink to this definition">¶</a></dt>
<dd><p>Bases: <code class="xref py py-class docutils literal notranslate"><span class="pre">object</span></code></p>
<p>This class provides a framework for solving linear homogeneous saddle
point problems of the form:</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="o">*</span><span class="n">Av</span><span class="o">+</span><span class="n">B</span><span class="o">^*</span><span class="n">p</span><span class="o">=</span><span class="n">f</span><span class="o">*</span>
<span class="o">*</span><span class="n">Bv</span>     <span class="o">=</span><span class="mi">0</span><span class="o">*</span>
</pre></div>
</div>
<p>for the unknowns <em>v</em> and <em>p</em> and given operators <em>A</em> and <em>B</em> and
given right hand side <em>f</em>. <em>B^*</em> is the adjoint operator of <em>B</em>.
<em>A</em> may depend weakly on <em>v</em> and <em>p</em>.</p>
<dl class="method">
<dt id="esys.escript.pdetools.HomogeneousSaddlePointProblem.__init__">
<code class="descname">__init__</code><span class="sig-paren">(</span><em>**kwargs</em><span class="sig-paren">)</span><a class="headerlink" href="#esys.escript.pdetools.HomogeneousSaddlePointProblem.__init__" title="Permalink to this definition">¶</a></dt>
<dd><p>initializes the saddle point problem</p>
</dd></dl>

<dl class="method">
<dt id="esys.escript.pdetools.HomogeneousSaddlePointProblem.Bv">
<code class="descname">Bv</code><span class="sig-paren">(</span><em>v</em>, <em>tol</em><span class="sig-paren">)</span><a class="headerlink" href="#esys.escript.pdetools.HomogeneousSaddlePointProblem.Bv" title="Permalink to this definition">¶</a></dt>
<dd><p>Returns Bv with accuracy <code class="xref py py-obj docutils literal notranslate"><span class="pre">tol</span></code> (overwrite)</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Return type:</th><td class="field-body">equal to the type of p</td>
</tr>
<tr class="field-even field"><th class="field-name">Note:</th><td class="field-body">boundary conditions on p should be zero!</td>
</tr>
</tbody>
</table>
</dd></dl>

<dl class="method">
<dt id="esys.escript.pdetools.HomogeneousSaddlePointProblem.getAbsoluteTolerance">
<code class="descname">getAbsoluteTolerance</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#esys.escript.pdetools.HomogeneousSaddlePointProblem.getAbsoluteTolerance" title="Permalink to this definition">¶</a></dt>
<dd><p>Returns the absolute tolerance.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body">absolute tolerance</td>
</tr>
<tr class="field-even field"><th class="field-name">Return type:</th><td class="field-body"><code class="docutils literal notranslate"><span class="pre">float</span></code></td>
</tr>
</tbody>
</table>
</dd></dl>

<dl class="method">
<dt id="esys.escript.pdetools.HomogeneousSaddlePointProblem.getDV">
<code class="descname">getDV</code><span class="sig-paren">(</span><em>p</em>, <em>v</em>, <em>tol</em><span class="sig-paren">)</span><a class="headerlink" href="#esys.escript.pdetools.HomogeneousSaddlePointProblem.getDV" title="Permalink to this definition">¶</a></dt>
<dd><p>return a correction to the value for a given v and a given p with accuracy <code class="xref py py-obj docutils literal notranslate"><span class="pre">tol</span></code> (overwrite)</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
<li><strong>p</strong> – pressure</li>
<li><strong>v</strong> – pressure</li>
</ul>
</td>
</tr>
<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first">dv given as <em>dv= A^{-1} (f-A v-B^*p)</em></p>
</td>
</tr>
<tr class="field-odd field"><th class="field-name">Note:</th><td class="field-body"><p class="first last">Only <em>A</em> may depend on <em>v</em> and <em>p</em></p>
</td>
</tr>
</tbody>
</table>
</dd></dl>

<dl class="method">
<dt id="esys.escript.pdetools.HomogeneousSaddlePointProblem.getTolerance">
<code class="descname">getTolerance</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#esys.escript.pdetools.HomogeneousSaddlePointProblem.getTolerance" title="Permalink to this definition">¶</a></dt>
<dd><p>Returns the relative tolerance.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body">relative tolerance</td>
</tr>
<tr class="field-even field"><th class="field-name">Return type:</th><td class="field-body"><code class="docutils literal notranslate"><span class="pre">float</span></code></td>
</tr>
</tbody>
</table>
</dd></dl>

<dl class="method">
<dt id="esys.escript.pdetools.HomogeneousSaddlePointProblem.inner_p">
<code class="descname">inner_p</code><span class="sig-paren">(</span><em>p0</em>, <em>p1</em><span class="sig-paren">)</span><a class="headerlink" href="#esys.escript.pdetools.HomogeneousSaddlePointProblem.inner_p" title="Permalink to this definition">¶</a></dt>
<dd><p>Returns inner product of p0 and p1 (overwrite).</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
<li><strong>p0</strong> – a pressure</li>
<li><strong>p1</strong> – a pressure</li>
</ul>
</td>
</tr>
<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first">inner product of p0 and p1</p>
</td>
</tr>
<tr class="field-odd field"><th class="field-name">Return type:</th><td class="field-body"><p class="first last"><code class="docutils literal notranslate"><span class="pre">float</span></code></p>
</td>
</tr>
</tbody>
</table>
</dd></dl>

<dl class="method">
<dt id="esys.escript.pdetools.HomogeneousSaddlePointProblem.inner_pBv">
<code class="descname">inner_pBv</code><span class="sig-paren">(</span><em>p</em>, <em>Bv</em><span class="sig-paren">)</span><a class="headerlink" href="#esys.escript.pdetools.HomogeneousSaddlePointProblem.inner_pBv" title="Permalink to this definition">¶</a></dt>
<dd><p>Returns inner product of element p and Bv (overwrite).</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
<li><strong>p</strong> – a pressure increment</li>
<li><strong>Bv</strong> – a residual</li>
</ul>
</td>
</tr>
<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first">inner product of element p and Bv</p>
</td>
</tr>
<tr class="field-odd field"><th class="field-name">Return type:</th><td class="field-body"><p class="first"><code class="docutils literal notranslate"><span class="pre">float</span></code></p>
</td>
</tr>
<tr class="field-even field"><th class="field-name">Note:</th><td class="field-body"><p class="first last">used if PCG is applied.</p>
</td>
</tr>
</tbody>
</table>
</dd></dl>

<dl class="method">
<dt id="esys.escript.pdetools.HomogeneousSaddlePointProblem.norm_Bv">
<code class="descname">norm_Bv</code><span class="sig-paren">(</span><em>Bv</em><span class="sig-paren">)</span><a class="headerlink" href="#esys.escript.pdetools.HomogeneousSaddlePointProblem.norm_Bv" title="Permalink to this definition">¶</a></dt>
<dd><p>Returns the norm of Bv (overwrite).</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Return type:</th><td class="field-body">equal to the type of p</td>
</tr>
<tr class="field-even field"><th class="field-name">Note:</th><td class="field-body">boundary conditions on p should be zero!</td>
</tr>
</tbody>
</table>
</dd></dl>

<dl class="method">
<dt id="esys.escript.pdetools.HomogeneousSaddlePointProblem.norm_p">
<code class="descname">norm_p</code><span class="sig-paren">(</span><em>p</em><span class="sig-paren">)</span><a class="headerlink" href="#esys.escript.pdetools.HomogeneousSaddlePointProblem.norm_p" title="Permalink to this definition">¶</a></dt>
<dd><p>calculates the norm of <code class="docutils literal notranslate"><span class="pre">p</span></code></p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>p</strong> – a pressure</td>
</tr>
<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body">the norm of <code class="docutils literal notranslate"><span class="pre">p</span></code> using the inner product for pressure</td>
</tr>
<tr class="field-odd field"><th class="field-name">Return type:</th><td class="field-body"><code class="docutils literal notranslate"><span class="pre">float</span></code></td>
</tr>
</tbody>
</table>
</dd></dl>

<dl class="method">
<dt id="esys.escript.pdetools.HomogeneousSaddlePointProblem.norm_v">
<code class="descname">norm_v</code><span class="sig-paren">(</span><em>v</em><span class="sig-paren">)</span><a class="headerlink" href="#esys.escript.pdetools.HomogeneousSaddlePointProblem.norm_v" title="Permalink to this definition">¶</a></dt>
<dd><p>Returns the norm of v (overwrite).</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>v</strong> – a velovity</td>
</tr>
<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body">norm of v</td>
</tr>
<tr class="field-odd field"><th class="field-name">Return type:</th><td class="field-body">non-negative <code class="docutils literal notranslate"><span class="pre">float</span></code></td>
</tr>
</tbody>
</table>
</dd></dl>

<dl class="method">
<dt id="esys.escript.pdetools.HomogeneousSaddlePointProblem.resetControlParameters">
<code class="descname">resetControlParameters</code><span class="sig-paren">(</span><em>K_p=1.0</em>, <em>K_v=1.0</em>, <em>rtol_max=0.01</em>, <em>rtol_min=1e-07</em>, <em>chi_max=0.5</em>, <em>reduction_factor=0.3</em>, <em>theta=0.1</em><span class="sig-paren">)</span><a class="headerlink" href="#esys.escript.pdetools.HomogeneousSaddlePointProblem.resetControlParameters" title="Permalink to this definition">¶</a></dt>
<dd><p>sets a control parameter</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last simple">
<li><strong>K_p</strong> (<code class="docutils literal notranslate"><span class="pre">float</span></code>) – initial value for constant to adjust pressure tolerance</li>
<li><strong>K_v</strong> (<code class="docutils literal notranslate"><span class="pre">float</span></code>) – initial value for constant to adjust velocity tolerance</li>
<li><strong>rtol_max</strong> (<code class="docutils literal notranslate"><span class="pre">float</span></code>) – maximuim relative tolerance used to calculate presssure and velocity increment.</li>
<li><strong>chi_max</strong> (<code class="docutils literal notranslate"><span class="pre">float</span></code>) – maximum tolerable converegence rate.</li>
<li><strong>reduction_factor</strong> (<code class="docutils literal notranslate"><span class="pre">float</span></code>) – reduction factor for adjustment factors.</li>
</ul>
</td>
</tr>
</tbody>
</table>
</dd></dl>

<dl class="method">
<dt id="esys.escript.pdetools.HomogeneousSaddlePointProblem.setAbsoluteTolerance">
<code class="descname">setAbsoluteTolerance</code><span class="sig-paren">(</span><em>tolerance=0.0</em><span class="sig-paren">)</span><a class="headerlink" href="#esys.escript.pdetools.HomogeneousSaddlePointProblem.setAbsoluteTolerance" title="Permalink to this definition">¶</a></dt>
<dd><p>Sets the absolute tolerance.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>tolerance</strong> (non-negative <code class="docutils literal notranslate"><span class="pre">float</span></code>) – tolerance to be used</td>
</tr>
</tbody>
</table>
</dd></dl>

<dl class="method">
<dt id="esys.escript.pdetools.HomogeneousSaddlePointProblem.setControlParameter">
<code class="descname">setControlParameter</code><span class="sig-paren">(</span><em>K_p=None</em>, <em>K_v=None</em>, <em>rtol_max=None</em>, <em>rtol_min=None</em>, <em>chi_max=None</em>, <em>reduction_factor=None</em>, <em>theta=None</em><span class="sig-paren">)</span><a class="headerlink" href="#esys.escript.pdetools.HomogeneousSaddlePointProblem.setControlParameter" title="Permalink to this definition">¶</a></dt>
<dd><p>sets a control parameter</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last simple">
<li><strong>K_p</strong> (<code class="docutils literal notranslate"><span class="pre">float</span></code>) – initial value for constant to adjust pressure tolerance</li>
<li><strong>K_v</strong> (<code class="docutils literal notranslate"><span class="pre">float</span></code>) – initial value for constant to adjust velocity tolerance</li>
<li><strong>rtol_max</strong> (<code class="docutils literal notranslate"><span class="pre">float</span></code>) – maximuim relative tolerance used to calculate presssure and velocity increment.</li>
<li><strong>chi_max</strong> (<code class="docutils literal notranslate"><span class="pre">float</span></code>) – maximum tolerable converegence rate.</li>
</ul>
</td>
</tr>
</tbody>
</table>
</dd></dl>

<dl class="method">
<dt id="esys.escript.pdetools.HomogeneousSaddlePointProblem.setTolerance">
<code class="descname">setTolerance</code><span class="sig-paren">(</span><em>tolerance=0.0001</em><span class="sig-paren">)</span><a class="headerlink" href="#esys.escript.pdetools.HomogeneousSaddlePointProblem.setTolerance" title="Permalink to this definition">¶</a></dt>
<dd><p>Sets the relative tolerance for (v,p).</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>tolerance</strong> (non-negative <code class="docutils literal notranslate"><span class="pre">float</span></code>) – tolerance to be used</td>
</tr>
</tbody>
</table>
</dd></dl>

<dl class="method">
<dt id="esys.escript.pdetools.HomogeneousSaddlePointProblem.solve">
<code class="descname">solve</code><span class="sig-paren">(</span><em>v</em>, <em>p</em>, <em>max_iter=20</em>, <em>verbose=False</em>, <em>usePCG=True</em>, <em>iter_restart=20</em>, <em>max_correction_steps=10</em><span class="sig-paren">)</span><a class="headerlink" href="#esys.escript.pdetools.HomogeneousSaddlePointProblem.solve" title="Permalink to this definition">¶</a></dt>
<dd><p>Solves the saddle point problem using initial guesses v and p.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
<li><strong>v</strong> (<code class="xref py py-obj docutils literal notranslate"><span class="pre">Data</span></code>) – initial guess for velocity</li>
<li><strong>p</strong> (<code class="xref py py-obj docutils literal notranslate"><span class="pre">Data</span></code>) – initial guess for pressure</li>
<li><strong>usePCG</strong> (<code class="docutils literal notranslate"><span class="pre">bool</span></code>) – indicates the usage of the PCG rather than GMRES scheme.</li>
<li><strong>max_iter</strong> (<code class="docutils literal notranslate"><span class="pre">int</span></code>) – maximum number of iteration steps per correction
attempt</li>
<li><strong>verbose</strong> (<code class="docutils literal notranslate"><span class="pre">bool</span></code>) – if True, shows information on the progress of the
saddlepoint problem solver.</li>
<li><strong>iter_restart</strong> (<code class="docutils literal notranslate"><span class="pre">int</span></code>) – restart the iteration after <code class="docutils literal notranslate"><span class="pre">iter_restart</span></code> steps
(only used if useUzaw=False)</li>
</ul>
</td>
</tr>
<tr class="field-even field"><th class="field-name">Return type:</th><td class="field-body"><p class="first"><code class="docutils literal notranslate"><span class="pre">tuple</span></code> of <code class="xref py py-obj docutils literal notranslate"><span class="pre">Data</span></code> objects</p>
</td>
</tr>
<tr class="field-odd field"><th class="field-name">Note:</th><td class="field-body"><p class="first last">typically this method is overwritten by a subclass. It provides a wrapper for the <code class="docutils literal notranslate"><span class="pre">_solve</span></code> method.</p>
</td>
</tr>
</tbody>
</table>
</dd></dl>

<dl class="method">
<dt id="esys.escript.pdetools.HomogeneousSaddlePointProblem.solve_AinvBt">
<code class="descname">solve_AinvBt</code><span class="sig-paren">(</span><em>dp</em>, <em>tol</em><span class="sig-paren">)</span><a class="headerlink" href="#esys.escript.pdetools.HomogeneousSaddlePointProblem.solve_AinvBt" title="Permalink to this definition">¶</a></dt>
<dd><p>Solves <em>A dv=B^*dp</em> with accuracy <code class="xref py py-obj docutils literal notranslate"><span class="pre">tol</span></code></p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>dp</strong> – a pressure increment</td>
</tr>
<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body">the solution of <em>A dv=B^*dp</em></td>
</tr>
<tr class="field-odd field"><th class="field-name">Note:</th><td class="field-body">boundary conditions on dv should be zero! <em>A</em> is the operator used in <code class="docutils literal notranslate"><span class="pre">getDV</span></code> and must not be altered.</td>
</tr>
</tbody>
</table>
</dd></dl>

<dl class="method">
<dt id="esys.escript.pdetools.HomogeneousSaddlePointProblem.solve_prec">
<code class="descname">solve_prec</code><span class="sig-paren">(</span><em>Bv</em>, <em>tol</em><span class="sig-paren">)</span><a class="headerlink" href="#esys.escript.pdetools.HomogeneousSaddlePointProblem.solve_prec" title="Permalink to this definition">¶</a></dt>
<dd><p>Provides a preconditioner for <em>(BA^{-1}B^ * )</em> applied to Bv with accuracy <code class="xref py py-obj docutils literal notranslate"><span class="pre">tol</span></code></p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Return type:</th><td class="field-body">equal to the type of p</td>
</tr>
<tr class="field-even field"><th class="field-name">Note:</th><td class="field-body">boundary conditions on p should be zero!</td>
</tr>
</tbody>
</table>
</dd></dl>

</dd></dl>

<dl class="class">
<dt id="esys.escript.pdetools.IndefinitePreconditioner">
<em class="property">class </em><code class="descclassname">esys.escript.pdetools.</code><code class="descname">IndefinitePreconditioner</code><a class="headerlink" href="#esys.escript.pdetools.IndefinitePreconditioner" title="Permalink to this definition">¶</a></dt>
<dd><p>Bases: <code class="xref py py-class docutils literal notranslate"><span class="pre">esys.escriptcore.pdetools.SolverSchemeException</span></code></p>
<p>Exception thrown if the preconditioner is not positive definite.</p>
<dl class="method">
<dt id="esys.escript.pdetools.IndefinitePreconditioner.__init__">
<code class="descname">__init__</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#esys.escript.pdetools.IndefinitePreconditioner.__init__" title="Permalink to this definition">¶</a></dt>
<dd><p>Initialize self.  See help(type(self)) for accurate signature.</p>
</dd></dl>

<dl class="attribute">
<dt id="esys.escript.pdetools.IndefinitePreconditioner.args">
<code class="descname">args</code><a class="headerlink" href="#esys.escript.pdetools.IndefinitePreconditioner.args" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="method">
<dt id="esys.escript.pdetools.IndefinitePreconditioner.with_traceback">
<code class="descname">with_traceback</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#esys.escript.pdetools.IndefinitePreconditioner.with_traceback" title="Permalink to this definition">¶</a></dt>
<dd><p>Exception.with_traceback(tb) –
set self.__traceback__ to tb and return self.</p>
</dd></dl>

</dd></dl>

<dl class="class">
<dt id="esys.escript.pdetools.IterationBreakDown">
<em class="property">class </em><code class="descclassname">esys.escript.pdetools.</code><code class="descname">IterationBreakDown</code><a class="headerlink" href="#esys.escript.pdetools.IterationBreakDown" title="Permalink to this definition">¶</a></dt>
<dd><p>Bases: <code class="xref py py-class docutils literal notranslate"><span class="pre">esys.escriptcore.pdetools.SolverSchemeException</span></code></p>
<p>Exception thrown if the iteration scheme encountered an incurable breakdown.</p>
<dl class="method">
<dt id="esys.escript.pdetools.IterationBreakDown.__init__">
<code class="descname">__init__</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#esys.escript.pdetools.IterationBreakDown.__init__" title="Permalink to this definition">¶</a></dt>
<dd><p>Initialize self.  See help(type(self)) for accurate signature.</p>
</dd></dl>

<dl class="attribute">
<dt id="esys.escript.pdetools.IterationBreakDown.args">
<code class="descname">args</code><a class="headerlink" href="#esys.escript.pdetools.IterationBreakDown.args" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="method">
<dt id="esys.escript.pdetools.IterationBreakDown.with_traceback">
<code class="descname">with_traceback</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#esys.escript.pdetools.IterationBreakDown.with_traceback" title="Permalink to this definition">¶</a></dt>
<dd><p>Exception.with_traceback(tb) –
set self.__traceback__ to tb and return self.</p>
</dd></dl>

</dd></dl>

<dl class="class">
<dt id="esys.escript.pdetools.Locator">
<em class="property">class </em><code class="descclassname">esys.escript.pdetools.</code><code class="descname">Locator</code><span class="sig-paren">(</span><em>where</em>, <em>x=array([0.</em>, <em>0.</em>, <em>0.])</em><span class="sig-paren">)</span><a class="headerlink" href="#esys.escript.pdetools.Locator" title="Permalink to this definition">¶</a></dt>
<dd><p>Bases: <code class="xref py py-class docutils literal notranslate"><span class="pre">object</span></code></p>
<p>Locator provides access to the values of data objects at a given spatial
coordinate x.</p>
<p>In fact, a Locator object finds the sample in the set of samples of a
given function space or domain which is closest to the given point x.</p>
<dl class="method">
<dt id="esys.escript.pdetools.Locator.__init__">
<code class="descname">__init__</code><span class="sig-paren">(</span><em>where</em>, <em>x=array([0.</em>, <em>0.</em>, <em>0.])</em><span class="sig-paren">)</span><a class="headerlink" href="#esys.escript.pdetools.Locator.__init__" title="Permalink to this definition">¶</a></dt>
<dd><p>Initializes a Locator to access values in Data objects on the Doamin
or FunctionSpace for the sample point which is closest to the given
point x.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last simple">
<li><strong>where</strong> (<code class="xref py py-obj docutils literal notranslate"><span class="pre">escript.FunctionSpace</span></code>) – function space</li>
<li><strong>x</strong> (<code class="docutils literal notranslate"><span class="pre">numpy.ndarray</span></code> or <code class="docutils literal notranslate"><span class="pre">list</span></code> of <code class="docutils literal notranslate"><span class="pre">numpy.ndarray</span></code>) – location(s) of the Locator</li>
</ul>
</td>
</tr>
</tbody>
</table>
</dd></dl>

<dl class="method">
<dt id="esys.escript.pdetools.Locator.getFunctionSpace">
<code class="descname">getFunctionSpace</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#esys.escript.pdetools.Locator.getFunctionSpace" title="Permalink to this definition">¶</a></dt>
<dd><p>Returns the function space of the Locator.</p>
</dd></dl>

<dl class="method">
<dt id="esys.escript.pdetools.Locator.getId">
<code class="descname">getId</code><span class="sig-paren">(</span><em>item=None</em><span class="sig-paren">)</span><a class="headerlink" href="#esys.escript.pdetools.Locator.getId" title="Permalink to this definition">¶</a></dt>
<dd><p>Returns the identifier of the location.</p>
</dd></dl>

<dl class="method">
<dt id="esys.escript.pdetools.Locator.getValue">
<code class="descname">getValue</code><span class="sig-paren">(</span><em>data</em><span class="sig-paren">)</span><a class="headerlink" href="#esys.escript.pdetools.Locator.getValue" title="Permalink to this definition">¶</a></dt>
<dd><p>Returns the value of <code class="docutils literal notranslate"><span class="pre">data</span></code> at the Locator if <code class="docutils literal notranslate"><span class="pre">data</span></code> is a <code class="xref py py-obj docutils literal notranslate"><span class="pre">Data</span></code>
object otherwise the object is returned.</p>
</dd></dl>

<dl class="method">
<dt id="esys.escript.pdetools.Locator.getX">
<code class="descname">getX</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#esys.escript.pdetools.Locator.getX" title="Permalink to this definition">¶</a></dt>
<dd><p>Returns the exact coordinates of the Locator.</p>
</dd></dl>

<dl class="method">
<dt id="esys.escript.pdetools.Locator.setValue">
<code class="descname">setValue</code><span class="sig-paren">(</span><em>data</em>, <em>v</em><span class="sig-paren">)</span><a class="headerlink" href="#esys.escript.pdetools.Locator.setValue" title="Permalink to this definition">¶</a></dt>
<dd><p>Sets the value of the <code class="docutils literal notranslate"><span class="pre">data</span></code> at the Locator.</p>
</dd></dl>

</dd></dl>

<dl class="class">
<dt id="esys.escript.pdetools.MaxIterReached">
<em class="property">class </em><code class="descclassname">esys.escript.pdetools.</code><code class="descname">MaxIterReached</code><a class="headerlink" href="#esys.escript.pdetools.MaxIterReached" title="Permalink to this definition">¶</a></dt>
<dd><p>Bases: <code class="xref py py-class docutils literal notranslate"><span class="pre">esys.escriptcore.pdetools.SolverSchemeException</span></code></p>
<p>Exception thrown if the maximum number of iteration steps is reached.</p>
<dl class="method">
<dt id="esys.escript.pdetools.MaxIterReached.__init__">
<code class="descname">__init__</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#esys.escript.pdetools.MaxIterReached.__init__" title="Permalink to this definition">¶</a></dt>
<dd><p>Initialize self.  See help(type(self)) for accurate signature.</p>
</dd></dl>

<dl class="attribute">
<dt id="esys.escript.pdetools.MaxIterReached.args">
<code class="descname">args</code><a class="headerlink" href="#esys.escript.pdetools.MaxIterReached.args" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="method">
<dt id="esys.escript.pdetools.MaxIterReached.with_traceback">
<code class="descname">with_traceback</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#esys.escript.pdetools.MaxIterReached.with_traceback" title="Permalink to this definition">¶</a></dt>
<dd><p>Exception.with_traceback(tb) –
set self.__traceback__ to tb and return self.</p>
</dd></dl>

</dd></dl>

<dl class="class">
<dt id="esys.escript.pdetools.NegativeNorm">
<em class="property">class </em><code class="descclassname">esys.escript.pdetools.</code><code class="descname">NegativeNorm</code><a class="headerlink" href="#esys.escript.pdetools.NegativeNorm" title="Permalink to this definition">¶</a></dt>
<dd><p>Bases: <code class="xref py py-class docutils literal notranslate"><span class="pre">esys.escriptcore.pdetools.SolverSchemeException</span></code></p>
<p>Exception thrown if a norm calculation returns a negative norm.</p>
<dl class="method">
<dt id="esys.escript.pdetools.NegativeNorm.__init__">
<code class="descname">__init__</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#esys.escript.pdetools.NegativeNorm.__init__" title="Permalink to this definition">¶</a></dt>
<dd><p>Initialize self.  See help(type(self)) for accurate signature.</p>
</dd></dl>

<dl class="attribute">
<dt id="esys.escript.pdetools.NegativeNorm.args">
<code class="descname">args</code><a class="headerlink" href="#esys.escript.pdetools.NegativeNorm.args" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="method">
<dt id="esys.escript.pdetools.NegativeNorm.with_traceback">
<code class="descname">with_traceback</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#esys.escript.pdetools.NegativeNorm.with_traceback" title="Permalink to this definition">¶</a></dt>
<dd><p>Exception.with_traceback(tb) –
set self.__traceback__ to tb and return self.</p>
</dd></dl>

</dd></dl>

<dl class="class">
<dt id="esys.escript.pdetools.NoPDE">
<em class="property">class </em><code class="descclassname">esys.escript.pdetools.</code><code class="descname">NoPDE</code><span class="sig-paren">(</span><em>domain</em>, <em>D=None</em>, <em>Y=None</em>, <em>q=None</em>, <em>r=None</em><span class="sig-paren">)</span><a class="headerlink" href="#esys.escript.pdetools.NoPDE" title="Permalink to this definition">¶</a></dt>
<dd><p>Bases: <code class="xref py py-class docutils literal notranslate"><span class="pre">object</span></code></p>
<p>Solves the following problem for u:</p>
<p><em>kronecker[i,j]*D[j]*u[j]=Y[i]</em></p>
<p>with constraint</p>
<p><em>u[j]=r[j]</em>  where <em>q[j]&gt;0</em></p>
<p>where <em>D</em>, <em>Y</em>, <em>r</em> and <em>q</em> are given functions of rank 1.</p>
<p>In the case of scalars this takes the form</p>
<p><em>D*u=Y</em></p>
<p>with constraint</p>
<p><em>u=r</em> where <em>q&gt;0</em></p>
<p>where <em>D</em>, <em>Y</em>, <em>r</em> and <em>q</em> are given scalar functions.</p>
<p>The constraint overwrites any other condition.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Note:</th><td class="field-body">This class is similar to the <code class="xref py py-obj docutils literal notranslate"><span class="pre">linearPDEs.LinearPDE</span></code> class with
A=B=C=X=0 but has the intention that all input parameters are given
in <code class="xref py py-obj docutils literal notranslate"><span class="pre">Solution</span></code> or <code class="xref py py-obj docutils literal notranslate"><span class="pre">ReducedSolution</span></code>.</td>
</tr>
</tbody>
</table>
<dl class="method">
<dt id="esys.escript.pdetools.NoPDE.__init__">
<code class="descname">__init__</code><span class="sig-paren">(</span><em>domain</em>, <em>D=None</em>, <em>Y=None</em>, <em>q=None</em>, <em>r=None</em><span class="sig-paren">)</span><a class="headerlink" href="#esys.escript.pdetools.NoPDE.__init__" title="Permalink to this definition">¶</a></dt>
<dd><p>Initializes the problem.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last simple">
<li><strong>domain</strong> (<code class="xref py py-obj docutils literal notranslate"><span class="pre">Domain</span></code>) – domain of the PDE</li>
<li><strong>D</strong> (<code class="docutils literal notranslate"><span class="pre">float</span></code>, <code class="docutils literal notranslate"><span class="pre">int</span></code>, <code class="docutils literal notranslate"><span class="pre">numpy.ndarray</span></code>, <code class="xref py py-obj docutils literal notranslate"><span class="pre">Data</span></code>) – coefficient of the solution</li>
<li><strong>Y</strong> (<code class="docutils literal notranslate"><span class="pre">float</span></code>, <code class="docutils literal notranslate"><span class="pre">int</span></code>, <code class="docutils literal notranslate"><span class="pre">numpy.ndarray</span></code>, <code class="xref py py-obj docutils literal notranslate"><span class="pre">Data</span></code>) – right hand side</li>
<li><strong>q</strong> (<code class="docutils literal notranslate"><span class="pre">float</span></code>, <code class="docutils literal notranslate"><span class="pre">int</span></code>, <code class="docutils literal notranslate"><span class="pre">numpy.ndarray</span></code>, <code class="xref py py-obj docutils literal notranslate"><span class="pre">Data</span></code>) – location of constraints</li>
<li><strong>r</strong> (<code class="docutils literal notranslate"><span class="pre">float</span></code>, <code class="docutils literal notranslate"><span class="pre">int</span></code>, <code class="docutils literal notranslate"><span class="pre">numpy.ndarray</span></code>, <code class="xref py py-obj docutils literal notranslate"><span class="pre">Data</span></code>) – value of solution at locations of constraints</li>
</ul>
</td>
</tr>
</tbody>
</table>
</dd></dl>

<dl class="method">
<dt id="esys.escript.pdetools.NoPDE.getSolution">
<code class="descname">getSolution</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#esys.escript.pdetools.NoPDE.getSolution" title="Permalink to this definition">¶</a></dt>
<dd><p>Returns the solution.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body">the solution of the problem</td>
</tr>
<tr class="field-even field"><th class="field-name">Return type:</th><td class="field-body"><code class="xref py py-obj docutils literal notranslate"><span class="pre">Data</span></code> object in the <code class="xref py py-obj docutils literal notranslate"><span class="pre">FunctionSpace</span></code> <code class="xref py py-obj docutils literal notranslate"><span class="pre">Solution</span></code> or
<code class="xref py py-obj docutils literal notranslate"><span class="pre">ReducedSolution</span></code></td>
</tr>
</tbody>
</table>
</dd></dl>

<dl class="method">
<dt id="esys.escript.pdetools.NoPDE.setReducedOff">
<code class="descname">setReducedOff</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#esys.escript.pdetools.NoPDE.setReducedOff" title="Permalink to this definition">¶</a></dt>
<dd><p>Sets the <code class="xref py py-obj docutils literal notranslate"><span class="pre">FunctionSpace</span></code> of the solution to <code class="xref py py-obj docutils literal notranslate"><span class="pre">Solution</span></code>.</p>
</dd></dl>

<dl class="method">
<dt id="esys.escript.pdetools.NoPDE.setReducedOn">
<code class="descname">setReducedOn</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#esys.escript.pdetools.NoPDE.setReducedOn" title="Permalink to this definition">¶</a></dt>
<dd><p>Sets the <code class="xref py py-obj docutils literal notranslate"><span class="pre">FunctionSpace</span></code> of the solution to <code class="xref py py-obj docutils literal notranslate"><span class="pre">ReducedSolution</span></code>.</p>
</dd></dl>

<dl class="method">
<dt id="esys.escript.pdetools.NoPDE.setValue">
<code class="descname">setValue</code><span class="sig-paren">(</span><em>D=None</em>, <em>Y=None</em>, <em>q=None</em>, <em>r=None</em><span class="sig-paren">)</span><a class="headerlink" href="#esys.escript.pdetools.NoPDE.setValue" title="Permalink to this definition">¶</a></dt>
<dd><p>Assigns values to the parameters.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last simple">
<li><strong>D</strong> (<code class="docutils literal notranslate"><span class="pre">float</span></code>, <code class="docutils literal notranslate"><span class="pre">int</span></code>, <code class="docutils literal notranslate"><span class="pre">numpy.ndarray</span></code>, <code class="xref py py-obj docutils literal notranslate"><span class="pre">Data</span></code>) – coefficient of the solution</li>
<li><strong>Y</strong> (<code class="docutils literal notranslate"><span class="pre">float</span></code>, <code class="docutils literal notranslate"><span class="pre">int</span></code>, <code class="docutils literal notranslate"><span class="pre">numpy.ndarray</span></code>, <code class="xref py py-obj docutils literal notranslate"><span class="pre">Data</span></code>) – right hand side</li>
<li><strong>q</strong> (<code class="docutils literal notranslate"><span class="pre">float</span></code>, <code class="docutils literal notranslate"><span class="pre">int</span></code>, <code class="docutils literal notranslate"><span class="pre">numpy.ndarray</span></code>, <code class="xref py py-obj docutils literal notranslate"><span class="pre">Data</span></code>) – location of constraints</li>
<li><strong>r</strong> (<code class="docutils literal notranslate"><span class="pre">float</span></code>, <code class="docutils literal notranslate"><span class="pre">int</span></code>, <code class="docutils literal notranslate"><span class="pre">numpy.ndarray</span></code>, <code class="xref py py-obj docutils literal notranslate"><span class="pre">Data</span></code>) – value of solution at locations of constraints</li>
</ul>
</td>
</tr>
</tbody>
</table>
</dd></dl>

</dd></dl>

<dl class="class">
<dt id="esys.escript.pdetools.Projector">
<em class="property">class </em><code class="descclassname">esys.escript.pdetools.</code><code class="descname">Projector</code><span class="sig-paren">(</span><em>domain</em>, <em>reduce=True</em>, <em>fast=True</em><span class="sig-paren">)</span><a class="headerlink" href="#esys.escript.pdetools.Projector" title="Permalink to this definition">¶</a></dt>
<dd><p>Bases: <code class="xref py py-class docutils literal notranslate"><span class="pre">object</span></code></p>
<p>The Projector is a factory which projects a discontinuous function onto a
continuous function on a given domain.</p>
<dl class="method">
<dt id="esys.escript.pdetools.Projector.__init__">
<code class="descname">__init__</code><span class="sig-paren">(</span><em>domain</em>, <em>reduce=True</em>, <em>fast=True</em><span class="sig-paren">)</span><a class="headerlink" href="#esys.escript.pdetools.Projector.__init__" title="Permalink to this definition">¶</a></dt>
<dd><p>Creates a continuous function space projector for a domain.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last simple">
<li><strong>domain</strong> – Domain of the projection.</li>
<li><strong>reduce</strong> – Flag to reduce projection order</li>
<li><strong>fast</strong> – Flag to use a fast method based on matrix lumping</li>
</ul>
</td>
</tr>
</tbody>
</table>
</dd></dl>

<dl class="method">
<dt id="esys.escript.pdetools.Projector.getSolverOptions">
<code class="descname">getSolverOptions</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#esys.escript.pdetools.Projector.getSolverOptions" title="Permalink to this definition">¶</a></dt>
<dd><p>Returns the solver options of the PDE solver.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Return type:</th><td class="field-body"><code class="xref py py-obj docutils literal notranslate"><span class="pre">linearPDEs.SolverOptions</span></code></td>
</tr>
</tbody>
</table>
</dd></dl>

<dl class="method">
<dt id="esys.escript.pdetools.Projector.getValue">
<code class="descname">getValue</code><span class="sig-paren">(</span><em>input_data</em><span class="sig-paren">)</span><a class="headerlink" href="#esys.escript.pdetools.Projector.getValue" title="Permalink to this definition">¶</a></dt>
<dd><p>Projects <code class="docutils literal notranslate"><span class="pre">input_data</span></code> onto a continuous function.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>input_data</strong> – the data to be projected</td>
</tr>
</tbody>
</table>
</dd></dl>

</dd></dl>

<dl class="class">
<dt id="esys.escript.pdetools.SolverSchemeException">
<em class="property">class </em><code class="descclassname">esys.escript.pdetools.</code><code class="descname">SolverSchemeException</code><a class="headerlink" href="#esys.escript.pdetools.SolverSchemeException" title="Permalink to this definition">¶</a></dt>
<dd><p>Bases: <code class="xref py py-class docutils literal notranslate"><span class="pre">Exception</span></code></p>
<p>This is a generic exception thrown by solvers.</p>
<dl class="method">
<dt id="esys.escript.pdetools.SolverSchemeException.__init__">
<code class="descname">__init__</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#esys.escript.pdetools.SolverSchemeException.__init__" title="Permalink to this definition">¶</a></dt>
<dd><p>Initialize self.  See help(type(self)) for accurate signature.</p>
</dd></dl>

<dl class="attribute">
<dt id="esys.escript.pdetools.SolverSchemeException.args">
<code class="descname">args</code><a class="headerlink" href="#esys.escript.pdetools.SolverSchemeException.args" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="method">
<dt id="esys.escript.pdetools.SolverSchemeException.with_traceback">
<code class="descname">with_traceback</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#esys.escript.pdetools.SolverSchemeException.with_traceback" title="Permalink to this definition">¶</a></dt>
<dd><p>Exception.with_traceback(tb) –
set self.__traceback__ to tb and return self.</p>
</dd></dl>

</dd></dl>

<dl class="class">
<dt id="esys.escript.pdetools.TimeIntegrationManager">
<em class="property">class </em><code class="descclassname">esys.escript.pdetools.</code><code class="descname">TimeIntegrationManager</code><span class="sig-paren">(</span><em>*inital_values</em>, <em>**kwargs</em><span class="sig-paren">)</span><a class="headerlink" href="#esys.escript.pdetools.TimeIntegrationManager" title="Permalink to this definition">¶</a></dt>
<dd><p>Bases: <code class="xref py py-class docutils literal notranslate"><span class="pre">object</span></code></p>
<p>A simple mechanism to manage time dependend values.</p>
<p>Typical usage is:</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">dt</span><span class="o">=</span><span class="mf">0.1</span> <span class="c1"># time increment</span>
<span class="n">tm</span><span class="o">=</span><span class="n">TimeIntegrationManager</span><span class="p">(</span><span class="n">inital_value</span><span class="p">,</span><span class="n">p</span><span class="o">=</span><span class="mi">1</span><span class="p">)</span>
<span class="k">while</span> <span class="n">t</span><span class="o">&lt;</span><span class="mf">1.</span>
    <span class="n">v_guess</span><span class="o">=</span><span class="n">tm</span><span class="o">.</span><span class="n">extrapolate</span><span class="p">(</span><span class="n">dt</span><span class="p">)</span> <span class="c1"># extrapolate to t+dt</span>
    <span class="n">v</span><span class="o">=...</span>
    <span class="n">tm</span><span class="o">.</span><span class="n">checkin</span><span class="p">(</span><span class="n">dt</span><span class="p">,</span><span class="n">v</span><span class="p">)</span>
    <span class="n">t</span><span class="o">+=</span><span class="n">dt</span>
</pre></div>
</div>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Note:</th><td class="field-body">currently only p=1 is supported.</td>
</tr>
</tbody>
</table>
<dl class="method">
<dt id="esys.escript.pdetools.TimeIntegrationManager.__init__">
<code class="descname">__init__</code><span class="sig-paren">(</span><em>*inital_values</em>, <em>**kwargs</em><span class="sig-paren">)</span><a class="headerlink" href="#esys.escript.pdetools.TimeIntegrationManager.__init__" title="Permalink to this definition">¶</a></dt>
<dd><p>Sets up the value manager where <code class="docutils literal notranslate"><span class="pre">inital_values</span></code> are the initial values
and p is the order used for extrapolation.</p>
</dd></dl>

<dl class="method">
<dt id="esys.escript.pdetools.TimeIntegrationManager.checkin">
<code class="descname">checkin</code><span class="sig-paren">(</span><em>dt</em>, <em>*values</em><span class="sig-paren">)</span><a class="headerlink" href="#esys.escript.pdetools.TimeIntegrationManager.checkin" title="Permalink to this definition">¶</a></dt>
<dd><p>Adds new values to the manager. The p+1 last values are lost.</p>
</dd></dl>

<dl class="method">
<dt id="esys.escript.pdetools.TimeIntegrationManager.extrapolate">
<code class="descname">extrapolate</code><span class="sig-paren">(</span><em>dt</em><span class="sig-paren">)</span><a class="headerlink" href="#esys.escript.pdetools.TimeIntegrationManager.extrapolate" title="Permalink to this definition">¶</a></dt>
<dd><p>Extrapolates to <code class="docutils literal notranslate"><span class="pre">dt</span></code> forward in time.</p>
</dd></dl>

<dl class="method">
<dt id="esys.escript.pdetools.TimeIntegrationManager.getTime">
<code class="descname">getTime</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#esys.escript.pdetools.TimeIntegrationManager.getTime" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="method">
<dt id="esys.escript.pdetools.TimeIntegrationManager.getValue">
<code class="descname">getValue</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#esys.escript.pdetools.TimeIntegrationManager.getValue" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

</dd></dl>

</div>
<div class="section" id="functions">
<h2>Functions<a class="headerlink" href="#functions" title="Permalink to this headline">¶</a></h2>
<dl class="function">
<dt id="esys.escript.pdetools.BoundaryValuesFromVolumeTag">
<code class="descclassname">esys.escript.pdetools.</code><code class="descname">BoundaryValuesFromVolumeTag</code><span class="sig-paren">(</span><em>domain</em>, <em>**values</em><span class="sig-paren">)</span><a class="headerlink" href="#esys.escript.pdetools.BoundaryValuesFromVolumeTag" title="Permalink to this definition">¶</a></dt>
<dd><p>Creates a mask on the Solution(domain) function space where the value is
one for samples that touch regions tagged by tags.</p>
<p>Usage: m=BoundaryValuesFromVolumeTag(domain, ham=1, f=6)</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>domain</strong> (<code class="xref py py-obj docutils literal notranslate"><span class="pre">escript.Domain</span></code>) – domain to be used</td>
</tr>
<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body">a mask which marks samples that are touching the boundary tagged
by any of the given tags</td>
</tr>
<tr class="field-odd field"><th class="field-name">Return type:</th><td class="field-body"><code class="xref py py-obj docutils literal notranslate"><span class="pre">escript.Data</span></code> of rank 0</td>
</tr>
</tbody>
</table>
</dd></dl>

<dl class="function">
<dt id="esys.escript.pdetools.GMRES">
<code class="descclassname">esys.escript.pdetools.</code><code class="descname">GMRES</code><span class="sig-paren">(</span><em>r</em>, <em>Aprod</em>, <em>x</em>, <em>bilinearform</em>, <em>atol=0</em>, <em>rtol=1e-08</em>, <em>iter_max=100</em>, <em>iter_restart=20</em>, <em>verbose=False</em>, <em>P_R=None</em><span class="sig-paren">)</span><a class="headerlink" href="#esys.escript.pdetools.GMRES" title="Permalink to this definition">¶</a></dt>
<dd><p>Solver for</p>
<p><em>Ax=b</em></p>
<p>with a general operator A (more details required!).
It uses the generalized minimum residual method (GMRES).</p>
<p>The iteration is terminated if</p>
<p><em>|r| &lt;= atol+rtol*|r0|</em></p>
<p>where <em>r0</em> is the initial residual and <em>|.|</em> is the energy norm. In fact</p>
<p><em>|r| = sqrt( bilinearform(r,r))</em></p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
<li><strong>r</strong> (<em>any object supporting inplace add</em><em> (</em><em>x+=y</em><em>) </em><em>and scaling</em><em> (</em><em>x=scalar*y</em><em>)</em>) – initial residual <em>r=b-Ax</em>. <code class="docutils literal notranslate"><span class="pre">r</span></code> is altered.</li>
<li><strong>x</strong> (same like <code class="docutils literal notranslate"><span class="pre">r</span></code>) – an initial guess for the solution</li>
<li><strong>Aprod</strong> (function <code class="docutils literal notranslate"><span class="pre">Aprod(x)</span></code> where <code class="docutils literal notranslate"><span class="pre">x</span></code> is of the same object like
argument <code class="docutils literal notranslate"><span class="pre">x</span></code>. The returned object needs to be of the same
type like argument <code class="docutils literal notranslate"><span class="pre">r</span></code>.) – returns the value Ax</li>
<li><strong>bilinearform</strong> (function <code class="docutils literal notranslate"><span class="pre">bilinearform(x,r)</span></code> where <code class="docutils literal notranslate"><span class="pre">x</span></code> is of the same
type like argument <code class="docutils literal notranslate"><span class="pre">x</span></code> and <code class="docutils literal notranslate"><span class="pre">r</span></code>. The returned value is
a <code class="docutils literal notranslate"><span class="pre">float</span></code>.) – inner product <code class="docutils literal notranslate"><span class="pre">&lt;x,r&gt;</span></code></li>
<li><strong>atol</strong> (non-negative <code class="docutils literal notranslate"><span class="pre">float</span></code>) – absolute tolerance</li>
<li><strong>rtol</strong> (non-negative <code class="docutils literal notranslate"><span class="pre">float</span></code>) – relative tolerance</li>
<li><strong>iter_max</strong> (<code class="docutils literal notranslate"><span class="pre">int</span></code>) – maximum number of iteration steps</li>
<li><strong>iter_restart</strong> (<code class="docutils literal notranslate"><span class="pre">int</span></code>) – in order to save memory the orthogonalization process
is terminated after <code class="docutils literal notranslate"><span class="pre">iter_restart</span></code> steps and the
iteration is restarted.</li>
</ul>
</td>
</tr>
<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first">the solution approximation and the corresponding residual</p>
</td>
</tr>
<tr class="field-odd field"><th class="field-name">Return type:</th><td class="field-body"><p class="first"><code class="docutils literal notranslate"><span class="pre">tuple</span></code></p>
</td>
</tr>
<tr class="field-even field"><th class="field-name">Warning:</th><td class="field-body"><p class="first last"><code class="docutils literal notranslate"><span class="pre">r</span></code> and <code class="docutils literal notranslate"><span class="pre">x</span></code> are altered.</p>
</td>
</tr>
</tbody>
</table>
</dd></dl>

<dl class="function">
<dt id="esys.escript.pdetools.MINRES">
<code class="descclassname">esys.escript.pdetools.</code><code class="descname">MINRES</code><span class="sig-paren">(</span><em>r</em>, <em>Aprod</em>, <em>x</em>, <em>Msolve</em>, <em>bilinearform</em>, <em>atol=0</em>, <em>rtol=1e-08</em>, <em>iter_max=100</em><span class="sig-paren">)</span><a class="headerlink" href="#esys.escript.pdetools.MINRES" title="Permalink to this definition">¶</a></dt>
<dd><p>Solver for</p>
<p><em>Ax=b</em></p>
<p>with a symmetric and positive definite operator A (more details required!).
It uses the minimum residual method (MINRES) with preconditioner M
providing an approximation of A.</p>
<p>The iteration is terminated if</p>
<p><em>|r| &lt;= atol+rtol*|r0|</em></p>
<p>where <em>r0</em> is the initial residual and <em>|.|</em> is the energy norm. In fact</p>
<p><em>|r| = sqrt( bilinearform(Msolve(r),r))</em></p>
<p>For details on the preconditioned conjugate gradient method see the book:</p>
<p>“Templates for the Solution of Linear Systems by R. Barrett, M. Berry,
T.F. Chan, J. Demmel, J. Donato, J. Dongarra, V. Eijkhout, R. Pozo,
C. Romine, and H. van der Vorst”.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
<li><strong>r</strong> (<em>any object supporting inplace add</em><em> (</em><em>x+=y</em><em>) </em><em>and scaling</em><em> (</em><em>x=scalar*y</em><em>)</em>) – initial residual <em>r=b-Ax</em>. <code class="docutils literal notranslate"><span class="pre">r</span></code> is altered.</li>
<li><strong>x</strong> (<em>any object supporting inplace add</em><em> (</em><em>x+=y</em><em>) </em><em>and scaling</em><em> (</em><em>x=scalar*y</em><em>)</em>) – an initial guess for the solution</li>
<li><strong>Aprod</strong> (function <code class="docutils literal notranslate"><span class="pre">Aprod(x)</span></code> where <code class="docutils literal notranslate"><span class="pre">x</span></code> is of the same object like
argument <code class="docutils literal notranslate"><span class="pre">x</span></code>. The returned object needs to be of the same
type like argument <code class="docutils literal notranslate"><span class="pre">r</span></code>.) – returns the value Ax</li>
<li><strong>Msolve</strong> (function <code class="docutils literal notranslate"><span class="pre">Msolve(r)</span></code> where <code class="docutils literal notranslate"><span class="pre">r</span></code> is of the same type like
argument <code class="docutils literal notranslate"><span class="pre">r</span></code>. The returned object needs to be of the same
type like argument <code class="docutils literal notranslate"><span class="pre">x</span></code>.) – solves Mx=r</li>
<li><strong>bilinearform</strong> (function <code class="docutils literal notranslate"><span class="pre">bilinearform(x,r)</span></code> where <code class="docutils literal notranslate"><span class="pre">x</span></code> is of the same
type like argument <code class="docutils literal notranslate"><span class="pre">x</span></code> and <code class="docutils literal notranslate"><span class="pre">r</span></code> is. The returned value
is a <code class="docutils literal notranslate"><span class="pre">float</span></code>.) – inner product <code class="docutils literal notranslate"><span class="pre">&lt;x,r&gt;</span></code></li>
<li><strong>atol</strong> (non-negative <code class="docutils literal notranslate"><span class="pre">float</span></code>) – absolute tolerance</li>
<li><strong>rtol</strong> (non-negative <code class="docutils literal notranslate"><span class="pre">float</span></code>) – relative tolerance</li>
<li><strong>iter_max</strong> (<code class="docutils literal notranslate"><span class="pre">int</span></code>) – maximum number of iteration steps</li>
</ul>
</td>
</tr>
<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first">the solution approximation and the corresponding residual</p>
</td>
</tr>
<tr class="field-odd field"><th class="field-name">Return type:</th><td class="field-body"><p class="first"><code class="docutils literal notranslate"><span class="pre">tuple</span></code></p>
</td>
</tr>
<tr class="field-even field"><th class="field-name">Warning:</th><td class="field-body"><p class="first last"><code class="docutils literal notranslate"><span class="pre">r</span></code> and <code class="docutils literal notranslate"><span class="pre">x</span></code> are altered.</p>
</td>
</tr>
</tbody>
</table>
</dd></dl>

<dl class="function">
<dt id="esys.escript.pdetools.MaskFromBoundaryTag">
<code class="descclassname">esys.escript.pdetools.</code><code class="descname">MaskFromBoundaryTag</code><span class="sig-paren">(</span><em>domain</em>, <em>*tags</em><span class="sig-paren">)</span><a class="headerlink" href="#esys.escript.pdetools.MaskFromBoundaryTag" title="Permalink to this definition">¶</a></dt>
<dd><p>Creates a mask on the Solution(domain) function space where the value is
one for samples that touch the boundary tagged by tags.</p>
<p>Usage: m=MaskFromBoundaryTag(domain, “left”, “right”)</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
<li><strong>domain</strong> (<code class="xref py py-obj docutils literal notranslate"><span class="pre">escript.Domain</span></code>) – domain to be used</li>
<li><strong>tags</strong> (<code class="docutils literal notranslate"><span class="pre">str</span></code>) – boundary tags</li>
</ul>
</td>
</tr>
<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first">a mask which marks samples that are touching the boundary tagged
by any of the given tags</p>
</td>
</tr>
<tr class="field-odd field"><th class="field-name">Return type:</th><td class="field-body"><p class="first last"><code class="xref py py-obj docutils literal notranslate"><span class="pre">escript.Data</span></code> of rank 0</p>
</td>
</tr>
</tbody>
</table>
</dd></dl>

<dl class="function">
<dt id="esys.escript.pdetools.MaskFromTag">
<code class="descclassname">esys.escript.pdetools.</code><code class="descname">MaskFromTag</code><span class="sig-paren">(</span><em>domain</em>, <em>*tags</em><span class="sig-paren">)</span><a class="headerlink" href="#esys.escript.pdetools.MaskFromTag" title="Permalink to this definition">¶</a></dt>
<dd><p>Creates a mask on the Solution(domain) function space where the value is
one for samples that touch regions tagged by tags.</p>
<p>Usage: m=MaskFromTag(domain, “ham”)</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
<li><strong>domain</strong> (<code class="xref py py-obj docutils literal notranslate"><span class="pre">escript.Domain</span></code>) – domain to be used</li>
<li><strong>tags</strong> (<code class="docutils literal notranslate"><span class="pre">str</span></code>) – boundary tags</li>
</ul>
</td>
</tr>
<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first">a mask which marks samples that are touching the boundary tagged
by any of the given tags</p>
</td>
</tr>
<tr class="field-odd field"><th class="field-name">Return type:</th><td class="field-body"><p class="first last"><code class="xref py py-obj docutils literal notranslate"><span class="pre">escript.Data</span></code> of rank 0</p>
</td>
</tr>
</tbody>
</table>
</dd></dl>

<dl class="function">
<dt id="esys.escript.pdetools.NewtonGMRES">
<code class="descclassname">esys.escript.pdetools.</code><code class="descname">NewtonGMRES</code><span class="sig-paren">(</span><em>defect</em>, <em>x</em>, <em>iter_max=100</em>, <em>sub_iter_max=20</em>, <em>atol=0</em>, <em>rtol=0.0001</em>, <em>subtol_max=0.5</em>, <em>gamma=0.9</em>, <em>verbose=False</em><span class="sig-paren">)</span><a class="headerlink" href="#esys.escript.pdetools.NewtonGMRES" title="Permalink to this definition">¶</a></dt>
<dd><p>Solves a non-linear problem <em>F(x)=0</em> for unknown <em>x</em> using the stopping
criterion:</p>
<p><em>norm(F(x) &lt;= atol + rtol * norm(F(x0)</em></p>
<p>where <em>x0</em> is the initial guess.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
<li><strong>defect</strong> (<a class="reference internal" href="#esys.escript.pdetools.Defect" title="esys.escript.pdetools.Defect"><code class="xref py py-obj docutils literal notranslate"><span class="pre">Defect</span></code></a>) – object defining the function <em>F</em>. <code class="docutils literal notranslate"><span class="pre">defect.norm</span></code> defines the
<em>norm</em> used in the stopping criterion.</li>
<li><strong>x</strong> (any object type allowing basic operations such as
<code class="docutils literal notranslate"><span class="pre">numpy.ndarray</span></code>, <code class="xref py py-obj docutils literal notranslate"><span class="pre">Data</span></code>) – initial guess for the solution, <code class="docutils literal notranslate"><span class="pre">x</span></code> is altered.</li>
<li><strong>iter_max</strong> (positive <code class="docutils literal notranslate"><span class="pre">int</span></code>) – maximum number of iteration steps</li>
<li><strong>sub_iter_max</strong> (positive <code class="docutils literal notranslate"><span class="pre">int</span></code>) – maximum number of inner iteration steps</li>
<li><strong>atol</strong> (positive <code class="docutils literal notranslate"><span class="pre">float</span></code>) – absolute tolerance for the solution</li>
<li><strong>rtol</strong> (positive <code class="docutils literal notranslate"><span class="pre">float</span></code>) – relative tolerance for the solution</li>
<li><strong>gamma</strong> (positive <code class="docutils literal notranslate"><span class="pre">float</span></code>, less than 1) – tolerance safety factor for inner iteration</li>
<li><strong>subtol_max</strong> (positive <code class="docutils literal notranslate"><span class="pre">float</span></code>, less than 1) – upper bound for inner tolerance</li>
</ul>
</td>
</tr>
<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first">an approximation of the solution with the desired accuracy</p>
</td>
</tr>
<tr class="field-odd field"><th class="field-name">Return type:</th><td class="field-body"><p class="first last">same type as the initial guess</p>
</td>
</tr>
</tbody>
</table>
</dd></dl>

<dl class="function">
<dt id="esys.escript.pdetools.PCG">
<code class="descclassname">esys.escript.pdetools.</code><code class="descname">PCG</code><span class="sig-paren">(</span><em>r</em>, <em>Aprod</em>, <em>x</em>, <em>Msolve</em>, <em>bilinearform</em>, <em>atol=0</em>, <em>rtol=1e-08</em>, <em>iter_max=100</em>, <em>initial_guess=True</em>, <em>verbose=False</em><span class="sig-paren">)</span><a class="headerlink" href="#esys.escript.pdetools.PCG" title="Permalink to this definition">¶</a></dt>
<dd><p>Solver for</p>
<p><em>Ax=b</em></p>
<p>with a symmetric and positive definite operator A (more details required!).
It uses the conjugate gradient method with preconditioner M providing an
approximation of A.</p>
<p>The iteration is terminated if</p>
<p><em>|r| &lt;= atol+rtol*|r0|</em></p>
<p>where <em>r0</em> is the initial residual and <em>|.|</em> is the energy norm. In fact</p>
<p><em>|r| = sqrt( bilinearform(Msolve(r),r))</em></p>
<p>For details on the preconditioned conjugate gradient method see the book:</p>
<p>“Templates for the Solution of Linear Systems by R. Barrett, M. Berry,
T.F. Chan, J. Demmel, J. Donato, J. Dongarra, V. Eijkhout, R. Pozo,
C. Romine, and H. van der Vorst”.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
<li><strong>r</strong> (<em>any object supporting inplace add</em><em> (</em><em>x+=y</em><em>) </em><em>and scaling</em><em> (</em><em>x=scalar*y</em><em>)</em>) – initial residual <em>r=b-Ax</em>. <code class="docutils literal notranslate"><span class="pre">r</span></code> is altered.</li>
<li><strong>x</strong> (<em>any object supporting inplace add</em><em> (</em><em>x+=y</em><em>) </em><em>and scaling</em><em> (</em><em>x=scalar*y</em><em>)</em>) – an initial guess for the solution</li>
<li><strong>Aprod</strong> (function <code class="docutils literal notranslate"><span class="pre">Aprod(x)</span></code> where <code class="docutils literal notranslate"><span class="pre">x</span></code> is of the same object like
argument <code class="docutils literal notranslate"><span class="pre">x</span></code>. The returned object needs to be of the same type
like argument <code class="docutils literal notranslate"><span class="pre">r</span></code>.) – returns the value Ax</li>
<li><strong>Msolve</strong> (function <code class="docutils literal notranslate"><span class="pre">Msolve(r)</span></code> where <code class="docutils literal notranslate"><span class="pre">r</span></code> is of the same type like
argument <code class="docutils literal notranslate"><span class="pre">r</span></code>. The returned object needs to be of the same
type like argument <code class="docutils literal notranslate"><span class="pre">x</span></code>.) – solves Mx=r</li>
<li><strong>bilinearform</strong> (function <code class="docutils literal notranslate"><span class="pre">bilinearform(x,r)</span></code> where <code class="docutils literal notranslate"><span class="pre">x</span></code> is of the same
type like argument <code class="docutils literal notranslate"><span class="pre">x</span></code> and <code class="docutils literal notranslate"><span class="pre">r</span></code> is. The returned value
is a <code class="docutils literal notranslate"><span class="pre">float</span></code>.) – inner product <code class="docutils literal notranslate"><span class="pre">&lt;x,r&gt;</span></code></li>
<li><strong>atol</strong> (non-negative <code class="docutils literal notranslate"><span class="pre">float</span></code>) – absolute tolerance</li>
<li><strong>rtol</strong> (non-negative <code class="docutils literal notranslate"><span class="pre">float</span></code>) – relative tolerance</li>
<li><strong>iter_max</strong> (<code class="docutils literal notranslate"><span class="pre">int</span></code>) – maximum number of iteration steps</li>
</ul>
</td>
</tr>
<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first">the solution approximation and the corresponding residual</p>
</td>
</tr>
<tr class="field-odd field"><th class="field-name">Return type:</th><td class="field-body"><p class="first"><code class="docutils literal notranslate"><span class="pre">tuple</span></code></p>
</td>
</tr>
<tr class="field-even field"><th class="field-name">Warning:</th><td class="field-body"><p class="first last"><code class="docutils literal notranslate"><span class="pre">r</span></code> and <code class="docutils literal notranslate"><span class="pre">x</span></code> are altered.</p>
</td>
</tr>
</tbody>
</table>
</dd></dl>

<dl class="function">
<dt id="esys.escript.pdetools.TFQMR">
<code class="descclassname">esys.escript.pdetools.</code><code class="descname">TFQMR</code><span class="sig-paren">(</span><em>r</em>, <em>Aprod</em>, <em>x</em>, <em>bilinearform</em>, <em>atol=0</em>, <em>rtol=1e-08</em>, <em>iter_max=100</em><span class="sig-paren">)</span><a class="headerlink" href="#esys.escript.pdetools.TFQMR" title="Permalink to this definition">¶</a></dt>
<dd><p>Solver for</p>
<p><em>Ax=b</em></p>
<p>with a general operator A (more details required!).
It uses the Transpose-Free Quasi-Minimal Residual method (TFQMR).</p>
<p>The iteration is terminated if</p>
<p><em>|r| &lt;= atol+rtol*|r0|</em></p>
<p>where <em>r0</em> is the initial residual and <em>|.|</em> is the energy norm. In fact</p>
<p><em>|r| = sqrt( bilinearform(r,r))</em></p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
<li><strong>r</strong> (<em>any object supporting inplace add</em><em> (</em><em>x+=y</em><em>) </em><em>and scaling</em><em> (</em><em>x=scalar*y</em><em>)</em>) – initial residual <em>r=b-Ax</em>. <code class="docutils literal notranslate"><span class="pre">r</span></code> is altered.</li>
<li><strong>x</strong> (same like <code class="docutils literal notranslate"><span class="pre">r</span></code>) – an initial guess for the solution</li>
<li><strong>Aprod</strong> (function <code class="docutils literal notranslate"><span class="pre">Aprod(x)</span></code> where <code class="docutils literal notranslate"><span class="pre">x</span></code> is of the same object like
argument <code class="docutils literal notranslate"><span class="pre">x</span></code>. The returned object needs to be of the same type
like argument <code class="docutils literal notranslate"><span class="pre">r</span></code>.) – returns the value Ax</li>
<li><strong>bilinearform</strong> (function <code class="docutils literal notranslate"><span class="pre">bilinearform(x,r)</span></code> where <code class="docutils literal notranslate"><span class="pre">x</span></code> is of the same
type like argument <code class="docutils literal notranslate"><span class="pre">x</span></code> and <code class="docutils literal notranslate"><span class="pre">r</span></code>. The returned value is
a <code class="docutils literal notranslate"><span class="pre">float</span></code>.) – inner product <code class="docutils literal notranslate"><span class="pre">&lt;x,r&gt;</span></code></li>
<li><strong>atol</strong> (non-negative <code class="docutils literal notranslate"><span class="pre">float</span></code>) – absolute tolerance</li>
<li><strong>rtol</strong> (non-negative <code class="docutils literal notranslate"><span class="pre">float</span></code>) – relative tolerance</li>
<li><strong>iter_max</strong> (<code class="docutils literal notranslate"><span class="pre">int</span></code>) – maximum number of iteration steps</li>
</ul>
</td>
</tr>
<tr class="field-even field"><th class="field-name">Return type:</th><td class="field-body"><p class="first"><code class="docutils literal notranslate"><span class="pre">tuple</span></code></p>
</td>
</tr>
<tr class="field-odd field"><th class="field-name">Warning:</th><td class="field-body"><p class="first last"><code class="docutils literal notranslate"><span class="pre">r</span></code> and <code class="docutils literal notranslate"><span class="pre">x</span></code> are altered.</p>
</td>
</tr>
</tbody>
</table>
</dd></dl>

<dl class="function">
<dt id="esys.escript.pdetools.getInfLocator">
<code class="descclassname">esys.escript.pdetools.</code><code class="descname">getInfLocator</code><span class="sig-paren">(</span><em>arg</em><span class="sig-paren">)</span><a class="headerlink" href="#esys.escript.pdetools.getInfLocator" title="Permalink to this definition">¶</a></dt>
<dd><p>Return a Locator for a point with the inf value over all arg.</p>
</dd></dl>

<dl class="function">
<dt id="esys.escript.pdetools.getSupLocator">
<code class="descclassname">esys.escript.pdetools.</code><code class="descname">getSupLocator</code><span class="sig-paren">(</span><em>arg</em><span class="sig-paren">)</span><a class="headerlink" href="#esys.escript.pdetools.getSupLocator" title="Permalink to this definition">¶</a></dt>
<dd><p>Return a Locator for a point with the sup value over all arg.</p>
</dd></dl>

</div>
<div class="section" id="others">
<h2>Others<a class="headerlink" href="#others" title="Permalink to this headline">¶</a></h2>
</div>
<div class="section" id="packages">
<h2>Packages<a class="headerlink" href="#packages" title="Permalink to this headline">¶</a></h2>
<div class="toctree-wrapper compound">
</div>
</div>
</div>


          </div>
        </div>
      </div>
      <div class="sphinxsidebar" role="navigation" aria-label="main navigation">
        <div class="sphinxsidebarwrapper">
  <h3><a href="index.html">Table of Contents</a></h3>
  <ul>
<li><a class="reference internal" href="#">esys.escript.pdetools Package</a><ul>
<li><a class="reference internal" href="#classes">Classes</a></li>
<li><a class="reference internal" href="#functions">Functions</a></li>
<li><a class="reference internal" href="#others">Others</a></li>
<li><a class="reference internal" href="#packages">Packages</a></li>
</ul>
</li>
</ul>

        </div>
      </div>
      <div class="clearer"></div>
    </div>
    <div class="related" role="navigation" aria-label="related navigation">
      <h3>Navigation</h3>
      <ul>
        <li class="right" style="margin-right: 10px">
          <a href="genindex.html" title="General Index"
             >index</a></li>
        <li class="right" >
          <a href="py-modindex.html" title="Python Module Index"
             >modules</a> |</li>
        <li class="nav-item nav-item-0"><a href="index.html">esys.escript 5.6 documentation</a> &#187;</li> 
      </ul>
    </div>
    <div class="footer" role="contentinfo">
        &#169; Copyright 2012-2014, Author.
      Created using <a href="http://sphinx-doc.org/">Sphinx</a> 1.8.4.
    </div>
  </body>
</html>