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
|
<!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.downunder.splitminimizers Package — 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" />
<link rel="next" title="esys.downunder.splitregularizations Package" href="esys.downunder.splitregularizations.html" />
<link rel="prev" title="esys.downunder.splitinversioncostfunctions Package" href="esys.downunder.splitinversioncostfunctions.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="right" >
<a href="esys.downunder.splitregularizations.html" title="esys.downunder.splitregularizations Package"
accesskey="N">next</a> |</li>
<li class="right" >
<a href="esys.downunder.splitinversioncostfunctions.html" title="esys.downunder.splitinversioncostfunctions Package"
accesskey="P">previous</a> |</li>
<li class="nav-item nav-item-0"><a href="index.html">esys.escript 5.6 documentation</a> »</li>
<li class="nav-item nav-item-1"><a href="esys.downunder.html" accesskey="U">esys.downunder Package</a> »</li>
</ul>
</div>
<div class="document">
<div class="documentwrapper">
<div class="bodywrapper">
<div class="body" role="main">
<div class="section" id="module-esys.downunder.splitminimizers">
<span id="esys-downunder-splitminimizers-package"></span><h1>esys.downunder.splitminimizers Package<a class="headerlink" href="#module-esys.downunder.splitminimizers" 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.downunder.splitminimizers.AbstractMinimizer" title="esys.downunder.splitminimizers.AbstractMinimizer"><code class="xref py py-obj docutils literal notranslate"><span class="pre">AbstractMinimizer</span></code></a></li>
<li><a class="reference internal" href="#esys.downunder.splitminimizers.ArithmeticTuple" title="esys.downunder.splitminimizers.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.downunder.splitminimizers.FunctionJob" title="esys.downunder.splitminimizers.FunctionJob"><code class="xref py py-obj docutils literal notranslate"><span class="pre">FunctionJob</span></code></a></li>
<li><a class="reference internal" href="#esys.downunder.splitminimizers.Job" title="esys.downunder.splitminimizers.Job"><code class="xref py py-obj docutils literal notranslate"><span class="pre">Job</span></code></a></li>
<li><a class="reference internal" href="#esys.downunder.splitminimizers.SplitInversionCostFunction" title="esys.downunder.splitminimizers.SplitInversionCostFunction"><code class="xref py py-obj docutils literal notranslate"><span class="pre">SplitInversionCostFunction</span></code></a></li>
<li><a class="reference internal" href="#esys.downunder.splitminimizers.SplitMinimizerLBFGS" title="esys.downunder.splitminimizers.SplitMinimizerLBFGS"><code class="xref py py-obj docutils literal notranslate"><span class="pre">SplitMinimizerLBFGS</span></code></a></li>
</ul>
<dl class="class">
<dt id="esys.downunder.splitminimizers.AbstractMinimizer">
<em class="property">class </em><code class="descclassname">esys.downunder.splitminimizers.</code><code class="descname">AbstractMinimizer</code><span class="sig-paren">(</span><em>J=None</em>, <em>m_tol=0.0001</em>, <em>J_tol=None</em>, <em>imax=300</em><span class="sig-paren">)</span><a class="headerlink" href="#esys.downunder.splitminimizers.AbstractMinimizer" 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>Base class for function minimization methods.</p>
<dl class="method">
<dt id="esys.downunder.splitminimizers.AbstractMinimizer.__init__">
<code class="descname">__init__</code><span class="sig-paren">(</span><em>J=None</em>, <em>m_tol=0.0001</em>, <em>J_tol=None</em>, <em>imax=300</em><span class="sig-paren">)</span><a class="headerlink" href="#esys.downunder.splitminimizers.AbstractMinimizer.__init__" title="Permalink to this definition">¶</a></dt>
<dd><p>Initializes a new minimizer for a given cost 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"><ul class="first last simple">
<li><strong>J</strong> (<code class="xref py py-obj docutils literal notranslate"><span class="pre">CostFunction</span></code>) – the cost function to be minimized</li>
<li><strong>m_tol</strong> (<em>float</em>) – terminate interations when relative change of the level set
function is less than or equal m_tol</li>
</ul>
</td>
</tr>
</tbody>
</table>
</dd></dl>
<dl class="method">
<dt id="esys.downunder.splitminimizers.AbstractMinimizer.getCostFunction">
<code class="descname">getCostFunction</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#esys.downunder.splitminimizers.AbstractMinimizer.getCostFunction" title="Permalink to this definition">¶</a></dt>
<dd><p>return the cost function to be minimized</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">CostFunction</span></code></td>
</tr>
</tbody>
</table>
</dd></dl>
<dl class="method">
<dt id="esys.downunder.splitminimizers.AbstractMinimizer.getOptions">
<code class="descname">getOptions</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#esys.downunder.splitminimizers.AbstractMinimizer.getOptions" title="Permalink to this definition">¶</a></dt>
<dd><p>Returns a dictionary of minimizer-specific options.</p>
</dd></dl>
<dl class="method">
<dt id="esys.downunder.splitminimizers.AbstractMinimizer.getResult">
<code class="descname">getResult</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#esys.downunder.splitminimizers.AbstractMinimizer.getResult" title="Permalink to this definition">¶</a></dt>
<dd><p>Returns the result of the minimization.</p>
</dd></dl>
<dl class="method">
<dt id="esys.downunder.splitminimizers.AbstractMinimizer.logSummary">
<code class="descname">logSummary</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#esys.downunder.splitminimizers.AbstractMinimizer.logSummary" title="Permalink to this definition">¶</a></dt>
<dd><p>Outputs a summary of the completed minimization process to the logger.</p>
</dd></dl>
<dl class="method">
<dt id="esys.downunder.splitminimizers.AbstractMinimizer.run">
<code class="descname">run</code><span class="sig-paren">(</span><em>x0</em><span class="sig-paren">)</span><a class="headerlink" href="#esys.downunder.splitminimizers.AbstractMinimizer.run" title="Permalink to this definition">¶</a></dt>
<dd><p>Executes the minimization algorithm for <em>f</em> starting with the initial
guess <code class="docutils literal notranslate"><span class="pre">x0</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">Returns:</th><td class="field-body">the result of the minimization</td>
</tr>
</tbody>
</table>
</dd></dl>
<dl class="method">
<dt id="esys.downunder.splitminimizers.AbstractMinimizer.setCallback">
<code class="descname">setCallback</code><span class="sig-paren">(</span><em>callback</em><span class="sig-paren">)</span><a class="headerlink" href="#esys.downunder.splitminimizers.AbstractMinimizer.setCallback" title="Permalink to this definition">¶</a></dt>
<dd><p>Sets a callback function to be called after every iteration.
It is up to the specific implementation what arguments are passed
to the callback. Subclasses should at least pass the current
iteration number k, the current estimate x, and possibly f(x),
grad f(x), and the current error.</p>
</dd></dl>
<dl class="method">
<dt id="esys.downunder.splitminimizers.AbstractMinimizer.setCostFunction">
<code class="descname">setCostFunction</code><span class="sig-paren">(</span><em>J</em><span class="sig-paren">)</span><a class="headerlink" href="#esys.downunder.splitminimizers.AbstractMinimizer.setCostFunction" title="Permalink to this definition">¶</a></dt>
<dd><p>set the cost function to be minimized</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>J</strong> (<code class="xref py py-obj docutils literal notranslate"><span class="pre">CostFunction</span></code>) – the cost function to be minimized</td>
</tr>
</tbody>
</table>
</dd></dl>
<dl class="method">
<dt id="esys.downunder.splitminimizers.AbstractMinimizer.setMaxIterations">
<code class="descname">setMaxIterations</code><span class="sig-paren">(</span><em>imax</em><span class="sig-paren">)</span><a class="headerlink" href="#esys.downunder.splitminimizers.AbstractMinimizer.setMaxIterations" title="Permalink to this definition">¶</a></dt>
<dd><p>Sets the maximum number of iterations before the minimizer terminates.</p>
</dd></dl>
<dl class="method">
<dt id="esys.downunder.splitminimizers.AbstractMinimizer.setOptions">
<code class="descname">setOptions</code><span class="sig-paren">(</span><em>**opts</em><span class="sig-paren">)</span><a class="headerlink" href="#esys.downunder.splitminimizers.AbstractMinimizer.setOptions" title="Permalink to this definition">¶</a></dt>
<dd><p>Sets minimizer-specific options. For a list of possible options see
<a class="reference internal" href="#esys.downunder.splitminimizers.AbstractMinimizer.getOptions" title="esys.downunder.splitminimizers.AbstractMinimizer.getOptions"><code class="xref py py-obj docutils literal notranslate"><span class="pre">getOptions()</span></code></a>.</p>
</dd></dl>
<dl class="method">
<dt id="esys.downunder.splitminimizers.AbstractMinimizer.setTolerance">
<code class="descname">setTolerance</code><span class="sig-paren">(</span><em>m_tol=0.0001</em>, <em>J_tol=None</em><span class="sig-paren">)</span><a class="headerlink" href="#esys.downunder.splitminimizers.AbstractMinimizer.setTolerance" title="Permalink to this definition">¶</a></dt>
<dd><p>Sets the tolerance for the stopping criterion. The minimizer stops
when an appropriate norm is less than <code class="xref py py-obj docutils literal notranslate"><span class="pre">m_tol</span></code>.</p>
</dd></dl>
</dd></dl>
<dl class="class">
<dt id="esys.downunder.splitminimizers.ArithmeticTuple">
<em class="property">class </em><code class="descclassname">esys.downunder.splitminimizers.</code><code class="descname">ArithmeticTuple</code><span class="sig-paren">(</span><em>*args</em><span class="sig-paren">)</span><a class="headerlink" href="#esys.downunder.splitminimizers.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.downunder.splitminimizers.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.downunder.splitminimizers.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.downunder.splitminimizers.FunctionJob">
<em class="property">class </em><code class="descclassname">esys.downunder.splitminimizers.</code><code class="descname">FunctionJob</code><span class="sig-paren">(</span><em>fn</em>, <em>*args</em>, <em>**kwargs</em><span class="sig-paren">)</span><a class="headerlink" href="#esys.downunder.splitminimizers.FunctionJob" title="Permalink to this definition">¶</a></dt>
<dd><p>Bases: <code class="xref py py-class docutils literal notranslate"><span class="pre">esys.escriptcore.splitworld.Job</span></code></p>
<p>Takes a python function (with only self and keyword params) to be called as the work method</p>
<dl class="method">
<dt id="esys.downunder.splitminimizers.FunctionJob.__init__">
<code class="descname">__init__</code><span class="sig-paren">(</span><em>fn</em>, <em>*args</em>, <em>**kwargs</em><span class="sig-paren">)</span><a class="headerlink" href="#esys.downunder.splitminimizers.FunctionJob.__init__" title="Permalink to this definition">¶</a></dt>
<dd><p>It ignores all of its parameters, except that, it requires the following as keyword arguments</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">Variables:</th><td class="field-body"><ul class="first last simple">
<li><a class="reference internal" href="esys.modellib.geometry.html#esys.modellib.geometry.DomainReader.domain" title="esys.modellib.geometry.DomainReader.domain"><strong>domain</strong></a> – Domain to be used as the basis for all <code class="docutils literal notranslate"><span class="pre">Data</span></code> and PDEs in this Job.</li>
<li><strong>jobid</strong> – sequence number of this job. The first job has id=1</li>
</ul>
</td>
</tr>
</tbody>
</table>
</dd></dl>
<dl class="method">
<dt id="esys.downunder.splitminimizers.FunctionJob.clearExports">
<code class="descname">clearExports</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#esys.downunder.splitminimizers.FunctionJob.clearExports" title="Permalink to this definition">¶</a></dt>
<dd><p>Remove exported values from the map</p>
</dd></dl>
<dl class="method">
<dt id="esys.downunder.splitminimizers.FunctionJob.clearImports">
<code class="descname">clearImports</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#esys.downunder.splitminimizers.FunctionJob.clearImports" title="Permalink to this definition">¶</a></dt>
<dd><p>Remove imported values from their map</p>
</dd></dl>
<dl class="method">
<dt id="esys.downunder.splitminimizers.FunctionJob.declareImport">
<code class="descname">declareImport</code><span class="sig-paren">(</span><em>name</em><span class="sig-paren">)</span><a class="headerlink" href="#esys.downunder.splitminimizers.FunctionJob.declareImport" title="Permalink to this definition">¶</a></dt>
<dd><p>Adds name to the list of imports</p>
</dd></dl>
<dl class="method">
<dt id="esys.downunder.splitminimizers.FunctionJob.exportValue">
<code class="descname">exportValue</code><span class="sig-paren">(</span><em>name</em>, <em>v</em><span class="sig-paren">)</span><a class="headerlink" href="#esys.downunder.splitminimizers.FunctionJob.exportValue" title="Permalink to this definition">¶</a></dt>
<dd><p>Make value v available to other Jobs under the label name.
name must have already been registered with the SplitWorld instance.
For use inside the work() method.</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">Variables:</th><td class="field-body"><ul class="first last simple">
<li><a class="reference internal" href="esys.downunder.apps.html#esys.downunder.apps.SolverOptions.name" title="esys.downunder.apps.SolverOptions.name"><strong>name</strong></a> – registered label for exported value</li>
<li><strong>v</strong> – value to be imported</li>
</ul>
</td>
</tr>
</tbody>
</table>
</dd></dl>
<dl class="method">
<dt id="esys.downunder.splitminimizers.FunctionJob.importValue">
<code class="descname">importValue</code><span class="sig-paren">(</span><em>name</em><span class="sig-paren">)</span><a class="headerlink" href="#esys.downunder.splitminimizers.FunctionJob.importValue" title="Permalink to this definition">¶</a></dt>
<dd><p>For use inside the work() method.</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">Variables:</th><td class="field-body"><a class="reference internal" href="esys.downunder.apps.html#esys.downunder.apps.SolverOptions.name" title="esys.downunder.apps.SolverOptions.name"><strong>name</strong></a> – label for imported value.</td>
</tr>
</tbody>
</table>
</dd></dl>
<dl class="method">
<dt id="esys.downunder.splitminimizers.FunctionJob.setImportValue">
<code class="descname">setImportValue</code><span class="sig-paren">(</span><em>name</em>, <em>v</em><span class="sig-paren">)</span><a class="headerlink" href="#esys.downunder.splitminimizers.FunctionJob.setImportValue" title="Permalink to this definition">¶</a></dt>
<dd><p>Use to make a value available to the job (ie called from outside the job)</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">Variables:</th><td class="field-body"><ul class="first last simple">
<li><a class="reference internal" href="esys.downunder.apps.html#esys.downunder.apps.SolverOptions.name" title="esys.downunder.apps.SolverOptions.name"><strong>name</strong></a> – label used to identify this import</li>
<li><strong>v</strong> – value to be imported</li>
</ul>
</td>
</tr>
</tbody>
</table>
</dd></dl>
<dl class="method">
<dt id="esys.downunder.splitminimizers.FunctionJob.work">
<code class="descname">work</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#esys.downunder.splitminimizers.FunctionJob.work" title="Permalink to this definition">¶</a></dt>
<dd><p>Need to be overloaded for the job to actually do anthing.
A return value of True indicates this job thinks it is done.
A return value of False indicates work still to be done</p>
</dd></dl>
</dd></dl>
<dl class="class">
<dt id="esys.downunder.splitminimizers.Job">
<em class="property">class </em><code class="descclassname">esys.downunder.splitminimizers.</code><code class="descname">Job</code><span class="sig-paren">(</span><em>*args</em>, <em>**kwargs</em><span class="sig-paren">)</span><a class="headerlink" href="#esys.downunder.splitminimizers.Job" 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>Describes a sequence of work to be carried out in a subworld.
The instances of this class used in the subworlds will
be constructed by the system.
To do specific work, this class should be subclassed and the work()
(and possibly __init__ methods overloaded).
The majority of the work done by the job will be in the <em>overloaded</em> work() method.
The work() method should retrieve values from the outside using importValue() and pass values to
the rest of the system using exportValue().
The rest of the methods should be considered off limits.</p>
<dl class="method">
<dt id="esys.downunder.splitminimizers.Job.__init__">
<code class="descname">__init__</code><span class="sig-paren">(</span><em>*args</em>, <em>**kwargs</em><span class="sig-paren">)</span><a class="headerlink" href="#esys.downunder.splitminimizers.Job.__init__" title="Permalink to this definition">¶</a></dt>
<dd><p>It ignores all of its parameters, except that, it requires the following as keyword arguments</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">Variables:</th><td class="field-body"><ul class="first last simple">
<li><a class="reference internal" href="esys.modellib.geometry.html#esys.modellib.geometry.DomainReader.domain" title="esys.modellib.geometry.DomainReader.domain"><strong>domain</strong></a> – Domain to be used as the basis for all <code class="docutils literal notranslate"><span class="pre">Data</span></code> and PDEs in this Job.</li>
<li><strong>jobid</strong> – sequence number of this job. The first job has id=1</li>
</ul>
</td>
</tr>
</tbody>
</table>
</dd></dl>
<dl class="method">
<dt id="esys.downunder.splitminimizers.Job.clearExports">
<code class="descname">clearExports</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#esys.downunder.splitminimizers.Job.clearExports" title="Permalink to this definition">¶</a></dt>
<dd><p>Remove exported values from the map</p>
</dd></dl>
<dl class="method">
<dt id="esys.downunder.splitminimizers.Job.clearImports">
<code class="descname">clearImports</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#esys.downunder.splitminimizers.Job.clearImports" title="Permalink to this definition">¶</a></dt>
<dd><p>Remove imported values from their map</p>
</dd></dl>
<dl class="method">
<dt id="esys.downunder.splitminimizers.Job.declareImport">
<code class="descname">declareImport</code><span class="sig-paren">(</span><em>name</em><span class="sig-paren">)</span><a class="headerlink" href="#esys.downunder.splitminimizers.Job.declareImport" title="Permalink to this definition">¶</a></dt>
<dd><p>Adds name to the list of imports</p>
</dd></dl>
<dl class="method">
<dt id="esys.downunder.splitminimizers.Job.exportValue">
<code class="descname">exportValue</code><span class="sig-paren">(</span><em>name</em>, <em>v</em><span class="sig-paren">)</span><a class="headerlink" href="#esys.downunder.splitminimizers.Job.exportValue" title="Permalink to this definition">¶</a></dt>
<dd><p>Make value v available to other Jobs under the label name.
name must have already been registered with the SplitWorld instance.
For use inside the work() method.</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">Variables:</th><td class="field-body"><ul class="first last simple">
<li><a class="reference internal" href="esys.downunder.apps.html#esys.downunder.apps.SolverOptions.name" title="esys.downunder.apps.SolverOptions.name"><strong>name</strong></a> – registered label for exported value</li>
<li><strong>v</strong> – value to be imported</li>
</ul>
</td>
</tr>
</tbody>
</table>
</dd></dl>
<dl class="method">
<dt id="esys.downunder.splitminimizers.Job.importValue">
<code class="descname">importValue</code><span class="sig-paren">(</span><em>name</em><span class="sig-paren">)</span><a class="headerlink" href="#esys.downunder.splitminimizers.Job.importValue" title="Permalink to this definition">¶</a></dt>
<dd><p>For use inside the work() method.</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">Variables:</th><td class="field-body"><a class="reference internal" href="esys.downunder.apps.html#esys.downunder.apps.SolverOptions.name" title="esys.downunder.apps.SolverOptions.name"><strong>name</strong></a> – label for imported value.</td>
</tr>
</tbody>
</table>
</dd></dl>
<dl class="method">
<dt id="esys.downunder.splitminimizers.Job.setImportValue">
<code class="descname">setImportValue</code><span class="sig-paren">(</span><em>name</em>, <em>v</em><span class="sig-paren">)</span><a class="headerlink" href="#esys.downunder.splitminimizers.Job.setImportValue" title="Permalink to this definition">¶</a></dt>
<dd><p>Use to make a value available to the job (ie called from outside the job)</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">Variables:</th><td class="field-body"><ul class="first last simple">
<li><a class="reference internal" href="esys.downunder.apps.html#esys.downunder.apps.SolverOptions.name" title="esys.downunder.apps.SolverOptions.name"><strong>name</strong></a> – label used to identify this import</li>
<li><strong>v</strong> – value to be imported</li>
</ul>
</td>
</tr>
</tbody>
</table>
</dd></dl>
<dl class="method">
<dt id="esys.downunder.splitminimizers.Job.work">
<code class="descname">work</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#esys.downunder.splitminimizers.Job.work" title="Permalink to this definition">¶</a></dt>
<dd><p>Need to be overloaded for the job to actually do anthing.
A return value of True indicates this job thinks it is done.
A return value of False indicates work still to be done</p>
</dd></dl>
</dd></dl>
<dl class="class">
<dt id="esys.downunder.splitminimizers.SplitInversionCostFunction">
<em class="property">class </em><code class="descclassname">esys.downunder.splitminimizers.</code><code class="descname">SplitInversionCostFunction</code><span class="sig-paren">(</span><em>numLevelSets=None</em>, <em>numModels=None</em>, <em>numMappings=None</em>, <em>splitworld=None</em>, <em>worldsinit_fn=None</em><span class="sig-paren">)</span><a class="headerlink" href="#esys.downunder.splitminimizers.SplitInversionCostFunction" title="Permalink to this definition">¶</a></dt>
<dd><p>Bases: <code class="xref py py-class docutils literal notranslate"><span class="pre">esys.downunder.costfunctions.MeteredCostFunction</span></code></p>
<p>Class to define cost function <em>J(m)</em> for inversion with one or more
forward models based on a multi-valued level set function <em>m</em>:</p>
<p><em>J(m) = J_reg(m) + sum_f mu_f * J_f(p)</em></p>
<p>where <em>J_reg(m)</em> is the regularization and cross gradient component of the
cost function applied to a level set function <em>m</em>, <em>J_f(p)</em> are the data
defect cost functions involving a physical forward model using the
physical parameter(s) <em>p</em> and <em>mu_f</em> is the trade-off factor for model f.</p>
<p>A forward model depends on a set of physical parameters <em>p</em> which are
constructed from components of the level set function <em>m</em> via mappings.</p>
<dl class="docutils">
<dt>Example 1 (single forward model):</dt>
<dd>m=Mapping()
f=ForwardModel()
J=InversionCostFunction(Regularization(), m, f)</dd>
<dt>Example 2 (two forward models on a single valued level set)</dt>
<dd><p class="first">m0=Mapping()
m1=Mapping()
f0=ForwardModel()
f1=ForwardModel()</p>
<p class="last">J=InversionCostFunction(Regularization(), mappings=[m0, m1], forward_models=[(f0, 0), (f1,1)])</p>
</dd>
<dt>Example 3 (two forward models on 2-valued level set)</dt>
<dd><p class="first">m0=Mapping()
m1=Mapping()
f0=ForwardModel()
f1=ForwardModel()</p>
<p class="last">J=InversionCostFunction(Regularization(self.numLevelSets=2), mappings=[(m0,0), (m1,0)], forward_models=[(f0, 0), (f1,1)])</p>
</dd>
</dl>
<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">If provides_inverse_Hessian_approximation is true, then the class
provides an approximative inverse of the Hessian operator.</td>
</tr>
</tbody>
</table>
<dl class="method">
<dt id="esys.downunder.splitminimizers.SplitInversionCostFunction.__init__">
<code class="descname">__init__</code><span class="sig-paren">(</span><em>numLevelSets=None</em>, <em>numModels=None</em>, <em>numMappings=None</em>, <em>splitworld=None</em>, <em>worldsinit_fn=None</em><span class="sig-paren">)</span><a class="headerlink" href="#esys.downunder.splitminimizers.SplitInversionCostFunction.__init__" title="Permalink to this definition">¶</a></dt>
<dd><p>fill this in.</p>
</dd></dl>
<dl class="method">
<dt id="esys.downunder.splitminimizers.SplitInversionCostFunction.calculateGradient">
<code class="descname">calculateGradient</code><span class="sig-paren">(</span><em>vnames1</em>, <em>vnames2</em><span class="sig-paren">)</span><a class="headerlink" href="#esys.downunder.splitminimizers.SplitInversionCostFunction.calculateGradient" title="Permalink to this definition">¶</a></dt>
<dd><p>The gradient operation produces two components (designated (Y^,X) in the non-split version).
vnames1 gives the variable name(s) where the first component should be stored.
vnames2 gives the variable name(s) where the second component should be stored.</p>
</dd></dl>
<dl class="staticmethod">
<dt id="esys.downunder.splitminimizers.SplitInversionCostFunction.calculatePropertiesHelper">
<em class="property">static </em><code class="descname">calculatePropertiesHelper</code><span class="sig-paren">(</span><em>self</em>, <em>m</em>, <em>mappings</em><span class="sig-paren">)</span><a class="headerlink" href="#esys.downunder.splitminimizers.SplitInversionCostFunction.calculatePropertiesHelper" title="Permalink to this definition">¶</a></dt>
<dd><p>returns a list of the physical properties from a given level set
function <em>m</em> using the mappings of the cost 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>m</strong> (<code class="xref py py-obj docutils literal notranslate"><span class="pre">Data</span></code>) – level set function</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">list</span></code> of <code class="xref py py-obj docutils literal notranslate"><span class="pre">Data</span></code></td>
</tr>
</tbody>
</table>
</dd></dl>
<dl class="method">
<dt id="esys.downunder.splitminimizers.SplitInversionCostFunction.calculateValue">
<code class="descname">calculateValue</code><span class="sig-paren">(</span><em>vname</em><span class="sig-paren">)</span><a class="headerlink" href="#esys.downunder.splitminimizers.SplitInversionCostFunction.calculateValue" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>
<dl class="method">
<dt id="esys.downunder.splitminimizers.SplitInversionCostFunction.createLevelSetFunction">
<code class="descname">createLevelSetFunction</code><span class="sig-paren">(</span><em>*props</em><span class="sig-paren">)</span><a class="headerlink" href="#esys.downunder.splitminimizers.SplitInversionCostFunction.createLevelSetFunction" title="Permalink to this definition">¶</a></dt>
<dd><p>returns an instance of an object used to represent a level set function
initialized with zeros. Components can be overwritten by physical
properties <code class="xref py py-obj docutils literal notranslate"><span class="pre">props</span></code>. If present entries must correspond to the
<code class="xref py py-obj docutils literal notranslate"><span class="pre">mappings</span></code> arguments in the constructor. Use <code class="docutils literal notranslate"><span class="pre">None</span></code> for properties
for which no value is given.</p>
</dd></dl>
<dl class="staticmethod">
<dt id="esys.downunder.splitminimizers.SplitInversionCostFunction.createLevelSetFunctionHelper">
<em class="property">static </em><code class="descname">createLevelSetFunctionHelper</code><span class="sig-paren">(</span><em>self</em>, <em>regularization</em>, <em>mappings</em>, <em>*props</em><span class="sig-paren">)</span><a class="headerlink" href="#esys.downunder.splitminimizers.SplitInversionCostFunction.createLevelSetFunctionHelper" title="Permalink to this definition">¶</a></dt>
<dd><p>Returns an object (init-ed) with 0s.
Components can be overwritten by physical
properties <code class="xref py py-obj docutils literal notranslate"><span class="pre">props</span></code>. If present entries must correspond to the
<code class="xref py py-obj docutils literal notranslate"><span class="pre">mappings</span></code> arguments in the constructor. Use <code class="docutils literal notranslate"><span class="pre">None</span></code> for properties
for which no value is given.</p>
</dd></dl>
<dl class="staticmethod">
<dt id="esys.downunder.splitminimizers.SplitInversionCostFunction.formatMappings">
<em class="property">static </em><code class="descname">formatMappings</code><span class="sig-paren">(</span><em>mappings</em>, <em>numLevelSets</em><span class="sig-paren">)</span><a class="headerlink" href="#esys.downunder.splitminimizers.SplitInversionCostFunction.formatMappings" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>
<dl class="staticmethod">
<dt id="esys.downunder.splitminimizers.SplitInversionCostFunction.formatModels">
<em class="property">static </em><code class="descname">formatModels</code><span class="sig-paren">(</span><em>forward_models</em>, <em>numMappings</em><span class="sig-paren">)</span><a class="headerlink" href="#esys.downunder.splitminimizers.SplitInversionCostFunction.formatModels" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>
<dl class="method">
<dt id="esys.downunder.splitminimizers.SplitInversionCostFunction.getArguments">
<code class="descname">getArguments</code><span class="sig-paren">(</span><em>x</em><span class="sig-paren">)</span><a class="headerlink" href="#esys.downunder.splitminimizers.SplitInversionCostFunction.getArguments" title="Permalink to this definition">¶</a></dt>
<dd><p>returns precalculated values that are shared in the calculation of
<em>f(x)</em> and <em>grad f(x)</em> and the Hessian operator</p>
<div class="admonition note">
<p class="first admonition-title">Note</p>
<p class="last">The tuple returned by this call will be passed back to this <code class="xref py py-obj docutils literal notranslate"><span class="pre">CostFunction</span></code> in other
calls(eg: <code class="docutils literal notranslate"><span class="pre">getGradient</span></code>). Its contents are not specified at this level because no code, other than the <code class="xref py py-obj docutils literal notranslate"><span class="pre">CostFunction</span></code>
which created it, will be interacting with it.
That is, the implementor can put whatever information they find useful in it.</p>
</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">Parameters:</th><td class="field-body"><strong>x</strong> (<em>x-type</em>) – location of derivative</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">tuple</span></code></td>
</tr>
</tbody>
</table>
</dd></dl>
<dl class="method">
<dt id="esys.downunder.splitminimizers.SplitInversionCostFunction.getComponentValues">
<code class="descname">getComponentValues</code><span class="sig-paren">(</span><em>m</em>, <em>*args</em><span class="sig-paren">)</span><a class="headerlink" href="#esys.downunder.splitminimizers.SplitInversionCostFunction.getComponentValues" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>
<dl class="method">
<dt id="esys.downunder.splitminimizers.SplitInversionCostFunction.getDomain">
<code class="descname">getDomain</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#esys.downunder.splitminimizers.SplitInversionCostFunction.getDomain" title="Permalink to this definition">¶</a></dt>
<dd><p>returns the domain of the cost 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">Return type:</th><td class="field-body"><code class="xref py py-obj docutils literal notranslate"><span class="pre">Domain</span></code></td>
</tr>
</tbody>
</table>
</dd></dl>
<dl class="method">
<dt id="esys.downunder.splitminimizers.SplitInversionCostFunction.getDualProduct">
<code class="descname">getDualProduct</code><span class="sig-paren">(</span><em>x</em>, <em>r</em><span class="sig-paren">)</span><a class="headerlink" href="#esys.downunder.splitminimizers.SplitInversionCostFunction.getDualProduct" title="Permalink to this definition">¶</a></dt>
<dd><p>returns the dual product of <code class="docutils literal notranslate"><span class="pre">x</span></code> and <code class="docutils literal notranslate"><span class="pre">r</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"><code class="docutils literal notranslate"><span class="pre">float</span></code></td>
</tr>
</tbody>
</table>
</dd></dl>
<dl class="method">
<dt id="esys.downunder.splitminimizers.SplitInversionCostFunction.getForwardModel">
<code class="descname">getForwardModel</code><span class="sig-paren">(</span><em>idx=None</em><span class="sig-paren">)</span><a class="headerlink" href="#esys.downunder.splitminimizers.SplitInversionCostFunction.getForwardModel" title="Permalink to this definition">¶</a></dt>
<dd><p>returns the <em>idx</em>-th forward model.</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>idx</strong> (<code class="docutils literal notranslate"><span class="pre">int</span></code>) – model index. If cost function contains one model only <code class="xref py py-obj docutils literal notranslate"><span class="pre">idx</span></code>
can be omitted.</td>
</tr>
</tbody>
</table>
</dd></dl>
<dl class="method">
<dt id="esys.downunder.splitminimizers.SplitInversionCostFunction.getGradient">
<code class="descname">getGradient</code><span class="sig-paren">(</span><em>x</em>, <em>*args</em><span class="sig-paren">)</span><a class="headerlink" href="#esys.downunder.splitminimizers.SplitInversionCostFunction.getGradient" title="Permalink to this definition">¶</a></dt>
<dd><p>returns the gradient of <em>f</em> at <em>x</em> using the precalculated values for
<em>x</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>x</strong> (<em>x-type</em>) – location of derivative</li>
<li><strong>args</strong> – pre-calculated values for <code class="docutils literal notranslate"><span class="pre">x</span></code> from <a class="reference internal" href="#esys.downunder.splitminimizers.SplitInversionCostFunction.getArguments" title="esys.downunder.splitminimizers.SplitInversionCostFunction.getArguments"><code class="xref py py-obj docutils literal notranslate"><span class="pre">getArguments()</span></code></a></li>
</ul>
</td>
</tr>
<tr class="field-even field"><th class="field-name">Return type:</th><td class="field-body"><p class="first last">r-type</p>
</td>
</tr>
</tbody>
</table>
</dd></dl>
<dl class="method">
<dt id="esys.downunder.splitminimizers.SplitInversionCostFunction.getInverseHessianApproximation">
<code class="descname">getInverseHessianApproximation</code><span class="sig-paren">(</span><em>x</em>, <em>r</em>, <em>*args</em><span class="sig-paren">)</span><a class="headerlink" href="#esys.downunder.splitminimizers.SplitInversionCostFunction.getInverseHessianApproximation" title="Permalink to this definition">¶</a></dt>
<dd><p>returns an approximative evaluation <em>p</em> of the inverse of the Hessian
operator of the cost function for a given gradient <em>r</em> at a given
location <em>x</em>: <em>H(x) p = r</em></p>
<div class="admonition note">
<p class="first admonition-title">Note</p>
<p class="last">In general it is assumed that the Hessian <em>H(x)</em> needs to be
calculate in each call for a new location <em>x</em>. However, the
solver may suggest that this is not required, typically when
the iteration is close to completeness.</p>
</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">Parameters:</th><td class="field-body"><ul class="first simple">
<li><strong>x</strong> (<em>x-type</em>) – location of Hessian operator to be evaluated.</li>
<li><strong>r</strong> (<em>r-type</em>) – a given gradient</li>
<li><strong>args</strong> – pre-calculated values for <code class="docutils literal notranslate"><span class="pre">x</span></code> from <a class="reference internal" href="#esys.downunder.splitminimizers.SplitInversionCostFunction.getArguments" title="esys.downunder.splitminimizers.SplitInversionCostFunction.getArguments"><code class="xref py py-obj docutils literal notranslate"><span class="pre">getArguments()</span></code></a></li>
</ul>
</td>
</tr>
<tr class="field-even field"><th class="field-name">Return type:</th><td class="field-body"><p class="first last">x-type</p>
</td>
</tr>
</tbody>
</table>
</dd></dl>
<dl class="staticmethod">
<dt id="esys.downunder.splitminimizers.SplitInversionCostFunction.getModelArgs">
<em class="property">static </em><code class="descname">getModelArgs</code><span class="sig-paren">(</span><em>self</em>, <em>fwdmodels</em><span class="sig-paren">)</span><a class="headerlink" href="#esys.downunder.splitminimizers.SplitInversionCostFunction.getModelArgs" title="Permalink to this definition">¶</a></dt>
<dd><p>Attempts to import the arguments for forward models, if they are not available,
Computes and exports them</p>
</dd></dl>
<dl class="method">
<dt id="esys.downunder.splitminimizers.SplitInversionCostFunction.getNorm">
<code class="descname">getNorm</code><span class="sig-paren">(</span><em>x</em><span class="sig-paren">)</span><a class="headerlink" href="#esys.downunder.splitminimizers.SplitInversionCostFunction.getNorm" title="Permalink to this definition">¶</a></dt>
<dd><p>returns the norm of <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">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.downunder.splitminimizers.SplitInversionCostFunction.getNumTradeOffFactors">
<code class="descname">getNumTradeOffFactors</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#esys.downunder.splitminimizers.SplitInversionCostFunction.getNumTradeOffFactors" title="Permalink to this definition">¶</a></dt>
<dd><p>returns the number of trade-off factors being used including the
trade-off factors used in the regularization component.</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="docutils literal notranslate"><span class="pre">int</span></code></td>
</tr>
</tbody>
</table>
</dd></dl>
<dl class="method">
<dt id="esys.downunder.splitminimizers.SplitInversionCostFunction.getProperties">
<code class="descname">getProperties</code><span class="sig-paren">(</span><em>m</em>, <em>return_list=False</em><span class="sig-paren">)</span><a class="headerlink" href="#esys.downunder.splitminimizers.SplitInversionCostFunction.getProperties" title="Permalink to this definition">¶</a></dt>
<dd><p>returns a list of the physical properties from a given level set
function <em>m</em> using the mappings of the cost 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"><ul class="first simple">
<li><strong>m</strong> (<code class="xref py py-obj docutils literal notranslate"><span class="pre">Data</span></code>) – level set function</li>
<li><strong>return_list</strong> (<code class="docutils literal notranslate"><span class="pre">bool</span></code>) – if <code class="docutils literal notranslate"><span class="pre">True</span></code> a list is returned.</li>
</ul>
</td>
</tr>
<tr class="field-even field"><th class="field-name">Return type:</th><td class="field-body"><p class="first last"><code class="docutils literal notranslate"><span class="pre">list</span></code> of <code class="xref py py-obj docutils literal notranslate"><span class="pre">Data</span></code></p>
</td>
</tr>
</tbody>
</table>
</dd></dl>
<dl class="method">
<dt id="esys.downunder.splitminimizers.SplitInversionCostFunction.getRegularization">
<code class="descname">getRegularization</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#esys.downunder.splitminimizers.SplitInversionCostFunction.getRegularization" title="Permalink to this definition">¶</a></dt>
<dd><p>returns the regularization</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">Regularization</span></code></td>
</tr>
</tbody>
</table>
</dd></dl>
<dl class="method">
<dt id="esys.downunder.splitminimizers.SplitInversionCostFunction.getTradeOffFactors">
<code class="descname">getTradeOffFactors</code><span class="sig-paren">(</span><em>mu=None</em><span class="sig-paren">)</span><a class="headerlink" href="#esys.downunder.splitminimizers.SplitInversionCostFunction.getTradeOffFactors" title="Permalink to this definition">¶</a></dt>
<dd><p>returns a list of the trade-off factors.</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="docutils literal notranslate"><span class="pre">list</span></code> of <code class="docutils literal notranslate"><span class="pre">float</span></code></td>
</tr>
</tbody>
</table>
</dd></dl>
<dl class="method">
<dt id="esys.downunder.splitminimizers.SplitInversionCostFunction.getTradeOffFactorsModels">
<code class="descname">getTradeOffFactorsModels</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#esys.downunder.splitminimizers.SplitInversionCostFunction.getTradeOffFactorsModels" title="Permalink to this definition">¶</a></dt>
<dd><p>returns the trade-off factors for the forward models</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="docutils literal notranslate"><span class="pre">float</span></code> or <code class="docutils literal notranslate"><span class="pre">list</span></code> of <code class="docutils literal notranslate"><span class="pre">float</span></code></td>
</tr>
</tbody>
</table>
</dd></dl>
<dl class="method">
<dt id="esys.downunder.splitminimizers.SplitInversionCostFunction.getValue">
<code class="descname">getValue</code><span class="sig-paren">(</span><em>x</em>, <em>*args</em><span class="sig-paren">)</span><a class="headerlink" href="#esys.downunder.splitminimizers.SplitInversionCostFunction.getValue" title="Permalink to this definition">¶</a></dt>
<dd><p>returns the value <em>f(x)</em> using the precalculated values for <em>x</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"><strong>x</strong> (<em>x-type</em>) – a solution approximation</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="attribute">
<dt id="esys.downunder.splitminimizers.SplitInversionCostFunction.provides_inverse_Hessian_approximation">
<code class="descname">provides_inverse_Hessian_approximation</code><em class="property"> = True</em><a class="headerlink" href="#esys.downunder.splitminimizers.SplitInversionCostFunction.provides_inverse_Hessian_approximation" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>
<dl class="method">
<dt id="esys.downunder.splitminimizers.SplitInversionCostFunction.resetCounters">
<code class="descname">resetCounters</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#esys.downunder.splitminimizers.SplitInversionCostFunction.resetCounters" title="Permalink to this definition">¶</a></dt>
<dd><p>resets all statistical counters</p>
</dd></dl>
<dl class="method">
<dt id="esys.downunder.splitminimizers.SplitInversionCostFunction.setPoint">
<code class="descname">setPoint</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#esys.downunder.splitminimizers.SplitInversionCostFunction.setPoint" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>
<dl class="method">
<dt id="esys.downunder.splitminimizers.SplitInversionCostFunction.setTradeOffFactors">
<code class="descname">setTradeOffFactors</code><span class="sig-paren">(</span><em>mu=None</em><span class="sig-paren">)</span><a class="headerlink" href="#esys.downunder.splitminimizers.SplitInversionCostFunction.setTradeOffFactors" title="Permalink to this definition">¶</a></dt>
<dd><p>sets the trade-off factors for the forward model and regularization
terms.</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>mu</strong> (<code class="docutils literal notranslate"><span class="pre">list</span></code> of <code class="docutils literal notranslate"><span class="pre">float</span></code>) – list of trade-off factors.</td>
</tr>
</tbody>
</table>
</dd></dl>
<dl class="method">
<dt id="esys.downunder.splitminimizers.SplitInversionCostFunction.setTradeOffFactorsModels">
<code class="descname">setTradeOffFactorsModels</code><span class="sig-paren">(</span><em>mu=None</em><span class="sig-paren">)</span><a class="headerlink" href="#esys.downunder.splitminimizers.SplitInversionCostFunction.setTradeOffFactorsModels" title="Permalink to this definition">¶</a></dt>
<dd><p>sets the trade-off factors for the forward model components.</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>mu</strong> (<code class="docutils literal notranslate"><span class="pre">float</span></code> in case of a single model or a <code class="docutils literal notranslate"><span class="pre">list</span></code> of
<code class="docutils literal notranslate"><span class="pre">float</span></code> with the length of the number of models.) – list of the trade-off factors. If not present ones are used.</td>
</tr>
</tbody>
</table>
</dd></dl>
<dl class="method">
<dt id="esys.downunder.splitminimizers.SplitInversionCostFunction.setTradeOffFactorsRegularization">
<code class="descname">setTradeOffFactorsRegularization</code><span class="sig-paren">(</span><em>mu=None</em>, <em>mu_c=None</em><span class="sig-paren">)</span><a class="headerlink" href="#esys.downunder.splitminimizers.SplitInversionCostFunction.setTradeOffFactorsRegularization" title="Permalink to this definition">¶</a></dt>
<dd><p>sets the trade-off factors for the regularization component of the
cost function, see <code class="xref py py-obj docutils literal notranslate"><span class="pre">Regularization</span></code> for details.</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>mu</strong> – trade-off factors for the level-set variation part</li>
<li><strong>mu_c</strong> – trade-off factors for the cross gradient variation part</li>
</ul>
</td>
</tr>
</tbody>
</table>
</dd></dl>
<dl class="staticmethod">
<dt id="esys.downunder.splitminimizers.SplitInversionCostFunction.subworld_setMu_model">
<em class="property">static </em><code class="descname">subworld_setMu_model</code><span class="sig-paren">(</span><em>self</em>, <em>**args</em><span class="sig-paren">)</span><a class="headerlink" href="#esys.downunder.splitminimizers.SplitInversionCostFunction.subworld_setMu_model" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>
<dl class="method">
<dt id="esys.downunder.splitminimizers.SplitInversionCostFunction.updateHessian">
<code class="descname">updateHessian</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#esys.downunder.splitminimizers.SplitInversionCostFunction.updateHessian" title="Permalink to this definition">¶</a></dt>
<dd><p>notifies the class that the Hessian operator needs to be updated.</p>
</dd></dl>
<dl class="staticmethod">
<dt id="esys.downunder.splitminimizers.SplitInversionCostFunction.update_point_helper">
<em class="property">static </em><code class="descname">update_point_helper</code><span class="sig-paren">(</span><em>self</em>, <em>newpoint</em><span class="sig-paren">)</span><a class="headerlink" href="#esys.downunder.splitminimizers.SplitInversionCostFunction.update_point_helper" title="Permalink to this definition">¶</a></dt>
<dd><p>Call within a subworld to set ‘current_point’ to newpoint
and update all the cached args info</p>
</dd></dl>
</dd></dl>
<dl class="class">
<dt id="esys.downunder.splitminimizers.SplitMinimizerLBFGS">
<em class="property">class </em><code class="descclassname">esys.downunder.splitminimizers.</code><code class="descname">SplitMinimizerLBFGS</code><span class="sig-paren">(</span><em>J=None</em>, <em>m_tol=0.0001</em>, <em>J_tol=None</em>, <em>imax=300</em><span class="sig-paren">)</span><a class="headerlink" href="#esys.downunder.splitminimizers.SplitMinimizerLBFGS" title="Permalink to this definition">¶</a></dt>
<dd><p>Bases: <code class="xref py py-class docutils literal notranslate"><span class="pre">esys.downunder.minimizers.AbstractMinimizer</span></code></p>
<p>Minimizer that uses the limited-memory Broyden-Fletcher-Goldfarb-Shanno
method.</p>
<p>version modified to fit with split world.</p>
<dl class="method">
<dt id="esys.downunder.splitminimizers.SplitMinimizerLBFGS.__init__">
<code class="descname">__init__</code><span class="sig-paren">(</span><em>J=None</em>, <em>m_tol=0.0001</em>, <em>J_tol=None</em>, <em>imax=300</em><span class="sig-paren">)</span><a class="headerlink" href="#esys.downunder.splitminimizers.SplitMinimizerLBFGS.__init__" title="Permalink to this definition">¶</a></dt>
<dd><p>Initializes a new minimizer for a given cost 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"><ul class="first last simple">
<li><strong>J</strong> (<code class="xref py py-obj docutils literal notranslate"><span class="pre">CostFunction</span></code>) – the cost function to be minimized</li>
<li><strong>m_tol</strong> (<em>float</em>) – terminate interations when relative change of the level set
function is less than or equal m_tol</li>
</ul>
</td>
</tr>
</tbody>
</table>
</dd></dl>
<dl class="method">
<dt id="esys.downunder.splitminimizers.SplitMinimizerLBFGS.getCostFunction">
<code class="descname">getCostFunction</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#esys.downunder.splitminimizers.SplitMinimizerLBFGS.getCostFunction" title="Permalink to this definition">¶</a></dt>
<dd><p>return the cost function to be minimized</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">CostFunction</span></code></td>
</tr>
</tbody>
</table>
</dd></dl>
<dl class="method">
<dt id="esys.downunder.splitminimizers.SplitMinimizerLBFGS.getOptions">
<code class="descname">getOptions</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#esys.downunder.splitminimizers.SplitMinimizerLBFGS.getOptions" title="Permalink to this definition">¶</a></dt>
<dd><p>Returns a dictionary of minimizer-specific options.</p>
</dd></dl>
<dl class="method">
<dt id="esys.downunder.splitminimizers.SplitMinimizerLBFGS.getResult">
<code class="descname">getResult</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#esys.downunder.splitminimizers.SplitMinimizerLBFGS.getResult" title="Permalink to this definition">¶</a></dt>
<dd><p>Returns the result of the minimization.</p>
</dd></dl>
<dl class="method">
<dt id="esys.downunder.splitminimizers.SplitMinimizerLBFGS.logSummary">
<code class="descname">logSummary</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#esys.downunder.splitminimizers.SplitMinimizerLBFGS.logSummary" title="Permalink to this definition">¶</a></dt>
<dd><p>Outputs a summary of the completed minimization process to the logger.</p>
</dd></dl>
<dl class="staticmethod">
<dt id="esys.downunder.splitminimizers.SplitMinimizerLBFGS.move_point_from_base">
<em class="property">static </em><code class="descname">move_point_from_base</code><span class="sig-paren">(</span><em>self</em>, <em>**kwargs</em><span class="sig-paren">)</span><a class="headerlink" href="#esys.downunder.splitminimizers.SplitMinimizerLBFGS.move_point_from_base" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>
<dl class="method">
<dt id="esys.downunder.splitminimizers.SplitMinimizerLBFGS.run">
<code class="descname">run</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#esys.downunder.splitminimizers.SplitMinimizerLBFGS.run" title="Permalink to this definition">¶</a></dt>
<dd><p>This version relies on the costfunction already having an initial guess loaded.
It also does not return the result, meaning a job needs to be submitted to
get the result out.</p>
</dd></dl>
<dl class="method">
<dt id="esys.downunder.splitminimizers.SplitMinimizerLBFGS.setCallback">
<code class="descname">setCallback</code><span class="sig-paren">(</span><em>callback</em><span class="sig-paren">)</span><a class="headerlink" href="#esys.downunder.splitminimizers.SplitMinimizerLBFGS.setCallback" title="Permalink to this definition">¶</a></dt>
<dd><p>Sets a callback function to be called after every iteration.
It is up to the specific implementation what arguments are passed
to the callback. Subclasses should at least pass the current
iteration number k, the current estimate x, and possibly f(x),
grad f(x), and the current error.</p>
</dd></dl>
<dl class="method">
<dt id="esys.downunder.splitminimizers.SplitMinimizerLBFGS.setCostFunction">
<code class="descname">setCostFunction</code><span class="sig-paren">(</span><em>J</em><span class="sig-paren">)</span><a class="headerlink" href="#esys.downunder.splitminimizers.SplitMinimizerLBFGS.setCostFunction" title="Permalink to this definition">¶</a></dt>
<dd><p>set the cost function to be minimized</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>J</strong> (<code class="xref py py-obj docutils literal notranslate"><span class="pre">CostFunction</span></code>) – the cost function to be minimized</td>
</tr>
</tbody>
</table>
</dd></dl>
<dl class="method">
<dt id="esys.downunder.splitminimizers.SplitMinimizerLBFGS.setMaxIterations">
<code class="descname">setMaxIterations</code><span class="sig-paren">(</span><em>imax</em><span class="sig-paren">)</span><a class="headerlink" href="#esys.downunder.splitminimizers.SplitMinimizerLBFGS.setMaxIterations" title="Permalink to this definition">¶</a></dt>
<dd><p>Sets the maximum number of iterations before the minimizer terminates.</p>
</dd></dl>
<dl class="method">
<dt id="esys.downunder.splitminimizers.SplitMinimizerLBFGS.setOptions">
<code class="descname">setOptions</code><span class="sig-paren">(</span><em>**opts</em><span class="sig-paren">)</span><a class="headerlink" href="#esys.downunder.splitminimizers.SplitMinimizerLBFGS.setOptions" title="Permalink to this definition">¶</a></dt>
<dd><p>Sets minimizer-specific options. For a list of possible options see
<a class="reference internal" href="#esys.downunder.splitminimizers.SplitMinimizerLBFGS.getOptions" title="esys.downunder.splitminimizers.SplitMinimizerLBFGS.getOptions"><code class="xref py py-obj docutils literal notranslate"><span class="pre">getOptions()</span></code></a>.</p>
</dd></dl>
<dl class="method">
<dt id="esys.downunder.splitminimizers.SplitMinimizerLBFGS.setTolerance">
<code class="descname">setTolerance</code><span class="sig-paren">(</span><em>m_tol=0.0001</em>, <em>J_tol=None</em><span class="sig-paren">)</span><a class="headerlink" href="#esys.downunder.splitminimizers.SplitMinimizerLBFGS.setTolerance" title="Permalink to this definition">¶</a></dt>
<dd><p>Sets the tolerance for the stopping criterion. The minimizer stops
when an appropriate norm is less than <code class="xref py py-obj docutils literal notranslate"><span class="pre">m_tol</span></code>.</p>
</dd></dl>
</dd></dl>
</div>
<div class="section" id="functions">
<h2>Functions<a class="headerlink" href="#functions" title="Permalink to this headline">¶</a></h2>
</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.downunder.splitminimizers 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>
<h4>Previous topic</h4>
<p class="topless"><a href="esys.downunder.splitinversioncostfunctions.html"
title="previous chapter">esys.downunder.splitinversioncostfunctions Package</a></p>
<h4>Next topic</h4>
<p class="topless"><a href="esys.downunder.splitregularizations.html"
title="next chapter">esys.downunder.splitregularizations Package</a></p>
</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="right" >
<a href="esys.downunder.splitregularizations.html" title="esys.downunder.splitregularizations Package"
>next</a> |</li>
<li class="right" >
<a href="esys.downunder.splitinversioncostfunctions.html" title="esys.downunder.splitinversioncostfunctions Package"
>previous</a> |</li>
<li class="nav-item nav-item-0"><a href="index.html">esys.escript 5.6 documentation</a> »</li>
<li class="nav-item nav-item-1"><a href="esys.downunder.html" >esys.downunder Package</a> »</li>
</ul>
</div>
<div class="footer" role="contentinfo">
© Copyright 2012-2014, Author.
Created using <a href="http://sphinx-doc.org/">Sphinx</a> 1.8.4.
</div>
</body>
</html>
|