File: petscsnes.h.html

package info (click to toggle)
petsc 3.23.1%2Bdfsg1-1exp1
  • links: PTS, VCS
  • area: main
  • in suites: experimental
  • size: 515,576 kB
  • sloc: ansic: 751,607; cpp: 51,542; python: 38,598; f90: 17,352; javascript: 3,493; makefile: 3,157; sh: 1,502; xml: 619; objc: 445; java: 13; csh: 1
file content (1370 lines) | stat: -rw-r--r-- 260,715 bytes parent folder | download
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
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
<center><a href="https://gitlab.com/petsc/petsc/-/blob/966382dc56242773704ef5f5cee7aa2db3ebc577/include/petscsnes.h">Actual source code: petscsnes.h</a></center><br>

<html>
<head>
<title></title>
<meta name="generator" content="c2html 0.9.6">
<meta name="date" content="2025-04-30T18:14:50+00:00">
</head>

<body bgcolor="#FFFFFF">
<pre width=80>
<a name="line1">  1: </a><font color="#B22222">/*</font>
<a name="line2">  2: </a><font color="#B22222">    User interface for the nonlinear solvers package.</font>
<a name="line3">  3: </a><font color="#B22222">*/</font>
<a name="line4">  4: </a><font color="#A020F0">#pragma once</font>

<a name="line6">  6: </a>#include <A href="../include/petscksp.h.html">&lt;petscksp.h&gt;</A>
<a name="line7">  7: </a>#include <A href="../include/petscdmtypes.h.html">&lt;petscdmtypes.h&gt;</A>
<a name="line8">  8: </a>#include <A href="../include/petscfvtypes.h.html">&lt;petscfvtypes.h&gt;</A>
<a name="line9">  9: </a>#include <A href="../include/petscdmdatypes.h.html">&lt;petscdmdatypes.h&gt;</A>
<a name="line10"> 10: </a>#include <A href="../include/petscsnestypes.h.html">&lt;petscsnestypes.h&gt;</A>

<a name="line12"> 12: </a><font color="#B22222">/* SUBMANSEC = <a href="../manualpages/SNES/SNES.html">SNES</a> */</font>

<a name="line14"> 14: </a><font color="#B22222">/*J</font>
<a name="line15"> 15: </a><font color="#B22222">   <a href="../manualpages/SNES/SNESType.html">SNESType</a> - String with the name of a PETSc `<a href="../manualpages/SNES/SNES.html">SNES</a>` method. These are all the nonlinear solvers that PETSc provides.</font>

<a name="line17"> 17: </a><font color="#B22222">   Level: beginner</font>

<a name="line19"> 19: </a><font color="#B22222">   Note:</font>
<a name="line20"> 20: </a><font color="#B22222">   Use `<a href="../manualpages/SNES/SNESSetType.html">SNESSetType</a>()` or the options database key `-snes_type` to set the specific nonlinear solver algorithm to use with a given `<a href="../manualpages/SNES/SNES.html">SNES</a>` object</font>

<a name="line22"> 22: </a><font color="#B22222">.seealso: [](doc_nonlinsolve), [](ch_snes), `<a href="../manualpages/SNES/SNESSetType.html">SNESSetType</a>()`, `<a href="../manualpages/SNES/SNES.html">SNES</a>`, `<a href="../manualpages/SNES/SNESCreate.html">SNESCreate</a>()`, `<a href="../manualpages/SNES/SNESDestroy.html">SNESDestroy</a>()`, `<a href="../manualpages/SNES/SNESSetFromOptions.html">SNESSetFromOptions</a>()`</font>
<a name="line23"> 23: </a><font color="#B22222">J*/</font>
<a name="line24"> 24: </a><font color="#4169E1">typedef const char *<a href="../manualpages/SNES/SNESType.html">SNESType</a>;</font>
<a name="line25"> 25: </a><strong><font color="#228B22">#define <a href="../manualpages/SNES/SNESNEWTONLS.html">SNESNEWTONLS</a>         </font><font color="#666666">"newtonls"</font><font color="#228B22"></font></strong>
<a name="line26"> 26: </a><strong><font color="#228B22">#define <a href="../manualpages/SNES/SNESNEWTONTR.html">SNESNEWTONTR</a>         </font><font color="#666666">"newtontr"</font><font color="#228B22"></font></strong>
<a name="line27"> 27: </a><strong><font color="#228B22">#define <a href="../manualpages/SNES/SNESNEWTONTRDC.html">SNESNEWTONTRDC</a>       </font><font color="#666666">"newtontrdc"</font><font color="#228B22"></font></strong>
<a name="line28"> 28: </a><strong><font color="#228B22">#define SNESPYTHON           </font><font color="#666666">"python"</font><font color="#228B22"></font></strong>
<a name="line29"> 29: </a><strong><font color="#228B22">#define <a href="../manualpages/SNES/SNESNRICHARDSON.html">SNESNRICHARDSON</a>      </font><font color="#666666">"nrichardson"</font><font color="#228B22"></font></strong>
<a name="line30"> 30: </a><strong><font color="#228B22">#define <a href="../manualpages/SNES/SNESKSPONLY.html">SNESKSPONLY</a>          </font><font color="#666666">"ksponly"</font><font color="#228B22"></font></strong>
<a name="line31"> 31: </a><strong><font color="#228B22">#define <a href="../manualpages/SNES/SNESKSPTRANSPOSEONLY.html">SNESKSPTRANSPOSEONLY</a> </font><font color="#666666">"ksptransposeonly"</font><font color="#228B22"></font></strong>
<a name="line32"> 32: </a><strong><font color="#228B22">#define <a href="../manualpages/SNES/SNESVINEWTONRSLS.html">SNESVINEWTONRSLS</a>     </font><font color="#666666">"vinewtonrsls"</font><font color="#228B22"></font></strong>
<a name="line33"> 33: </a><strong><font color="#228B22">#define <a href="../manualpages/SNES/SNESVINEWTONSSLS.html">SNESVINEWTONSSLS</a>     </font><font color="#666666">"vinewtonssls"</font><font color="#228B22"></font></strong>
<a name="line34"> 34: </a><strong><font color="#228B22">#define <a href="../manualpages/SNES/SNESNGMRES.html">SNESNGMRES</a>           </font><font color="#666666">"ngmres"</font><font color="#228B22"></font></strong>
<a name="line35"> 35: </a><strong><font color="#228B22">#define <a href="../manualpages/SNES/SNESQN.html">SNESQN</a>               </font><font color="#666666">"qn"</font><font color="#228B22"></font></strong>
<a name="line36"> 36: </a><strong><font color="#228B22">#define <a href="../manualpages/SNES/SNESSHELL.html">SNESSHELL</a>            </font><font color="#666666">"shell"</font><font color="#228B22"></font></strong>
<a name="line37"> 37: </a><strong><font color="#228B22">#define <a href="../manualpages/SNES/SNESNGS.html">SNESNGS</a>              </font><font color="#666666">"ngs"</font><font color="#228B22"></font></strong>
<a name="line38"> 38: </a><strong><font color="#228B22">#define <a href="../manualpages/SNES/SNESNCG.html">SNESNCG</a>              </font><font color="#666666">"ncg"</font><font color="#228B22"></font></strong>
<a name="line39"> 39: </a><strong><font color="#228B22">#define <a href="../manualpages/SNESFAS/SNESFAS.html">SNESFAS</a>              </font><font color="#666666">"fas"</font><font color="#228B22"></font></strong>
<a name="line40"> 40: </a><strong><font color="#228B22">#define <a href="../manualpages/SNES/SNESMS.html">SNESMS</a>               </font><font color="#666666">"ms"</font><font color="#228B22"></font></strong>
<a name="line41"> 41: </a><strong><font color="#228B22">#define <a href="../manualpages/SNES/SNESNASM.html">SNESNASM</a>             </font><font color="#666666">"nasm"</font><font color="#228B22"></font></strong>
<a name="line42"> 42: </a><strong><font color="#228B22">#define <a href="../manualpages/SNES/SNESANDERSON.html">SNESANDERSON</a>         </font><font color="#666666">"anderson"</font><font color="#228B22"></font></strong>
<a name="line43"> 43: </a><strong><font color="#228B22">#define <a href="../manualpages/SNES/SNESASPIN.html">SNESASPIN</a>            </font><font color="#666666">"aspin"</font><font color="#228B22"></font></strong>
<a name="line44"> 44: </a><strong><font color="#228B22">#define <a href="../manualpages/SNES/SNESCOMPOSITE.html">SNESCOMPOSITE</a>        </font><font color="#666666">"composite"</font><font color="#228B22"></font></strong>
<a name="line45"> 45: </a><strong><font color="#228B22">#define <a href="../manualpages/SNES/SNESPATCH.html">SNESPATCH</a>            </font><font color="#666666">"patch"</font><font color="#228B22"></font></strong>
<a name="line46"> 46: </a><strong><font color="#228B22">#define <a href="../manualpages/SNES/SNESNEWTONAL.html">SNESNEWTONAL</a>         </font><font color="#666666">"newtonal"</font><font color="#228B22"></font></strong>

<a name="line48"> 48: </a><font color="#B22222">/* Logging support */</font>
<a name="line49"> 49: </a>PETSC_EXTERN <a href="../manualpages/Sys/PetscClassId.html">PetscClassId</a> SNES_CLASSID;
<a name="line50"> 50: </a>PETSC_EXTERN <a href="../manualpages/Sys/PetscClassId.html">PetscClassId</a> DMSNES_CLASSID;

<a name="line52"> 52: </a><strong><font color="#4169E1">PETSC_EXTERN <a href="../manualpages/Sys/PetscErrorCode.html">PetscErrorCode</a> <a href="../manualpages/SNES/SNESInitializePackage.html">SNESInitializePackage</a>(void)</font></strong>;
<a name="line53"> 53: </a><strong><font color="#4169E1">PETSC_EXTERN <a href="../manualpages/Sys/PetscErrorCode.html">PetscErrorCode</a> <a href="../manualpages/SNES/SNESFinalizePackage.html">SNESFinalizePackage</a>(void)</font></strong>;

<a name="line55"> 55: </a><strong><font color="#4169E1">PETSC_EXTERN <a href="../manualpages/Sys/PetscErrorCode.html">PetscErrorCode</a> <a href="../manualpages/SNES/SNESCreate.html">SNESCreate</a>(<a href="../manualpages/Sys/MPI_Comm.html">MPI_Comm</a>, <a href="../manualpages/SNES/SNES.html">SNES</a> *)</font></strong>;
<a name="line56"> 56: </a><strong><font color="#4169E1">PETSC_EXTERN <a href="../manualpages/Sys/PetscErrorCode.html">PetscErrorCode</a> <a href="../manualpages/SNES/SNESParametersInitialize.html">SNESParametersInitialize</a>(<a href="../manualpages/SNES/SNES.html">SNES</a>)</font></strong>;
<a name="line57"> 57: </a><strong><font color="#4169E1">PETSC_EXTERN <a href="../manualpages/Sys/PetscErrorCode.html">PetscErrorCode</a> <a href="../manualpages/SNES/SNESReset.html">SNESReset</a>(<a href="../manualpages/SNES/SNES.html">SNES</a>)</font></strong>;
<a name="line58"> 58: </a><strong><font color="#4169E1">PETSC_EXTERN <a href="../manualpages/Sys/PetscErrorCode.html">PetscErrorCode</a> <a href="../manualpages/SNES/SNESDestroy.html">SNESDestroy</a>(<a href="../manualpages/SNES/SNES.html">SNES</a> *)</font></strong>;
<a name="line59"> 59: </a><strong><font color="#4169E1">PETSC_EXTERN <a href="../manualpages/Sys/PetscErrorCode.html">PetscErrorCode</a> <a href="../manualpages/SNES/SNESSetType.html">SNESSetType</a>(<a href="../manualpages/SNES/SNES.html">SNES</a>, <a href="../manualpages/SNES/SNESType.html">SNESType</a>)</font></strong>;
<a name="line60"> 60: </a><strong><font color="#4169E1">PETSC_EXTERN <a href="../manualpages/Sys/PetscErrorCode.html">PetscErrorCode</a> <a href="../manualpages/SNES/SNESMonitor.html">SNESMonitor</a>(<a href="../manualpages/SNES/SNES.html">SNES</a>, <a href="../manualpages/Sys/PetscInt.html">PetscInt</a>, <a href="../manualpages/Sys/PetscReal.html">PetscReal</a>)</font></strong>;
<a name="line61"> 61: </a><strong><font color="#4169E1">PETSC_EXTERN <a href="../manualpages/Sys/PetscErrorCode.html">PetscErrorCode</a> <a href="../manualpages/SNES/SNESMonitorSet.html">SNESMonitorSet</a>(<a href="../manualpages/SNES/SNES.html">SNES</a>, <a href="../manualpages/Sys/PetscErrorCode.html">PetscErrorCode</a> (*)(<a href="../manualpages/SNES/SNES.html">SNES</a>, <a href="../manualpages/Sys/PetscInt.html">PetscInt</a>, <a href="../manualpages/Sys/PetscReal.html">PetscReal</a>, void *), void *, <a href="../manualpages/Sys/PetscCtxDestroyFn.html">PetscCtxDestroyFn</a> *)</font></strong>;
<a name="line62"> 62: </a><strong><font color="#4169E1"><a name="SNESMonitorSetFromOptions"></a>PETSC_EXTERN <a href="../manualpages/Sys/PetscErrorCode.html">PetscErrorCode</a> <a href="../manualpages/SNES/SNESMonitorSetFromOptions.html">SNESMonitorSetFromOptions</a>(<a href="../manualpages/SNES/SNES.html">SNES</a>, const char[], const char[], const char[], <a href="../manualpages/Sys/PetscErrorCode.html">PetscErrorCode</a> (*)(<a href="../manualpages/SNES/SNES.html">SNES</a>, <a href="../manualpages/Sys/PetscInt.html">PetscInt</a>, <a href="../manualpages/Sys/PetscReal.html">PetscReal</a>, PetscViewerAndFormat *), <a href="../manualpages/Sys/PetscErrorCode.html">PetscErrorCode</a> (*)(<a href="../manualpages/SNES/SNES.html">SNES</a>, PetscViewerAndFormat *)</font></strong>);
<a name="line63"> 63: </a><strong><font color="#4169E1">PETSC_EXTERN <a href="../manualpages/Sys/PetscErrorCode.html">PetscErrorCode</a> <a href="../manualpages/SNES/SNESMonitorCancel.html">SNESMonitorCancel</a>(<a href="../manualpages/SNES/SNES.html">SNES</a>)</font></strong>;
<a name="line64"> 64: </a><strong><font color="#4169E1">PETSC_EXTERN <a href="../manualpages/Sys/PetscErrorCode.html">PetscErrorCode</a> <a href="../manualpages/SNES/SNESMonitorSAWs.html">SNESMonitorSAWs</a>(<a href="../manualpages/SNES/SNES.html">SNES</a>, <a href="../manualpages/Sys/PetscInt.html">PetscInt</a>, <a href="../manualpages/Sys/PetscReal.html">PetscReal</a>, void *)</font></strong>;
<a name="line65"> 65: </a><strong><font color="#4169E1">PETSC_EXTERN <a href="../manualpages/Sys/PetscErrorCode.html">PetscErrorCode</a> <a href="../manualpages/SNES/SNESMonitorSAWsCreate.html">SNESMonitorSAWsCreate</a>(<a href="../manualpages/SNES/SNES.html">SNES</a>, void **)</font></strong>;
<a name="line66"> 66: </a><strong><font color="#4169E1">PETSC_EXTERN <a href="../manualpages/Sys/PetscErrorCode.html">PetscErrorCode</a> <a href="../manualpages/SNES/SNESMonitorSAWsDestroy.html">SNESMonitorSAWsDestroy</a>(void **)</font></strong>;
<a name="line67"> 67: </a><strong><font color="#4169E1">PETSC_EXTERN <a href="../manualpages/Sys/PetscErrorCode.html">PetscErrorCode</a> <a href="../manualpages/SNES/SNESSetConvergenceHistory.html">SNESSetConvergenceHistory</a>(<a href="../manualpages/SNES/SNES.html">SNES</a>, <a href="../manualpages/Sys/PetscReal.html">PetscReal</a>[], <a href="../manualpages/Sys/PetscInt.html">PetscInt</a>[], <a href="../manualpages/Sys/PetscInt.html">PetscInt</a>, <a href="../manualpages/Sys/PetscBool.html">PetscBool</a>)</font></strong>;
<a name="line68"> 68: </a><strong><font color="#4169E1">PETSC_EXTERN <a href="../manualpages/Sys/PetscErrorCode.html">PetscErrorCode</a> <a href="../manualpages/SNES/SNESGetConvergenceHistory.html">SNESGetConvergenceHistory</a>(<a href="../manualpages/SNES/SNES.html">SNES</a>, <a href="../manualpages/Sys/PetscReal.html">PetscReal</a> *[], <a href="../manualpages/Sys/PetscInt.html">PetscInt</a> *[], <a href="../manualpages/Sys/PetscInt.html">PetscInt</a> *)</font></strong>;
<a name="line69"> 69: </a><strong><font color="#4169E1">PETSC_EXTERN <a href="../manualpages/Sys/PetscErrorCode.html">PetscErrorCode</a> <a href="../manualpages/SNES/SNESSetUp.html">SNESSetUp</a>(<a href="../manualpages/SNES/SNES.html">SNES</a>)</font></strong>;
<a name="line70"> 70: </a><strong><font color="#4169E1">PETSC_EXTERN <a href="../manualpages/Sys/PetscErrorCode.html">PetscErrorCode</a> <a href="../manualpages/SNES/SNESSolve.html">SNESSolve</a>(<a href="../manualpages/SNES/SNES.html">SNES</a>, <a href="../manualpages/Vec/Vec.html">Vec</a>, <a href="../manualpages/Vec/Vec.html">Vec</a>)</font></strong>;
<a name="line71"> 71: </a><strong><font color="#4169E1">PETSC_EXTERN <a href="../manualpages/Sys/PetscErrorCode.html">PetscErrorCode</a> <a href="../manualpages/SNES/SNESSetErrorIfNotConverged.html">SNESSetErrorIfNotConverged</a>(<a href="../manualpages/SNES/SNES.html">SNES</a>, <a href="../manualpages/Sys/PetscBool.html">PetscBool</a>)</font></strong>;
<a name="line72"> 72: </a><strong><font color="#4169E1">PETSC_EXTERN <a href="../manualpages/Sys/PetscErrorCode.html">PetscErrorCode</a> <a href="../manualpages/SNES/SNESGetErrorIfNotConverged.html">SNESGetErrorIfNotConverged</a>(<a href="../manualpages/SNES/SNES.html">SNES</a>, <a href="../manualpages/Sys/PetscBool.html">PetscBool</a> *)</font></strong>;
<a name="line73"> 73: </a><strong><font color="#4169E1">PETSC_EXTERN <a href="../manualpages/Sys/PetscErrorCode.html">PetscErrorCode</a> <a href="../manualpages/SNES/SNESConverged.html">SNESConverged</a>(<a href="../manualpages/SNES/SNES.html">SNES</a>, <a href="../manualpages/Sys/PetscInt.html">PetscInt</a>, <a href="../manualpages/Sys/PetscReal.html">PetscReal</a>, <a href="../manualpages/Sys/PetscReal.html">PetscReal</a>, <a href="../manualpages/Sys/PetscReal.html">PetscReal</a>)</font></strong>;

<a name="line75"> 75: </a><strong><font color="#4169E1">PETSC_EXTERN <a href="../manualpages/Sys/PetscErrorCode.html">PetscErrorCode</a> <a href="../manualpages/SNES/SNESSetWorkVecs.html">SNESSetWorkVecs</a>(<a href="../manualpages/SNES/SNES.html">SNES</a>, <a href="../manualpages/Sys/PetscInt.html">PetscInt</a>)</font></strong>;

<a name="line77"> 77: </a><strong><font color="#4169E1"><a name="SNESAddOptionsChecker"></a>PETSC_EXTERN <a href="../manualpages/Sys/PetscErrorCode.html">PetscErrorCode</a> <a href="../manualpages/SNES/SNESAddOptionsChecker.html">SNESAddOptionsChecker</a>(<a href="../manualpages/Sys/PetscErrorCode.html">PetscErrorCode</a> (*)(<a href="../manualpages/SNES/SNES.html">SNES</a>)</font></strong>);

<a name="line79"> 79: </a><strong><font color="#4169E1"><a name="SNESRegister"></a>PETSC_EXTERN <a href="../manualpages/Sys/PetscErrorCode.html">PetscErrorCode</a> <a href="../manualpages/SNES/SNESRegister.html">SNESRegister</a>(const char[], <a href="../manualpages/Sys/PetscErrorCode.html">PetscErrorCode</a> (*)(<a href="../manualpages/SNES/SNES.html">SNES</a>)</font></strong>);

<a name="line81"> 81: </a><strong><font color="#4169E1">PETSC_EXTERN <a href="../manualpages/Sys/PetscErrorCode.html">PetscErrorCode</a> <a href="../manualpages/SNES/SNESGetKSP.html">SNESGetKSP</a>(<a href="../manualpages/SNES/SNES.html">SNES</a>, <a href="../manualpages/KSP/KSP.html">KSP</a> *)</font></strong>;
<a name="line82"> 82: </a><strong><font color="#4169E1">PETSC_EXTERN <a href="../manualpages/Sys/PetscErrorCode.html">PetscErrorCode</a> <a href="../manualpages/SNES/SNESSetKSP.html">SNESSetKSP</a>(<a href="../manualpages/SNES/SNES.html">SNES</a>, <a href="../manualpages/KSP/KSP.html">KSP</a>)</font></strong>;
<a name="line83"> 83: </a><strong><font color="#4169E1">PETSC_EXTERN <a href="../manualpages/Sys/PetscErrorCode.html">PetscErrorCode</a> <a href="../manualpages/SNES/SNESSetSolution.html">SNESSetSolution</a>(<a href="../manualpages/SNES/SNES.html">SNES</a>, <a href="../manualpages/Vec/Vec.html">Vec</a>)</font></strong>;
<a name="line84"> 84: </a><strong><font color="#4169E1">PETSC_EXTERN <a href="../manualpages/Sys/PetscErrorCode.html">PetscErrorCode</a> <a href="../manualpages/SNES/SNESGetSolution.html">SNESGetSolution</a>(<a href="../manualpages/SNES/SNES.html">SNES</a>, <a href="../manualpages/Vec/Vec.html">Vec</a> *)</font></strong>;
<a name="line85"> 85: </a><strong><font color="#4169E1">PETSC_EXTERN <a href="../manualpages/Sys/PetscErrorCode.html">PetscErrorCode</a> <a href="../manualpages/SNES/SNESGetSolutionUpdate.html">SNESGetSolutionUpdate</a>(<a href="../manualpages/SNES/SNES.html">SNES</a>, <a href="../manualpages/Vec/Vec.html">Vec</a> *)</font></strong>;
<a name="line86"> 86: </a><strong><font color="#4169E1">PETSC_EXTERN <a href="../manualpages/Sys/PetscErrorCode.html">PetscErrorCode</a> <a href="../manualpages/SNES/SNESGetRhs.html">SNESGetRhs</a>(<a href="../manualpages/SNES/SNES.html">SNES</a>, <a href="../manualpages/Vec/Vec.html">Vec</a> *)</font></strong>;
<a name="line87"> 87: </a><strong><font color="#4169E1">PETSC_EXTERN <a href="../manualpages/Sys/PetscErrorCode.html">PetscErrorCode</a> <a href="../manualpages/SNES/SNESView.html">SNESView</a>(<a href="../manualpages/SNES/SNES.html">SNES</a>, <a href="../manualpages/Viewer/PetscViewer.html">PetscViewer</a>)</font></strong>;
<a name="line88"> 88: </a><strong><font color="#4169E1">PETSC_EXTERN <a href="../manualpages/Sys/PetscErrorCode.html">PetscErrorCode</a> <a href="../manualpages/SNES/SNESLoad.html">SNESLoad</a>(<a href="../manualpages/SNES/SNES.html">SNES</a>, <a href="../manualpages/Viewer/PetscViewer.html">PetscViewer</a>)</font></strong>;
<a name="line89"> 89: </a><strong><font color="#4169E1">PETSC_EXTERN <a href="../manualpages/Sys/PetscErrorCode.html">PetscErrorCode</a> <a href="../manualpages/SNES/SNESConvergedReasonViewSet.html">SNESConvergedReasonViewSet</a>(<a href="../manualpages/SNES/SNES.html">SNES</a>, <a href="../manualpages/Sys/PetscErrorCode.html">PetscErrorCode</a> (*)(<a href="../manualpages/SNES/SNES.html">SNES</a>, void *), void *, <a href="../manualpages/Sys/PetscCtxDestroyFn.html">PetscCtxDestroyFn</a> *)</font></strong>;
<a name="line90"> 90: </a><strong><font color="#4169E1">PETSC_EXTERN <a href="../manualpages/Sys/PetscErrorCode.html">PetscErrorCode</a> <a href="../manualpages/SNES/SNESViewFromOptions.html">SNESViewFromOptions</a>(<a href="../manualpages/SNES/SNES.html">SNES</a>, <a href="../manualpages/Sys/PetscObject.html">PetscObject</a>, const char[])</font></strong>;
<a name="line91"> 91: </a><strong><font color="#4169E1">PETSC_EXTERN <a href="../manualpages/Sys/PetscErrorCode.html">PetscErrorCode</a> <a href="../manualpages/SNES/SNESConvergedReasonView.html">SNESConvergedReasonView</a>(<a href="../manualpages/SNES/SNES.html">SNES</a>, <a href="../manualpages/Viewer/PetscViewer.html">PetscViewer</a>)</font></strong>;
<a name="line92"> 92: </a><strong><font color="#4169E1">PETSC_EXTERN <a href="../manualpages/Sys/PetscErrorCode.html">PetscErrorCode</a> <a href="../manualpages/SNES/SNESConvergedReasonViewFromOptions.html">SNESConvergedReasonViewFromOptions</a>(<a href="../manualpages/SNES/SNES.html">SNES</a>)</font></strong>;
<a name="line93"> 93: </a><strong><font color="#4169E1">PETSC_EXTERN <a href="../manualpages/Sys/PetscErrorCode.html">PetscErrorCode</a> <a href="../manualpages/SNES/SNESConvergedReasonViewCancel.html">SNESConvergedReasonViewCancel</a>(<a href="../manualpages/SNES/SNES.html">SNES</a>)</font></strong>;

<a name="line95"> 95: </a>PETSC_DEPRECATED_FUNCTION(3, 14, 0, <font color="#666666">"<a href="../manualpages/SNES/SNESConvergedReasonView.html">SNESConvergedReasonView</a>()"</font>, ) static inline <a href="../manualpages/Sys/PetscErrorCode.html">PetscErrorCode</a> SNESReasonView(<a href="../manualpages/SNES/SNES.html">SNES</a> snes, <a href="../manualpages/Viewer/PetscViewer.html">PetscViewer</a> v)
<a name="line96"> 96: </a>{
<a name="line97"> 97: </a>  <font color="#4169E1">return</font> <a href="../manualpages/SNES/SNESConvergedReasonView.html">SNESConvergedReasonView</a>(snes, v);
<a name="line98"> 98: </a>}
<a name="line99"> 99: </a>PETSC_DEPRECATED_FUNCTION(3, 14, 0, <font color="#666666">"<a href="../manualpages/SNES/SNESConvergedReasonViewFromOptions.html">SNESConvergedReasonViewFromOptions</a>()"</font>, ) static inline <a href="../manualpages/Sys/PetscErrorCode.html">PetscErrorCode</a> SNESReasonViewFromOptions(<a href="../manualpages/SNES/SNES.html">SNES</a> snes)
<a name="line100">100: </a>{
<a name="line101">101: </a>  <font color="#4169E1">return</font> <a href="../manualpages/SNES/SNESConvergedReasonViewFromOptions.html">SNESConvergedReasonViewFromOptions</a>(snes);
<a name="line102">102: </a>}

<a name="line104">104: </a><strong><font color="#228B22">#define SNES_FILE_CLASSID 1211224</font></strong>

<a name="line106">106: </a><strong><font color="#4169E1">PETSC_EXTERN <a href="../manualpages/Sys/PetscErrorCode.html">PetscErrorCode</a> <a href="../manualpages/SNES/SNESSetOptionsPrefix.html">SNESSetOptionsPrefix</a>(<a href="../manualpages/SNES/SNES.html">SNES</a>, const char[])</font></strong>;
<a name="line107">107: </a><strong><font color="#4169E1">PETSC_EXTERN <a href="../manualpages/Sys/PetscErrorCode.html">PetscErrorCode</a> <a href="../manualpages/SNES/SNESAppendOptionsPrefix.html">SNESAppendOptionsPrefix</a>(<a href="../manualpages/SNES/SNES.html">SNES</a>, const char[])</font></strong>;
<a name="line108">108: </a><strong><font color="#4169E1">PETSC_EXTERN <a href="../manualpages/Sys/PetscErrorCode.html">PetscErrorCode</a> <a href="../manualpages/SNES/SNESGetOptionsPrefix.html">SNESGetOptionsPrefix</a>(<a href="../manualpages/SNES/SNES.html">SNES</a>, const char *[])</font></strong>;
<a name="line109">109: </a><strong><font color="#4169E1">PETSC_EXTERN <a href="../manualpages/Sys/PetscErrorCode.html">PetscErrorCode</a> <a href="../manualpages/SNES/SNESSetFromOptions.html">SNESSetFromOptions</a>(<a href="../manualpages/SNES/SNES.html">SNES</a>)</font></strong>;
<a name="line110">110: </a><strong><font color="#4169E1">PETSC_EXTERN <a href="../manualpages/Sys/PetscErrorCode.html">PetscErrorCode</a> <a href="../manualpages/SNES/SNESResetFromOptions.html">SNESResetFromOptions</a>(<a href="../manualpages/SNES/SNES.html">SNES</a>)</font></strong>;

<a name="line112">112: </a><strong><font color="#4169E1">PETSC_EXTERN <a href="../manualpages/Sys/PetscErrorCode.html">PetscErrorCode</a> <a href="../manualpages/SNES/SNESSetUseMatrixFree.html">SNESSetUseMatrixFree</a>(<a href="../manualpages/SNES/SNES.html">SNES</a>, <a href="../manualpages/Sys/PetscBool.html">PetscBool</a>, <a href="../manualpages/Sys/PetscBool.html">PetscBool</a>)</font></strong>;
<a name="line113">113: </a><strong><font color="#4169E1">PETSC_EXTERN <a href="../manualpages/Sys/PetscErrorCode.html">PetscErrorCode</a> <a href="../manualpages/SNES/SNESGetUseMatrixFree.html">SNESGetUseMatrixFree</a>(<a href="../manualpages/SNES/SNES.html">SNES</a>, <a href="../manualpages/Sys/PetscBool.html">PetscBool</a> *, <a href="../manualpages/Sys/PetscBool.html">PetscBool</a> *)</font></strong>;
<a name="line114">114: </a><strong><font color="#4169E1">PETSC_EXTERN <a href="../manualpages/Sys/PetscErrorCode.html">PetscErrorCode</a> <a href="../manualpages/SNES/MatCreateSNESMF.html">MatCreateSNESMF</a>(<a href="../manualpages/SNES/SNES.html">SNES</a>, <a href="../manualpages/Mat/Mat.html">Mat</a> *)</font></strong>;
<a name="line115">115: </a><strong><font color="#4169E1">PETSC_EXTERN <a href="../manualpages/Sys/PetscErrorCode.html">PetscErrorCode</a> <a href="../manualpages/SNES/MatSNESMFGetSNES.html">MatSNESMFGetSNES</a>(<a href="../manualpages/Mat/Mat.html">Mat</a>, <a href="../manualpages/SNES/SNES.html">SNES</a> *)</font></strong>;
<a name="line116">116: </a><strong><font color="#4169E1">PETSC_EXTERN <a href="../manualpages/Sys/PetscErrorCode.html">PetscErrorCode</a> <a href="../manualpages/SNES/MatSNESMFSetReuseBase.html">MatSNESMFSetReuseBase</a>(<a href="../manualpages/Mat/Mat.html">Mat</a>, <a href="../manualpages/Sys/PetscBool.html">PetscBool</a>)</font></strong>;
<a name="line117">117: </a><strong><font color="#4169E1">PETSC_EXTERN <a href="../manualpages/Sys/PetscErrorCode.html">PetscErrorCode</a> <a href="../manualpages/SNES/MatSNESMFGetReuseBase.html">MatSNESMFGetReuseBase</a>(<a href="../manualpages/Mat/Mat.html">Mat</a>, <a href="../manualpages/Sys/PetscBool.html">PetscBool</a> *)</font></strong>;
<a name="line118">118: </a><strong><font color="#4169E1">PETSC_EXTERN <a href="../manualpages/Sys/PetscErrorCode.html">PetscErrorCode</a> <a href="../manualpages/SNES/MatMFFDComputeJacobian.html">MatMFFDComputeJacobian</a>(<a href="../manualpages/SNES/SNES.html">SNES</a>, <a href="../manualpages/Vec/Vec.html">Vec</a>, <a href="../manualpages/Mat/Mat.html">Mat</a>, <a href="../manualpages/Mat/Mat.html">Mat</a>, void *)</font></strong>;
<a name="line119">119: </a><strong><font color="#4169E1">PETSC_EXTERN <a href="../manualpages/Sys/PetscErrorCode.html">PetscErrorCode</a> <a href="../manualpages/SNES/MatCreateSNESMFMore.html">MatCreateSNESMFMore</a>(<a href="../manualpages/SNES/SNES.html">SNES</a>, <a href="../manualpages/Vec/Vec.html">Vec</a>, <a href="../manualpages/Mat/Mat.html">Mat</a> *)</font></strong>;
<a name="line120">120: </a><strong><font color="#4169E1">PETSC_EXTERN <a href="../manualpages/Sys/PetscErrorCode.html">PetscErrorCode</a> <a href="../manualpages/SNES/MatSNESMFMoreSetParameters.html">MatSNESMFMoreSetParameters</a>(<a href="../manualpages/Mat/Mat.html">Mat</a>, <a href="../manualpages/Sys/PetscReal.html">PetscReal</a>, <a href="../manualpages/Sys/PetscReal.html">PetscReal</a>, <a href="../manualpages/Sys/PetscReal.html">PetscReal</a>)</font></strong>;

<a name="line122">122: </a><strong><font color="#4169E1">PETSC_EXTERN <a href="../manualpages/Sys/PetscErrorCode.html">PetscErrorCode</a> <a href="../manualpages/SNES/SNESGetType.html">SNESGetType</a>(<a href="../manualpages/SNES/SNES.html">SNES</a>, <a href="../manualpages/SNES/SNESType.html">SNESType</a> *)</font></strong>;
<a name="line123">123: </a><strong><font color="#4169E1">PETSC_EXTERN <a href="../manualpages/Sys/PetscErrorCode.html">PetscErrorCode</a> SNESMonitorDefaultSetUp(<a href="../manualpages/SNES/SNES.html">SNES</a>, PetscViewerAndFormat *)</font></strong>;
<a name="line124">124: </a><strong><font color="#4169E1">PETSC_EXTERN <a href="../manualpages/Sys/PetscErrorCode.html">PetscErrorCode</a> <a href="../manualpages/SNES/SNESMonitorDefault.html">SNESMonitorDefault</a>(<a href="../manualpages/SNES/SNES.html">SNES</a>, <a href="../manualpages/Sys/PetscInt.html">PetscInt</a>, <a href="../manualpages/Sys/PetscReal.html">PetscReal</a>, PetscViewerAndFormat *)</font></strong>;
<a name="line125">125: </a><strong><font color="#4169E1">PETSC_EXTERN <a href="../manualpages/Sys/PetscErrorCode.html">PetscErrorCode</a> <a href="../manualpages/SNES/SNESMonitorScaling.html">SNESMonitorScaling</a>(<a href="../manualpages/SNES/SNES.html">SNES</a>, <a href="../manualpages/Sys/PetscInt.html">PetscInt</a>, <a href="../manualpages/Sys/PetscReal.html">PetscReal</a>, PetscViewerAndFormat *)</font></strong>;
<a name="line126">126: </a><strong><font color="#4169E1">PETSC_EXTERN <a href="../manualpages/Sys/PetscErrorCode.html">PetscErrorCode</a> <a href="../manualpages/SNES/SNESMonitorRange.html">SNESMonitorRange</a>(<a href="../manualpages/SNES/SNES.html">SNES</a>, <a href="../manualpages/Sys/PetscInt.html">PetscInt</a>, <a href="../manualpages/Sys/PetscReal.html">PetscReal</a>, PetscViewerAndFormat *)</font></strong>;
<a name="line127">127: </a><strong><font color="#4169E1">PETSC_EXTERN <a href="../manualpages/Sys/PetscErrorCode.html">PetscErrorCode</a> <a href="../manualpages/SNES/SNESMonitorRatio.html">SNESMonitorRatio</a>(<a href="../manualpages/SNES/SNES.html">SNES</a>, <a href="../manualpages/Sys/PetscInt.html">PetscInt</a>, <a href="../manualpages/Sys/PetscReal.html">PetscReal</a>, PetscViewerAndFormat *)</font></strong>;
<a name="line128">128: </a><strong><font color="#4169E1">PETSC_EXTERN <a href="../manualpages/Sys/PetscErrorCode.html">PetscErrorCode</a> <a href="../manualpages/SNES/SNESMonitorRatioSetUp.html">SNESMonitorRatioSetUp</a>(<a href="../manualpages/SNES/SNES.html">SNES</a>, PetscViewerAndFormat *)</font></strong>;
<a name="line129">129: </a><strong><font color="#4169E1">PETSC_EXTERN <a href="../manualpages/Sys/PetscErrorCode.html">PetscErrorCode</a> <a href="../manualpages/SNES/SNESMonitorSolution.html">SNESMonitorSolution</a>(<a href="../manualpages/SNES/SNES.html">SNES</a>, <a href="../manualpages/Sys/PetscInt.html">PetscInt</a>, <a href="../manualpages/Sys/PetscReal.html">PetscReal</a>, PetscViewerAndFormat *)</font></strong>;
<a name="line130">130: </a><strong><font color="#4169E1">PETSC_EXTERN <a href="../manualpages/Sys/PetscErrorCode.html">PetscErrorCode</a> <a href="../manualpages/SNES/SNESMonitorResidual.html">SNESMonitorResidual</a>(<a href="../manualpages/SNES/SNES.html">SNES</a>, <a href="../manualpages/Sys/PetscInt.html">PetscInt</a>, <a href="../manualpages/Sys/PetscReal.html">PetscReal</a>, PetscViewerAndFormat *)</font></strong>;
<a name="line131">131: </a><strong><font color="#4169E1">PETSC_EXTERN <a href="../manualpages/Sys/PetscErrorCode.html">PetscErrorCode</a> <a href="../manualpages/SNES/SNESMonitorSolutionUpdate.html">SNESMonitorSolutionUpdate</a>(<a href="../manualpages/SNES/SNES.html">SNES</a>, <a href="../manualpages/Sys/PetscInt.html">PetscInt</a>, <a href="../manualpages/Sys/PetscReal.html">PetscReal</a>, PetscViewerAndFormat *)</font></strong>;
<a name="line132">132: </a><strong><font color="#4169E1">PETSC_EXTERN <a href="../manualpages/Sys/PetscErrorCode.html">PetscErrorCode</a> SNESMonitorDefaultShort(<a href="../manualpages/SNES/SNES.html">SNES</a>, <a href="../manualpages/Sys/PetscInt.html">PetscInt</a>, <a href="../manualpages/Sys/PetscReal.html">PetscReal</a>, PetscViewerAndFormat *)</font></strong>;
<a name="line133">133: </a><strong><font color="#4169E1">PETSC_EXTERN <a href="../manualpages/Sys/PetscErrorCode.html">PetscErrorCode</a> <a href="../manualpages/SNES/SNESMonitorDefaultField.html">SNESMonitorDefaultField</a>(<a href="../manualpages/SNES/SNES.html">SNES</a>, <a href="../manualpages/Sys/PetscInt.html">PetscInt</a>, <a href="../manualpages/Sys/PetscReal.html">PetscReal</a>, PetscViewerAndFormat *)</font></strong>;
<a name="line134">134: </a><strong><font color="#4169E1">PETSC_EXTERN <a href="../manualpages/Sys/PetscErrorCode.html">PetscErrorCode</a> <a href="../manualpages/SNES/SNESMonitorJacUpdateSpectrum.html">SNESMonitorJacUpdateSpectrum</a>(<a href="../manualpages/SNES/SNES.html">SNES</a>, <a href="../manualpages/Sys/PetscInt.html">PetscInt</a>, <a href="../manualpages/Sys/PetscReal.html">PetscReal</a>, PetscViewerAndFormat *)</font></strong>;
<a name="line135">135: </a><strong><font color="#4169E1">PETSC_EXTERN <a href="../manualpages/Sys/PetscErrorCode.html">PetscErrorCode</a> <a href="../manualpages/SNES/SNESMonitorFields.html">SNESMonitorFields</a>(<a href="../manualpages/SNES/SNES.html">SNES</a>, <a href="../manualpages/Sys/PetscInt.html">PetscInt</a>, <a href="../manualpages/Sys/PetscReal.html">PetscReal</a>, PetscViewerAndFormat *)</font></strong>;
<a name="line136">136: </a><strong><font color="#4169E1">PETSC_EXTERN <a href="../manualpages/Sys/PetscErrorCode.html">PetscErrorCode</a> <a href="../manualpages/SNES/KSPMonitorSNESResidual.html">KSPMonitorSNESResidual</a>(<a href="../manualpages/KSP/KSP.html">KSP</a>, <a href="../manualpages/Sys/PetscInt.html">PetscInt</a>, <a href="../manualpages/Sys/PetscReal.html">PetscReal</a>, PetscViewerAndFormat *)</font></strong>;
<a name="line137">137: </a><strong><font color="#4169E1">PETSC_EXTERN <a href="../manualpages/Sys/PetscErrorCode.html">PetscErrorCode</a> <a href="../manualpages/SNES/KSPMonitorSNESResidualDrawLG.html">KSPMonitorSNESResidualDrawLG</a>(<a href="../manualpages/KSP/KSP.html">KSP</a>, <a href="../manualpages/Sys/PetscInt.html">PetscInt</a>, <a href="../manualpages/Sys/PetscReal.html">PetscReal</a>, PetscViewerAndFormat *)</font></strong>;
<a name="line138">138: </a><strong><font color="#4169E1">PETSC_EXTERN <a href="../manualpages/Sys/PetscErrorCode.html">PetscErrorCode</a> <a href="../manualpages/SNES/KSPMonitorSNESResidualDrawLGCreate.html">KSPMonitorSNESResidualDrawLGCreate</a>(<a href="../manualpages/Viewer/PetscViewer.html">PetscViewer</a>, <a href="../manualpages/Viewer/PetscViewerFormat.html">PetscViewerFormat</a>, void *, PetscViewerAndFormat **)</font></strong>;

<a name="line140">140: </a><strong><font color="#4169E1">PETSC_EXTERN <a href="../manualpages/Sys/PetscErrorCode.html">PetscErrorCode</a> <a href="../manualpages/SNES/SNESSetTolerances.html">SNESSetTolerances</a>(<a href="../manualpages/SNES/SNES.html">SNES</a>, <a href="../manualpages/Sys/PetscReal.html">PetscReal</a>, <a href="../manualpages/Sys/PetscReal.html">PetscReal</a>, <a href="../manualpages/Sys/PetscReal.html">PetscReal</a>, <a href="../manualpages/Sys/PetscInt.html">PetscInt</a>, <a href="../manualpages/Sys/PetscInt.html">PetscInt</a>)</font></strong>;
<a name="line141">141: </a><strong><font color="#4169E1">PETSC_EXTERN <a href="../manualpages/Sys/PetscErrorCode.html">PetscErrorCode</a> <a href="../manualpages/SNES/SNESSetDivergenceTolerance.html">SNESSetDivergenceTolerance</a>(<a href="../manualpages/SNES/SNES.html">SNES</a>, <a href="../manualpages/Sys/PetscReal.html">PetscReal</a>)</font></strong>;
<a name="line142">142: </a><strong><font color="#4169E1">PETSC_EXTERN <a href="../manualpages/Sys/PetscErrorCode.html">PetscErrorCode</a> <a href="../manualpages/SNES/SNESGetTolerances.html">SNESGetTolerances</a>(<a href="../manualpages/SNES/SNES.html">SNES</a>, <a href="../manualpages/Sys/PetscReal.html">PetscReal</a> *, <a href="../manualpages/Sys/PetscReal.html">PetscReal</a> *, <a href="../manualpages/Sys/PetscReal.html">PetscReal</a> *, <a href="../manualpages/Sys/PetscInt.html">PetscInt</a> *, <a href="../manualpages/Sys/PetscInt.html">PetscInt</a> *)</font></strong>;
<a name="line143">143: </a><strong><font color="#4169E1">PETSC_EXTERN <a href="../manualpages/Sys/PetscErrorCode.html">PetscErrorCode</a> <a href="../manualpages/SNES/SNESGetDivergenceTolerance.html">SNESGetDivergenceTolerance</a>(<a href="../manualpages/SNES/SNES.html">SNES</a>, <a href="../manualpages/Sys/PetscReal.html">PetscReal</a> *)</font></strong>;
<a name="line144">144: </a><strong><font color="#4169E1">PETSC_EXTERN <a href="../manualpages/Sys/PetscErrorCode.html">PetscErrorCode</a> <a href="../manualpages/SNES/SNESGetForceIteration.html">SNESGetForceIteration</a>(<a href="../manualpages/SNES/SNES.html">SNES</a>, <a href="../manualpages/Sys/PetscBool.html">PetscBool</a> *)</font></strong>;
<a name="line145">145: </a><strong><font color="#4169E1">PETSC_EXTERN <a href="../manualpages/Sys/PetscErrorCode.html">PetscErrorCode</a> <a href="../manualpages/SNES/SNESSetForceIteration.html">SNESSetForceIteration</a>(<a href="../manualpages/SNES/SNES.html">SNES</a>, <a href="../manualpages/Sys/PetscBool.html">PetscBool</a>)</font></strong>;
<a name="line146">146: </a><strong><font color="#4169E1">PETSC_EXTERN <a href="../manualpages/Sys/PetscErrorCode.html">PetscErrorCode</a> <a href="../manualpages/SNES/SNESGetIterationNumber.html">SNESGetIterationNumber</a>(<a href="../manualpages/SNES/SNES.html">SNES</a>, <a href="../manualpages/Sys/PetscInt.html">PetscInt</a> *)</font></strong>;
<a name="line147">147: </a><strong><font color="#4169E1">PETSC_EXTERN <a href="../manualpages/Sys/PetscErrorCode.html">PetscErrorCode</a> <a href="../manualpages/SNES/SNESSetIterationNumber.html">SNESSetIterationNumber</a>(<a href="../manualpages/SNES/SNES.html">SNES</a>, <a href="../manualpages/Sys/PetscInt.html">PetscInt</a>)</font></strong>;

<a name="line149">149: </a><font color="#B22222">/*E</font>
<a name="line150">150: </a><font color="#B22222">   <a href="../manualpages/SNES/SNESNewtonTRFallbackType.html">SNESNewtonTRFallbackType</a> - type of fallback in case the solution of the trust-region subproblem is outside of the radius</font>

<a name="line152">152: </a><font color="#B22222">   Values:</font>
<a name="line153">153: </a><font color="#B22222">+  `<a href="../manualpages/SNES/SNESNewtonTRFallbackType.html">SNES_TR_FALLBACK_NEWTON</a>` - use scaled Newton step</font>
<a name="line154">154: </a><font color="#B22222">.  `<a href="../manualpages/SNES/SNESNewtonTRFallbackType.html">SNES_TR_FALLBACK_CAUCHY</a>` - use Cauchy direction</font>
<a name="line155">155: </a><font color="#B22222">-  `<a href="../manualpages/SNES/SNESNewtonTRFallbackType.html">SNES_TR_FALLBACK_DOGLEG</a>` - use dogleg method</font>

<a name="line157">157: </a><font color="#B22222">   Level: intermediate</font>

<a name="line159">159: </a><font color="#B22222">.seealso: [](ch_snes), `<a href="../manualpages/SNES/SNES.html">SNES</a>`, `<a href="../manualpages/SNES/SNESNEWTONTR.html">SNESNEWTONTR</a>`, `<a href="../manualpages/SNES/SNESNEWTONTRDC.html">SNESNEWTONTRDC</a>`</font>
<a name="line160">160: </a><font color="#B22222">E*/</font>
<a name="line161">161: </a><font color="#4169E1">typedef</font> <font color="#4169E1">enum</font> {
<a name="line162">162: </a>  <a href="../manualpages/SNES/SNESNewtonTRFallbackType.html">SNES_TR_FALLBACK_NEWTON</a>,
<a name="line163">163: </a>  <a href="../manualpages/SNES/SNESNewtonTRFallbackType.html">SNES_TR_FALLBACK_CAUCHY</a>,
<a name="line164">164: </a>  <a href="../manualpages/SNES/SNESNewtonTRFallbackType.html">SNES_TR_FALLBACK_DOGLEG</a>,
<a name="line165">165: </a>} <a href="../manualpages/SNES/SNESNewtonTRFallbackType.html">SNESNewtonTRFallbackType</a>;

<a name="line167">167: </a>PETSC_EXTERN const char *const SNESNewtonTRFallbackTypes[];

<a name="line169">169: </a><strong><font color="#4169E1">PETSC_EXTERN <a href="../manualpages/Sys/PetscErrorCode.html">PetscErrorCode</a> <a href="../manualpages/SNES/SNESNewtonTRSetPreCheck.html">SNESNewtonTRSetPreCheck</a>(<a href="../manualpages/SNES/SNES.html">SNES</a>, <a href="../manualpages/Sys/PetscErrorCode.html">PetscErrorCode</a> (*)(<a href="../manualpages/SNES/SNES.html">SNES</a>, <a href="../manualpages/Vec/Vec.html">Vec</a>, <a href="../manualpages/Vec/Vec.html">Vec</a>, <a href="../manualpages/Sys/PetscBool.html">PetscBool</a> *, void *), void *ctx)</font></strong>;
<a name="line170">170: </a><strong><font color="#4169E1">PETSC_EXTERN <a href="../manualpages/Sys/PetscErrorCode.html">PetscErrorCode</a> <a href="../manualpages/SNES/SNESNewtonTRGetPreCheck.html">SNESNewtonTRGetPreCheck</a>(<a href="../manualpages/SNES/SNES.html">SNES</a>, <a href="../manualpages/Sys/PetscErrorCode.html">PetscErrorCode</a> (**)(<a href="../manualpages/SNES/SNES.html">SNES</a>, <a href="../manualpages/Vec/Vec.html">Vec</a>, <a href="../manualpages/Vec/Vec.html">Vec</a>, <a href="../manualpages/Sys/PetscBool.html">PetscBool</a> *, void *), void **ctx)</font></strong>;
<a name="line171">171: </a><strong><font color="#4169E1">PETSC_EXTERN <a href="../manualpages/Sys/PetscErrorCode.html">PetscErrorCode</a> <a href="../manualpages/SNES/SNESNewtonTRSetPostCheck.html">SNESNewtonTRSetPostCheck</a>(<a href="../manualpages/SNES/SNES.html">SNES</a>, <a href="../manualpages/Sys/PetscErrorCode.html">PetscErrorCode</a> (*)(<a href="../manualpages/SNES/SNES.html">SNES</a>, <a href="../manualpages/Vec/Vec.html">Vec</a>, <a href="../manualpages/Vec/Vec.html">Vec</a>, <a href="../manualpages/Vec/Vec.html">Vec</a>, <a href="../manualpages/Sys/PetscBool.html">PetscBool</a> *, <a href="../manualpages/Sys/PetscBool.html">PetscBool</a> *, void *), void *ctx)</font></strong>;
<a name="line172">172: </a><strong><font color="#4169E1">PETSC_EXTERN <a href="../manualpages/Sys/PetscErrorCode.html">PetscErrorCode</a> <a href="../manualpages/SNES/SNESNewtonTRGetPostCheck.html">SNESNewtonTRGetPostCheck</a>(<a href="../manualpages/SNES/SNES.html">SNES</a>, <a href="../manualpages/Sys/PetscErrorCode.html">PetscErrorCode</a> (**)(<a href="../manualpages/SNES/SNES.html">SNES</a>, <a href="../manualpages/Vec/Vec.html">Vec</a>, <a href="../manualpages/Vec/Vec.html">Vec</a>, <a href="../manualpages/Vec/Vec.html">Vec</a>, <a href="../manualpages/Sys/PetscBool.html">PetscBool</a> *, <a href="../manualpages/Sys/PetscBool.html">PetscBool</a> *, void *), void **ctx)</font></strong>;
<a name="line173">173: </a><strong><font color="#4169E1">PETSC_EXTERN <a href="../manualpages/Sys/PetscErrorCode.html">PetscErrorCode</a> <a href="../manualpages/SNES/SNESNewtonTRSetFallbackType.html">SNESNewtonTRSetFallbackType</a>(<a href="../manualpages/SNES/SNES.html">SNES</a>, <a href="../manualpages/SNES/SNESNewtonTRFallbackType.html">SNESNewtonTRFallbackType</a>)</font></strong>;
<a name="line174">174: </a><strong><font color="#4169E1">PETSC_EXTERN <a href="../manualpages/Sys/PetscErrorCode.html">PetscErrorCode</a> <a href="../manualpages/SNES/SNESNewtonTRPreCheck.html">SNESNewtonTRPreCheck</a>(<a href="../manualpages/SNES/SNES.html">SNES</a>, <a href="../manualpages/Vec/Vec.html">Vec</a>, <a href="../manualpages/Vec/Vec.html">Vec</a>, <a href="../manualpages/Sys/PetscBool.html">PetscBool</a> *)</font></strong>;
<a name="line175">175: </a><strong><font color="#4169E1">PETSC_EXTERN <a href="../manualpages/Sys/PetscErrorCode.html">PetscErrorCode</a> <a href="../manualpages/SNES/SNESNewtonTRPostCheck.html">SNESNewtonTRPostCheck</a>(<a href="../manualpages/SNES/SNES.html">SNES</a>, <a href="../manualpages/Vec/Vec.html">Vec</a>, <a href="../manualpages/Vec/Vec.html">Vec</a>, <a href="../manualpages/Vec/Vec.html">Vec</a>, <a href="../manualpages/Sys/PetscBool.html">PetscBool</a> *, <a href="../manualpages/Sys/PetscBool.html">PetscBool</a> *)</font></strong>;
<a name="line176">176: </a><strong><font color="#4169E1">PETSC_EXTERN <a href="../manualpages/Sys/PetscErrorCode.html">PetscErrorCode</a> <a href="../manualpages/SNES/SNESNewtonTRSetNormType.html">SNESNewtonTRSetNormType</a>(<a href="../manualpages/SNES/SNES.html">SNES</a>, <a href="../manualpages/Vec/NormType.html">NormType</a>)</font></strong>;

<a name="line178">178: </a><font color="#B22222">/*E</font>
<a name="line179">179: </a><font color="#B22222">    <a href="../manualpages/SNES/SNESNewtonTRQNType.html">SNESNewtonTRQNType</a> - type of quasi-Newton model to use</font>

<a name="line181">181: </a><font color="#B22222">   Values:</font>
<a name="line182">182: </a><font color="#B22222">+  `<a href="../manualpages/SNES/SNESNewtonTRQNType.html">SNES_TR_QN_NONE</a>` - do not use a quasi-Newton model</font>
<a name="line183">183: </a><font color="#B22222">.  `<a href="../manualpages/SNES/SNESNewtonTRQNType.html">SNES_TR_QN_SAME</a>` - use the same quasi-Newton model for matrix and preconditioner</font>
<a name="line184">184: </a><font color="#B22222">-  `<a href="../manualpages/SNES/SNESNewtonTRQNType.html">SNES_TR_QN_DIFFERENT</a>` - use different quasi-Newton models for matrix and preconditioner</font>

<a name="line186">186: </a><font color="#B22222">   Level: intermediate</font>

<a name="line188">188: </a><font color="#B22222">.seealso: [](ch_snes), `<a href="../manualpages/SNES/SNES.html">SNES</a>`, `<a href="../manualpages/SNES/SNESNEWTONTR.html">SNESNEWTONTR</a>`</font>
<a name="line189">189: </a><font color="#B22222">E*/</font>
<a name="line190">190: </a><font color="#4169E1">typedef</font> <font color="#4169E1">enum</font> {
<a name="line191">191: </a>  <a href="../manualpages/SNES/SNESNewtonTRQNType.html">SNES_TR_QN_NONE</a>,
<a name="line192">192: </a>  <a href="../manualpages/SNES/SNESNewtonTRQNType.html">SNES_TR_QN_SAME</a>,
<a name="line193">193: </a>  <a href="../manualpages/SNES/SNESNewtonTRQNType.html">SNES_TR_QN_DIFFERENT</a>,
<a name="line194">194: </a>} <a href="../manualpages/SNES/SNESNewtonTRQNType.html">SNESNewtonTRQNType</a>;

<a name="line196">196: </a>PETSC_EXTERN const char *const SNESNewtonTRQNTypes[];

<a name="line198">198: </a><strong><font color="#4169E1">PETSC_EXTERN <a href="../manualpages/Sys/PetscErrorCode.html">PetscErrorCode</a> <a href="../manualpages/SNES/SNESNewtonTRSetQNType.html">SNESNewtonTRSetQNType</a>(<a href="../manualpages/SNES/SNES.html">SNES</a>, <a href="../manualpages/SNES/SNESNewtonTRQNType.html">SNESNewtonTRQNType</a>)</font></strong>;

<a name="line200">200: </a>PETSC_EXTERN PETSC_DEPRECATED_FUNCTION(3, 22, 0, <font color="#666666">"<a href="../manualpages/SNES/SNESNewtonTRSetTolerances.html">SNESNewtonTRSetTolerances</a>()"</font>, ) <a href="../manualpages/Sys/PetscErrorCode.html">PetscErrorCode</a> <a href="../manualpages/SNES/SNESSetTrustRegionTolerance.html">SNESSetTrustRegionTolerance</a>(<a href="../manualpages/SNES/SNES.html">SNES</a>, <a href="../manualpages/Sys/PetscReal.html">PetscReal</a>);
<a name="line201">201: </a><strong><font color="#4169E1">PETSC_EXTERN <a href="../manualpages/Sys/PetscErrorCode.html">PetscErrorCode</a> <a href="../manualpages/SNES/SNESNewtonTRSetTolerances.html">SNESNewtonTRSetTolerances</a>(<a href="../manualpages/SNES/SNES.html">SNES</a>, <a href="../manualpages/Sys/PetscReal.html">PetscReal</a>, <a href="../manualpages/Sys/PetscReal.html">PetscReal</a>, <a href="../manualpages/Sys/PetscReal.html">PetscReal</a>)</font></strong>;
<a name="line202">202: </a><strong><font color="#4169E1">PETSC_EXTERN <a href="../manualpages/Sys/PetscErrorCode.html">PetscErrorCode</a> <a href="../manualpages/SNES/SNESNewtonTRGetTolerances.html">SNESNewtonTRGetTolerances</a>(<a href="../manualpages/SNES/SNES.html">SNES</a>, <a href="../manualpages/Sys/PetscReal.html">PetscReal</a> *, <a href="../manualpages/Sys/PetscReal.html">PetscReal</a> *, <a href="../manualpages/Sys/PetscReal.html">PetscReal</a> *)</font></strong>;
<a name="line203">203: </a><strong><font color="#4169E1">PETSC_EXTERN <a href="../manualpages/Sys/PetscErrorCode.html">PetscErrorCode</a> <a href="../manualpages/SNES/SNESNewtonTRSetUpdateParameters.html">SNESNewtonTRSetUpdateParameters</a>(<a href="../manualpages/SNES/SNES.html">SNES</a>, <a href="../manualpages/Sys/PetscReal.html">PetscReal</a>, <a href="../manualpages/Sys/PetscReal.html">PetscReal</a>, <a href="../manualpages/Sys/PetscReal.html">PetscReal</a>, <a href="../manualpages/Sys/PetscReal.html">PetscReal</a>, <a href="../manualpages/Sys/PetscReal.html">PetscReal</a>)</font></strong>;
<a name="line204">204: </a><strong><font color="#4169E1">PETSC_EXTERN <a href="../manualpages/Sys/PetscErrorCode.html">PetscErrorCode</a> <a href="../manualpages/SNES/SNESNewtonTRGetUpdateParameters.html">SNESNewtonTRGetUpdateParameters</a>(<a href="../manualpages/SNES/SNES.html">SNES</a>, <a href="../manualpages/Sys/PetscReal.html">PetscReal</a> *, <a href="../manualpages/Sys/PetscReal.html">PetscReal</a> *, <a href="../manualpages/Sys/PetscReal.html">PetscReal</a> *, <a href="../manualpages/Sys/PetscReal.html">PetscReal</a> *, <a href="../manualpages/Sys/PetscReal.html">PetscReal</a> *)</font></strong>;

<a name="line206">206: </a><strong><font color="#4169E1">PETSC_EXTERN <a href="../manualpages/Sys/PetscErrorCode.html">PetscErrorCode</a> <a href="../manualpages/SNES/SNESNewtonTRDCGetRhoFlag.html">SNESNewtonTRDCGetRhoFlag</a>(<a href="../manualpages/SNES/SNES.html">SNES</a>, <a href="../manualpages/Sys/PetscBool.html">PetscBool</a> *)</font></strong>;
<a name="line207">207: </a><strong><font color="#4169E1">PETSC_EXTERN <a href="../manualpages/Sys/PetscErrorCode.html">PetscErrorCode</a> <a href="../manualpages/SNES/SNESNewtonTRDCSetPreCheck.html">SNESNewtonTRDCSetPreCheck</a>(<a href="../manualpages/SNES/SNES.html">SNES</a>, <a href="../manualpages/Sys/PetscErrorCode.html">PetscErrorCode</a> (*)(<a href="../manualpages/SNES/SNES.html">SNES</a>, <a href="../manualpages/Vec/Vec.html">Vec</a>, <a href="../manualpages/Vec/Vec.html">Vec</a>, <a href="../manualpages/Sys/PetscBool.html">PetscBool</a> *, void *), void *ctx)</font></strong>;
<a name="line208">208: </a><strong><font color="#4169E1">PETSC_EXTERN <a href="../manualpages/Sys/PetscErrorCode.html">PetscErrorCode</a> <a href="../manualpages/SNES/SNESNewtonTRDCGetPreCheck.html">SNESNewtonTRDCGetPreCheck</a>(<a href="../manualpages/SNES/SNES.html">SNES</a>, <a href="../manualpages/Sys/PetscErrorCode.html">PetscErrorCode</a> (**)(<a href="../manualpages/SNES/SNES.html">SNES</a>, <a href="../manualpages/Vec/Vec.html">Vec</a>, <a href="../manualpages/Vec/Vec.html">Vec</a>, <a href="../manualpages/Sys/PetscBool.html">PetscBool</a> *, void *), void **ctx)</font></strong>;
<a name="line209">209: </a><strong><font color="#4169E1">PETSC_EXTERN <a href="../manualpages/Sys/PetscErrorCode.html">PetscErrorCode</a> <a href="../manualpages/SNES/SNESNewtonTRDCSetPostCheck.html">SNESNewtonTRDCSetPostCheck</a>(<a href="../manualpages/SNES/SNES.html">SNES</a>, <a href="../manualpages/Sys/PetscErrorCode.html">PetscErrorCode</a> (*)(<a href="../manualpages/SNES/SNES.html">SNES</a>, <a href="../manualpages/Vec/Vec.html">Vec</a>, <a href="../manualpages/Vec/Vec.html">Vec</a>, <a href="../manualpages/Vec/Vec.html">Vec</a>, <a href="../manualpages/Sys/PetscBool.html">PetscBool</a> *, <a href="../manualpages/Sys/PetscBool.html">PetscBool</a> *, void *), void *ctx)</font></strong>;
<a name="line210">210: </a><strong><font color="#4169E1">PETSC_EXTERN <a href="../manualpages/Sys/PetscErrorCode.html">PetscErrorCode</a> <a href="../manualpages/SNES/SNESNewtonTRDCGetPostCheck.html">SNESNewtonTRDCGetPostCheck</a>(<a href="../manualpages/SNES/SNES.html">SNES</a>, <a href="../manualpages/Sys/PetscErrorCode.html">PetscErrorCode</a> (**)(<a href="../manualpages/SNES/SNES.html">SNES</a>, <a href="../manualpages/Vec/Vec.html">Vec</a>, <a href="../manualpages/Vec/Vec.html">Vec</a>, <a href="../manualpages/Vec/Vec.html">Vec</a>, <a href="../manualpages/Sys/PetscBool.html">PetscBool</a> *, <a href="../manualpages/Sys/PetscBool.html">PetscBool</a> *, void *), void **ctx)</font></strong>;

<a name="line212">212: </a><strong><font color="#4169E1">PETSC_EXTERN <a href="../manualpages/Sys/PetscErrorCode.html">PetscErrorCode</a> <a href="../manualpages/SNES/SNESGetNonlinearStepFailures.html">SNESGetNonlinearStepFailures</a>(<a href="../manualpages/SNES/SNES.html">SNES</a>, <a href="../manualpages/Sys/PetscInt.html">PetscInt</a> *)</font></strong>;
<a name="line213">213: </a><strong><font color="#4169E1">PETSC_EXTERN <a href="../manualpages/Sys/PetscErrorCode.html">PetscErrorCode</a> <a href="../manualpages/SNES/SNESSetMaxNonlinearStepFailures.html">SNESSetMaxNonlinearStepFailures</a>(<a href="../manualpages/SNES/SNES.html">SNES</a>, <a href="../manualpages/Sys/PetscInt.html">PetscInt</a>)</font></strong>;
<a name="line214">214: </a><strong><font color="#4169E1">PETSC_EXTERN <a href="../manualpages/Sys/PetscErrorCode.html">PetscErrorCode</a> <a href="../manualpages/SNES/SNESGetMaxNonlinearStepFailures.html">SNESGetMaxNonlinearStepFailures</a>(<a href="../manualpages/SNES/SNES.html">SNES</a>, <a href="../manualpages/Sys/PetscInt.html">PetscInt</a> *)</font></strong>;
<a name="line215">215: </a><strong><font color="#4169E1">PETSC_EXTERN <a href="../manualpages/Sys/PetscErrorCode.html">PetscErrorCode</a> <a href="../manualpages/SNES/SNESGetNumberFunctionEvals.html">SNESGetNumberFunctionEvals</a>(<a href="../manualpages/SNES/SNES.html">SNES</a>, <a href="../manualpages/Sys/PetscInt.html">PetscInt</a> *)</font></strong>;

<a name="line217">217: </a><strong><font color="#4169E1">PETSC_EXTERN <a href="../manualpages/Sys/PetscErrorCode.html">PetscErrorCode</a> <a href="../manualpages/SNES/SNESSetLagPreconditioner.html">SNESSetLagPreconditioner</a>(<a href="../manualpages/SNES/SNES.html">SNES</a>, <a href="../manualpages/Sys/PetscInt.html">PetscInt</a>)</font></strong>;
<a name="line218">218: </a><strong><font color="#4169E1">PETSC_EXTERN <a href="../manualpages/Sys/PetscErrorCode.html">PetscErrorCode</a> <a href="../manualpages/SNES/SNESGetLagPreconditioner.html">SNESGetLagPreconditioner</a>(<a href="../manualpages/SNES/SNES.html">SNES</a>, <a href="../manualpages/Sys/PetscInt.html">PetscInt</a> *)</font></strong>;
<a name="line219">219: </a><strong><font color="#4169E1">PETSC_EXTERN <a href="../manualpages/Sys/PetscErrorCode.html">PetscErrorCode</a> <a href="../manualpages/SNES/SNESSetLagJacobian.html">SNESSetLagJacobian</a>(<a href="../manualpages/SNES/SNES.html">SNES</a>, <a href="../manualpages/Sys/PetscInt.html">PetscInt</a>)</font></strong>;
<a name="line220">220: </a><strong><font color="#4169E1">PETSC_EXTERN <a href="../manualpages/Sys/PetscErrorCode.html">PetscErrorCode</a> <a href="../manualpages/SNES/SNESGetLagJacobian.html">SNESGetLagJacobian</a>(<a href="../manualpages/SNES/SNES.html">SNES</a>, <a href="../manualpages/Sys/PetscInt.html">PetscInt</a> *)</font></strong>;
<a name="line221">221: </a><strong><font color="#4169E1">PETSC_EXTERN <a href="../manualpages/Sys/PetscErrorCode.html">PetscErrorCode</a> <a href="../manualpages/SNES/SNESSetLagPreconditionerPersists.html">SNESSetLagPreconditionerPersists</a>(<a href="../manualpages/SNES/SNES.html">SNES</a>, <a href="../manualpages/Sys/PetscBool.html">PetscBool</a>)</font></strong>;
<a name="line222">222: </a><strong><font color="#4169E1">PETSC_EXTERN <a href="../manualpages/Sys/PetscErrorCode.html">PetscErrorCode</a> <a href="../manualpages/SNES/SNESSetLagJacobianPersists.html">SNESSetLagJacobianPersists</a>(<a href="../manualpages/SNES/SNES.html">SNES</a>, <a href="../manualpages/Sys/PetscBool.html">PetscBool</a>)</font></strong>;
<a name="line223">223: </a><strong><font color="#4169E1">PETSC_EXTERN <a href="../manualpages/Sys/PetscErrorCode.html">PetscErrorCode</a> <a href="../manualpages/SNES/SNESSetGridSequence.html">SNESSetGridSequence</a>(<a href="../manualpages/SNES/SNES.html">SNES</a>, <a href="../manualpages/Sys/PetscInt.html">PetscInt</a>)</font></strong>;
<a name="line224">224: </a><strong><font color="#4169E1">PETSC_EXTERN <a href="../manualpages/Sys/PetscErrorCode.html">PetscErrorCode</a> <a href="../manualpages/SNES/SNESGetGridSequence.html">SNESGetGridSequence</a>(<a href="../manualpages/SNES/SNES.html">SNES</a>, <a href="../manualpages/Sys/PetscInt.html">PetscInt</a> *)</font></strong>;

<a name="line226">226: </a><strong><font color="#4169E1">PETSC_EXTERN <a href="../manualpages/Sys/PetscErrorCode.html">PetscErrorCode</a> <a href="../manualpages/SNES/SNESGetLinearSolveIterations.html">SNESGetLinearSolveIterations</a>(<a href="../manualpages/SNES/SNES.html">SNES</a>, <a href="../manualpages/Sys/PetscInt.html">PetscInt</a> *)</font></strong>;
<a name="line227">227: </a><strong><font color="#4169E1">PETSC_EXTERN <a href="../manualpages/Sys/PetscErrorCode.html">PetscErrorCode</a> <a href="../manualpages/SNES/SNESGetLinearSolveFailures.html">SNESGetLinearSolveFailures</a>(<a href="../manualpages/SNES/SNES.html">SNES</a>, <a href="../manualpages/Sys/PetscInt.html">PetscInt</a> *)</font></strong>;
<a name="line228">228: </a><strong><font color="#4169E1">PETSC_EXTERN <a href="../manualpages/Sys/PetscErrorCode.html">PetscErrorCode</a> <a href="../manualpages/SNES/SNESSetMaxLinearSolveFailures.html">SNESSetMaxLinearSolveFailures</a>(<a href="../manualpages/SNES/SNES.html">SNES</a>, <a href="../manualpages/Sys/PetscInt.html">PetscInt</a>)</font></strong>;
<a name="line229">229: </a><strong><font color="#4169E1">PETSC_EXTERN <a href="../manualpages/Sys/PetscErrorCode.html">PetscErrorCode</a> <a href="../manualpages/SNES/SNESGetMaxLinearSolveFailures.html">SNESGetMaxLinearSolveFailures</a>(<a href="../manualpages/SNES/SNES.html">SNES</a>, <a href="../manualpages/Sys/PetscInt.html">PetscInt</a> *)</font></strong>;
<a name="line230">230: </a><strong><font color="#4169E1">PETSC_EXTERN <a href="../manualpages/Sys/PetscErrorCode.html">PetscErrorCode</a> <a href="../manualpages/SNES/SNESSetCountersReset.html">SNESSetCountersReset</a>(<a href="../manualpages/SNES/SNES.html">SNES</a>, <a href="../manualpages/Sys/PetscBool.html">PetscBool</a>)</font></strong>;
<a name="line231">231: </a><strong><font color="#4169E1">PETSC_EXTERN <a href="../manualpages/Sys/PetscErrorCode.html">PetscErrorCode</a> <a href="../manualpages/SNES/SNESResetCounters.html">SNESResetCounters</a>(<a href="../manualpages/SNES/SNES.html">SNES</a>)</font></strong>;

<a name="line233">233: </a><strong><font color="#4169E1">PETSC_EXTERN <a href="../manualpages/Sys/PetscErrorCode.html">PetscErrorCode</a> <a href="../manualpages/SNES/SNESKSPSetUseEW.html">SNESKSPSetUseEW</a>(<a href="../manualpages/SNES/SNES.html">SNES</a>, <a href="../manualpages/Sys/PetscBool.html">PetscBool</a>)</font></strong>;
<a name="line234">234: </a><strong><font color="#4169E1">PETSC_EXTERN <a href="../manualpages/Sys/PetscErrorCode.html">PetscErrorCode</a> <a href="../manualpages/SNES/SNESKSPGetUseEW.html">SNESKSPGetUseEW</a>(<a href="../manualpages/SNES/SNES.html">SNES</a>, <a href="../manualpages/Sys/PetscBool.html">PetscBool</a> *)</font></strong>;
<a name="line235">235: </a><strong><font color="#4169E1">PETSC_EXTERN <a href="../manualpages/Sys/PetscErrorCode.html">PetscErrorCode</a> <a href="../manualpages/SNES/SNESKSPSetParametersEW.html">SNESKSPSetParametersEW</a>(<a href="../manualpages/SNES/SNES.html">SNES</a>, <a href="../manualpages/Sys/PetscInt.html">PetscInt</a>, <a href="../manualpages/Sys/PetscReal.html">PetscReal</a>, <a href="../manualpages/Sys/PetscReal.html">PetscReal</a>, <a href="../manualpages/Sys/PetscReal.html">PetscReal</a>, <a href="../manualpages/Sys/PetscReal.html">PetscReal</a>, <a href="../manualpages/Sys/PetscReal.html">PetscReal</a>, <a href="../manualpages/Sys/PetscReal.html">PetscReal</a>)</font></strong>;
<a name="line236">236: </a><strong><font color="#4169E1">PETSC_EXTERN <a href="../manualpages/Sys/PetscErrorCode.html">PetscErrorCode</a> <a href="../manualpages/SNES/SNESKSPGetParametersEW.html">SNESKSPGetParametersEW</a>(<a href="../manualpages/SNES/SNES.html">SNES</a>, <a href="../manualpages/Sys/PetscInt.html">PetscInt</a> *, <a href="../manualpages/Sys/PetscReal.html">PetscReal</a> *, <a href="../manualpages/Sys/PetscReal.html">PetscReal</a> *, <a href="../manualpages/Sys/PetscReal.html">PetscReal</a> *, <a href="../manualpages/Sys/PetscReal.html">PetscReal</a> *, <a href="../manualpages/Sys/PetscReal.html">PetscReal</a> *, <a href="../manualpages/Sys/PetscReal.html">PetscReal</a> *)</font></strong>;

<a name="line238">238: </a><strong><font color="#4169E1">PETSC_EXTERN <a href="../manualpages/Sys/PetscErrorCode.html">PetscErrorCode</a> SNESMonitorLGRange(<a href="../manualpages/SNES/SNES.html">SNES</a>, <a href="../manualpages/Sys/PetscInt.html">PetscInt</a>, <a href="../manualpages/Sys/PetscReal.html">PetscReal</a>, void *)</font></strong>;

<a name="line240">240: </a><strong><font color="#4169E1">PETSC_EXTERN <a href="../manualpages/Sys/PetscErrorCode.html">PetscErrorCode</a> <a href="../manualpages/SNES/SNESSetApplicationContext.html">SNESSetApplicationContext</a>(<a href="../manualpages/SNES/SNES.html">SNES</a>, void *)</font></strong>;
<a name="line241">241: </a><strong><font color="#4169E1">PETSC_EXTERN <a href="../manualpages/Sys/PetscErrorCode.html">PetscErrorCode</a> <a href="../manualpages/SNES/SNESGetApplicationContext.html">SNESGetApplicationContext</a>(<a href="../manualpages/SNES/SNES.html">SNES</a>, void *)</font></strong>;
<a name="line242">242: </a><strong><font color="#4169E1">PETSC_EXTERN <a href="../manualpages/Sys/PetscErrorCode.html">PetscErrorCode</a> <a href="../manualpages/SNES/SNESSetComputeApplicationContext.html">SNESSetComputeApplicationContext</a>(<a href="../manualpages/SNES/SNES.html">SNES</a>, <a href="../manualpages/Sys/PetscErrorCode.html">PetscErrorCode</a> (*)(<a href="../manualpages/SNES/SNES.html">SNES</a>, void **), <a href="../manualpages/Sys/PetscCtxDestroyFn.html">PetscCtxDestroyFn</a> *)</font></strong>;

<a name="line244">244: </a><strong><font color="#4169E1">PETSC_EXTERN <a href="../manualpages/Sys/PetscErrorCode.html">PetscErrorCode</a> <a href="../manualpages/SNES/SNESPythonSetType.html">SNESPythonSetType</a>(<a href="../manualpages/SNES/SNES.html">SNES</a>, const char[])</font></strong>;
<a name="line245">245: </a><strong><font color="#4169E1">PETSC_EXTERN <a href="../manualpages/Sys/PetscErrorCode.html">PetscErrorCode</a> <a href="../manualpages/SNES/SNESPythonGetType.html">SNESPythonGetType</a>(<a href="../manualpages/SNES/SNES.html">SNES</a>, const char *[])</font></strong>;

<a name="line247">247: </a><strong><font color="#4169E1">PETSC_EXTERN <a href="../manualpages/Sys/PetscErrorCode.html">PetscErrorCode</a> <a href="../manualpages/SNES/SNESSetFunctionDomainError.html">SNESSetFunctionDomainError</a>(<a href="../manualpages/SNES/SNES.html">SNES</a>)</font></strong>;
<a name="line248">248: </a><strong><font color="#4169E1">PETSC_EXTERN <a href="../manualpages/Sys/PetscErrorCode.html">PetscErrorCode</a> <a href="../manualpages/SNES/SNESGetFunctionDomainError.html">SNESGetFunctionDomainError</a>(<a href="../manualpages/SNES/SNES.html">SNES</a>, <a href="../manualpages/Sys/PetscBool.html">PetscBool</a> *)</font></strong>;
<a name="line249">249: </a><strong><font color="#4169E1">PETSC_EXTERN <a href="../manualpages/Sys/PetscErrorCode.html">PetscErrorCode</a> <a href="../manualpages/SNES/SNESGetJacobianDomainError.html">SNESGetJacobianDomainError</a>(<a href="../manualpages/SNES/SNES.html">SNES</a>, <a href="../manualpages/Sys/PetscBool.html">PetscBool</a> *)</font></strong>;
<a name="line250">250: </a><strong><font color="#4169E1">PETSC_EXTERN <a href="../manualpages/Sys/PetscErrorCode.html">PetscErrorCode</a> <a href="../manualpages/SNES/SNESSetJacobianDomainError.html">SNESSetJacobianDomainError</a>(<a href="../manualpages/SNES/SNES.html">SNES</a>)</font></strong>;
<a name="line251">251: </a><strong><font color="#4169E1">PETSC_EXTERN <a href="../manualpages/Sys/PetscErrorCode.html">PetscErrorCode</a> <a href="../manualpages/SNES/SNESSetCheckJacobianDomainError.html">SNESSetCheckJacobianDomainError</a>(<a href="../manualpages/SNES/SNES.html">SNES</a>, <a href="../manualpages/Sys/PetscBool.html">PetscBool</a>)</font></strong>;
<a name="line252">252: </a><strong><font color="#4169E1">PETSC_EXTERN <a href="../manualpages/Sys/PetscErrorCode.html">PetscErrorCode</a> <a href="../manualpages/SNES/SNESGetCheckJacobianDomainError.html">SNESGetCheckJacobianDomainError</a>(<a href="../manualpages/SNES/SNES.html">SNES</a>, <a href="../manualpages/Sys/PetscBool.html">PetscBool</a> *)</font></strong>;

<a name="line254">254: </a><strong><font color="#228B22">#define <a href="../manualpages/SNES/SNESConvergedReason.html">SNES_CONVERGED_TR_DELTA_DEPRECATED</a> SNES_CONVERGED_TR_DELTA PETSC_DEPRECATED_ENUM(3, 12, 0, </font><font color="#666666">"<a href="../manualpages/SNES/SNESConvergedReason.html">SNES_DIVERGED_TR_DELTA</a>"</font><font color="#228B22">, )</font></strong>
<a name="line255">255: </a><font color="#B22222">/*E</font>
<a name="line256">256: </a><font color="#B22222">    <a href="../manualpages/SNES/SNESConvergedReason.html">SNESConvergedReason</a> - reason a `<a href="../manualpages/SNES/SNESSolve.html">SNESSolve</a>()` was determined to have converged or diverged</font>

<a name="line258">258: </a><font color="#B22222">   Values:</font>
<a name="line259">259: </a><font color="#B22222">+  `<a href="../manualpages/SNES/SNES_CONVERGED_FNORM_ABS.html">SNES_CONVERGED_FNORM_ABS</a>`      - 2-norm(F) &lt;= abstol</font>
<a name="line260">260: </a><font color="#B22222">.  `<a href="../manualpages/SNES/SNES_CONVERGED_FNORM_RELATIVE.html">SNES_CONVERGED_FNORM_RELATIVE</a>` - 2-norm(F) &lt;= rtol*2-norm(F(x_0)) where x_0 is the initial guess</font>
<a name="line261">261: </a><font color="#B22222">.  `<a href="../manualpages/SNES/SNES_CONVERGED_SNORM_RELATIVE.html">SNES_CONVERGED_SNORM_RELATIVE</a>` - The 2-norm of the last step &lt;= stol * 2-norm(x) where x is the current</font>
<a name="line262">262: </a><font color="#B22222">.  `<a href="../manualpages/SNES/SNESConvergedReason.html">SNES_CONVERGED_USER</a>`           - The user has indicated convergence for an arbitrary reason</font>
<a name="line263">263: </a><font color="#B22222">.  `<a href="../manualpages/SNES/SNES_DIVERGED_FUNCTION_COUNT.html">SNES_DIVERGED_FUNCTION_COUNT</a>`  - The user provided function has been called more times than the maximum set in `<a href="../manualpages/SNES/SNESSetTolerances.html">SNESSetTolerances</a>()`</font>
<a name="line264">264: </a><font color="#B22222">.  `<a href="../manualpages/SNES/SNES_DIVERGED_DTOL.html">SNES_DIVERGED_DTOL</a>`            - The norm of the function has increased by a factor of divtol set with `<a href="../manualpages/SNES/SNESSetDivergenceTolerance.html">SNESSetDivergenceTolerance</a>()`</font>
<a name="line265">265: </a><font color="#B22222">.  `<a href="../manualpages/SNES/SNES_DIVERGED_FNORM_NAN.html">SNES_DIVERGED_FNORM_NAN</a>`       - the 2-norm of the current function evaluation is not-a-number (NaN), this</font>
<a name="line266">266: </a><font color="#B22222">                                     is usually caused by a division of 0 by 0.</font>
<a name="line267">267: </a><font color="#B22222">.  `<a href="../manualpages/SNES/SNES_DIVERGED_MAX_IT.html">SNES_DIVERGED_MAX_IT</a>`          - `<a href="../manualpages/SNES/SNESSolve.html">SNESSolve</a>()` has reached the maximum number of iterations requested</font>
<a name="line268">268: </a><font color="#B22222">.  `<a href="../manualpages/SNES/SNES_DIVERGED_LINE_SEARCH.html">SNES_DIVERGED_LINE_SEARCH</a>`     - The line search has failed. This only occurs for `<a href="../manualpages/SNES/SNES.html">SNES</a>` solvers that use a line search</font>
<a name="line269">269: </a><font color="#B22222">.  `<a href="../manualpages/SNES/SNES_DIVERGED_LOCAL_MIN.html">SNES_DIVERGED_LOCAL_MIN</a>`       - the algorithm seems to have stagnated at a local minimum that is not zero.</font>
<a name="line270">270: </a><font color="#B22222">.  `<a href="../manualpages/SNES/SNESConvergedReason.html">SNES_DIVERGED_USER</a>`            - The user has indicated divergence for an arbitrary reason</font>
<a name="line271">271: </a><font color="#B22222">-  `<a href="../manualpages/SNES/SNESConvergedReason.html">SNES_CONVERGED_ITERATING</a>       - this only occurs if `<a href="../manualpages/SNES/SNESGetConvergedReason.html">SNESGetConvergedReason</a>()` is called during the `<a href="../manualpages/SNES/SNESSolve.html">SNESSolve</a>()`</font>

<a name="line273">273: </a><font color="#B22222">   Level: beginner</font>

<a name="line275">275: </a><font color="#B22222">    Notes:</font>
<a name="line276">276: </a><font color="#B22222">   The two most common reasons for divergence are an incorrectly coded or computed Jacobian or failure or lack of convergence in the linear system</font>
<a name="line277">277: </a><font color="#B22222">   (in this case we recommend</font>
<a name="line278">278: </a><font color="#B22222">   testing with `-pc_type lu` to eliminate the linear solver as the cause of the problem).</font>

<a name="line280">280: </a><font color="#B22222">   `<a href="../manualpages/SNES/SNES_DIVERGED_LOCAL_MIN.html">SNES_DIVERGED_LOCAL_MIN</a>` can only occur when using a `<a href="../manualpages/SNES/SNES.html">SNES</a>` solver that uses a line search (`<a href="../manualpages/SNES/SNESLineSearch.html">SNESLineSearch</a>`).</font>
<a name="line281">281: </a><font color="#B22222">   The line search wants to minimize Q(alpha) = 1/2 || F(x + alpha s) ||^2_2  this occurs</font>
<a name="line282">282: </a><font color="#B22222">   at Q'(alpha) = s^T F'(x+alpha s)^T F(x+alpha s) = 0. If s is the Newton direction - F'(x)^(-1)F(x) then</font>
<a name="line283">283: </a><font color="#B22222">   you get Q'(alpha) = -F(x)^T F'(x)^(-1)^T F'(x+alpha s)F(x+alpha s); when alpha = 0</font>
<a name="line284">284: </a><font color="#B22222">   Q'(0) = - ||F(x)||^2_2 which is always NEGATIVE if F'(x) is invertible. This means the Newton</font>
<a name="line285">285: </a><font color="#B22222">   direction is a descent direction and the line search should succeed if alpha is small enough.</font>

<a name="line287">287: </a><font color="#B22222">   If F'(x) is NOT invertible AND F'(x)^T F(x) = 0 then Q'(0) = 0 and the Newton direction</font>
<a name="line288">288: </a><font color="#B22222">   is NOT a descent direction so the line search will fail. All one can do at this point</font>
<a name="line289">289: </a><font color="#B22222">   is change the initial guess and try again.</font>

<a name="line291">291: </a><font color="#B22222">   An alternative explanation: Newton's method can be regarded as replacing the function with</font>
<a name="line292">292: </a><font color="#B22222">   its linear approximation and minimizing the 2-norm of that. That is F(x+s) approx F(x) + F'(x)s</font>
<a name="line293">293: </a><font color="#B22222">   so we minimize || F(x) + F'(x) s ||^2_2; do this using Least Squares. If F'(x) is invertible then</font>
<a name="line294">294: </a><font color="#B22222">   s = - F'(x)^(-1)F(x) otherwise F'(x)^T F'(x) s = -F'(x)^T F(x). If F'(x)^T F(x) is NOT zero then there</font>
<a name="line295">295: </a><font color="#B22222">   exists a nontrivial (that is F'(x)s != 0) solution to the equation and this direction is</font>
<a name="line296">296: </a><font color="#B22222">   s = - [F'(x)^T F'(x)]^(-1) F'(x)^T F(x) so Q'(0) = - F(x)^T F'(x) [F'(x)^T F'(x)]^(-T) F'(x)^T F(x)</font>
<a name="line297">297: </a><font color="#B22222">   = - (F'(x)^T F(x)) [F'(x)^T F'(x)]^(-T) (F'(x)^T F(x)). Since we are assuming (F'(x)^T F(x)) != 0</font>
<a name="line298">298: </a><font color="#B22222">   and F'(x)^T F'(x) has no negative eigenvalues Q'(0) &lt; 0 so s is a descent direction and the line</font>
<a name="line299">299: </a><font color="#B22222">   search should succeed for small enough alpha.</font>

<a name="line301">301: </a><font color="#B22222">   Note that this RARELY happens in practice. Far more likely the linear system is not being solved</font>
<a name="line302">302: </a><font color="#B22222">   (well enough?) or the Jacobian is wrong.</font>

<a name="line304">304: </a><font color="#B22222">   `<a href="../manualpages/SNES/SNES_DIVERGED_MAX_IT.html">SNES_DIVERGED_MAX_IT</a>` means that the solver reached the maximum number of iterations without satisfying any</font>
<a name="line305">305: </a><font color="#B22222">   convergence criteria. `<a href="../manualpages/SNES/SNESConvergedReason.html">SNES_CONVERGED_ITS</a>` means that `<a href="../manualpages/SNES/SNESConvergedSkip.html">SNESConvergedSkip</a>()` was chosen as the convergence test;</font>
<a name="line306">306: </a><font color="#B22222">   thus the usual convergence criteria have not been checked and may or may not be satisfied.</font>

<a name="line308">308: </a><font color="#B22222">.seealso: [](ch_snes), `<a href="../manualpages/SNES/SNES.html">SNES</a>`, `<a href="../manualpages/SNES/SNESSolve.html">SNESSolve</a>()`, `<a href="../manualpages/SNES/SNESGetConvergedReason.html">SNESGetConvergedReason</a>()`, `<a href="../manualpages/KSP/KSPConvergedReason.html">KSPConvergedReason</a>`, `<a href="../manualpages/SNES/SNESSetConvergenceTest.html">SNESSetConvergenceTest</a>()`, `<a href="../manualpages/SNES/SNESSetTolerances.html">SNESSetTolerances</a>()`</font>
<a name="line309">309: </a><font color="#B22222">E*/</font>
<a name="line310">310: </a><font color="#4169E1">typedef</font> <font color="#4169E1">enum</font> {                       <font color="#B22222">/* converged */</font>
<a name="line311">311: </a>  <a href="../manualpages/SNES/SNES_CONVERGED_FNORM_ABS.html">SNES_CONVERGED_FNORM_ABS</a>      = 2, <font color="#B22222">/* ||F|| &lt; atol */</font>
<a name="line312">312: </a>  <a href="../manualpages/SNES/SNES_CONVERGED_FNORM_RELATIVE.html">SNES_CONVERGED_FNORM_RELATIVE</a> = 3, <font color="#B22222">/* ||F|| &lt; rtol*||F_initial|| */</font>
<a name="line313">313: </a>  <a href="../manualpages/SNES/SNES_CONVERGED_SNORM_RELATIVE.html">SNES_CONVERGED_SNORM_RELATIVE</a> = 4, <font color="#B22222">/* Newton computed step size small; || delta x || &lt; stol || x || */</font>
<a name="line314">314: </a>  <a href="../manualpages/SNES/SNESConvergedReason.html">SNES_CONVERGED_ITS</a>            = 5, <font color="#B22222">/* maximum iterations reached */</font>
<a name="line315">315: </a>  <a href="../manualpages/SNES/SNESConvergedReason.html">SNES_BREAKOUT_INNER_ITER</a>      = 6, <font color="#B22222">/* Flag to break out of inner loop after checking custom convergence, used in multi-phase flow when state changes */</font>
<a name="line316">316: </a>  <a href="../manualpages/SNES/SNESConvergedReason.html">SNES_CONVERGED_USER</a>           = 7, <font color="#B22222">/* The user has indicated convergence for an arbitrary reason */</font>
<a name="line317">317: </a>  <font color="#B22222">/* diverged */</font>
<a name="line318">318: </a>  <a href="../manualpages/SNES/SNESConvergedReason.html">SNES_DIVERGED_FUNCTION_DOMAIN</a>      = -1, <font color="#B22222">/* the new x location passed the function is not in the domain of F */</font>
<a name="line319">319: </a>  <a href="../manualpages/SNES/SNES_DIVERGED_FUNCTION_COUNT.html">SNES_DIVERGED_FUNCTION_COUNT</a>       = -2,
<a name="line320">320: </a>  <a href="../manualpages/SNES/SNESConvergedReason.html">SNES_DIVERGED_LINEAR_SOLVE</a>         = -3, <font color="#B22222">/* the linear solve failed */</font>
<a name="line321">321: </a>  <a href="../manualpages/SNES/SNES_DIVERGED_FNORM_NAN.html">SNES_DIVERGED_FNORM_NAN</a>            = -4,
<a name="line322">322: </a>  <a href="../manualpages/SNES/SNES_DIVERGED_MAX_IT.html">SNES_DIVERGED_MAX_IT</a>               = -5,
<a name="line323">323: </a>  <a href="../manualpages/SNES/SNES_DIVERGED_LINE_SEARCH.html">SNES_DIVERGED_LINE_SEARCH</a>          = -6,  <font color="#B22222">/* the line search failed */</font>
<a name="line324">324: </a>  <a href="../manualpages/SNES/SNESConvergedReason.html">SNES_DIVERGED_INNER</a>                = -7,  <font color="#B22222">/* inner solve failed */</font>
<a name="line325">325: </a>  <a href="../manualpages/SNES/SNES_DIVERGED_LOCAL_MIN.html">SNES_DIVERGED_LOCAL_MIN</a>            = -8,  <font color="#B22222">/* || J^T b || is small, implies converged to local minimum of F() */</font>
<a name="line326">326: </a>  <a href="../manualpages/SNES/SNES_DIVERGED_DTOL.html">SNES_DIVERGED_DTOL</a>                 = -9,  <font color="#B22222">/* || F || &gt; divtol*||F_initial|| */</font>
<a name="line327">327: </a>  <a href="../manualpages/SNES/SNESConvergedReason.html">SNES_DIVERGED_JACOBIAN_DOMAIN</a>      = -10, <font color="#B22222">/* Jacobian calculation does not make sense */</font>
<a name="line328">328: </a>  <a href="../manualpages/SNES/SNESConvergedReason.html">SNES_DIVERGED_TR_DELTA</a>             = -11,
<a name="line329">329: </a>  <a href="../manualpages/SNES/SNESConvergedReason.html">SNES_CONVERGED_TR_DELTA_DEPRECATED</a> = -11,
<a name="line330">330: </a>  <a href="../manualpages/SNES/SNESConvergedReason.html">SNES_DIVERGED_USER</a>                 = -12, <font color="#B22222">/* The user has indicated divergence for an arbitrary reason */</font>

<a name="line332">332: </a>  <a href="../manualpages/SNES/SNESConvergedReason.html">SNES_CONVERGED_ITERATING</a> = 0
<a name="line333">333: </a>} <a href="../manualpages/SNES/SNESConvergedReason.html">SNESConvergedReason</a>;
<a name="line334">334: </a>PETSC_EXTERN const char *const *SNESConvergedReasons;

<a name="line336">336: </a><font color="#B22222">/*MC</font>
<a name="line337">337: </a><font color="#B22222">   <a href="../manualpages/SNES/SNES_CONVERGED_FNORM_ABS.html">SNES_CONVERGED_FNORM_ABS</a> - 2-norm(F) &lt;= abstol</font>

<a name="line339">339: </a><font color="#B22222">   Level: beginner</font>

<a name="line341">341: </a><font color="#B22222">.seealso: [](ch_snes), `<a href="../manualpages/SNES/SNES.html">SNES</a>`, `<a href="../manualpages/SNES/SNESSolve.html">SNESSolve</a>()`, `<a href="../manualpages/SNES/SNESGetConvergedReason.html">SNESGetConvergedReason</a>()`, `<a href="../manualpages/SNES/SNESConvergedReason.html">SNESConvergedReason</a>`, `<a href="../manualpages/SNES/SNESSetTolerances.html">SNESSetTolerances</a>()`</font>
<a name="line342">342: </a><font color="#B22222">M*/</font>

<a name="line344">344: </a><font color="#B22222">/*MC</font>
<a name="line345">345: </a><font color="#B22222">   <a href="../manualpages/SNES/SNES_CONVERGED_FNORM_RELATIVE.html">SNES_CONVERGED_FNORM_RELATIVE</a> - 2-norm(F) &lt;= rtol*2-norm(F(x_0)) where x_0 is the initial guess</font>

<a name="line347">347: </a><font color="#B22222">   Level: beginner</font>

<a name="line349">349: </a><font color="#B22222">.seealso: [](ch_snes), `<a href="../manualpages/SNES/SNES.html">SNES</a>`, `<a href="../manualpages/SNES/SNESSolve.html">SNESSolve</a>()`, `<a href="../manualpages/SNES/SNESGetConvergedReason.html">SNESGetConvergedReason</a>()`, `<a href="../manualpages/SNES/SNESConvergedReason.html">SNESConvergedReason</a>`, `<a href="../manualpages/SNES/SNESSetTolerances.html">SNESSetTolerances</a>()`</font>
<a name="line350">350: </a><font color="#B22222">M*/</font>

<a name="line352">352: </a><font color="#B22222">/*MC</font>
<a name="line353">353: </a><font color="#B22222">  <a href="../manualpages/SNES/SNES_CONVERGED_SNORM_RELATIVE.html">SNES_CONVERGED_SNORM_RELATIVE</a> - The 2-norm of the last step &lt;= stol * 2-norm(x) where x is the current</font>
<a name="line354">354: </a><font color="#B22222">  solution and stol is the 4th argument to `<a href="../manualpages/SNES/SNESSetTolerances.html">SNESSetTolerances</a>()`</font>

<a name="line356">356: </a><font color="#B22222">  Options Database Key:</font>
<a name="line357">357: </a><font color="#B22222">  -snes_stol &lt;stol&gt; - the step tolerance</font>

<a name="line359">359: </a><font color="#B22222">   Level: beginner</font>

<a name="line361">361: </a><font color="#B22222">.seealso: [](ch_snes), `<a href="../manualpages/SNES/SNES.html">SNES</a>`, `<a href="../manualpages/SNES/SNESSolve.html">SNESSolve</a>()`, `<a href="../manualpages/SNES/SNESGetConvergedReason.html">SNESGetConvergedReason</a>()`, `<a href="../manualpages/SNES/SNESConvergedReason.html">SNESConvergedReason</a>`, `<a href="../manualpages/SNES/SNESSetTolerances.html">SNESSetTolerances</a>()`</font>
<a name="line362">362: </a><font color="#B22222">M*/</font>

<a name="line364">364: </a><font color="#B22222">/*MC</font>
<a name="line365">365: </a><font color="#B22222">   <a href="../manualpages/SNES/SNES_DIVERGED_FUNCTION_COUNT.html">SNES_DIVERGED_FUNCTION_COUNT</a> - The user provided function has been called more times then the final</font>
<a name="line366">366: </a><font color="#B22222">   argument to `<a href="../manualpages/SNES/SNESSetTolerances.html">SNESSetTolerances</a>()`</font>

<a name="line368">368: </a><font color="#B22222">   Level: beginner</font>

<a name="line370">370: </a><font color="#B22222">.seealso: [](ch_snes), `<a href="../manualpages/SNES/SNES.html">SNES</a>`, `<a href="../manualpages/SNES/SNESSolve.html">SNESSolve</a>()`, `<a href="../manualpages/SNES/SNESGetConvergedReason.html">SNESGetConvergedReason</a>()`, `<a href="../manualpages/SNES/SNESConvergedReason.html">SNESConvergedReason</a>`, `<a href="../manualpages/SNES/SNESSetTolerances.html">SNESSetTolerances</a>()`</font>
<a name="line371">371: </a><font color="#B22222">M*/</font>

<a name="line373">373: </a><font color="#B22222">/*MC</font>
<a name="line374">374: </a><font color="#B22222">   <a href="../manualpages/SNES/SNES_DIVERGED_DTOL.html">SNES_DIVERGED_DTOL</a> - The norm of the function has increased by a factor of divtol set with `<a href="../manualpages/SNES/SNESSetDivergenceTolerance.html">SNESSetDivergenceTolerance</a>()`</font>

<a name="line376">376: </a><font color="#B22222">   Level: beginner</font>

<a name="line378">378: </a><font color="#B22222">.seealso: [](ch_snes), `<a href="../manualpages/SNES/SNES.html">SNES</a>`, `<a href="../manualpages/SNES/SNESSolve.html">SNESSolve</a>()`, `<a href="../manualpages/SNES/SNESGetConvergedReason.html">SNESGetConvergedReason</a>()`, `<a href="../manualpages/SNES/SNESConvergedReason.html">SNESConvergedReason</a>`, `<a href="../manualpages/SNES/SNESSetTolerances.html">SNESSetTolerances</a>()`, `<a href="../manualpages/SNES/SNESSetDivergenceTolerance.html">SNESSetDivergenceTolerance</a>()`</font>
<a name="line379">379: </a><font color="#B22222">M*/</font>

<a name="line381">381: </a><font color="#B22222">/*MC</font>
<a name="line382">382: </a><font color="#B22222">   <a href="../manualpages/SNES/SNES_DIVERGED_FNORM_NAN.html">SNES_DIVERGED_FNORM_NAN</a> - the 2-norm of the current function evaluation is not-a-number (NaN), this</font>
<a name="line383">383: </a><font color="#B22222">   is usually caused by a division of 0 by 0.</font>

<a name="line385">385: </a><font color="#B22222">   Level: beginner</font>

<a name="line387">387: </a><font color="#B22222">.seealso: [](ch_snes), `<a href="../manualpages/SNES/SNES.html">SNES</a>`, `<a href="../manualpages/SNES/SNESSolve.html">SNESSolve</a>()`, `<a href="../manualpages/SNES/SNESGetConvergedReason.html">SNESGetConvergedReason</a>()`, `<a href="../manualpages/SNES/SNESConvergedReason.html">SNESConvergedReason</a>`, `<a href="../manualpages/SNES/SNESSetTolerances.html">SNESSetTolerances</a>()`</font>
<a name="line388">388: </a><font color="#B22222">M*/</font>

<a name="line390">390: </a><font color="#B22222">/*MC</font>
<a name="line391">391: </a><font color="#B22222">   <a href="../manualpages/SNES/SNES_DIVERGED_MAX_IT.html">SNES_DIVERGED_MAX_IT</a> - <a href="../manualpages/SNES/SNESSolve.html">SNESSolve</a>() has reached the maximum number of iterations requested</font>

<a name="line393">393: </a><font color="#B22222">   Level: beginner</font>

<a name="line395">395: </a><font color="#B22222">.seealso: [](ch_snes), `<a href="../manualpages/SNES/SNES.html">SNES</a>`, `<a href="../manualpages/SNES/SNESSolve.html">SNESSolve</a>()`, `<a href="../manualpages/SNES/SNESGetConvergedReason.html">SNESGetConvergedReason</a>()`, `<a href="../manualpages/SNES/SNESConvergedReason.html">SNESConvergedReason</a>`, `<a href="../manualpages/SNES/SNESSetTolerances.html">SNESSetTolerances</a>()`</font>
<a name="line396">396: </a><font color="#B22222">M*/</font>

<a name="line398">398: </a><font color="#B22222">/*MC</font>
<a name="line399">399: </a><font color="#B22222">   <a href="../manualpages/SNES/SNES_DIVERGED_LINE_SEARCH.html">SNES_DIVERGED_LINE_SEARCH</a> - The line search has failed. This only occurs for a `<a href="../manualpages/SNES/SNES.html">SNES</a>` solvers that use a line search</font>

<a name="line401">401: </a><font color="#B22222">   Level: beginner</font>

<a name="line403">403: </a><font color="#B22222">.seealso: [](ch_snes), `<a href="../manualpages/SNES/SNES.html">SNES</a>`, `<a href="../manualpages/SNES/SNESSolve.html">SNESSolve</a>()`, `<a href="../manualpages/SNES/SNESGetConvergedReason.html">SNESGetConvergedReason</a>()`, `<a href="../manualpages/SNES/SNESConvergedReason.html">SNESConvergedReason</a>`, `<a href="../manualpages/SNES/SNESSetTolerances.html">SNESSetTolerances</a>()`, `<a href="../manualpages/SNES/SNESLineSearch.html">SNESLineSearch</a>`</font>
<a name="line404">404: </a><font color="#B22222">M*/</font>

<a name="line406">406: </a><font color="#B22222">/*MC</font>
<a name="line407">407: </a><font color="#B22222">   <a href="../manualpages/SNES/SNES_DIVERGED_LOCAL_MIN.html">SNES_DIVERGED_LOCAL_MIN</a> - the algorithm seems to have stagnated at a local minimum that is not zero.</font>
<a name="line408">408: </a><font color="#B22222">   See the manual page for `<a href="../manualpages/SNES/SNESConvergedReason.html">SNESConvergedReason</a>` for more details</font>

<a name="line410">410: </a><font color="#B22222">   Level: beginner</font>

<a name="line412">412: </a><font color="#B22222">.seealso: [](ch_snes), `<a href="../manualpages/SNES/SNES.html">SNES</a>`, `<a href="../manualpages/SNES/SNESSolve.html">SNESSolve</a>()`, `<a href="../manualpages/SNES/SNESGetConvergedReason.html">SNESGetConvergedReason</a>()`, `<a href="../manualpages/SNES/SNESConvergedReason.html">SNESConvergedReason</a>`, `<a href="../manualpages/SNES/SNESSetTolerances.html">SNESSetTolerances</a>()`</font>
<a name="line413">413: </a><font color="#B22222">M*/</font>

<a name="line415">415: </a><font color="#B22222">/*MC</font>
<a name="line416">416: </a><font color="#B22222">   <a href="../manualpages/SNES/SNES_CONERGED_ITERATING.html">SNES_CONERGED_ITERATING</a> - this only occurs if `<a href="../manualpages/SNES/SNESGetConvergedReason.html">SNESGetConvergedReason</a>()` is called during the `<a href="../manualpages/SNES/SNESSolve.html">SNESSolve</a>()`</font>

<a name="line418">418: </a><font color="#B22222">   Level: beginner</font>

<a name="line420">420: </a><font color="#B22222">.seealso: [](ch_snes), `<a href="../manualpages/SNES/SNES.html">SNES</a>`, `<a href="../manualpages/SNES/SNESSolve.html">SNESSolve</a>()`, `<a href="../manualpages/SNES/SNESGetConvergedReason.html">SNESGetConvergedReason</a>()`, `<a href="../manualpages/SNES/SNESConvergedReason.html">SNESConvergedReason</a>`, `<a href="../manualpages/SNES/SNESSetTolerances.html">SNESSetTolerances</a>()`</font>
<a name="line421">421: </a><font color="#B22222">M*/</font>

<a name="line423">423: </a><strong><font color="#4169E1"><a name="SNESSetConvergenceTest"></a>PETSC_EXTERN <a href="../manualpages/Sys/PetscErrorCode.html">PetscErrorCode</a> <a href="../manualpages/SNES/SNESSetConvergenceTest.html">SNESSetConvergenceTest</a>(<a href="../manualpages/SNES/SNES.html">SNES</a>, <a href="../manualpages/Sys/PetscErrorCode.html">PetscErrorCode</a> (*)(<a href="../manualpages/SNES/SNES.html">SNES</a>, <a href="../manualpages/Sys/PetscInt.html">PetscInt</a>, <a href="../manualpages/Sys/PetscReal.html">PetscReal</a>, <a href="../manualpages/Sys/PetscReal.html">PetscReal</a>, <a href="../manualpages/Sys/PetscReal.html">PetscReal</a>, <a href="../manualpages/SNES/SNESConvergedReason.html">SNESConvergedReason</a> *, void *), void *, <a href="../manualpages/Sys/PetscErrorCode.html">PetscErrorCode</a> (*)(void *)</font></strong>);
<a name="line424">424: </a><strong><font color="#4169E1">PETSC_EXTERN <a href="../manualpages/Sys/PetscErrorCode.html">PetscErrorCode</a> <a href="../manualpages/SNES/SNESConvergedDefault.html">SNESConvergedDefault</a>(<a href="../manualpages/SNES/SNES.html">SNES</a>, <a href="../manualpages/Sys/PetscInt.html">PetscInt</a>, <a href="../manualpages/Sys/PetscReal.html">PetscReal</a>, <a href="../manualpages/Sys/PetscReal.html">PetscReal</a>, <a href="../manualpages/Sys/PetscReal.html">PetscReal</a>, <a href="../manualpages/SNES/SNESConvergedReason.html">SNESConvergedReason</a> *, void *)</font></strong>;
<a name="line425">425: </a><strong><font color="#4169E1">PETSC_EXTERN <a href="../manualpages/Sys/PetscErrorCode.html">PetscErrorCode</a> <a href="../manualpages/SNES/SNESConvergedSkip.html">SNESConvergedSkip</a>(<a href="../manualpages/SNES/SNES.html">SNES</a>, <a href="../manualpages/Sys/PetscInt.html">PetscInt</a>, <a href="../manualpages/Sys/PetscReal.html">PetscReal</a>, <a href="../manualpages/Sys/PetscReal.html">PetscReal</a>, <a href="../manualpages/Sys/PetscReal.html">PetscReal</a>, <a href="../manualpages/SNES/SNESConvergedReason.html">SNESConvergedReason</a> *, void *)</font></strong>;
<a name="line426">426: </a><strong><font color="#4169E1">PETSC_EXTERN <a href="../manualpages/Sys/PetscErrorCode.html">PetscErrorCode</a> <a href="../manualpages/SNES/SNESConvergedCorrectPressure.html">SNESConvergedCorrectPressure</a>(<a href="../manualpages/SNES/SNES.html">SNES</a>, <a href="../manualpages/Sys/PetscInt.html">PetscInt</a>, <a href="../manualpages/Sys/PetscReal.html">PetscReal</a>, <a href="../manualpages/Sys/PetscReal.html">PetscReal</a>, <a href="../manualpages/Sys/PetscReal.html">PetscReal</a>, <a href="../manualpages/SNES/SNESConvergedReason.html">SNESConvergedReason</a> *, void *)</font></strong>;
<a name="line427">427: </a><strong><font color="#4169E1">PETSC_EXTERN <a href="../manualpages/Sys/PetscErrorCode.html">PetscErrorCode</a> <a href="../manualpages/SNES/SNESGetConvergedReason.html">SNESGetConvergedReason</a>(<a href="../manualpages/SNES/SNES.html">SNES</a>, <a href="../manualpages/SNES/SNESConvergedReason.html">SNESConvergedReason</a> *)</font></strong>;
<a name="line428">428: </a><strong><font color="#4169E1">PETSC_EXTERN <a href="../manualpages/Sys/PetscErrorCode.html">PetscErrorCode</a> <a href="../manualpages/SNES/SNESGetConvergedReasonString.html">SNESGetConvergedReasonString</a>(<a href="../manualpages/SNES/SNES.html">SNES</a>, const char **)</font></strong>;
<a name="line429">429: </a><strong><font color="#4169E1">PETSC_EXTERN <a href="../manualpages/Sys/PetscErrorCode.html">PetscErrorCode</a> <a href="../manualpages/SNES/SNESSetConvergedReason.html">SNESSetConvergedReason</a>(<a href="../manualpages/SNES/SNES.html">SNES</a>, <a href="../manualpages/SNES/SNESConvergedReason.html">SNESConvergedReason</a>)</font></strong>;

<a name="line431">431: </a>PETSC_DEPRECATED_FUNCTION(3, 5, 0, <font color="#666666">"<a href="../manualpages/SNES/SNESConvergedSkip.html">SNESConvergedSkip</a>()"</font>, ) static inline void SNESSkipConverged(void)
<a name="line432">432: </a>{ <font color="#B22222">/* never called */</font>
<a name="line433">433: </a>}
<a name="line434">434: </a><strong><font color="#228B22">#define SNESSkipConverged (SNESSkipConverged, <a href="../manualpages/SNES/SNESConvergedSkip.html">SNESConvergedSkip</a>)</font></strong>

<a name="line436">436: </a><font color="#B22222">/*S</font>
<a name="line437">437: </a><font color="#B22222">  <a href="../manualpages/SNES/SNESInitialGuessFn.html">SNESInitialGuessFn</a> - A prototype of a `<a href="../manualpages/SNES/SNES.html">SNES</a>` compute initial guess function that would be passed to `<a href="../manualpages/SNES/SNESSetComputeInitialGuess.html">SNESSetComputeInitialGuess</a>()`</font>

<a name="line439">439: </a><font color="#B22222">  Calling Sequence:</font>
<a name="line440">440: </a><font color="#B22222">+ snes  - `<a href="../manualpages/SNES/SNES.html">SNES</a>` context</font>
<a name="line441">441: </a><font color="#B22222">. u   - output vector to contain initial guess</font>
<a name="line442">442: </a><font color="#B22222">- ctx - [optional] user-defined function context</font>

<a name="line444">444: </a><font color="#B22222">  Level: beginner</font>

<a name="line446">446: </a><font color="#B22222">.seealso: [](ch_snes), `<a href="../manualpages/SNES/SNES.html">SNES</a>`, `<a href="../manualpages/SNES/SNESSetComputeInitialGuess.html">SNESSetComputeInitialGuess</a>()`, `<a href="../manualpages/SNES/SNESSetFunction.html">SNESSetFunction</a>()`, `<a href="../manualpages/SNES/SNESGetFunction.html">SNESGetFunction</a>()`, `<a href="../manualpages/SNES/SNESJacobianFn.html">SNESJacobianFn</a>`, `<a href="../manualpages/SNES/SNESFunctionFn.html">SNESFunctionFn</a>`</font>
<a name="line447">447: </a><font color="#B22222">S*/</font>
<a name="line448">448: </a><strong><font color="#4169E1">PETSC_EXTERN_TYPEDEF typedef <a href="../manualpages/Sys/PetscErrorCode.html">PetscErrorCode</a>(<a href="../manualpages/SNES/SNESInitialGuessFn.html">SNESInitialGuessFn</a>)(<a href="../manualpages/SNES/SNES.html">SNES</a> snes, <a href="../manualpages/Vec/Vec.html">Vec</a> u, void *ctx)</font></strong>;

<a name="line450">450: </a><font color="#B22222">/*S</font>
<a name="line451">451: </a><font color="#B22222">  <a href="../manualpages/SNES/SNESFunctionFn.html">SNESFunctionFn</a> - A prototype of a `<a href="../manualpages/SNES/SNES.html">SNES</a>` evaluation function that would be passed to `<a href="../manualpages/SNES/SNESSetFunction.html">SNESSetFunction</a>()`</font>

<a name="line453">453: </a><font color="#B22222">  Calling Sequence:</font>
<a name="line454">454: </a><font color="#B22222">+ snes  - `<a href="../manualpages/SNES/SNES.html">SNES</a>` context</font>
<a name="line455">455: </a><font color="#B22222">. u   - input vector</font>
<a name="line456">456: </a><font color="#B22222">. F   - function vector</font>
<a name="line457">457: </a><font color="#B22222">- ctx - [optional] user-defined function context</font>

<a name="line459">459: </a><font color="#B22222">  Level: beginner</font>

<a name="line461">461: </a><font color="#B22222">.seealso: [](ch_snes), `<a href="../manualpages/SNES/SNES.html">SNES</a>`, `<a href="../manualpages/SNES/SNESSetFunction.html">SNESSetFunction</a>()`, `<a href="../manualpages/SNES/SNESGetFunction.html">SNESGetFunction</a>()`, `<a href="../manualpages/SNES/SNESJacobianFn.html">SNESJacobianFn</a>`, `<a href="../manualpages/SNES/SNESNGSFn.html">SNESNGSFn</a>`</font>
<a name="line462">462: </a><font color="#B22222">S*/</font>
<a name="line463">463: </a><strong><font color="#4169E1">PETSC_EXTERN_TYPEDEF typedef <a href="../manualpages/Sys/PetscErrorCode.html">PetscErrorCode</a>(<a href="../manualpages/SNES/SNESFunctionFn.html">SNESFunctionFn</a>)(<a href="../manualpages/SNES/SNES.html">SNES</a> snes, <a href="../manualpages/Vec/Vec.html">Vec</a> u, <a href="../manualpages/Vec/Vec.html">Vec</a> F, void *ctx)</font></strong>;

<a name="line465">465: </a><font color="#B22222">/*S</font>
<a name="line466">466: </a><font color="#B22222">  <a href="../manualpages/SNES/SNESObjectiveFn.html">SNESObjectiveFn</a> - A prototype of a `<a href="../manualpages/SNES/SNES.html">SNES</a>` objective evaluation function that would be passed to `<a href="../manualpages/SNES/SNESSetObjective.html">SNESSetObjective</a>()`</font>

<a name="line468">468: </a><font color="#B22222">  Calling Sequence:</font>
<a name="line469">469: </a><font color="#B22222">+ snes  - `<a href="../manualpages/SNES/SNES.html">SNES</a>` context</font>
<a name="line470">470: </a><font color="#B22222">. u   - input vector</font>
<a name="line471">471: </a><font color="#B22222">. o   - output value</font>
<a name="line472">472: </a><font color="#B22222">- ctx - [optional] user-defined function context</font>

<a name="line474">474: </a><font color="#B22222">  Level: beginner</font>

<a name="line476">476: </a><font color="#B22222">.seealso: [](ch_snes), `<a href="../manualpages/SNES/SNES.html">SNES</a>`, `<a href="../manualpages/SNES/SNESSetFunction.html">SNESSetFunction</a>()`, `<a href="../manualpages/SNES/SNESGetFunction.html">SNESGetFunction</a>()`, `<a href="../manualpages/SNES/SNESJacobianFn.html">SNESJacobianFn</a>`, `<a href="../manualpages/SNES/SNESNGSFn.html">SNESNGSFn</a>`</font>
<a name="line477">477: </a><font color="#B22222">S*/</font>
<a name="line478">478: </a><strong><font color="#4169E1">PETSC_EXTERN_TYPEDEF typedef <a href="../manualpages/Sys/PetscErrorCode.html">PetscErrorCode</a>(<a href="../manualpages/SNES/SNESObjectiveFn.html">SNESObjectiveFn</a>)(<a href="../manualpages/SNES/SNES.html">SNES</a> snes, <a href="../manualpages/Vec/Vec.html">Vec</a> u, <a href="../manualpages/Sys/PetscReal.html">PetscReal</a> *o, void *ctx)</font></strong>;

<a name="line480">480: </a><font color="#B22222">/*S</font>
<a name="line481">481: </a><font color="#B22222">  <a href="../manualpages/SNES/SNESJacobianFn.html">SNESJacobianFn</a> - A prototype of a `<a href="../manualpages/SNES/SNES.html">SNES</a>` Jacobian evaluation function that would be passed to `<a href="../manualpages/SNES/SNESSetJacobian.html">SNESSetJacobian</a>()`</font>

<a name="line483">483: </a><font color="#B22222">  Calling Sequence:</font>
<a name="line484">484: </a><font color="#B22222">+ snes   - the `<a href="../manualpages/SNES/SNES.html">SNES</a>` context obtained from `<a href="../manualpages/SNES/SNESCreate.html">SNESCreate</a>()`</font>
<a name="line485">485: </a><font color="#B22222">. u    - input vector</font>
<a name="line486">486: </a><font color="#B22222">. Amat - (approximate) Jacobian matrix</font>
<a name="line487">487: </a><font color="#B22222">. Pmat - matrix used to construct the preconditioner, often the same as `Amat`</font>
<a name="line488">488: </a><font color="#B22222">- ctx  - [optional] user-defined context for matrix evaluation routine</font>

<a name="line490">490: </a><font color="#B22222">  Level: beginner</font>

<a name="line492">492: </a><font color="#B22222">.seealso: [](ch_snes), `<a href="../manualpages/SNES/SNES.html">SNES</a>`, `<a href="../manualpages/SNES/SNESSetJacobian.html">SNESSetJacobian</a>()`, `<a href="../manualpages/SNES/SNESGetJacobian.html">SNESGetJacobian</a>()`, `<a href="../manualpages/SNES/SNESFunctionFn.html">SNESFunctionFn</a>`, `<a href="../manualpages/SNES/SNESNGSFn.html">SNESNGSFn</a>`</font>
<a name="line493">493: </a><font color="#B22222">S*/</font>
<a name="line494">494: </a><strong><font color="#4169E1">PETSC_EXTERN_TYPEDEF typedef <a href="../manualpages/Sys/PetscErrorCode.html">PetscErrorCode</a>(<a href="../manualpages/SNES/SNESJacobianFn.html">SNESJacobianFn</a>)(<a href="../manualpages/SNES/SNES.html">SNES</a> snes, <a href="../manualpages/Vec/Vec.html">Vec</a> u, <a href="../manualpages/Mat/Mat.html">Mat</a> Amat, <a href="../manualpages/Mat/Mat.html">Mat</a> Pmat, void *ctx)</font></strong>;

<a name="line496">496: </a><font color="#B22222">/*S</font>
<a name="line497">497: </a><font color="#B22222">  <a href="../manualpages/SNES/SNESNGSFn.html">SNESNGSFn</a> - A prototype of a `<a href="../manualpages/SNES/SNES.html">SNES</a>` nonlinear Gauss-Seidel function that would be passed to `<a href="../manualpages/SNES/SNESSetNGS.html">SNESSetNGS</a>()`</font>

<a name="line499">499: </a><font color="#B22222">  Calling Sequence:</font>
<a name="line500">500: </a><font color="#B22222">+ snes   - the `<a href="../manualpages/SNES/SNES.html">SNES</a>` context obtained from `<a href="../manualpages/SNES/SNESCreate.html">SNESCreate</a>()`</font>
<a name="line501">501: </a><font color="#B22222">. u    - the current solution, updated in place</font>
<a name="line502">502: </a><font color="#B22222">. b    - the right-hand side vector (which may be `NULL`)</font>
<a name="line503">503: </a><font color="#B22222">- ctx  - [optional] user-defined context for matrix evaluation routine</font>

<a name="line505">505: </a><font color="#B22222">  Level: beginner</font>

<a name="line507">507: </a><font color="#B22222">.seealso: [](ch_snes), `<a href="../manualpages/SNES/SNES.html">SNES</a>`, `<a href="../manualpages/SNES/SNESSetJacobian.html">SNESSetJacobian</a>()`, `<a href="../manualpages/SNES/SNESGetJacobian.html">SNESGetJacobian</a>()`, `<a href="../manualpages/SNES/SNESFunctionFn.html">SNESFunctionFn</a>`, `<a href="../manualpages/SNES/SNESSetFunction.html">SNESSetFunction</a>()`, `<a href="../manualpages/SNES/SNESGetFunction.html">SNESGetFunction</a>()`, `<a href="../manualpages/SNES/SNESJacobianFn.html">SNESJacobianFn</a>`</font>
<a name="line508">508: </a><font color="#B22222">S*/</font>
<a name="line509">509: </a><strong><font color="#4169E1">PETSC_EXTERN_TYPEDEF typedef <a href="../manualpages/Sys/PetscErrorCode.html">PetscErrorCode</a>(<a href="../manualpages/SNES/SNESNGSFn.html">SNESNGSFn</a>)(<a href="../manualpages/SNES/SNES.html">SNES</a> snes, <a href="../manualpages/Vec/Vec.html">Vec</a> u, <a href="../manualpages/Vec/Vec.html">Vec</a> b, void *ctx)</font></strong>;

<a name="line511">511: </a><font color="#B22222">/*S</font>
<a name="line512">512: </a><font color="#B22222">  <a href="../manualpages/SNES/SNESUpdateFn.html">SNESUpdateFn</a> - A prototype of a `<a href="../manualpages/SNES/SNES.html">SNES</a>` update function that would be passed to `<a href="../manualpages/SNES/SNESSetUpdate.html">SNESSetUpdate</a>()`</font>

<a name="line514">514: </a><font color="#B22222">  Calling Sequence:</font>
<a name="line515">515: </a><font color="#B22222">+ snes - `<a href="../manualpages/SNES/SNES.html">SNES</a>` context</font>
<a name="line516">516: </a><font color="#B22222">- step - the current iteration index</font>

<a name="line518">518: </a><font color="#B22222">  Level: advanced</font>

<a name="line520">520: </a><font color="#B22222">.seealso: [](ch_snes), `<a href="../manualpages/SNES/SNES.html">SNES</a>`, `<a href="../manualpages/SNES/SNESSetUpdate.html">SNESSetUpdate</a>()`</font>
<a name="line521">521: </a><font color="#B22222">S*/</font>
<a name="line522">522: </a><strong><font color="#4169E1">PETSC_EXTERN_TYPEDEF typedef <a href="../manualpages/Sys/PetscErrorCode.html">PetscErrorCode</a>(<a href="../manualpages/SNES/SNESUpdateFn.html">SNESUpdateFn</a>)(<a href="../manualpages/SNES/SNES.html">SNES</a> snes, <a href="../manualpages/Sys/PetscInt.html">PetscInt</a> step)</font></strong>;

<a name="line524">524: </a><font color="#B22222">/* --------- Solving systems of nonlinear equations --------------- */</font>
<a name="line525">525: </a><strong><font color="#4169E1">PETSC_EXTERN <a href="../manualpages/Sys/PetscErrorCode.html">PetscErrorCode</a> <a href="../manualpages/SNES/SNESSetFunction.html">SNESSetFunction</a>(<a href="../manualpages/SNES/SNES.html">SNES</a>, <a href="../manualpages/Vec/Vec.html">Vec</a>, <a href="../manualpages/SNES/SNESFunctionFn.html">SNESFunctionFn</a> *, void *)</font></strong>;
<a name="line526">526: </a><strong><font color="#4169E1">PETSC_EXTERN <a href="../manualpages/Sys/PetscErrorCode.html">PetscErrorCode</a> <a href="../manualpages/SNES/SNESGetFunction.html">SNESGetFunction</a>(<a href="../manualpages/SNES/SNES.html">SNES</a>, <a href="../manualpages/Vec/Vec.html">Vec</a> *, <a href="../manualpages/SNES/SNESFunctionFn.html">SNESFunctionFn</a> **, void **)</font></strong>;
<a name="line527">527: </a><strong><font color="#4169E1">PETSC_EXTERN <a href="../manualpages/Sys/PetscErrorCode.html">PetscErrorCode</a> <a href="../manualpages/SNES/SNESComputeFunction.html">SNESComputeFunction</a>(<a href="../manualpages/SNES/SNES.html">SNES</a>, <a href="../manualpages/Vec/Vec.html">Vec</a>, <a href="../manualpages/Vec/Vec.html">Vec</a>)</font></strong>;
<a name="line528">528: </a><strong><font color="#4169E1">PETSC_EXTERN <a href="../manualpages/Sys/PetscErrorCode.html">PetscErrorCode</a> <a href="../manualpages/SNES/SNESComputeMFFunction.html">SNESComputeMFFunction</a>(<a href="../manualpages/SNES/SNES.html">SNES</a>, <a href="../manualpages/Vec/Vec.html">Vec</a>, <a href="../manualpages/Vec/Vec.html">Vec</a>)</font></strong>;
<a name="line529">529: </a><strong><font color="#4169E1">PETSC_EXTERN <a href="../manualpages/Sys/PetscErrorCode.html">PetscErrorCode</a> <a href="../manualpages/SNES/SNESSetInitialFunction.html">SNESSetInitialFunction</a>(<a href="../manualpages/SNES/SNES.html">SNES</a>, <a href="../manualpages/Vec/Vec.html">Vec</a>)</font></strong>;

<a name="line531">531: </a><strong><font color="#4169E1">PETSC_EXTERN <a href="../manualpages/Sys/PetscErrorCode.html">PetscErrorCode</a> <a href="../manualpages/SNES/SNESSetJacobian.html">SNESSetJacobian</a>(<a href="../manualpages/SNES/SNES.html">SNES</a>, <a href="../manualpages/Mat/Mat.html">Mat</a>, <a href="../manualpages/Mat/Mat.html">Mat</a>, <a href="../manualpages/SNES/SNESJacobianFn.html">SNESJacobianFn</a> *, void *)</font></strong>;
<a name="line532">532: </a><strong><font color="#4169E1">PETSC_EXTERN <a href="../manualpages/Sys/PetscErrorCode.html">PetscErrorCode</a> <a href="../manualpages/SNES/SNESGetJacobian.html">SNESGetJacobian</a>(<a href="../manualpages/SNES/SNES.html">SNES</a>, <a href="../manualpages/Mat/Mat.html">Mat</a> *, <a href="../manualpages/Mat/Mat.html">Mat</a> *, <a href="../manualpages/SNES/SNESJacobianFn.html">SNESJacobianFn</a> **, void **)</font></strong>;
<a name="line533">533: </a>PETSC_EXTERN <a href="../manualpages/SNES/SNESFunctionFn.html">SNESFunctionFn</a> <a href="../manualpages/SNES/SNESObjectiveComputeFunctionDefaultFD.html">SNESObjectiveComputeFunctionDefaultFD</a>;
<a name="line534">534: </a>PETSC_EXTERN <a href="../manualpages/SNES/SNESJacobianFn.html">SNESJacobianFn</a> <a href="../manualpages/SNES/SNESComputeJacobianDefault.html">SNESComputeJacobianDefault</a>;
<a name="line535">535: </a>PETSC_EXTERN <a href="../manualpages/SNES/SNESJacobianFn.html">SNESJacobianFn</a> <a href="../manualpages/SNES/SNESComputeJacobianDefaultColor.html">SNESComputeJacobianDefaultColor</a>;
<a name="line536">536: </a><strong><font color="#4169E1">PETSC_EXTERN <a href="../manualpages/Sys/PetscErrorCode.html">PetscErrorCode</a> <a href="../manualpages/SNES/SNESPruneJacobianColor.html">SNESPruneJacobianColor</a>(<a href="../manualpages/SNES/SNES.html">SNES</a>, <a href="../manualpages/Mat/Mat.html">Mat</a>, <a href="../manualpages/Mat/Mat.html">Mat</a>)</font></strong>;
<a name="line537">537: </a><strong><font color="#4169E1">PETSC_EXTERN <a href="../manualpages/Sys/PetscErrorCode.html">PetscErrorCode</a> <a href="../manualpages/SNES/SNESSetComputeInitialGuess.html">SNESSetComputeInitialGuess</a>(<a href="../manualpages/SNES/SNES.html">SNES</a>, <a href="../manualpages/SNES/SNESInitialGuessFn.html">SNESInitialGuessFn</a> *, void *)</font></strong>;
<a name="line538">538: </a><strong><font color="#4169E1">PETSC_EXTERN <a href="../manualpages/Sys/PetscErrorCode.html">PetscErrorCode</a> <a href="../manualpages/SNES/SNESSetPicard.html">SNESSetPicard</a>(<a href="../manualpages/SNES/SNES.html">SNES</a>, <a href="../manualpages/Vec/Vec.html">Vec</a>, <a href="../manualpages/SNES/SNESFunctionFn.html">SNESFunctionFn</a> *, <a href="../manualpages/Mat/Mat.html">Mat</a>, <a href="../manualpages/Mat/Mat.html">Mat</a>, <a href="../manualpages/SNES/SNESJacobianFn.html">SNESJacobianFn</a> *, void *)</font></strong>;
<a name="line539">539: </a><strong><font color="#4169E1">PETSC_EXTERN <a href="../manualpages/Sys/PetscErrorCode.html">PetscErrorCode</a> <a href="../manualpages/SNES/SNESGetPicard.html">SNESGetPicard</a>(<a href="../manualpages/SNES/SNES.html">SNES</a>, <a href="../manualpages/Vec/Vec.html">Vec</a> *, <a href="../manualpages/SNES/SNESFunctionFn.html">SNESFunctionFn</a> **, <a href="../manualpages/Mat/Mat.html">Mat</a> *, <a href="../manualpages/Mat/Mat.html">Mat</a> *, <a href="../manualpages/SNES/SNESJacobianFn.html">SNESJacobianFn</a> **, void **)</font></strong>;
<a name="line540">540: </a>PETSC_EXTERN <a href="../manualpages/SNES/SNESFunctionFn.html">SNESFunctionFn</a> SNESPicardComputeFunction;
<a name="line541">541: </a>PETSC_EXTERN <a href="../manualpages/SNES/SNESFunctionFn.html">SNESFunctionFn</a> SNESPicardComputeMFFunction;
<a name="line542">542: </a>PETSC_EXTERN <a href="../manualpages/SNES/SNESJacobianFn.html">SNESJacobianFn</a> SNESPicardComputeJacobian;

<a name="line544">544: </a><strong><font color="#4169E1">PETSC_EXTERN <a href="../manualpages/Sys/PetscErrorCode.html">PetscErrorCode</a> <a href="../manualpages/SNES/SNESSetObjective.html">SNESSetObjective</a>(<a href="../manualpages/SNES/SNES.html">SNES</a>, <a href="../manualpages/SNES/SNESObjectiveFn.html">SNESObjectiveFn</a> *, void *)</font></strong>;
<a name="line545">545: </a><strong><font color="#4169E1">PETSC_EXTERN <a href="../manualpages/Sys/PetscErrorCode.html">PetscErrorCode</a> <a href="../manualpages/SNES/SNESGetObjective.html">SNESGetObjective</a>(<a href="../manualpages/SNES/SNES.html">SNES</a>, <a href="../manualpages/SNES/SNESObjectiveFn.html">SNESObjectiveFn</a> **, void **)</font></strong>;
<a name="line546">546: </a><strong><font color="#4169E1">PETSC_EXTERN <a href="../manualpages/Sys/PetscErrorCode.html">PetscErrorCode</a> <a href="../manualpages/SNES/SNESComputeObjective.html">SNESComputeObjective</a>(<a href="../manualpages/SNES/SNES.html">SNES</a>, <a href="../manualpages/Vec/Vec.html">Vec</a>, <a href="../manualpages/Sys/PetscReal.html">PetscReal</a> *)</font></strong>;

<a name="line548">548: </a><strong><font color="#4169E1">PETSC_EXTERN <a href="../manualpages/Sys/PetscErrorCode.html">PetscErrorCode</a> <a href="../manualpages/SNES/SNESSetUpdate.html">SNESSetUpdate</a>(<a href="../manualpages/SNES/SNES.html">SNES</a>, <a href="../manualpages/SNES/SNESUpdateFn.html">SNESUpdateFn</a> *)</font></strong>;

<a name="line550">550: </a><font color="#B22222">/*E</font>
<a name="line551">551: </a><font color="#B22222">   <a href="../manualpages/SNES/SNESNormSchedule.html">SNESNormSchedule</a> - Frequency with which the norm is computed during a nonliner solve</font>

<a name="line553">553: </a><font color="#B22222">   Values:</font>
<a name="line554">554: </a><font color="#B22222">+   `<a href="../manualpages/SNES/SNESNormSchedule.html">SNES_NORM_DEFAULT</a>`            - use the default behavior for the current `<a href="../manualpages/SNES/SNESType.html">SNESType</a>`</font>
<a name="line555">555: </a><font color="#B22222">.   `<a href="../manualpages/SNES/SNES_NORM_NONE.html">SNES_NORM_NONE</a>`               - avoid all norm computations</font>
<a name="line556">556: </a><font color="#B22222">.   `<a href="../manualpages/SNES/SNES_NORM_ALWAYS.html">SNES_NORM_ALWAYS</a>`             - compute the norms whenever possible</font>
<a name="line557">557: </a><font color="#B22222">.   `<a href="../manualpages/SNES/SNES_NORM_INITIAL_ONLY.html">SNES_NORM_INITIAL_ONLY</a>`       - compute the norm only when the algorithm starts</font>
<a name="line558">558: </a><font color="#B22222">.   `<a href="../manualpages/SNES/SNES_NORM_FINAL_ONLY.html">SNES_NORM_FINAL_ONLY</a>`         - compute the norm only when the algorithm finishes</font>
<a name="line559">559: </a><font color="#B22222">-   `<a href="../manualpages/SNES/SNES_NORM_INITIAL_FINAL_ONLY.html">SNES_NORM_INITIAL_FINAL_ONLY</a>` - compute the norm at the start and end of the algorithm</font>

<a name="line561">561: </a><font color="#B22222">   Level: advanced</font>

<a name="line563">563: </a><font color="#B22222">   Notes:</font>
<a name="line564">564: </a><font color="#B22222">   Support for these is highly dependent on the solver.</font>

<a name="line566">566: </a><font color="#B22222">   Some options limit the convergence tests that can be used.</font>

<a name="line568">568: </a><font color="#B22222">   The `<a href="../manualpages/SNES/SNES_NORM_NONE.html">SNES_NORM_NONE</a>` option is most commonly used when the nonlinear solver is being used as a smoother, for example for `<a href="../manualpages/SNESFAS/SNESFAS.html">SNESFAS</a>`</font>

<a name="line570">570: </a><font color="#B22222">   This is primarily used to turn off extra norm and function computation</font>
<a name="line571">571: </a><font color="#B22222">   when the solvers are composed.</font>

<a name="line573">573: </a><font color="#B22222">.seealso: [](ch_snes), `<a href="../manualpages/SNES/SNES.html">SNES</a>`, `<a href="../manualpages/SNES/SNESSolve.html">SNESSolve</a>()`, `<a href="../manualpages/SNES/SNESGetConvergedReason.html">SNESGetConvergedReason</a>()`, `<a href="../manualpages/KSP/KSPSetNormType.html">KSPSetNormType</a>()`,</font>
<a name="line574">574: </a><font color="#B22222">          `<a href="../manualpages/KSP/KSPSetConvergenceTest.html">KSPSetConvergenceTest</a>()`, `<a href="../manualpages/KSP/KSPSetPCSide.html">KSPSetPCSide</a>()`</font>
<a name="line575">575: </a><font color="#B22222">E*/</font>
<a name="line576">576: </a><font color="#4169E1">typedef</font> <font color="#4169E1">enum</font> {
<a name="line577">577: </a>  <a href="../manualpages/SNES/SNESNormSchedule.html">SNES_NORM_DEFAULT</a>            = -1,
<a name="line578">578: </a>  <a href="../manualpages/SNES/SNES_NORM_NONE.html">SNES_NORM_NONE</a>               = 0,
<a name="line579">579: </a>  <a href="../manualpages/SNES/SNES_NORM_ALWAYS.html">SNES_NORM_ALWAYS</a>             = 1,
<a name="line580">580: </a>  <a href="../manualpages/SNES/SNES_NORM_INITIAL_ONLY.html">SNES_NORM_INITIAL_ONLY</a>       = 2,
<a name="line581">581: </a>  <a href="../manualpages/SNES/SNES_NORM_FINAL_ONLY.html">SNES_NORM_FINAL_ONLY</a>         = 3,
<a name="line582">582: </a>  <a href="../manualpages/SNES/SNES_NORM_INITIAL_FINAL_ONLY.html">SNES_NORM_INITIAL_FINAL_ONLY</a> = 4
<a name="line583">583: </a>} <a href="../manualpages/SNES/SNESNormSchedule.html">SNESNormSchedule</a>;
<a name="line584">584: </a>PETSC_EXTERN const char *const *const SNESNormSchedules;

<a name="line586">586: </a><font color="#B22222">/*MC</font>
<a name="line587">587: </a><font color="#B22222">   <a href="../manualpages/SNES/SNES_NORM_NONE.html">SNES_NORM_NONE</a> - Don't compute function and its L2 norm when possible</font>

<a name="line589">589: </a><font color="#B22222">   Level: advanced</font>

<a name="line591">591: </a><font color="#B22222">   Note:</font>
<a name="line592">592: </a><font color="#B22222">   This is most useful for stationary solvers with a fixed number of iterations used as smoothers.</font>

<a name="line594">594: </a><font color="#B22222">.seealso: [](ch_snes), `<a href="../manualpages/SNES/SNESNormSchedule.html">SNESNormSchedule</a>`, `<a href="../manualpages/SNES/SNES.html">SNES</a>`, `<a href="../manualpages/SNES/SNESSetNormSchedule.html">SNESSetNormSchedule</a>()`, `<a href="../manualpages/SNES/SNESNormSchedule.html">SNES_NORM_DEFAULT</a>`</font>
<a name="line595">595: </a><font color="#B22222">M*/</font>

<a name="line597">597: </a><font color="#B22222">/*MC</font>
<a name="line598">598: </a><font color="#B22222">   <a href="../manualpages/SNES/SNES_NORM_ALWAYS.html">SNES_NORM_ALWAYS</a> - Compute the function and its L2 norm at each iteration.</font>

<a name="line600">600: </a><font color="#B22222">   Level: advanced</font>

<a name="line602">602: </a><font color="#B22222">   Note:</font>
<a name="line603">603: </a><font color="#B22222">   Most solvers will use this no matter what norm type is passed to them.</font>

<a name="line605">605: </a><font color="#B22222">.seealso: [](ch_snes), `<a href="../manualpages/SNES/SNESNormSchedule.html">SNESNormSchedule</a>`, `<a href="../manualpages/SNES/SNES.html">SNES</a>`, `<a href="../manualpages/SNES/SNESSetNormSchedule.html">SNESSetNormSchedule</a>()`, `<a href="../manualpages/SNES/SNES_NORM_NONE.html">SNES_NORM_NONE</a>`</font>
<a name="line606">606: </a><font color="#B22222">M*/</font>

<a name="line608">608: </a><font color="#B22222">/*MC</font>
<a name="line609">609: </a><font color="#B22222">   <a href="../manualpages/SNES/SNES_NORM_INITIAL_ONLY.html">SNES_NORM_INITIAL_ONLY</a> - Compute the function and its L2 at iteration 0, but do not update it.</font>

<a name="line611">611: </a><font color="#B22222">   Level: advanced</font>

<a name="line613">613: </a><font color="#B22222">   Notes:</font>
<a name="line614">614: </a><font color="#B22222">   This method is useful in composed methods, when a true solution might actually be found before `<a href="../manualpages/SNES/SNESSolve.html">SNESSolve</a>()` is called.</font>
<a name="line615">615: </a><font color="#B22222">   This option enables the solve to abort on the zeroth iteration if this is the case.</font>

<a name="line617">617: </a><font color="#B22222">   For solvers that require the computation of the L2 norm of the function as part of the method, this merely cancels</font>
<a name="line618">618: </a><font color="#B22222">   the norm computation at the last iteration (if possible).</font>

<a name="line620">620: </a><font color="#B22222">.seealso: [](ch_snes), `<a href="../manualpages/SNES/SNESNormSchedule.html">SNESNormSchedule</a>`, `<a href="../manualpages/SNES/SNES.html">SNES</a>`, `<a href="../manualpages/SNES/SNESSetNormSchedule.html">SNESSetNormSchedule</a>()`, `<a href="../manualpages/SNES/SNES_NORM_FINAL_ONLY.html">SNES_NORM_FINAL_ONLY</a>`, `<a href="../manualpages/SNES/SNES_NORM_INITIAL_FINAL_ONLY.html">SNES_NORM_INITIAL_FINAL_ONLY</a>`</font>
<a name="line621">621: </a><font color="#B22222">M*/</font>

<a name="line623">623: </a><font color="#B22222">/*MC</font>
<a name="line624">624: </a><font color="#B22222">   <a href="../manualpages/SNES/SNES_NORM_FINAL_ONLY.html">SNES_NORM_FINAL_ONLY</a> - Compute the function and its L2 norm on only the final iteration.</font>

<a name="line626">626: </a><font color="#B22222">   Level: advanced</font>

<a name="line628">628: </a><font color="#B22222">   Note:</font>
<a name="line629">629: </a><font color="#B22222">   For solvers that require the computation of the L2 norm of the function as part of the method, behaves</font>
<a name="line630">630: </a><font color="#B22222">   exactly as `<a href="../manualpages/SNES/SNESNormSchedule.html">SNES_NORM_DEFAULT</a>`.  This method is useful when the function is gotten after `<a href="../manualpages/SNES/SNESSolve.html">SNESSolve</a>()` and</font>
<a name="line631">631: </a><font color="#B22222">   used in subsequent computation for methods that do not need the norm computed during the rest of the</font>
<a name="line632">632: </a><font color="#B22222">   solution procedure.</font>

<a name="line634">634: </a><font color="#B22222">.seealso: [](ch_snes), `<a href="../manualpages/SNES/SNESNormSchedule.html">SNESNormSchedule</a>`, `<a href="../manualpages/SNES/SNES.html">SNES</a>`, `<a href="../manualpages/SNES/SNESSetNormSchedule.html">SNESSetNormSchedule</a>()`, `<a href="../manualpages/SNES/SNES_NORM_INITIAL_ONLY.html">SNES_NORM_INITIAL_ONLY</a>`, `<a href="../manualpages/SNES/SNES_NORM_INITIAL_FINAL_ONLY.html">SNES_NORM_INITIAL_FINAL_ONLY</a>`</font>
<a name="line635">635: </a><font color="#B22222">M*/</font>

<a name="line637">637: </a><font color="#B22222">/*MC</font>
<a name="line638">638: </a><font color="#B22222">   <a href="../manualpages/SNES/SNES_NORM_INITIAL_FINAL_ONLY.html">SNES_NORM_INITIAL_FINAL_ONLY</a> - Compute the function and its L2 norm on only the initial and final iterations.</font>

<a name="line640">640: </a><font color="#B22222">   Level: advanced</font>

<a name="line642">642: </a><font color="#B22222">   Note:</font>
<a name="line643">643: </a><font color="#B22222">   This method combines the benefits of `<a href="../manualpages/SNES/SNES_NORM_INITIAL_ONLY.html">SNES_NORM_INITIAL_ONLY</a>` and `<a href="../manualpages/SNES/SNES_NORM_FINAL_ONLY.html">SNES_NORM_FINAL_ONLY</a>`.</font>

<a name="line645">645: </a><font color="#B22222">.seealso: [](ch_snes), `<a href="../manualpages/SNES/SNESNormSchedule.html">SNESNormSchedule</a>`, `<a href="../manualpages/SNES/SNES.html">SNES</a>`, `<a href="../manualpages/SNES/SNESSetNormSchedule.html">SNESSetNormSchedule</a>()`, `SNES_NORM_SNES_NORM_INITIAL_ONLY`, `<a href="../manualpages/SNES/SNES_NORM_FINAL_ONLY.html">SNES_NORM_FINAL_ONLY</a>`</font>
<a name="line646">646: </a><font color="#B22222">M*/</font>

<a name="line648">648: </a><strong><font color="#4169E1">PETSC_EXTERN <a href="../manualpages/Sys/PetscErrorCode.html">PetscErrorCode</a> <a href="../manualpages/SNES/SNESSetNormSchedule.html">SNESSetNormSchedule</a>(<a href="../manualpages/SNES/SNES.html">SNES</a>, <a href="../manualpages/SNES/SNESNormSchedule.html">SNESNormSchedule</a>)</font></strong>;
<a name="line649">649: </a><strong><font color="#4169E1">PETSC_EXTERN <a href="../manualpages/Sys/PetscErrorCode.html">PetscErrorCode</a> <a href="../manualpages/SNES/SNESGetNormSchedule.html">SNESGetNormSchedule</a>(<a href="../manualpages/SNES/SNES.html">SNES</a>, <a href="../manualpages/SNES/SNESNormSchedule.html">SNESNormSchedule</a> *)</font></strong>;
<a name="line650">650: </a><strong><font color="#4169E1">PETSC_EXTERN <a href="../manualpages/Sys/PetscErrorCode.html">PetscErrorCode</a> <a href="../manualpages/SNES/SNESSetFunctionNorm.html">SNESSetFunctionNorm</a>(<a href="../manualpages/SNES/SNES.html">SNES</a>, <a href="../manualpages/Sys/PetscReal.html">PetscReal</a>)</font></strong>;
<a name="line651">651: </a><strong><font color="#4169E1">PETSC_EXTERN <a href="../manualpages/Sys/PetscErrorCode.html">PetscErrorCode</a> <a href="../manualpages/SNES/SNESGetFunctionNorm.html">SNESGetFunctionNorm</a>(<a href="../manualpages/SNES/SNES.html">SNES</a>, <a href="../manualpages/Sys/PetscReal.html">PetscReal</a> *)</font></strong>;
<a name="line652">652: </a><strong><font color="#4169E1">PETSC_EXTERN <a href="../manualpages/Sys/PetscErrorCode.html">PetscErrorCode</a> <a href="../manualpages/SNES/SNESGetUpdateNorm.html">SNESGetUpdateNorm</a>(<a href="../manualpages/SNES/SNES.html">SNES</a>, <a href="../manualpages/Sys/PetscReal.html">PetscReal</a> *)</font></strong>;
<a name="line653">653: </a><strong><font color="#4169E1">PETSC_EXTERN <a href="../manualpages/Sys/PetscErrorCode.html">PetscErrorCode</a> <a href="../manualpages/SNES/SNESGetSolutionNorm.html">SNESGetSolutionNorm</a>(<a href="../manualpages/SNES/SNES.html">SNES</a>, <a href="../manualpages/Sys/PetscReal.html">PetscReal</a> *)</font></strong>;

<a name="line655">655: </a><font color="#B22222">/*E</font>
<a name="line656">656: </a><font color="#B22222">   <a href="../manualpages/SNES/SNESFunctionType.html">SNESFunctionType</a> - Type of function computed</font>

<a name="line658">658: </a><font color="#B22222">   Values:</font>
<a name="line659">659: </a><font color="#B22222">+  `<a href="../manualpages/SNES/SNESFunctionType.html">SNES_FUNCTION_DEFAULT</a>`          - the default behavior for the current `<a href="../manualpages/SNES/SNESType.html">SNESType</a>`</font>
<a name="line660">660: </a><font color="#B22222">.  `<a href="../manualpages/SNES/SNESFunctionType.html">SNES_FUNCTION_UNPRECONDITIONED</a>` - the original function provided</font>
<a name="line661">661: </a><font color="#B22222">-  `<a href="../manualpages/SNES/SNESFunctionType.html">SNES_FUNCTION_PRECONDITIONED</a>`   - the modification of the function by the preconditioner</font>

<a name="line663">663: </a><font color="#B22222">   Level: advanced</font>

<a name="line665">665: </a><font color="#B22222">   Note:</font>
<a name="line666">666: </a><font color="#B22222">   Support for these is dependent on the solver.</font>

<a name="line668">668: </a><font color="#B22222">.seealso: [](ch_snes), `<a href="../manualpages/SNES/SNES.html">SNES</a>`, `<a href="../manualpages/SNES/SNESSolve.html">SNESSolve</a>()`, `<a href="../manualpages/SNES/SNESGetConvergedReason.html">SNESGetConvergedReason</a>()`, `<a href="../manualpages/KSP/KSPSetNormType.html">KSPSetNormType</a>()`,</font>
<a name="line669">669: </a><font color="#B22222">          `<a href="../manualpages/KSP/KSPSetConvergenceTest.html">KSPSetConvergenceTest</a>()`, `<a href="../manualpages/KSP/KSPSetPCSide.html">KSPSetPCSide</a>()`</font>
<a name="line670">670: </a><font color="#B22222">E*/</font>
<a name="line671">671: </a><font color="#4169E1">typedef</font> <font color="#4169E1">enum</font> {
<a name="line672">672: </a>  <a href="../manualpages/SNES/SNESFunctionType.html">SNES_FUNCTION_DEFAULT</a>          = -1,
<a name="line673">673: </a>  <a href="../manualpages/SNES/SNESFunctionType.html">SNES_FUNCTION_UNPRECONDITIONED</a> = 0,
<a name="line674">674: </a>  <a href="../manualpages/SNES/SNESFunctionType.html">SNES_FUNCTION_PRECONDITIONED</a>   = 1
<a name="line675">675: </a>} <a href="../manualpages/SNES/SNESFunctionType.html">SNESFunctionType</a>;
<a name="line676">676: </a>PETSC_EXTERN const char *const *const SNESFunctionTypes;

<a name="line678">678: </a><strong><font color="#4169E1">PETSC_EXTERN <a href="../manualpages/Sys/PetscErrorCode.html">PetscErrorCode</a> <a href="../manualpages/SNES/SNESSetFunctionType.html">SNESSetFunctionType</a>(<a href="../manualpages/SNES/SNES.html">SNES</a>, <a href="../manualpages/SNES/SNESFunctionType.html">SNESFunctionType</a>)</font></strong>;
<a name="line679">679: </a><strong><font color="#4169E1">PETSC_EXTERN <a href="../manualpages/Sys/PetscErrorCode.html">PetscErrorCode</a> <a href="../manualpages/SNES/SNESGetFunctionType.html">SNESGetFunctionType</a>(<a href="../manualpages/SNES/SNES.html">SNES</a>, <a href="../manualpages/SNES/SNESFunctionType.html">SNESFunctionType</a> *)</font></strong>;

<a name="line681">681: </a><strong><font color="#4169E1">PETSC_EXTERN <a href="../manualpages/Sys/PetscErrorCode.html">PetscErrorCode</a> <a href="../manualpages/SNES/SNESSetNGS.html">SNESSetNGS</a>(<a href="../manualpages/SNES/SNES.html">SNES</a>, <a href="../manualpages/SNES/SNESNGSFn.html">SNESNGSFn</a> *, void *)</font></strong>;
<a name="line682">682: </a><strong><font color="#4169E1">PETSC_EXTERN <a href="../manualpages/Sys/PetscErrorCode.html">PetscErrorCode</a> <a href="../manualpages/SNES/SNESGetNGS.html">SNESGetNGS</a>(<a href="../manualpages/SNES/SNES.html">SNES</a>, <a href="../manualpages/SNES/SNESNGSFn.html">SNESNGSFn</a> **, void **)</font></strong>;
<a name="line683">683: </a><strong><font color="#4169E1">PETSC_EXTERN <a href="../manualpages/Sys/PetscErrorCode.html">PetscErrorCode</a> <a href="../manualpages/SNES/SNESComputeNGS.html">SNESComputeNGS</a>(<a href="../manualpages/SNES/SNES.html">SNES</a>, <a href="../manualpages/Vec/Vec.html">Vec</a>, <a href="../manualpages/Vec/Vec.html">Vec</a>)</font></strong>;

<a name="line685">685: </a><strong><font color="#4169E1">PETSC_EXTERN <a href="../manualpages/Sys/PetscErrorCode.html">PetscErrorCode</a> <a href="../manualpages/SNES/SNESNGSSetSweeps.html">SNESNGSSetSweeps</a>(<a href="../manualpages/SNES/SNES.html">SNES</a>, <a href="../manualpages/Sys/PetscInt.html">PetscInt</a>)</font></strong>;
<a name="line686">686: </a><strong><font color="#4169E1">PETSC_EXTERN <a href="../manualpages/Sys/PetscErrorCode.html">PetscErrorCode</a> <a href="../manualpages/SNES/SNESNGSGetSweeps.html">SNESNGSGetSweeps</a>(<a href="../manualpages/SNES/SNES.html">SNES</a>, <a href="../manualpages/Sys/PetscInt.html">PetscInt</a> *)</font></strong>;
<a name="line687">687: </a><strong><font color="#4169E1">PETSC_EXTERN <a href="../manualpages/Sys/PetscErrorCode.html">PetscErrorCode</a> <a href="../manualpages/SNES/SNESNGSSetTolerances.html">SNESNGSSetTolerances</a>(<a href="../manualpages/SNES/SNES.html">SNES</a>, <a href="../manualpages/Sys/PetscReal.html">PetscReal</a>, <a href="../manualpages/Sys/PetscReal.html">PetscReal</a>, <a href="../manualpages/Sys/PetscReal.html">PetscReal</a>, <a href="../manualpages/Sys/PetscInt.html">PetscInt</a>)</font></strong>;
<a name="line688">688: </a><strong><font color="#4169E1">PETSC_EXTERN <a href="../manualpages/Sys/PetscErrorCode.html">PetscErrorCode</a> <a href="../manualpages/SNES/SNESNGSGetTolerances.html">SNESNGSGetTolerances</a>(<a href="../manualpages/SNES/SNES.html">SNES</a>, <a href="../manualpages/Sys/PetscReal.html">PetscReal</a> *, <a href="../manualpages/Sys/PetscReal.html">PetscReal</a> *, <a href="../manualpages/Sys/PetscReal.html">PetscReal</a> *, <a href="../manualpages/Sys/PetscInt.html">PetscInt</a> *)</font></strong>;

<a name="line690">690: </a><strong><font color="#4169E1">PETSC_EXTERN <a href="../manualpages/Sys/PetscErrorCode.html">PetscErrorCode</a> <a href="../manualpages/SNES/SNESSetAlwaysComputesFinalResidual.html">SNESSetAlwaysComputesFinalResidual</a>(<a href="../manualpages/SNES/SNES.html">SNES</a>, <a href="../manualpages/Sys/PetscBool.html">PetscBool</a>)</font></strong>;
<a name="line691">691: </a><strong><font color="#4169E1">PETSC_EXTERN <a href="../manualpages/Sys/PetscErrorCode.html">PetscErrorCode</a> <a href="../manualpages/SNES/SNESGetAlwaysComputesFinalResidual.html">SNESGetAlwaysComputesFinalResidual</a>(<a href="../manualpages/SNES/SNES.html">SNES</a>, <a href="../manualpages/Sys/PetscBool.html">PetscBool</a> *)</font></strong>;

<a name="line693">693: </a><strong><font color="#4169E1">PETSC_EXTERN <a href="../manualpages/Sys/PetscErrorCode.html">PetscErrorCode</a> <a href="../manualpages/SNES/SNESShellGetContext.html">SNESShellGetContext</a>(<a href="../manualpages/SNES/SNES.html">SNES</a>, void *)</font></strong>;
<a name="line694">694: </a><strong><font color="#4169E1">PETSC_EXTERN <a href="../manualpages/Sys/PetscErrorCode.html">PetscErrorCode</a> <a href="../manualpages/SNES/SNESShellSetContext.html">SNESShellSetContext</a>(<a href="../manualpages/SNES/SNES.html">SNES</a>, void *)</font></strong>;
<a name="line695">695: </a><strong><font color="#4169E1"><a name="SNESShellSetSolve"></a>PETSC_EXTERN <a href="../manualpages/Sys/PetscErrorCode.html">PetscErrorCode</a> <a href="../manualpages/SNES/SNESShellSetSolve.html">SNESShellSetSolve</a>(<a href="../manualpages/SNES/SNES.html">SNES</a>, <a href="../manualpages/Sys/PetscErrorCode.html">PetscErrorCode</a> (*)(<a href="../manualpages/SNES/SNES.html">SNES</a>, <a href="../manualpages/Vec/Vec.html">Vec</a>)</font></strong>);

<a name="line697">697: </a><font color="#B22222">/* --------- Routines specifically for line search methods --------------- */</font>

<a name="line699">699: </a><font color="#B22222">/*S</font>
<a name="line700">700: </a><font color="#B22222">   <a href="../manualpages/SNES/SNESLineSearch.html">SNESLineSearch</a> - Abstract PETSc object that manages line-search operations for nonlinear solvers</font>

<a name="line702">702: </a><font color="#B22222">   Level: beginner</font>

<a name="line704">704: </a><font color="#B22222">.seealso: [](ch_snes), `<a href="../manualpages/SNES/SNESLineSearchType.html">SNESLineSearchType</a>`, `<a href="../manualpages/SNES/SNESLineSearchCreate.html">SNESLineSearchCreate</a>()`, `<a href="../manualpages/SNES/SNESLineSearchSetType.html">SNESLineSearchSetType</a>()`, `<a href="../manualpages/SNES/SNES.html">SNES</a>`</font>
<a name="line705">705: </a><font color="#B22222">S*/</font>
<a name="line706">706: </a><font color="#4169E1">typedef struct _p_LineSearch *<a href="../manualpages/SNES/SNESLineSearch.html">SNESLineSearch</a>;</font>

<a name="line708">708: </a><font color="#B22222">/*J</font>
<a name="line709">709: </a><font color="#B22222">   <a href="../manualpages/SNES/SNESLineSearchType.html">SNESLineSearchType</a> - String with the name of a PETSc line search method `<a href="../manualpages/SNES/SNESLineSearch.html">SNESLineSearch</a>`. Provides all the linesearches for the nonlinear solvers, `<a href="../manualpages/SNES/SNES.html">SNES</a>`,</font>
<a name="line710">710: </a><font color="#B22222">                        in PETSc.</font>

<a name="line712">712: </a><font color="#B22222">   Values:</font>
<a name="line713">713: </a><font color="#B22222">+  `<a href="../manualpages/SNES/SNESLINESEARCHBASIC.html">SNESLINESEARCHBASIC</a>`   - (or equivalently `SNESLINESEARCHNONE`) Simple damping line search, defaults to using the full Newton step</font>
<a name="line714">714: </a><font color="#B22222">.  `<a href="../manualpages/SNES/SNESLINESEARCHBT.html">SNESLINESEARCHBT</a>`      - Backtracking line search over the L2 norm of the function</font>
<a name="line715">715: </a><font color="#B22222">.  `<a href="../manualpages/SNES/SNESLINESEARCHL2.html">SNESLINESEARCHL2</a>`      - Secant line search over the L2 norm of the function</font>
<a name="line716">716: </a><font color="#B22222">.  `<a href="../manualpages/SNES/SNESLINESEARCHCP.html">SNESLINESEARCHCP</a>`      - Critical point secant line search assuming $F(x) = \nabla G(x)$ for some unknown $G(x)$</font>
<a name="line717">717: </a><font color="#B22222">.  `<a href="../manualpages/SNES/SNESLINESEARCHNLEQERR.html">SNESLINESEARCHNLEQERR</a>` - Affine-covariant error-oriented linesearch</font>
<a name="line718">718: </a><font color="#B22222">-  `<a href="../manualpages/SNES/SNESLINESEARCHSHELL.html">SNESLINESEARCHSHELL</a>`   - User provided `<a href="../manualpages/SNES/SNESLineSearch.html">SNESLineSearch</a>` implementation</font>

<a name="line720">720: </a><font color="#B22222">   Level: beginner</font>

<a name="line722">722: </a><font color="#B22222">   Note:</font>
<a name="line723">723: </a><font color="#B22222">   Use `<a href="../manualpages/SNES/SNESLineSearchSetType.html">SNESLineSearchSetType</a>()` or the options database key `-snes_linesearch_type` to set</font>
<a name="line724">724: </a><font color="#B22222">   the specific line search algorithm to use with a given `<a href="../manualpages/SNES/SNES.html">SNES</a>` object. Not all `<a href="../manualpages/SNES/SNESType.html">SNESType</a>` can utilize a line search.</font>

<a name="line726">726: </a><font color="#B22222">.seealso: [](ch_snes), `<a href="../manualpages/SNES/SNESLineSearch.html">SNESLineSearch</a>`, `<a href="../manualpages/SNES/SNESLineSearchSetType.html">SNESLineSearchSetType</a>()`, `<a href="../manualpages/SNES/SNES.html">SNES</a>`</font>
<a name="line727">727: </a><font color="#B22222">J*/</font>
<a name="line728">728: </a><font color="#4169E1">typedef const char *<a href="../manualpages/SNES/SNESLineSearchType.html">SNESLineSearchType</a>;</font>
<a name="line729">729: </a><strong><font color="#228B22">#define <a href="../manualpages/SNES/SNESLINESEARCHBT.html">SNESLINESEARCHBT</a>        </font><font color="#666666">"bt"</font><font color="#228B22"></font></strong>
<a name="line730">730: </a><strong><font color="#228B22">#define <a href="../manualpages/SNES/SNESLINESEARCHNLEQERR.html">SNESLINESEARCHNLEQERR</a>   </font><font color="#666666">"nleqerr"</font><font color="#228B22"></font></strong>
<a name="line731">731: </a><strong><font color="#228B22">#define <a href="../manualpages/SNES/SNESLINESEARCHBASIC.html">SNESLINESEARCHBASIC</a>     </font><font color="#666666">"basic"</font><font color="#228B22"></font></strong>
<a name="line732">732: </a><strong><font color="#228B22">#define SNESLINESEARCHNONE      </font><font color="#666666">"none"</font><font color="#228B22"></font></strong>
<a name="line733">733: </a><strong><font color="#228B22">#define <a href="../manualpages/SNES/SNESLINESEARCHL2.html">SNESLINESEARCHL2</a>        </font><font color="#666666">"l2"</font><font color="#228B22"></font></strong>
<a name="line734">734: </a><strong><font color="#228B22">#define <a href="../manualpages/SNES/SNESLINESEARCHCP.html">SNESLINESEARCHCP</a>        </font><font color="#666666">"cp"</font><font color="#228B22"></font></strong>
<a name="line735">735: </a><strong><font color="#228B22">#define <a href="../manualpages/SNES/SNESLINESEARCHSHELL.html">SNESLINESEARCHSHELL</a>     </font><font color="#666666">"shell"</font><font color="#228B22"></font></strong>
<a name="line736">736: </a><strong><font color="#228B22">#define <a href="../manualpages/SNES/SNESLINESEARCHNCGLINEAR.html">SNESLINESEARCHNCGLINEAR</a> </font><font color="#666666">"ncglinear"</font><font color="#228B22"></font></strong>
<a name="line737">737: </a><strong><font color="#228B22">#define <a href="../manualpages/SNES/SNESLINESEARCHBISECTION.html">SNESLINESEARCHBISECTION</a> </font><font color="#666666">"bisection"</font><font color="#228B22"></font></strong>

<a name="line739">739: </a>PETSC_EXTERN <a href="../manualpages/Sys/PetscFunctionList.html">PetscFunctionList</a> SNESList;
<a name="line740">740: </a>PETSC_EXTERN <a href="../manualpages/Sys/PetscClassId.html">PetscClassId</a>      SNESLINESEARCH_CLASSID;
<a name="line741">741: </a>PETSC_EXTERN <a href="../manualpages/Sys/PetscFunctionList.html">PetscFunctionList</a> SNESLineSearchList;

<a name="line743">743: </a><strong><font color="#228B22">#define SNES_LINESEARCH_ORDER_LINEAR    1</font></strong>
<a name="line744">744: </a><strong><font color="#228B22">#define SNES_LINESEARCH_ORDER_QUADRATIC 2</font></strong>
<a name="line745">745: </a><strong><font color="#228B22">#define SNES_LINESEARCH_ORDER_CUBIC     3</font></strong>

<a name="line747">747: </a><font color="#B22222">/*S</font>
<a name="line748">748: </a><font color="#B22222">  <a href="../manualpages/SNES/SNESLineSearchVIProjectFn.html">SNESLineSearchVIProjectFn</a> - A prototype of a `<a href="../manualpages/SNES/SNES.html">SNES</a>` function that projects a vector onto the VI bounds, passed to `<a href="../manualpages/SNES/SNESLineSearchSetVIFunctions.html">SNESLineSearchSetVIFunctions</a>()`</font>

<a name="line750">750: </a><font color="#B22222">  Calling Sequence:</font>
<a name="line751">751: </a><font color="#B22222">+ snes  - `<a href="../manualpages/SNES/SNES.html">SNES</a>` context</font>
<a name="line752">752: </a><font color="#B22222">- u     - the vector to project to the bounds</font>

<a name="line754">754: </a><font color="#B22222">  Level: advanced</font>

<a name="line756">756: </a><font color="#B22222">  Note:</font>
<a name="line757">757: </a><font color="#B22222">  The deprecated `SNESLineSearchVIProjectFunc` still works as a replacement for `<a href="../manualpages/SNES/SNESLineSearchVIProjectFn.html">SNESLineSearchVIProjectFn</a>` *.</font>

<a name="line759">759: </a><font color="#B22222">.seealso: [](ch_snes), `<a href="../manualpages/SNES/SNES.html">SNES</a>`, `<a href="../manualpages/SNES/SNESLineSearch.html">SNESLineSearch</a>`</font>
<a name="line760">760: </a><font color="#B22222">S*/</font>
<a name="line761">761: </a><strong><font color="#4169E1">PETSC_EXTERN_TYPEDEF typedef <a href="../manualpages/Sys/PetscErrorCode.html">PetscErrorCode</a>(<a href="../manualpages/SNES/SNESLineSearchVIProjectFn.html">SNESLineSearchVIProjectFn</a>)(<a href="../manualpages/SNES/SNES.html">SNES</a> snes, <a href="../manualpages/Vec/Vec.html">Vec</a> u)</font></strong>;
<a name="line762">762: </a>PETSC_EXTERN_TYPEDEF <font color="#4169E1">typedef</font> <a href="../manualpages/SNES/SNESLineSearchVIProjectFn.html">SNESLineSearchVIProjectFn</a> *SNESLineSearchVIProjectFunc; <font color="#B22222">// deprecated</font>

<a name="line764">764: </a><font color="#B22222">/*S</font>
<a name="line765">765: </a><font color="#B22222">  <a href="../manualpages/SNES/SNESLineSearchVIProjectFn.html">SNESLineSearchVIProjectFn</a> - A prototype of a `<a href="../manualpages/SNES/SNES.html">SNES</a>` function that computes the norm of the active set variables in a vector in a VI solve,</font>
<a name="line766">766: </a><font color="#B22222">  passed to `<a href="../manualpages/SNES/SNESLineSearchSetVIFunctions.html">SNESLineSearchSetVIFunctions</a>()`</font>

<a name="line768">768: </a><font color="#B22222">  Calling Sequence:</font>
<a name="line769">769: </a><font color="#B22222">+ snes  - `<a href="../manualpages/SNES/SNES.html">SNES</a>` context</font>
<a name="line770">770: </a><font color="#B22222">. f     - the vector to compute the norm of</font>
<a name="line771">771: </a><font color="#B22222">. u     - the current solution, entries that are on the VI bounds are ignored</font>
<a name="line772">772: </a><font color="#B22222">- fnorm - the resulting norm</font>

<a name="line774">774: </a><font color="#B22222">  Level: advanced</font>

<a name="line776">776: </a><font color="#B22222">  Note:</font>
<a name="line777">777: </a><font color="#B22222">  The deprecated `SNESLineSearchVINormFunc` still works as a replacement for `SNESLineSearchVINormFn` *.</font>

<a name="line779">779: </a><font color="#B22222">.seealso: [](ch_snes), `<a href="../manualpages/SNES/SNES.html">SNES</a>`, `<a href="../manualpages/SNES/SNESLineSearch.html">SNESLineSearch</a>`</font>
<a name="line780">780: </a><font color="#B22222">S*/</font>
<a name="line781">781: </a><strong><font color="#4169E1">PETSC_EXTERN_TYPEDEF typedef <a href="../manualpages/Sys/PetscErrorCode.html">PetscErrorCode</a>(SNESLineSearchVINormFn)(<a href="../manualpages/SNES/SNES.html">SNES</a> snes, <a href="../manualpages/Vec/Vec.html">Vec</a> f, <a href="../manualpages/Vec/Vec.html">Vec</a> u, <a href="../manualpages/Sys/PetscReal.html">PetscReal</a> *fnorm)</font></strong>;
<a name="line782">782: </a>PETSC_EXTERN_TYPEDEF <font color="#4169E1">typedef</font> SNESLineSearchVINormFn *SNESLineSearchVINormFunc; <font color="#B22222">// deprecated</font>

<a name="line784">784: </a><font color="#B22222">/*S</font>
<a name="line785">785: </a><font color="#B22222">  <a href="../manualpages/SNES/SNESLineSearchVIDirDerivFn.html">SNESLineSearchVIDirDerivFn</a> - A prototype of a `<a href="../manualpages/SNES/SNES.html">SNES</a>` function that computes the directional derivative considering the VI bounds, passed to `<a href="../manualpages/SNES/SNESLineSearchSetVIFunctions.html">SNESLineSearchSetVIFunctions</a>()`</font>

<a name="line787">787: </a><font color="#B22222">  Calling Sequence:</font>
<a name="line788">788: </a><font color="#B22222">+ snes  - `<a href="../manualpages/SNES/SNES.html">SNES</a>` context</font>
<a name="line789">789: </a><font color="#B22222">. f     - the function vector to compute the directional derivative with</font>
<a name="line790">790: </a><font color="#B22222">. u     - the current solution, entries that are on the VI bounds are ignored</font>
<a name="line791">791: </a><font color="#B22222">. y     - the direction to compute the directional derivative</font>
<a name="line792">792: </a><font color="#B22222">- fty   - the resulting directional derivative</font>

<a name="line794">794: </a><font color="#B22222">  Level: advanced</font>

<a name="line796">796: </a><font color="#B22222">.seealso: [](ch_snes), `<a href="../manualpages/SNES/SNES.html">SNES</a>`, `<a href="../manualpages/SNES/SNESLineSearch.html">SNESLineSearch</a>`, `<a href="../manualpages/SNES/SNESLineSearchVIProjectFn.html">SNESLineSearchVIProjectFn</a>`, `<a href="../manualpages/SNES/SNESLineSearchVIProjectFn.html">SNESLineSearchVIProjectFn</a>`, `<a href="../manualpages/SNES/SNESLineSearchSetVIFunctions.html">SNESLineSearchSetVIFunctions</a>()`, `<a href="../manualpages/SNES/SNESLineSearchGetVIFunctions.html">SNESLineSearchGetVIFunctions</a>()`</font>
<a name="line797">797: </a><font color="#B22222">S*/</font>
<a name="line798">798: </a><strong><font color="#4169E1">PETSC_EXTERN_TYPEDEF typedef <a href="../manualpages/Sys/PetscErrorCode.html">PetscErrorCode</a>(<a href="../manualpages/SNES/SNESLineSearchVIDirDerivFn.html">SNESLineSearchVIDirDerivFn</a>)(<a href="../manualpages/SNES/SNES.html">SNES</a> snes, <a href="../manualpages/Vec/Vec.html">Vec</a> f, <a href="../manualpages/Vec/Vec.html">Vec</a> u, <a href="../manualpages/Vec/Vec.html">Vec</a> y, <a href="../manualpages/Sys/PetscScalar.html">PetscScalar</a> *fty)</font></strong>;

<a name="line800">800: </a><strong><font color="#4169E1">PETSC_EXTERN_TYPEDEF typedef <a href="../manualpages/Sys/PetscErrorCode.html">PetscErrorCode</a>(SNESLineSearchApplyFn)(<a href="../manualpages/SNES/SNESLineSearch.html">SNESLineSearch</a>)</font></strong>;
<a name="line801">801: </a>PETSC_EXTERN_TYPEDEF <font color="#4169E1">typedef</font> SNESLineSearchApplyFn *SNESLineSearchApplyFunc; <font color="#B22222">// deprecated</font>
<a name="line802">802: </a><strong><font color="#4169E1">PETSC_EXTERN_TYPEDEF typedef <a href="../manualpages/Sys/PetscErrorCode.html">PetscErrorCode</a>(SNESLineSearchShellApplyFn)(<a href="../manualpages/SNES/SNESLineSearch.html">SNESLineSearch</a>, void *)</font></strong>;
<a name="line803">803: </a>PETSC_EXTERN_TYPEDEF <font color="#4169E1">typedef</font> SNESLineSearchShellApplyFn *SNESLineSearchUserFunc; <font color="#B22222">// deprecated</font>

<a name="line805">805: </a><strong><font color="#4169E1">PETSC_EXTERN <a href="../manualpages/Sys/PetscErrorCode.html">PetscErrorCode</a> <a href="../manualpages/SNES/SNESLineSearchCreate.html">SNESLineSearchCreate</a>(<a href="../manualpages/Sys/MPI_Comm.html">MPI_Comm</a>, <a href="../manualpages/SNES/SNESLineSearch.html">SNESLineSearch</a> *)</font></strong>;
<a name="line806">806: </a><strong><font color="#4169E1">PETSC_EXTERN <a href="../manualpages/Sys/PetscErrorCode.html">PetscErrorCode</a> <a href="../manualpages/SNES/SNESLineSearchReset.html">SNESLineSearchReset</a>(<a href="../manualpages/SNES/SNESLineSearch.html">SNESLineSearch</a>)</font></strong>;
<a name="line807">807: </a><strong><font color="#4169E1">PETSC_EXTERN <a href="../manualpages/Sys/PetscErrorCode.html">PetscErrorCode</a> <a href="../manualpages/SNES/SNESLineSearchView.html">SNESLineSearchView</a>(<a href="../manualpages/SNES/SNESLineSearch.html">SNESLineSearch</a>, <a href="../manualpages/Viewer/PetscViewer.html">PetscViewer</a>)</font></strong>;
<a name="line808">808: </a><strong><font color="#4169E1">PETSC_EXTERN <a href="../manualpages/Sys/PetscErrorCode.html">PetscErrorCode</a> <a href="../manualpages/SNES/SNESLineSearchDestroy.html">SNESLineSearchDestroy</a>(<a href="../manualpages/SNES/SNESLineSearch.html">SNESLineSearch</a> *)</font></strong>;
<a name="line809">809: </a><strong><font color="#4169E1">PETSC_EXTERN <a href="../manualpages/Sys/PetscErrorCode.html">PetscErrorCode</a> <a href="../manualpages/SNES/SNESLineSearchGetType.html">SNESLineSearchGetType</a>(<a href="../manualpages/SNES/SNESLineSearch.html">SNESLineSearch</a>, <a href="../manualpages/SNES/SNESLineSearchType.html">SNESLineSearchType</a> *)</font></strong>;
<a name="line810">810: </a><strong><font color="#4169E1">PETSC_EXTERN <a href="../manualpages/Sys/PetscErrorCode.html">PetscErrorCode</a> <a href="../manualpages/SNES/SNESLineSearchSetType.html">SNESLineSearchSetType</a>(<a href="../manualpages/SNES/SNESLineSearch.html">SNESLineSearch</a>, <a href="../manualpages/SNES/SNESLineSearchType.html">SNESLineSearchType</a>)</font></strong>;
<a name="line811">811: </a><strong><font color="#4169E1">PETSC_EXTERN <a href="../manualpages/Sys/PetscErrorCode.html">PetscErrorCode</a> <a href="../manualpages/SNES/SNESLineSearchSetFromOptions.html">SNESLineSearchSetFromOptions</a>(<a href="../manualpages/SNES/SNESLineSearch.html">SNESLineSearch</a>)</font></strong>;
<a name="line812">812: </a><strong><font color="#4169E1"><a name="SNESLineSearchSetFunction"></a>PETSC_EXTERN <a href="../manualpages/Sys/PetscErrorCode.html">PetscErrorCode</a> <a href="../manualpages/SNES/SNESLineSearchSetFunction.html">SNESLineSearchSetFunction</a>(<a href="../manualpages/SNES/SNESLineSearch.html">SNESLineSearch</a>, <a href="../manualpages/Sys/PetscErrorCode.html">PetscErrorCode</a> (*)(<a href="../manualpages/SNES/SNES.html">SNES</a>, <a href="../manualpages/Vec/Vec.html">Vec</a>, <a href="../manualpages/Vec/Vec.html">Vec</a>)</font></strong>);
<a name="line813">813: </a><strong><font color="#4169E1">PETSC_EXTERN <a href="../manualpages/Sys/PetscErrorCode.html">PetscErrorCode</a> <a href="../manualpages/SNES/SNESLineSearchSetUp.html">SNESLineSearchSetUp</a>(<a href="../manualpages/SNES/SNESLineSearch.html">SNESLineSearch</a>)</font></strong>;
<a name="line814">814: </a><strong><font color="#4169E1">PETSC_EXTERN <a href="../manualpages/Sys/PetscErrorCode.html">PetscErrorCode</a> <a href="../manualpages/SNES/SNESLineSearchApply.html">SNESLineSearchApply</a>(<a href="../manualpages/SNES/SNESLineSearch.html">SNESLineSearch</a>, <a href="../manualpages/Vec/Vec.html">Vec</a>, <a href="../manualpages/Vec/Vec.html">Vec</a>, <a href="../manualpages/Sys/PetscReal.html">PetscReal</a> *, <a href="../manualpages/Vec/Vec.html">Vec</a>)</font></strong>;
<a name="line815">815: </a><strong><font color="#4169E1">PETSC_EXTERN <a href="../manualpages/Sys/PetscErrorCode.html">PetscErrorCode</a> <a href="../manualpages/SNES/SNESLineSearchPreCheck.html">SNESLineSearchPreCheck</a>(<a href="../manualpages/SNES/SNESLineSearch.html">SNESLineSearch</a>, <a href="../manualpages/Vec/Vec.html">Vec</a>, <a href="../manualpages/Vec/Vec.html">Vec</a>, <a href="../manualpages/Sys/PetscBool.html">PetscBool</a> *)</font></strong>;
<a name="line816">816: </a><strong><font color="#4169E1">PETSC_EXTERN <a href="../manualpages/Sys/PetscErrorCode.html">PetscErrorCode</a> <a href="../manualpages/SNES/SNESLineSearchPostCheck.html">SNESLineSearchPostCheck</a>(<a href="../manualpages/SNES/SNESLineSearch.html">SNESLineSearch</a>, <a href="../manualpages/Vec/Vec.html">Vec</a>, <a href="../manualpages/Vec/Vec.html">Vec</a>, <a href="../manualpages/Vec/Vec.html">Vec</a>, <a href="../manualpages/Sys/PetscBool.html">PetscBool</a> *, <a href="../manualpages/Sys/PetscBool.html">PetscBool</a> *)</font></strong>;
<a name="line817">817: </a><strong><font color="#4169E1">PETSC_EXTERN <a href="../manualpages/Sys/PetscErrorCode.html">PetscErrorCode</a> <a href="../manualpages/SNES/SNESLineSearchSetWorkVecs.html">SNESLineSearchSetWorkVecs</a>(<a href="../manualpages/SNES/SNESLineSearch.html">SNESLineSearch</a>, <a href="../manualpages/Sys/PetscInt.html">PetscInt</a>)</font></strong>;

<a name="line819">819: </a><font color="#B22222">/* set the functions for precheck and postcheck */</font>

<a name="line821">821: </a><strong><font color="#4169E1">PETSC_EXTERN <a href="../manualpages/Sys/PetscErrorCode.html">PetscErrorCode</a> <a href="../manualpages/SNES/SNESLineSearchSetPreCheck.html">SNESLineSearchSetPreCheck</a>(<a href="../manualpages/SNES/SNESLineSearch.html">SNESLineSearch</a>, <a href="../manualpages/Sys/PetscErrorCode.html">PetscErrorCode</a> (*)(<a href="../manualpages/SNES/SNESLineSearch.html">SNESLineSearch</a>, <a href="../manualpages/Vec/Vec.html">Vec</a>, <a href="../manualpages/Vec/Vec.html">Vec</a>, <a href="../manualpages/Sys/PetscBool.html">PetscBool</a> *, void *), void *ctx)</font></strong>;
<a name="line822">822: </a><strong><font color="#4169E1">PETSC_EXTERN <a href="../manualpages/Sys/PetscErrorCode.html">PetscErrorCode</a> <a href="../manualpages/SNES/SNESLineSearchSetPostCheck.html">SNESLineSearchSetPostCheck</a>(<a href="../manualpages/SNES/SNESLineSearch.html">SNESLineSearch</a>, <a href="../manualpages/Sys/PetscErrorCode.html">PetscErrorCode</a> (*)(<a href="../manualpages/SNES/SNESLineSearch.html">SNESLineSearch</a>, <a href="../manualpages/Vec/Vec.html">Vec</a>, <a href="../manualpages/Vec/Vec.html">Vec</a>, <a href="../manualpages/Vec/Vec.html">Vec</a>, <a href="../manualpages/Sys/PetscBool.html">PetscBool</a> *, <a href="../manualpages/Sys/PetscBool.html">PetscBool</a> *, void *), void *ctx)</font></strong>;

<a name="line824">824: </a><strong><font color="#4169E1">PETSC_EXTERN <a href="../manualpages/Sys/PetscErrorCode.html">PetscErrorCode</a> <a href="../manualpages/SNES/SNESLineSearchGetPreCheck.html">SNESLineSearchGetPreCheck</a>(<a href="../manualpages/SNES/SNESLineSearch.html">SNESLineSearch</a>, <a href="../manualpages/Sys/PetscErrorCode.html">PetscErrorCode</a> (**)(<a href="../manualpages/SNES/SNESLineSearch.html">SNESLineSearch</a>, <a href="../manualpages/Vec/Vec.html">Vec</a>, <a href="../manualpages/Vec/Vec.html">Vec</a>, <a href="../manualpages/Sys/PetscBool.html">PetscBool</a> *, void *), void **ctx)</font></strong>;
<a name="line825">825: </a><strong><font color="#4169E1">PETSC_EXTERN <a href="../manualpages/Sys/PetscErrorCode.html">PetscErrorCode</a> <a href="../manualpages/SNES/SNESLineSearchGetPostCheck.html">SNESLineSearchGetPostCheck</a>(<a href="../manualpages/SNES/SNESLineSearch.html">SNESLineSearch</a>, <a href="../manualpages/Sys/PetscErrorCode.html">PetscErrorCode</a> (**)(<a href="../manualpages/SNES/SNESLineSearch.html">SNESLineSearch</a>, <a href="../manualpages/Vec/Vec.html">Vec</a>, <a href="../manualpages/Vec/Vec.html">Vec</a>, <a href="../manualpages/Vec/Vec.html">Vec</a>, <a href="../manualpages/Sys/PetscBool.html">PetscBool</a> *, <a href="../manualpages/Sys/PetscBool.html">PetscBool</a> *, void *), void **ctx)</font></strong>;

<a name="line827">827: </a><font color="#B22222">/* set the functions for VI-specific line search operations */</font>

<a name="line829">829: </a><strong><font color="#4169E1">PETSC_EXTERN <a href="../manualpages/Sys/PetscErrorCode.html">PetscErrorCode</a> <a href="../manualpages/SNES/SNESLineSearchSetVIFunctions.html">SNESLineSearchSetVIFunctions</a>(<a href="../manualpages/SNES/SNESLineSearch.html">SNESLineSearch</a>, <a href="../manualpages/SNES/SNESLineSearchVIProjectFn.html">SNESLineSearchVIProjectFn</a> *, SNESLineSearchVINormFn *, <a href="../manualpages/SNES/SNESLineSearchVIDirDerivFn.html">SNESLineSearchVIDirDerivFn</a> *)</font></strong>;
<a name="line830">830: </a><strong><font color="#4169E1">PETSC_EXTERN <a href="../manualpages/Sys/PetscErrorCode.html">PetscErrorCode</a> <a href="../manualpages/SNES/SNESLineSearchGetVIFunctions.html">SNESLineSearchGetVIFunctions</a>(<a href="../manualpages/SNES/SNESLineSearch.html">SNESLineSearch</a>, <a href="../manualpages/SNES/SNESLineSearchVIProjectFn.html">SNESLineSearchVIProjectFn</a> **, SNESLineSearchVINormFn **, <a href="../manualpages/SNES/SNESLineSearchVIDirDerivFn.html">SNESLineSearchVIDirDerivFn</a> **)</font></strong>;

<a name="line832">832: </a><font color="#B22222">/* pointers to the associated <a href="../manualpages/SNES/SNES.html">SNES</a> in order to be able to get the function evaluation out */</font>
<a name="line833">833: </a><strong><font color="#4169E1">PETSC_EXTERN <a href="../manualpages/Sys/PetscErrorCode.html">PetscErrorCode</a> <a href="../manualpages/SNES/SNESLineSearchSetSNES.html">SNESLineSearchSetSNES</a>(<a href="../manualpages/SNES/SNESLineSearch.html">SNESLineSearch</a>, <a href="../manualpages/SNES/SNES.html">SNES</a>)</font></strong>;
<a name="line834">834: </a><strong><font color="#4169E1">PETSC_EXTERN <a href="../manualpages/Sys/PetscErrorCode.html">PetscErrorCode</a> <a href="../manualpages/SNES/SNESLineSearchGetSNES.html">SNESLineSearchGetSNES</a>(<a href="../manualpages/SNES/SNESLineSearch.html">SNESLineSearch</a>, <a href="../manualpages/SNES/SNES.html">SNES</a> *)</font></strong>;

<a name="line836">836: </a><font color="#B22222">/* set and get the parameters and vectors */</font>
<a name="line837">837: </a><strong><font color="#4169E1">PETSC_EXTERN <a href="../manualpages/Sys/PetscErrorCode.html">PetscErrorCode</a> <a href="../manualpages/SNES/SNESLineSearchGetTolerances.html">SNESLineSearchGetTolerances</a>(<a href="../manualpages/SNES/SNESLineSearch.html">SNESLineSearch</a>, <a href="../manualpages/Sys/PetscReal.html">PetscReal</a> *, <a href="../manualpages/Sys/PetscReal.html">PetscReal</a> *, <a href="../manualpages/Sys/PetscReal.html">PetscReal</a> *, <a href="../manualpages/Sys/PetscReal.html">PetscReal</a> *, <a href="../manualpages/Sys/PetscReal.html">PetscReal</a> *, <a href="../manualpages/Sys/PetscInt.html">PetscInt</a> *)</font></strong>;
<a name="line838">838: </a><strong><font color="#4169E1">PETSC_EXTERN <a href="../manualpages/Sys/PetscErrorCode.html">PetscErrorCode</a> <a href="../manualpages/SNES/SNESLineSearchSetTolerances.html">SNESLineSearchSetTolerances</a>(<a href="../manualpages/SNES/SNESLineSearch.html">SNESLineSearch</a>, <a href="../manualpages/Sys/PetscReal.html">PetscReal</a>, <a href="../manualpages/Sys/PetscReal.html">PetscReal</a>, <a href="../manualpages/Sys/PetscReal.html">PetscReal</a>, <a href="../manualpages/Sys/PetscReal.html">PetscReal</a>, <a href="../manualpages/Sys/PetscReal.html">PetscReal</a>, <a href="../manualpages/Sys/PetscInt.html">PetscInt</a>)</font></strong>;

<a name="line840">840: </a><strong><font color="#4169E1">PETSC_EXTERN <a href="../manualpages/Sys/PetscErrorCode.html">PetscErrorCode</a> <a href="../manualpages/SNES/SNESLineSearchPreCheckPicard.html">SNESLineSearchPreCheckPicard</a>(<a href="../manualpages/SNES/SNESLineSearch.html">SNESLineSearch</a>, <a href="../manualpages/Vec/Vec.html">Vec</a>, <a href="../manualpages/Vec/Vec.html">Vec</a>, <a href="../manualpages/Sys/PetscBool.html">PetscBool</a> *, void *)</font></strong>;

<a name="line842">842: </a><strong><font color="#4169E1">PETSC_EXTERN <a href="../manualpages/Sys/PetscErrorCode.html">PetscErrorCode</a> <a href="../manualpages/SNES/SNESLineSearchGetLambda.html">SNESLineSearchGetLambda</a>(<a href="../manualpages/SNES/SNESLineSearch.html">SNESLineSearch</a>, <a href="../manualpages/Sys/PetscReal.html">PetscReal</a> *)</font></strong>;
<a name="line843">843: </a><strong><font color="#4169E1">PETSC_EXTERN <a href="../manualpages/Sys/PetscErrorCode.html">PetscErrorCode</a> <a href="../manualpages/SNES/SNESLineSearchSetLambda.html">SNESLineSearchSetLambda</a>(<a href="../manualpages/SNES/SNESLineSearch.html">SNESLineSearch</a>, <a href="../manualpages/Sys/PetscReal.html">PetscReal</a>)</font></strong>;

<a name="line845">845: </a><strong><font color="#4169E1">PETSC_EXTERN <a href="../manualpages/Sys/PetscErrorCode.html">PetscErrorCode</a> <a href="../manualpages/SNES/SNESLineSearchGetDamping.html">SNESLineSearchGetDamping</a>(<a href="../manualpages/SNES/SNESLineSearch.html">SNESLineSearch</a>, <a href="../manualpages/Sys/PetscReal.html">PetscReal</a> *)</font></strong>;
<a name="line846">846: </a><strong><font color="#4169E1">PETSC_EXTERN <a href="../manualpages/Sys/PetscErrorCode.html">PetscErrorCode</a> <a href="../manualpages/SNES/SNESLineSearchSetDamping.html">SNESLineSearchSetDamping</a>(<a href="../manualpages/SNES/SNESLineSearch.html">SNESLineSearch</a>, <a href="../manualpages/Sys/PetscReal.html">PetscReal</a>)</font></strong>;

<a name="line848">848: </a><strong><font color="#4169E1">PETSC_EXTERN <a href="../manualpages/Sys/PetscErrorCode.html">PetscErrorCode</a> <a href="../manualpages/SNES/SNESLineSearchGetOrder.html">SNESLineSearchGetOrder</a>(<a href="../manualpages/SNES/SNESLineSearch.html">SNESLineSearch</a>, <a href="../manualpages/Sys/PetscInt.html">PetscInt</a> *)</font></strong>;
<a name="line849">849: </a><strong><font color="#4169E1">PETSC_EXTERN <a href="../manualpages/Sys/PetscErrorCode.html">PetscErrorCode</a> <a href="../manualpages/SNES/SNESLineSearchSetOrder.html">SNESLineSearchSetOrder</a>(<a href="../manualpages/SNES/SNESLineSearch.html">SNESLineSearch</a>, <a href="../manualpages/Sys/PetscInt.html">PetscInt</a>)</font></strong>;

<a name="line851">851: </a><font color="#B22222">/*E</font>
<a name="line852">852: </a><font color="#B22222">    <a href="../manualpages/SNES/SNESLineSearchReason.html">SNESLineSearchReason</a> - indication if the line search has succeeded or failed and why</font>

<a name="line854">854: </a><font color="#B22222">  Values:</font>
<a name="line855">855: </a><font color="#B22222">+  `<a href="../manualpages/SNES/SNESLineSearchReason.html">SNES_LINESEARCH_SUCCEEDED</a>`       - the line search succeeded</font>
<a name="line856">856: </a><font color="#B22222">.  `<a href="../manualpages/SNES/SNESLineSearchReason.html">SNES_LINESEARCH_FAILED_NANORINF</a>` - a not a number of infinity appeared in the computions</font>
<a name="line857">857: </a><font color="#B22222">.  `<a href="../manualpages/SNES/SNESLineSearchReason.html">SNES_LINESEARCH_FAILED_DOMAIN</a>`   - the function was evaluated outside of its domain, see `<a href="../manualpages/SNES/SNESSetFunctionDomainError.html">SNESSetFunctionDomainError</a>()` and `<a href="../manualpages/SNES/SNESSetJacobianDomainError.html">SNESSetJacobianDomainError</a>()`</font>
<a name="line858">858: </a><font color="#B22222">.  `<a href="../manualpages/SNES/SNESLineSearchReason.html">SNES_LINESEARCH_FAILED_REDUCT</a>`   - the linear search failed to get the requested decrease in its norm or objective</font>
<a name="line859">859: </a><font color="#B22222">.  `<a href="../manualpages/SNES/SNESLineSearchReason.html">SNES_LINESEARCH_FAILED_USER</a>`     - used by `<a href="../manualpages/SNES/SNESLINESEARCHNLEQERR.html">SNESLINESEARCHNLEQERR</a>` to indicate the user changed the search direction inappropriately</font>
<a name="line860">860: </a><font color="#B22222">-  `<a href="../manualpages/SNES/SNESLineSearchReason.html">SNES_LINESEARCH_FAILED_FUNCTION</a>` - indicates the maximum number of function evaluations allowed has been surpassed, `<a href="../manualpages/SNES/SNESConvergedReason.html">SNESConvergedReason</a>` is also</font>
<a name="line861">861: </a><font color="#B22222">                                       set to `<a href="../manualpages/SNES/SNES_DIVERGED_FUNCTION_COUNT.html">SNES_DIVERGED_FUNCTION_COUNT</a>`</font>

<a name="line863">863: </a><font color="#B22222">   Level: intermediate</font>

<a name="line865">865: </a><font color="#B22222">   Developer Note:</font>
<a name="line866">866: </a><font color="#B22222">   Some of these reasons overlap with values of `<a href="../manualpages/SNES/SNESConvergedReason.html">SNESConvergedReason</a>`</font>

<a name="line868">868: </a><font color="#B22222">.seealso: [](ch_snes), `<a href="../manualpages/SNES/SNES.html">SNES</a>`, `<a href="../manualpages/SNES/SNESSolve.html">SNESSolve</a>()`, `<a href="../manualpages/SNES/SNESGetConvergedReason.html">SNESGetConvergedReason</a>()`, `<a href="../manualpages/KSP/KSPConvergedReason.html">KSPConvergedReason</a>`, `<a href="../manualpages/SNES/SNESSetConvergenceTest.html">SNESSetConvergenceTest</a>()`,</font>
<a name="line869">869: </a><font color="#B22222">          `<a href="../manualpages/SNES/SNESSetFunctionDomainError.html">SNESSetFunctionDomainError</a>()` and `<a href="../manualpages/SNES/SNESSetJacobianDomainError.html">SNESSetJacobianDomainError</a>()`</font>
<a name="line870">870: </a><font color="#B22222">E*/</font>
<a name="line871">871: </a><font color="#4169E1">typedef</font> <font color="#4169E1">enum</font> {
<a name="line872">872: </a>  <a href="../manualpages/SNES/SNESLineSearchReason.html">SNES_LINESEARCH_SUCCEEDED</a>,
<a name="line873">873: </a>  <a href="../manualpages/SNES/SNESLineSearchReason.html">SNES_LINESEARCH_FAILED_NANORINF</a>,
<a name="line874">874: </a>  <a href="../manualpages/SNES/SNESLineSearchReason.html">SNES_LINESEARCH_FAILED_DOMAIN</a>,
<a name="line875">875: </a>  <a href="../manualpages/SNES/SNESLineSearchReason.html">SNES_LINESEARCH_FAILED_REDUCT</a>, <font color="#B22222">/* INSUFFICIENT REDUCTION */</font>
<a name="line876">876: </a>  <a href="../manualpages/SNES/SNESLineSearchReason.html">SNES_LINESEARCH_FAILED_USER</a>,
<a name="line877">877: </a>  <a href="../manualpages/SNES/SNESLineSearchReason.html">SNES_LINESEARCH_FAILED_FUNCTION</a>
<a name="line878">878: </a>} <a href="../manualpages/SNES/SNESLineSearchReason.html">SNESLineSearchReason</a>;

<a name="line880">880: </a><strong><font color="#4169E1">PETSC_EXTERN <a href="../manualpages/Sys/PetscErrorCode.html">PetscErrorCode</a> <a href="../manualpages/SNES/SNESLineSearchGetReason.html">SNESLineSearchGetReason</a>(<a href="../manualpages/SNES/SNESLineSearch.html">SNESLineSearch</a>, <a href="../manualpages/SNES/SNESLineSearchReason.html">SNESLineSearchReason</a> *)</font></strong>;
<a name="line881">881: </a><strong><font color="#4169E1">PETSC_EXTERN <a href="../manualpages/Sys/PetscErrorCode.html">PetscErrorCode</a> <a href="../manualpages/SNES/SNESLineSearchSetReason.html">SNESLineSearchSetReason</a>(<a href="../manualpages/SNES/SNESLineSearch.html">SNESLineSearch</a>, <a href="../manualpages/SNES/SNESLineSearchReason.html">SNESLineSearchReason</a>)</font></strong>;

<a name="line883">883: </a><strong><font color="#4169E1">PETSC_EXTERN <a href="../manualpages/Sys/PetscErrorCode.html">PetscErrorCode</a> <a href="../manualpages/SNES/SNESLineSearchGetVecs.html">SNESLineSearchGetVecs</a>(<a href="../manualpages/SNES/SNESLineSearch.html">SNESLineSearch</a>, <a href="../manualpages/Vec/Vec.html">Vec</a> *, <a href="../manualpages/Vec/Vec.html">Vec</a> *, <a href="../manualpages/Vec/Vec.html">Vec</a> *, <a href="../manualpages/Vec/Vec.html">Vec</a> *, <a href="../manualpages/Vec/Vec.html">Vec</a> *)</font></strong>;
<a name="line884">884: </a><strong><font color="#4169E1">PETSC_EXTERN <a href="../manualpages/Sys/PetscErrorCode.html">PetscErrorCode</a> <a href="../manualpages/SNES/SNESLineSearchSetVecs.html">SNESLineSearchSetVecs</a>(<a href="../manualpages/SNES/SNESLineSearch.html">SNESLineSearch</a>, <a href="../manualpages/Vec/Vec.html">Vec</a>, <a href="../manualpages/Vec/Vec.html">Vec</a>, <a href="../manualpages/Vec/Vec.html">Vec</a>, <a href="../manualpages/Vec/Vec.html">Vec</a>, <a href="../manualpages/Vec/Vec.html">Vec</a>)</font></strong>;

<a name="line886">886: </a><strong><font color="#4169E1">PETSC_EXTERN <a href="../manualpages/Sys/PetscErrorCode.html">PetscErrorCode</a> <a href="../manualpages/SNES/SNESLineSearchGetNorms.html">SNESLineSearchGetNorms</a>(<a href="../manualpages/SNES/SNESLineSearch.html">SNESLineSearch</a>, <a href="../manualpages/Sys/PetscReal.html">PetscReal</a> *, <a href="../manualpages/Sys/PetscReal.html">PetscReal</a> *, <a href="../manualpages/Sys/PetscReal.html">PetscReal</a> *)</font></strong>;
<a name="line887">887: </a><strong><font color="#4169E1">PETSC_EXTERN <a href="../manualpages/Sys/PetscErrorCode.html">PetscErrorCode</a> <a href="../manualpages/SNES/SNESLineSearchSetNorms.html">SNESLineSearchSetNorms</a>(<a href="../manualpages/SNES/SNESLineSearch.html">SNESLineSearch</a>, <a href="../manualpages/Sys/PetscReal.html">PetscReal</a>, <a href="../manualpages/Sys/PetscReal.html">PetscReal</a>, <a href="../manualpages/Sys/PetscReal.html">PetscReal</a>)</font></strong>;
<a name="line888">888: </a><strong><font color="#4169E1">PETSC_EXTERN <a href="../manualpages/Sys/PetscErrorCode.html">PetscErrorCode</a> <a href="../manualpages/SNES/SNESLineSearchComputeNorms.html">SNESLineSearchComputeNorms</a>(<a href="../manualpages/SNES/SNESLineSearch.html">SNESLineSearch</a>)</font></strong>;
<a name="line889">889: </a><strong><font color="#4169E1">PETSC_EXTERN <a href="../manualpages/Sys/PetscErrorCode.html">PetscErrorCode</a> <a href="../manualpages/SNES/SNESLineSearchSetComputeNorms.html">SNESLineSearchSetComputeNorms</a>(<a href="../manualpages/SNES/SNESLineSearch.html">SNESLineSearch</a>, <a href="../manualpages/Sys/PetscBool.html">PetscBool</a>)</font></strong>;

<a name="line891">891: </a><strong><font color="#4169E1">PETSC_EXTERN <a href="../manualpages/Sys/PetscErrorCode.html">PetscErrorCode</a> <a href="../manualpages/SNES/SNESLineSearchMonitor.html">SNESLineSearchMonitor</a>(<a href="../manualpages/SNES/SNESLineSearch.html">SNESLineSearch</a>)</font></strong>;
<a name="line892">892: </a><strong><font color="#4169E1">PETSC_EXTERN <a href="../manualpages/Sys/PetscErrorCode.html">PetscErrorCode</a> <a href="../manualpages/SNES/SNESLineSearchMonitorSet.html">SNESLineSearchMonitorSet</a>(<a href="../manualpages/SNES/SNESLineSearch.html">SNESLineSearch</a>, <a href="../manualpages/Sys/PetscErrorCode.html">PetscErrorCode</a> (*)(<a href="../manualpages/SNES/SNESLineSearch.html">SNESLineSearch</a>, void *), void *, <a href="../manualpages/Sys/PetscCtxDestroyFn.html">PetscCtxDestroyFn</a> *)</font></strong>;
<a name="line893">893: </a><strong><font color="#4169E1"><a name="SNESLineSearchMonitorSetFromOptions"></a>PETSC_EXTERN <a href="../manualpages/Sys/PetscErrorCode.html">PetscErrorCode</a> <a href="../manualpages/SNES/SNESLineSearchMonitorSetFromOptions.html">SNESLineSearchMonitorSetFromOptions</a>(<a href="../manualpages/SNES/SNESLineSearch.html">SNESLineSearch</a>, const char[], const char[], const char[], <a href="../manualpages/Sys/PetscErrorCode.html">PetscErrorCode</a> (*)(<a href="../manualpages/SNES/SNESLineSearch.html">SNESLineSearch</a>, PetscViewerAndFormat *), <a href="../manualpages/Sys/PetscErrorCode.html">PetscErrorCode</a> (*)(<a href="../manualpages/SNES/SNESLineSearch.html">SNESLineSearch</a>, PetscViewerAndFormat *)</font></strong>);
<a name="line894">894: </a><strong><font color="#4169E1">PETSC_EXTERN <a href="../manualpages/Sys/PetscErrorCode.html">PetscErrorCode</a> <a href="../manualpages/SNES/SNESLineSearchMonitorCancel.html">SNESLineSearchMonitorCancel</a>(<a href="../manualpages/SNES/SNESLineSearch.html">SNESLineSearch</a>)</font></strong>;
<a name="line895">895: </a><strong><font color="#4169E1">PETSC_EXTERN <a href="../manualpages/Sys/PetscErrorCode.html">PetscErrorCode</a> <a href="../manualpages/SNES/SNESLineSearchSetDefaultMonitor.html">SNESLineSearchSetDefaultMonitor</a>(<a href="../manualpages/SNES/SNESLineSearch.html">SNESLineSearch</a>, <a href="../manualpages/Viewer/PetscViewer.html">PetscViewer</a>)</font></strong>;
<a name="line896">896: </a><strong><font color="#4169E1">PETSC_EXTERN <a href="../manualpages/Sys/PetscErrorCode.html">PetscErrorCode</a> <a href="../manualpages/SNES/SNESLineSearchGetDefaultMonitor.html">SNESLineSearchGetDefaultMonitor</a>(<a href="../manualpages/SNES/SNESLineSearch.html">SNESLineSearch</a>, <a href="../manualpages/Viewer/PetscViewer.html">PetscViewer</a> *)</font></strong>;
<a name="line897">897: </a><strong><font color="#4169E1">PETSC_EXTERN <a href="../manualpages/Sys/PetscErrorCode.html">PetscErrorCode</a> <a href="../manualpages/SNES/SNESLineSearchMonitorSolutionUpdate.html">SNESLineSearchMonitorSolutionUpdate</a>(<a href="../manualpages/SNES/SNESLineSearch.html">SNESLineSearch</a>, PetscViewerAndFormat *)</font></strong>;

<a name="line899">899: </a><strong><font color="#4169E1">PETSC_EXTERN <a href="../manualpages/Sys/PetscErrorCode.html">PetscErrorCode</a> <a href="../manualpages/SNES/SNESLineSearchAppendOptionsPrefix.html">SNESLineSearchAppendOptionsPrefix</a>(<a href="../manualpages/SNES/SNESLineSearch.html">SNESLineSearch</a>, const char[])</font></strong>;
<a name="line900">900: </a><strong><font color="#4169E1">PETSC_EXTERN <a href="../manualpages/Sys/PetscErrorCode.html">PetscErrorCode</a> <a href="../manualpages/SNES/SNESLineSearchGetOptionsPrefix.html">SNESLineSearchGetOptionsPrefix</a>(<a href="../manualpages/SNES/SNESLineSearch.html">SNESLineSearch</a>, const char *[])</font></strong>;

<a name="line902">902: </a><font color="#B22222">/* Shell interface functions */</font>
<a name="line903">903: </a><strong><font color="#4169E1">PETSC_EXTERN <a href="../manualpages/Sys/PetscErrorCode.html">PetscErrorCode</a> <a href="../manualpages/SNES/SNESLineSearchShellSetApply.html">SNESLineSearchShellSetApply</a>(<a href="../manualpages/SNES/SNESLineSearch.html">SNESLineSearch</a>, SNESLineSearchShellApplyFn, void *)</font></strong>;
<a name="line904">904: </a><strong><font color="#4169E1">PETSC_EXTERN <a href="../manualpages/Sys/PetscErrorCode.html">PetscErrorCode</a> <a href="../manualpages/SNES/SNESLineSearchShellGetApply.html">SNESLineSearchShellGetApply</a>(<a href="../manualpages/SNES/SNESLineSearch.html">SNESLineSearch</a>, SNESLineSearchShellApplyFn **, void **)</font></strong>;

<a name="line906">906: </a>PETSC_DEPRECATED_FUNCTION(3, 21, 0, <font color="#666666">"SNESLinesearchShellSetApply()"</font>, ) static inline <a href="../manualpages/Sys/PetscErrorCode.html">PetscErrorCode</a> SNESLineSearchShellSetUserFunc(<a href="../manualpages/SNES/SNESLineSearch.html">SNESLineSearch</a> ls, SNESLineSearchUserFunc f, void *ctx)
<a name="line907">907: </a>{
<a name="line908">908: </a>  <font color="#4169E1">return</font> <a href="../manualpages/SNES/SNESLineSearchShellSetApply.html">SNESLineSearchShellSetApply</a>(ls, f, ctx);
<a name="line909">909: </a>}

<a name="line911">911: </a>PETSC_DEPRECATED_FUNCTION(3, 21, 0, <font color="#666666">"SNESLinesearchShellGetApply()"</font>, ) static inline <a href="../manualpages/Sys/PetscErrorCode.html">PetscErrorCode</a> SNESLineSearchShellGetUserFunc(<a href="../manualpages/SNES/SNESLineSearch.html">SNESLineSearch</a> ls, SNESLineSearchUserFunc *f, void **ctx)
<a name="line912">912: </a>{
<a name="line913">913: </a>  <font color="#4169E1">return</font> <a href="../manualpages/SNES/SNESLineSearchShellGetApply.html">SNESLineSearchShellGetApply</a>(ls, f, ctx);
<a name="line914">914: </a>}

<a name="line916">916: </a><font color="#B22222">/* BT interface functions */</font>
<a name="line917">917: </a><strong><font color="#4169E1">PETSC_EXTERN <a href="../manualpages/Sys/PetscErrorCode.html">PetscErrorCode</a> <a href="../manualpages/SNES/SNESLineSearchBTSetAlpha.html">SNESLineSearchBTSetAlpha</a>(<a href="../manualpages/SNES/SNESLineSearch.html">SNESLineSearch</a>, <a href="../manualpages/Sys/PetscReal.html">PetscReal</a>)</font></strong>;
<a name="line918">918: </a><strong><font color="#4169E1">PETSC_EXTERN <a href="../manualpages/Sys/PetscErrorCode.html">PetscErrorCode</a> <a href="../manualpages/SNES/SNESLineSearchBTGetAlpha.html">SNESLineSearchBTGetAlpha</a>(<a href="../manualpages/SNES/SNESLineSearch.html">SNESLineSearch</a>, <a href="../manualpages/Sys/PetscReal.html">PetscReal</a> *)</font></strong>;

<a name="line920">920: </a><font color="#B22222">/*register line search types */</font>
<a name="line921">921: </a><strong><font color="#4169E1"><a name="SNESLineSearchRegister"></a>PETSC_EXTERN <a href="../manualpages/Sys/PetscErrorCode.html">PetscErrorCode</a> <a href="../manualpages/SNES/SNESLineSearchRegister.html">SNESLineSearchRegister</a>(const char[], <a href="../manualpages/Sys/PetscErrorCode.html">PetscErrorCode</a> (*)(<a href="../manualpages/SNES/SNESLineSearch.html">SNESLineSearch</a>)</font></strong>);

<a name="line923">923: </a><font color="#B22222">/* Routines for VI solver */</font>
<a name="line924">924: </a><strong><font color="#4169E1">PETSC_EXTERN <a href="../manualpages/Sys/PetscErrorCode.html">PetscErrorCode</a> <a href="../manualpages/SNES/SNESVISetVariableBounds.html">SNESVISetVariableBounds</a>(<a href="../manualpages/SNES/SNES.html">SNES</a>, <a href="../manualpages/Vec/Vec.html">Vec</a>, <a href="../manualpages/Vec/Vec.html">Vec</a>)</font></strong>;
<a name="line925">925: </a><strong><font color="#4169E1">PETSC_EXTERN <a href="../manualpages/Sys/PetscErrorCode.html">PetscErrorCode</a> <a href="../manualpages/SNES/SNESVIGetVariableBounds.html">SNESVIGetVariableBounds</a>(<a href="../manualpages/SNES/SNES.html">SNES</a>, <a href="../manualpages/Vec/Vec.html">Vec</a> *, <a href="../manualpages/Vec/Vec.html">Vec</a> *)</font></strong>;
<a name="line926">926: </a><strong><font color="#4169E1"><a name="SNESVISetComputeVariableBounds"></a>PETSC_EXTERN <a href="../manualpages/Sys/PetscErrorCode.html">PetscErrorCode</a> <a href="../manualpages/SNES/SNESVISetComputeVariableBounds.html">SNESVISetComputeVariableBounds</a>(<a href="../manualpages/SNES/SNES.html">SNES</a>, <a href="../manualpages/Sys/PetscErrorCode.html">PetscErrorCode</a> (*)(<a href="../manualpages/SNES/SNES.html">SNES</a>, <a href="../manualpages/Vec/Vec.html">Vec</a>, <a href="../manualpages/Vec/Vec.html">Vec</a>)</font></strong>);
<a name="line927">927: </a><strong><font color="#4169E1">PETSC_EXTERN <a href="../manualpages/Sys/PetscErrorCode.html">PetscErrorCode</a> <a href="../manualpages/SNES/SNESVIGetInactiveSet.html">SNESVIGetInactiveSet</a>(<a href="../manualpages/SNES/SNES.html">SNES</a>, <a href="../manualpages/IS/IS.html">IS</a> *)</font></strong>;
<a name="line928">928: </a><strong><font color="#4169E1">PETSC_EXTERN <a href="../manualpages/Sys/PetscErrorCode.html">PetscErrorCode</a> <a href="../manualpages/SNES/SNESVIGetActiveSetIS.html">SNESVIGetActiveSetIS</a>(<a href="../manualpages/SNES/SNES.html">SNES</a>, <a href="../manualpages/Vec/Vec.html">Vec</a>, <a href="../manualpages/Vec/Vec.html">Vec</a>, <a href="../manualpages/IS/IS.html">IS</a> *)</font></strong>;
<a name="line929">929: </a><strong><font color="#4169E1">PETSC_EXTERN <a href="../manualpages/Sys/PetscErrorCode.html">PetscErrorCode</a> <a href="../manualpages/SNES/SNESVIComputeInactiveSetFnorm.html">SNESVIComputeInactiveSetFnorm</a>(<a href="../manualpages/SNES/SNES.html">SNES</a>, <a href="../manualpages/Vec/Vec.html">Vec</a>, <a href="../manualpages/Vec/Vec.html">Vec</a>, <a href="../manualpages/Sys/PetscReal.html">PetscReal</a> *)</font></strong>;
<a name="line930">930: </a><strong><font color="#4169E1">PETSC_EXTERN <a href="../manualpages/Sys/PetscErrorCode.html">PetscErrorCode</a> <a href="../manualpages/SNES/SNESVIComputeInactiveSetFtY.html">SNESVIComputeInactiveSetFtY</a>(<a href="../manualpages/SNES/SNES.html">SNES</a>, <a href="../manualpages/Vec/Vec.html">Vec</a>, <a href="../manualpages/Vec/Vec.html">Vec</a>, <a href="../manualpages/Vec/Vec.html">Vec</a>, <a href="../manualpages/Sys/PetscScalar.html">PetscScalar</a> *)</font></strong>;
<a name="line931">931: </a><strong><font color="#4169E1">PETSC_EXTERN <a href="../manualpages/Sys/PetscErrorCode.html">PetscErrorCode</a> <a href="../manualpages/SNES/SNESVISetRedundancyCheck.html">SNESVISetRedundancyCheck</a>(<a href="../manualpages/SNES/SNES.html">SNES</a>, <a href="../manualpages/Sys/PetscErrorCode.html">PetscErrorCode</a> (*)(<a href="../manualpages/SNES/SNES.html">SNES</a>, <a href="../manualpages/IS/IS.html">IS</a>, <a href="../manualpages/IS/IS.html">IS</a> *, void *), void *)</font></strong>;
<a name="line932">932: </a><strong><font color="#4169E1">PETSC_EXTERN <a href="../manualpages/Sys/PetscErrorCode.html">PetscErrorCode</a> <a href="../manualpages/SNES/SNESVIComputeMeritFunction.html">SNESVIComputeMeritFunction</a>(<a href="../manualpages/Vec/Vec.html">Vec</a>, <a href="../manualpages/Sys/PetscReal.html">PetscReal</a> *, <a href="../manualpages/Sys/PetscReal.html">PetscReal</a> *)</font></strong>;
<a name="line933">933: </a><strong><font color="#4169E1">PETSC_EXTERN <a href="../manualpages/Sys/PetscErrorCode.html">PetscErrorCode</a> <a href="../manualpages/SNES/SNESVIComputeFunction.html">SNESVIComputeFunction</a>(<a href="../manualpages/SNES/SNES.html">SNES</a>, <a href="../manualpages/Vec/Vec.html">Vec</a>, <a href="../manualpages/Vec/Vec.html">Vec</a>, void *)</font></strong>;
<a name="line934">934: </a><strong><font color="#4169E1">PETSC_EXTERN <a href="../manualpages/Sys/PetscErrorCode.html">PetscErrorCode</a> <a href="../manualpages/SNES/DMSetVI.html">DMSetVI</a>(<a href="../manualpages/DM/DM.html">DM</a>, <a href="../manualpages/IS/IS.html">IS</a>)</font></strong>;
<a name="line935">935: </a><strong><font color="#4169E1">PETSC_EXTERN <a href="../manualpages/Sys/PetscErrorCode.html">PetscErrorCode</a> DMDestroyVI(<a href="../manualpages/DM/DM.html">DM</a>)</font></strong>;

<a name="line937">937: </a><strong><font color="#4169E1">PETSC_EXTERN <a href="../manualpages/Sys/PetscErrorCode.html">PetscErrorCode</a> SNESTestLocalMin(<a href="../manualpages/SNES/SNES.html">SNES</a>)</font></strong>;

<a name="line939">939: </a><font color="#B22222">/* Should this routine be private? */</font>
<a name="line940">940: </a><strong><font color="#4169E1">PETSC_EXTERN <a href="../manualpages/Sys/PetscErrorCode.html">PetscErrorCode</a> <a href="../manualpages/SNES/SNESComputeJacobian.html">SNESComputeJacobian</a>(<a href="../manualpages/SNES/SNES.html">SNES</a>, <a href="../manualpages/Vec/Vec.html">Vec</a>, <a href="../manualpages/Mat/Mat.html">Mat</a>, <a href="../manualpages/Mat/Mat.html">Mat</a>)</font></strong>;
<a name="line941">941: </a><strong><font color="#4169E1">PETSC_EXTERN <a href="../manualpages/Sys/PetscErrorCode.html">PetscErrorCode</a> SNESTestJacobian(<a href="../manualpages/SNES/SNES.html">SNES</a>)</font></strong>;
<a name="line942">942: </a><strong><font color="#4169E1">PETSC_EXTERN <a href="../manualpages/Sys/PetscErrorCode.html">PetscErrorCode</a> SNESTestFunction(<a href="../manualpages/SNES/SNES.html">SNES</a>)</font></strong>;

<a name="line944">944: </a><strong><font color="#4169E1">PETSC_EXTERN <a href="../manualpages/Sys/PetscErrorCode.html">PetscErrorCode</a> <a href="../manualpages/SNES/SNESSetDM.html">SNESSetDM</a>(<a href="../manualpages/SNES/SNES.html">SNES</a>, <a href="../manualpages/DM/DM.html">DM</a>)</font></strong>;
<a name="line945">945: </a><strong><font color="#4169E1">PETSC_EXTERN <a href="../manualpages/Sys/PetscErrorCode.html">PetscErrorCode</a> <a href="../manualpages/SNES/SNESGetDM.html">SNESGetDM</a>(<a href="../manualpages/SNES/SNES.html">SNES</a>, <a href="../manualpages/DM/DM.html">DM</a> *)</font></strong>;
<a name="line946">946: </a><strong><font color="#4169E1">PETSC_EXTERN <a href="../manualpages/Sys/PetscErrorCode.html">PetscErrorCode</a> <a href="../manualpages/SNES/SNESSetNPC.html">SNESSetNPC</a>(<a href="../manualpages/SNES/SNES.html">SNES</a>, <a href="../manualpages/SNES/SNES.html">SNES</a>)</font></strong>;
<a name="line947">947: </a><strong><font color="#4169E1">PETSC_EXTERN <a href="../manualpages/Sys/PetscErrorCode.html">PetscErrorCode</a> <a href="../manualpages/SNES/SNESGetNPC.html">SNESGetNPC</a>(<a href="../manualpages/SNES/SNES.html">SNES</a>, <a href="../manualpages/SNES/SNES.html">SNES</a> *)</font></strong>;
<a name="line948">948: </a><strong><font color="#4169E1">PETSC_EXTERN <a href="../manualpages/Sys/PetscErrorCode.html">PetscErrorCode</a> <a href="../manualpages/SNES/SNESHasNPC.html">SNESHasNPC</a>(<a href="../manualpages/SNES/SNES.html">SNES</a>, <a href="../manualpages/Sys/PetscBool.html">PetscBool</a> *)</font></strong>;
<a name="line949">949: </a><strong><font color="#4169E1">PETSC_EXTERN <a href="../manualpages/Sys/PetscErrorCode.html">PetscErrorCode</a> <a href="../manualpages/SNES/SNESApplyNPC.html">SNESApplyNPC</a>(<a href="../manualpages/SNES/SNES.html">SNES</a>, <a href="../manualpages/Vec/Vec.html">Vec</a>, <a href="../manualpages/Vec/Vec.html">Vec</a>, <a href="../manualpages/Vec/Vec.html">Vec</a>)</font></strong>;
<a name="line950">950: </a><strong><font color="#4169E1">PETSC_EXTERN <a href="../manualpages/Sys/PetscErrorCode.html">PetscErrorCode</a> <a href="../manualpages/SNES/SNESGetNPCFunction.html">SNESGetNPCFunction</a>(<a href="../manualpages/SNES/SNES.html">SNES</a>, <a href="../manualpages/Vec/Vec.html">Vec</a>, <a href="../manualpages/Sys/PetscReal.html">PetscReal</a> *)</font></strong>;
<a name="line951">951: </a><strong><font color="#4169E1">PETSC_EXTERN <a href="../manualpages/Sys/PetscErrorCode.html">PetscErrorCode</a> SNESComputeFunctionDefaultNPC(<a href="../manualpages/SNES/SNES.html">SNES</a>, <a href="../manualpages/Vec/Vec.html">Vec</a>, <a href="../manualpages/Vec/Vec.html">Vec</a>)</font></strong>;
<a name="line952">952: </a><strong><font color="#4169E1">PETSC_EXTERN <a href="../manualpages/Sys/PetscErrorCode.html">PetscErrorCode</a> <a href="../manualpages/SNES/SNESSetNPCSide.html">SNESSetNPCSide</a>(<a href="../manualpages/SNES/SNES.html">SNES</a>, <a href="../manualpages/PC/PCSide.html">PCSide</a>)</font></strong>;
<a name="line953">953: </a><strong><font color="#4169E1">PETSC_EXTERN <a href="../manualpages/Sys/PetscErrorCode.html">PetscErrorCode</a> <a href="../manualpages/SNES/SNESGetNPCSide.html">SNESGetNPCSide</a>(<a href="../manualpages/SNES/SNES.html">SNES</a>, <a href="../manualpages/PC/PCSide.html">PCSide</a> *)</font></strong>;
<a name="line954">954: </a><strong><font color="#4169E1">PETSC_EXTERN <a href="../manualpages/Sys/PetscErrorCode.html">PetscErrorCode</a> <a href="../manualpages/SNES/SNESSetLineSearch.html">SNESSetLineSearch</a>(<a href="../manualpages/SNES/SNES.html">SNES</a>, <a href="../manualpages/SNES/SNESLineSearch.html">SNESLineSearch</a>)</font></strong>;
<a name="line955">955: </a><strong><font color="#4169E1">PETSC_EXTERN <a href="../manualpages/Sys/PetscErrorCode.html">PetscErrorCode</a> <a href="../manualpages/SNES/SNESGetLineSearch.html">SNESGetLineSearch</a>(<a href="../manualpages/SNES/SNES.html">SNES</a>, <a href="../manualpages/SNES/SNESLineSearch.html">SNESLineSearch</a> *)</font></strong>;

<a name="line957">957: </a>PETSC_DEPRECATED_FUNCTION(3, 4, 0, <font color="#666666">"<a href="../manualpages/SNES/SNESGetLineSearch.html">SNESGetLineSearch</a>()"</font>, ) static inline <a href="../manualpages/Sys/PetscErrorCode.html">PetscErrorCode</a> SNESGetSNESLineSearch(<a href="../manualpages/SNES/SNES.html">SNES</a> snes, <a href="../manualpages/SNES/SNESLineSearch.html">SNESLineSearch</a> *ls)
<a name="line958">958: </a>{
<a name="line959">959: </a>  <font color="#4169E1">return</font> <a href="../manualpages/SNES/SNESGetLineSearch.html">SNESGetLineSearch</a>(snes, ls);
<a name="line960">960: </a>}
<a name="line961">961: </a>PETSC_DEPRECATED_FUNCTION(3, 4, 0, <font color="#666666">"<a href="../manualpages/SNES/SNESSetLineSearch.html">SNESSetLineSearch</a>()"</font>, ) static inline <a href="../manualpages/Sys/PetscErrorCode.html">PetscErrorCode</a> SNESSetSNESLineSearch(<a href="../manualpages/SNES/SNES.html">SNES</a> snes, <a href="../manualpages/SNES/SNESLineSearch.html">SNESLineSearch</a> ls)
<a name="line962">962: </a>{
<a name="line963">963: </a>  <font color="#4169E1">return</font> <a href="../manualpages/SNES/SNESSetLineSearch.html">SNESSetLineSearch</a>(snes, ls);
<a name="line964">964: </a>}

<a name="line966">966: </a><strong><font color="#4169E1">PETSC_EXTERN <a href="../manualpages/Sys/PetscErrorCode.html">PetscErrorCode</a> <a href="../manualpages/SNES/SNESSetUpMatrices.html">SNESSetUpMatrices</a>(<a href="../manualpages/SNES/SNES.html">SNES</a>)</font></strong>;
<a name="line967">967: </a><strong><font color="#4169E1">PETSC_EXTERN <a href="../manualpages/Sys/PetscErrorCode.html">PetscErrorCode</a> <a href="../manualpages/SNES/DMSNESSetFunction.html">DMSNESSetFunction</a>(<a href="../manualpages/DM/DM.html">DM</a>, <a href="../manualpages/SNES/SNESFunctionFn.html">SNESFunctionFn</a> *, void *)</font></strong>;
<a name="line968">968: </a><strong><font color="#4169E1">PETSC_EXTERN <a href="../manualpages/Sys/PetscErrorCode.html">PetscErrorCode</a> <a href="../manualpages/SNES/DMSNESGetFunction.html">DMSNESGetFunction</a>(<a href="../manualpages/DM/DM.html">DM</a>, <a href="../manualpages/SNES/SNESFunctionFn.html">SNESFunctionFn</a> **, void **)</font></strong>;
<a name="line969">969: </a><strong><font color="#4169E1">PETSC_EXTERN <a href="../manualpages/Sys/PetscErrorCode.html">PetscErrorCode</a> <a href="../manualpages/SNES/DMSNESSetFunctionContextDestroy.html">DMSNESSetFunctionContextDestroy</a>(<a href="../manualpages/DM/DM.html">DM</a>, <a href="../manualpages/Sys/PetscCtxDestroyFn.html">PetscCtxDestroyFn</a> *)</font></strong>;
<a name="line970">970: </a><strong><font color="#4169E1">PETSC_EXTERN <a href="../manualpages/Sys/PetscErrorCode.html">PetscErrorCode</a> <a href="../manualpages/SNES/DMSNESSetMFFunction.html">DMSNESSetMFFunction</a>(<a href="../manualpages/DM/DM.html">DM</a>, <a href="../manualpages/SNES/SNESFunctionFn.html">SNESFunctionFn</a> *, void *)</font></strong>;
<a name="line971">971: </a><strong><font color="#4169E1">PETSC_EXTERN <a href="../manualpages/Sys/PetscErrorCode.html">PetscErrorCode</a> <a href="../manualpages/SNES/DMSNESSetNGS.html">DMSNESSetNGS</a>(<a href="../manualpages/DM/DM.html">DM</a>, <a href="../manualpages/SNES/SNESNGSFn.html">SNESNGSFn</a> *, void *)</font></strong>;
<a name="line972">972: </a><strong><font color="#4169E1">PETSC_EXTERN <a href="../manualpages/Sys/PetscErrorCode.html">PetscErrorCode</a> <a href="../manualpages/SNES/DMSNESGetNGS.html">DMSNESGetNGS</a>(<a href="../manualpages/DM/DM.html">DM</a>, <a href="../manualpages/SNES/SNESNGSFn.html">SNESNGSFn</a> **, void **)</font></strong>;
<a name="line973">973: </a><strong><font color="#4169E1">PETSC_EXTERN <a href="../manualpages/Sys/PetscErrorCode.html">PetscErrorCode</a> <a href="../manualpages/SNES/DMSNESSetJacobian.html">DMSNESSetJacobian</a>(<a href="../manualpages/DM/DM.html">DM</a>, <a href="../manualpages/SNES/SNESJacobianFn.html">SNESJacobianFn</a> *, void *)</font></strong>;
<a name="line974">974: </a><strong><font color="#4169E1">PETSC_EXTERN <a href="../manualpages/Sys/PetscErrorCode.html">PetscErrorCode</a> <a href="../manualpages/SNES/DMSNESGetJacobian.html">DMSNESGetJacobian</a>(<a href="../manualpages/DM/DM.html">DM</a>, <a href="../manualpages/SNES/SNESJacobianFn.html">SNESJacobianFn</a> **, void **)</font></strong>;
<a name="line975">975: </a><strong><font color="#4169E1">PETSC_EXTERN <a href="../manualpages/Sys/PetscErrorCode.html">PetscErrorCode</a> <a href="../manualpages/SNES/DMSNESSetJacobianContextDestroy.html">DMSNESSetJacobianContextDestroy</a>(<a href="../manualpages/DM/DM.html">DM</a>, <a href="../manualpages/Sys/PetscCtxDestroyFn.html">PetscCtxDestroyFn</a> *)</font></strong>;
<a name="line976">976: </a><strong><font color="#4169E1">PETSC_EXTERN <a href="../manualpages/Sys/PetscErrorCode.html">PetscErrorCode</a> <a href="../manualpages/SNES/DMSNESSetPicard.html">DMSNESSetPicard</a>(<a href="../manualpages/DM/DM.html">DM</a>, <a href="../manualpages/SNES/SNESFunctionFn.html">SNESFunctionFn</a> *, <a href="../manualpages/SNES/SNESJacobianFn.html">SNESJacobianFn</a> *, void *)</font></strong>;
<a name="line977">977: </a><strong><font color="#4169E1">PETSC_EXTERN <a href="../manualpages/Sys/PetscErrorCode.html">PetscErrorCode</a> <a href="../manualpages/SNES/DMSNESGetPicard.html">DMSNESGetPicard</a>(<a href="../manualpages/DM/DM.html">DM</a>, <a href="../manualpages/SNES/SNESFunctionFn.html">SNESFunctionFn</a> **, <a href="../manualpages/SNES/SNESJacobianFn.html">SNESJacobianFn</a> **, void **)</font></strong>;
<a name="line978">978: </a><strong><font color="#4169E1">PETSC_EXTERN <a href="../manualpages/Sys/PetscErrorCode.html">PetscErrorCode</a> <a href="../manualpages/SNES/DMSNESSetObjective.html">DMSNESSetObjective</a>(<a href="../manualpages/DM/DM.html">DM</a>, <a href="../manualpages/SNES/SNESObjectiveFn.html">SNESObjectiveFn</a> *, void *)</font></strong>;
<a name="line979">979: </a><strong><font color="#4169E1">PETSC_EXTERN <a href="../manualpages/Sys/PetscErrorCode.html">PetscErrorCode</a> <a href="../manualpages/SNES/DMSNESGetObjective.html">DMSNESGetObjective</a>(<a href="../manualpages/DM/DM.html">DM</a>, <a href="../manualpages/SNES/SNESObjectiveFn.html">SNESObjectiveFn</a> **, void **)</font></strong>;
<a name="line980">980: </a><strong><font color="#4169E1">PETSC_EXTERN <a href="../manualpages/Sys/PetscErrorCode.html">PetscErrorCode</a> <a href="../manualpages/SNES/DMCopyDMSNES.html">DMCopyDMSNES</a>(<a href="../manualpages/DM/DM.html">DM</a>, <a href="../manualpages/DM/DM.html">DM</a>)</font></strong>;

<a name="line982">982: </a><strong><font color="#4169E1">PETSC_EXTERN_TYPEDEF typedef <a href="../manualpages/Sys/PetscErrorCode.html">PetscErrorCode</a>(DMDASNESFunctionFn)(<a href="../manualpages/DMDA/DMDALocalInfo.html">DMDALocalInfo</a> *, void *, void *, void *)</font></strong>;
<a name="line983">983: </a><strong><font color="#4169E1">PETSC_EXTERN_TYPEDEF typedef <a href="../manualpages/Sys/PetscErrorCode.html">PetscErrorCode</a>(DMDASNESJacobianFn)(<a href="../manualpages/DMDA/DMDALocalInfo.html">DMDALocalInfo</a> *, void *, <a href="../manualpages/Mat/Mat.html">Mat</a>, <a href="../manualpages/Mat/Mat.html">Mat</a>, void *)</font></strong>;
<a name="line984">984: </a><strong><font color="#4169E1">PETSC_EXTERN_TYPEDEF typedef <a href="../manualpages/Sys/PetscErrorCode.html">PetscErrorCode</a>(DMDASNESObjectiveFn)(<a href="../manualpages/DMDA/DMDALocalInfo.html">DMDALocalInfo</a> *, void *, <a href="../manualpages/Sys/PetscReal.html">PetscReal</a> *, void *)</font></strong>;

<a name="line986">986: </a><strong><font color="#4169E1">PETSC_EXTERN_TYPEDEF typedef <a href="../manualpages/Sys/PetscErrorCode.html">PetscErrorCode</a>(DMDASNESFunctionVecFn)(<a href="../manualpages/DMDA/DMDALocalInfo.html">DMDALocalInfo</a> *, <a href="../manualpages/Vec/Vec.html">Vec</a>, <a href="../manualpages/Vec/Vec.html">Vec</a>, void *)</font></strong>;
<a name="line987">987: </a><strong><font color="#4169E1">PETSC_EXTERN_TYPEDEF typedef <a href="../manualpages/Sys/PetscErrorCode.html">PetscErrorCode</a>(DMDASNESJacobianVecFn)(<a href="../manualpages/DMDA/DMDALocalInfo.html">DMDALocalInfo</a> *, <a href="../manualpages/Vec/Vec.html">Vec</a>, <a href="../manualpages/Mat/Mat.html">Mat</a>, <a href="../manualpages/Mat/Mat.html">Mat</a>, void *)</font></strong>;
<a name="line988">988: </a><strong><font color="#4169E1">PETSC_EXTERN_TYPEDEF typedef <a href="../manualpages/Sys/PetscErrorCode.html">PetscErrorCode</a>(DMDASNESObjectiveVecFn)(<a href="../manualpages/DMDA/DMDALocalInfo.html">DMDALocalInfo</a> *, <a href="../manualpages/Vec/Vec.html">Vec</a>, <a href="../manualpages/Sys/PetscReal.html">PetscReal</a> *, void *)</font></strong>;

<a name="line990">990: </a><strong><font color="#4169E1">PETSC_EXTERN <a href="../manualpages/Sys/PetscErrorCode.html">PetscErrorCode</a> <a href="../manualpages/SNES/DMDASNESSetFunctionLocal.html">DMDASNESSetFunctionLocal</a>(<a href="../manualpages/DM/DM.html">DM</a>, <a href="../manualpages/Sys/InsertMode.html">InsertMode</a>, DMDASNESFunctionFn *, void *)</font></strong>;
<a name="line991">991: </a><strong><font color="#4169E1">PETSC_EXTERN <a href="../manualpages/Sys/PetscErrorCode.html">PetscErrorCode</a> <a href="../manualpages/SNES/DMDASNESSetJacobianLocal.html">DMDASNESSetJacobianLocal</a>(<a href="../manualpages/DM/DM.html">DM</a>, DMDASNESJacobianFn *, void *)</font></strong>;
<a name="line992">992: </a><strong><font color="#4169E1">PETSC_EXTERN <a href="../manualpages/Sys/PetscErrorCode.html">PetscErrorCode</a> <a href="../manualpages/SNES/DMDASNESSetObjectiveLocal.html">DMDASNESSetObjectiveLocal</a>(<a href="../manualpages/DM/DM.html">DM</a>, DMDASNESObjectiveFn *, void *)</font></strong>;
<a name="line993">993: </a><strong><font color="#4169E1">PETSC_EXTERN <a href="../manualpages/Sys/PetscErrorCode.html">PetscErrorCode</a> <a href="../manualpages/SNES/DMDASNESSetPicardLocal.html">DMDASNESSetPicardLocal</a>(<a href="../manualpages/DM/DM.html">DM</a>, <a href="../manualpages/Sys/InsertMode.html">InsertMode</a>, DMDASNESFunctionFn *, DMDASNESJacobianFn, void *)</font></strong>;

<a name="line995">995: </a><strong><font color="#4169E1">PETSC_EXTERN <a href="../manualpages/Sys/PetscErrorCode.html">PetscErrorCode</a> <a href="../manualpages/SNES/DMDASNESSetFunctionLocalVec.html">DMDASNESSetFunctionLocalVec</a>(<a href="../manualpages/DM/DM.html">DM</a>, <a href="../manualpages/Sys/InsertMode.html">InsertMode</a>, DMDASNESFunctionVecFn *, void *)</font></strong>;
<a name="line996">996: </a><strong><font color="#4169E1">PETSC_EXTERN <a href="../manualpages/Sys/PetscErrorCode.html">PetscErrorCode</a> <a href="../manualpages/SNES/DMDASNESSetJacobianLocalVec.html">DMDASNESSetJacobianLocalVec</a>(<a href="../manualpages/DM/DM.html">DM</a>, DMDASNESJacobianVecFn *, void *)</font></strong>;
<a name="line997">997: </a><strong><font color="#4169E1">PETSC_EXTERN <a href="../manualpages/Sys/PetscErrorCode.html">PetscErrorCode</a> <a href="../manualpages/SNES/DMDASNESSetObjectiveLocalVec.html">DMDASNESSetObjectiveLocalVec</a>(<a href="../manualpages/DM/DM.html">DM</a>, DMDASNESObjectiveVecFn *, void *)</font></strong>;

<a name="line999">999: </a><strong><font color="#4169E1">PETSC_EXTERN <a href="../manualpages/Sys/PetscErrorCode.html">PetscErrorCode</a> <a href="../manualpages/SNES/DMSNESSetBoundaryLocal.html">DMSNESSetBoundaryLocal</a>(<a href="../manualpages/DM/DM.html">DM</a>, <a href="../manualpages/Sys/PetscErrorCode.html">PetscErrorCode</a> (*)(<a href="../manualpages/DM/DM.html">DM</a>, <a href="../manualpages/Vec/Vec.html">Vec</a>, void *), void *)</font></strong>;
<a name="line1000">1000: </a><strong><font color="#4169E1">PETSC_EXTERN <a href="../manualpages/Sys/PetscErrorCode.html">PetscErrorCode</a> <a href="../manualpages/SNES/DMSNESSetObjectiveLocal.html">DMSNESSetObjectiveLocal</a>(<a href="../manualpages/DM/DM.html">DM</a>, <a href="../manualpages/Sys/PetscErrorCode.html">PetscErrorCode</a> (*)(<a href="../manualpages/DM/DM.html">DM</a>, <a href="../manualpages/Vec/Vec.html">Vec</a>, <a href="../manualpages/Sys/PetscReal.html">PetscReal</a> *, void *), void *)</font></strong>;
<a name="line1001">1001: </a><strong><font color="#4169E1">PETSC_EXTERN <a href="../manualpages/Sys/PetscErrorCode.html">PetscErrorCode</a> <a href="../manualpages/SNES/DMSNESSetFunctionLocal.html">DMSNESSetFunctionLocal</a>(<a href="../manualpages/DM/DM.html">DM</a>, <a href="../manualpages/Sys/PetscErrorCode.html">PetscErrorCode</a> (*)(<a href="../manualpages/DM/DM.html">DM</a>, <a href="../manualpages/Vec/Vec.html">Vec</a>, <a href="../manualpages/Vec/Vec.html">Vec</a>, void *), void *)</font></strong>;
<a name="line1002">1002: </a><strong><font color="#4169E1">PETSC_EXTERN <a href="../manualpages/Sys/PetscErrorCode.html">PetscErrorCode</a> <a href="../manualpages/SNES/DMSNESSetJacobianLocal.html">DMSNESSetJacobianLocal</a>(<a href="../manualpages/DM/DM.html">DM</a>, <a href="../manualpages/Sys/PetscErrorCode.html">PetscErrorCode</a> (*)(<a href="../manualpages/DM/DM.html">DM</a>, <a href="../manualpages/Vec/Vec.html">Vec</a>, <a href="../manualpages/Mat/Mat.html">Mat</a>, <a href="../manualpages/Mat/Mat.html">Mat</a>, void *), void *)</font></strong>;
<a name="line1003">1003: </a><strong><font color="#4169E1">PETSC_EXTERN <a href="../manualpages/Sys/PetscErrorCode.html">PetscErrorCode</a> <a href="../manualpages/SNES/DMSNESGetBoundaryLocal.html">DMSNESGetBoundaryLocal</a>(<a href="../manualpages/DM/DM.html">DM</a>, <a href="../manualpages/Sys/PetscErrorCode.html">PetscErrorCode</a> (**)(<a href="../manualpages/DM/DM.html">DM</a>, <a href="../manualpages/Vec/Vec.html">Vec</a>, void *), void **)</font></strong>;
<a name="line1004">1004: </a><strong><font color="#4169E1">PETSC_EXTERN <a href="../manualpages/Sys/PetscErrorCode.html">PetscErrorCode</a> <a href="../manualpages/SNES/DMSNESGetObjectiveLocal.html">DMSNESGetObjectiveLocal</a>(<a href="../manualpages/DM/DM.html">DM</a>, <a href="../manualpages/Sys/PetscErrorCode.html">PetscErrorCode</a> (**)(<a href="../manualpages/DM/DM.html">DM</a>, <a href="../manualpages/Vec/Vec.html">Vec</a>, <a href="../manualpages/Sys/PetscReal.html">PetscReal</a> *, void *), void **)</font></strong>;
<a name="line1005">1005: </a><strong><font color="#4169E1">PETSC_EXTERN <a href="../manualpages/Sys/PetscErrorCode.html">PetscErrorCode</a> <a href="../manualpages/SNES/DMSNESGetFunctionLocal.html">DMSNESGetFunctionLocal</a>(<a href="../manualpages/DM/DM.html">DM</a>, <a href="../manualpages/Sys/PetscErrorCode.html">PetscErrorCode</a> (**)(<a href="../manualpages/DM/DM.html">DM</a>, <a href="../manualpages/Vec/Vec.html">Vec</a>, <a href="../manualpages/Vec/Vec.html">Vec</a>, void *), void **)</font></strong>;
<a name="line1006">1006: </a><strong><font color="#4169E1">PETSC_EXTERN <a href="../manualpages/Sys/PetscErrorCode.html">PetscErrorCode</a> <a href="../manualpages/SNES/DMSNESGetJacobianLocal.html">DMSNESGetJacobianLocal</a>(<a href="../manualpages/DM/DM.html">DM</a>, <a href="../manualpages/Sys/PetscErrorCode.html">PetscErrorCode</a> (**)(<a href="../manualpages/DM/DM.html">DM</a>, <a href="../manualpages/Vec/Vec.html">Vec</a>, <a href="../manualpages/Mat/Mat.html">Mat</a>, <a href="../manualpages/Mat/Mat.html">Mat</a>, void *), void **)</font></strong>;

<a name="line1008">1008: </a><font color="#B22222">/* Routines for Multiblock solver */</font>
<a name="line1009">1009: </a><strong><font color="#4169E1">PETSC_EXTERN <a href="../manualpages/Sys/PetscErrorCode.html">PetscErrorCode</a> <a href="../manualpages/SNES/SNESMultiblockSetFields.html">SNESMultiblockSetFields</a>(<a href="../manualpages/SNES/SNES.html">SNES</a>, const char[], <a href="../manualpages/Sys/PetscInt.html">PetscInt</a>, const <a href="../manualpages/Sys/PetscInt.html">PetscInt</a> *)</font></strong>;
<a name="line1010">1010: </a><strong><font color="#4169E1">PETSC_EXTERN <a href="../manualpages/Sys/PetscErrorCode.html">PetscErrorCode</a> <a href="../manualpages/SNES/SNESMultiblockSetIS.html">SNESMultiblockSetIS</a>(<a href="../manualpages/SNES/SNES.html">SNES</a>, const char[], <a href="../manualpages/IS/IS.html">IS</a>)</font></strong>;
<a name="line1011">1011: </a><strong><font color="#4169E1">PETSC_EXTERN <a href="../manualpages/Sys/PetscErrorCode.html">PetscErrorCode</a> <a href="../manualpages/SNES/SNESMultiblockSetBlockSize.html">SNESMultiblockSetBlockSize</a>(<a href="../manualpages/SNES/SNES.html">SNES</a>, <a href="../manualpages/Sys/PetscInt.html">PetscInt</a>)</font></strong>;
<a name="line1012">1012: </a><strong><font color="#4169E1">PETSC_EXTERN <a href="../manualpages/Sys/PetscErrorCode.html">PetscErrorCode</a> <a href="../manualpages/SNES/SNESMultiblockSetType.html">SNESMultiblockSetType</a>(<a href="../manualpages/SNES/SNES.html">SNES</a>, <a href="../manualpages/PC/PCCompositeType.html">PCCompositeType</a>)</font></strong>;
<a name="line1013">1013: </a><strong><font color="#4169E1">PETSC_EXTERN <a href="../manualpages/Sys/PetscErrorCode.html">PetscErrorCode</a> <a href="../manualpages/SNES/SNESMultiblockGetSubSNES.html">SNESMultiblockGetSubSNES</a>(<a href="../manualpages/SNES/SNES.html">SNES</a>, <a href="../manualpages/Sys/PetscInt.html">PetscInt</a> *, <a href="../manualpages/SNES/SNES.html">SNES</a> *[])</font></strong>;

<a name="line1015">1015: </a><font color="#B22222">/*J</font>
<a name="line1016">1016: </a><font color="#B22222">   <a href="../manualpages/SNES/SNESMSType.html">SNESMSType</a> - String with the name of a PETSc `<a href="../manualpages/SNES/SNESMS.html">SNESMS</a>` method.</font>

<a name="line1018">1018: </a><font color="#B22222">   Level: intermediate</font>

<a name="line1020">1020: </a><font color="#B22222">.seealso: [](ch_snes), `<a href="../manualpages/SNES/SNESMS.html">SNESMS</a>`, `<a href="../manualpages/SNES/SNESMSGetType.html">SNESMSGetType</a>()`, `<a href="../manualpages/SNES/SNESMSSetType.html">SNESMSSetType</a>()`, `<a href="../manualpages/SNES/SNES.html">SNES</a>`</font>
<a name="line1021">1021: </a><font color="#B22222">J*/</font>
<a name="line1022">1022: </a><font color="#4169E1">typedef const char *<a href="../manualpages/SNES/SNESMSType.html">SNESMSType</a>;</font>
<a name="line1023">1023: </a><strong><font color="#228B22">#define SNESMSM62       </font><font color="#666666">"m62"</font><font color="#228B22"></font></strong>
<a name="line1024">1024: </a><strong><font color="#228B22">#define SNESMSEULER     </font><font color="#666666">"euler"</font><font color="#228B22"></font></strong>
<a name="line1025">1025: </a><strong><font color="#228B22">#define SNESMSJAMESON83 </font><font color="#666666">"jameson83"</font><font color="#228B22"></font></strong>
<a name="line1026">1026: </a><strong><font color="#228B22">#define SNESMSVLTP11    </font><font color="#666666">"vltp11"</font><font color="#228B22"></font></strong>
<a name="line1027">1027: </a><strong><font color="#228B22">#define SNESMSVLTP21    </font><font color="#666666">"vltp21"</font><font color="#228B22"></font></strong>
<a name="line1028">1028: </a><strong><font color="#228B22">#define SNESMSVLTP31    </font><font color="#666666">"vltp31"</font><font color="#228B22"></font></strong>
<a name="line1029">1029: </a><strong><font color="#228B22">#define SNESMSVLTP41    </font><font color="#666666">"vltp41"</font><font color="#228B22"></font></strong>
<a name="line1030">1030: </a><strong><font color="#228B22">#define SNESMSVLTP51    </font><font color="#666666">"vltp51"</font><font color="#228B22"></font></strong>
<a name="line1031">1031: </a><strong><font color="#228B22">#define SNESMSVLTP61    </font><font color="#666666">"vltp61"</font><font color="#228B22"></font></strong>

<a name="line1033">1033: </a><strong><font color="#4169E1">PETSC_EXTERN <a href="../manualpages/Sys/PetscErrorCode.html">PetscErrorCode</a> <a href="../manualpages/SNES/SNESMSRegister.html">SNESMSRegister</a>(<a href="../manualpages/SNES/SNESMSType.html">SNESMSType</a>, <a href="../manualpages/Sys/PetscInt.html">PetscInt</a>, <a href="../manualpages/Sys/PetscInt.html">PetscInt</a>, <a href="../manualpages/Sys/PetscReal.html">PetscReal</a>, const <a href="../manualpages/Sys/PetscReal.html">PetscReal</a>[], const <a href="../manualpages/Sys/PetscReal.html">PetscReal</a>[], const <a href="../manualpages/Sys/PetscReal.html">PetscReal</a>[])</font></strong>;
<a name="line1034">1034: </a><strong><font color="#4169E1">PETSC_EXTERN <a href="../manualpages/Sys/PetscErrorCode.html">PetscErrorCode</a> <a href="../manualpages/SNES/SNESMSRegisterAll.html">SNESMSRegisterAll</a>(void)</font></strong>;
<a name="line1035">1035: </a><strong><font color="#4169E1">PETSC_EXTERN <a href="../manualpages/Sys/PetscErrorCode.html">PetscErrorCode</a> <a href="../manualpages/SNES/SNESMSGetType.html">SNESMSGetType</a>(<a href="../manualpages/SNES/SNES.html">SNES</a>, <a href="../manualpages/SNES/SNESMSType.html">SNESMSType</a> *)</font></strong>;
<a name="line1036">1036: </a><strong><font color="#4169E1">PETSC_EXTERN <a href="../manualpages/Sys/PetscErrorCode.html">PetscErrorCode</a> <a href="../manualpages/SNES/SNESMSSetType.html">SNESMSSetType</a>(<a href="../manualpages/SNES/SNES.html">SNES</a>, <a href="../manualpages/SNES/SNESMSType.html">SNESMSType</a>)</font></strong>;
<a name="line1037">1037: </a><strong><font color="#4169E1">PETSC_EXTERN <a href="../manualpages/Sys/PetscErrorCode.html">PetscErrorCode</a> <a href="../manualpages/SNES/SNESMSGetDamping.html">SNESMSGetDamping</a>(<a href="../manualpages/SNES/SNES.html">SNES</a>, <a href="../manualpages/Sys/PetscReal.html">PetscReal</a> *)</font></strong>;
<a name="line1038">1038: </a><strong><font color="#4169E1">PETSC_EXTERN <a href="../manualpages/Sys/PetscErrorCode.html">PetscErrorCode</a> <a href="../manualpages/SNES/SNESMSSetDamping.html">SNESMSSetDamping</a>(<a href="../manualpages/SNES/SNES.html">SNES</a>, <a href="../manualpages/Sys/PetscReal.html">PetscReal</a>)</font></strong>;
<a name="line1039">1039: </a><strong><font color="#4169E1">PETSC_EXTERN <a href="../manualpages/Sys/PetscErrorCode.html">PetscErrorCode</a> <a href="../manualpages/SNES/SNESMSFinalizePackage.html">SNESMSFinalizePackage</a>(void)</font></strong>;
<a name="line1040">1040: </a><strong><font color="#4169E1">PETSC_EXTERN <a href="../manualpages/Sys/PetscErrorCode.html">PetscErrorCode</a> <a href="../manualpages/SNES/SNESMSInitializePackage.html">SNESMSInitializePackage</a>(void)</font></strong>;
<a name="line1041">1041: </a><strong><font color="#4169E1">PETSC_EXTERN <a href="../manualpages/Sys/PetscErrorCode.html">PetscErrorCode</a> <a href="../manualpages/SNES/SNESMSRegisterDestroy.html">SNESMSRegisterDestroy</a>(void)</font></strong>;

<a name="line1043">1043: </a><font color="#B22222">/*MC</font>
<a name="line1044">1044: </a><font color="#B22222">   <a href="../manualpages/SNES/SNESNGMRESRestartType.html">SNESNGMRESRestartType</a> - the restart approach used by `<a href="../manualpages/SNES/SNESNGMRES.html">SNESNGMRES</a>`</font>

<a name="line1046">1046: </a><font color="#B22222">  Values:</font>
<a name="line1047">1047: </a><font color="#B22222">+   `SNES_NGMRES_RESTART_NONE`       - never restart</font>
<a name="line1048">1048: </a><font color="#B22222">.   `SNES_NGMRES_RESTART_DIFFERENCE` - restart based upon difference criteria</font>
<a name="line1049">1049: </a><font color="#B22222">-   `SNES_NGMRES_RESTART_PERIODIC`   - restart after a fixed number of iterations</font>

<a name="line1051">1051: </a><font color="#B22222">  Options Database Keys:</font>
<a name="line1052">1052: </a><font color="#B22222">+ -snes_ngmres_restart_type &lt;difference,periodic,none&gt; - set the restart type</font>
<a name="line1053">1053: </a><font color="#B22222">- -snes_ngmres_restart &lt;30&gt;                            - sets the number of iterations before restart for periodic</font>

<a name="line1055">1055: </a><font color="#B22222">   Level: intermediate</font>

<a name="line1057">1057: </a><font color="#B22222">.seealso: `<a href="../manualpages/SNES/SNES.html">SNES</a>, `<a href="../manualpages/SNES/SNESNGMRES.html">SNESNGMRES</a>`, `<a href="../manualpages/SNES/SNESNGMRESSetSelectType.html">SNESNGMRESSetSelectType</a>()`, `SNESNGMRESGetSelectType()`, `<a href="../manualpages/SNES/SNESNGMRESSetRestartType.html">SNESNGMRESSetRestartType</a>()`,</font>
<a name="line1058">1058: </a><font color="#B22222">          `SNESNGMRESGetRestartType()`, `<a href="../manualpages/SNES/SNESNGMRESSelectType.html">SNESNGMRESSelectType</a>`</font>
<a name="line1059">1059: </a><font color="#B22222">M*/</font>
<a name="line1060">1060: </a><font color="#4169E1">typedef</font> <font color="#4169E1">enum</font> {
<a name="line1061">1061: </a>  SNES_NGMRES_RESTART_NONE       = 0,
<a name="line1062">1062: </a>  SNES_NGMRES_RESTART_PERIODIC   = 1,
<a name="line1063">1063: </a>  SNES_NGMRES_RESTART_DIFFERENCE = 2
<a name="line1064">1064: </a>} <a href="../manualpages/SNES/SNESNGMRESRestartType.html">SNESNGMRESRestartType</a>;
<a name="line1065">1065: </a>PETSC_EXTERN const char *const SNESNGMRESRestartTypes[];

<a name="line1067">1067: </a><font color="#B22222">/*MC</font>
<a name="line1068">1068: </a><font color="#B22222">   <a href="../manualpages/SNES/SNESNGMRESSelectType.html">SNESNGMRESSelectType</a> - the approach used by `<a href="../manualpages/SNES/SNESNGMRES.html">SNESNGMRES</a>` to determine how the candidate solution and</font>
<a name="line1069">1069: </a><font color="#B22222">  combined solution are used to create the next iterate.</font>

<a name="line1071">1071: </a><font color="#B22222">   Values:</font>
<a name="line1072">1072: </a><font color="#B22222">+   `SNES_NGMRES_SELECT_NONE`       - choose the combined solution all the time</font>
<a name="line1073">1073: </a><font color="#B22222">.   `SNES_NGMRES_SELECT_DIFFERENCE` - choose based upon the selection criteria</font>
<a name="line1074">1074: </a><font color="#B22222">-   `SNES_NGMRES_SELECT_LINESEARCH` - choose based upon line search combination</font>

<a name="line1076">1076: </a><font color="#B22222">  Options Database Key:</font>
<a name="line1077">1077: </a><font color="#B22222">. -snes_ngmres_select_type&lt;difference,none,linesearch&gt; - select type</font>

<a name="line1079">1079: </a><font color="#B22222">   Level: intermediate</font>

<a name="line1081">1081: </a><font color="#B22222">.seealso: `<a href="../manualpages/SNES/SNES.html">SNES</a>, `<a href="../manualpages/SNES/SNESNGMRES.html">SNESNGMRES</a>`, `<a href="../manualpages/SNES/SNESNGMRESSetSelectType.html">SNESNGMRESSetSelectType</a>()`, `SNESNGMRESGetSelectType()`, `<a href="../manualpages/SNES/SNESNGMRESSetRestartType.html">SNESNGMRESSetRestartType</a>()`,</font>
<a name="line1082">1082: </a><font color="#B22222">          `SNESNGMRESGetRestartType()`, `<a href="../manualpages/SNES/SNESNGMRESRestartType.html">SNESNGMRESRestartType</a>`</font>
<a name="line1083">1083: </a><font color="#B22222">M*/</font>
<a name="line1084">1084: </a><font color="#4169E1">typedef</font> <font color="#4169E1">enum</font> {
<a name="line1085">1085: </a>  SNES_NGMRES_SELECT_NONE       = 0,
<a name="line1086">1086: </a>  SNES_NGMRES_SELECT_DIFFERENCE = 1,
<a name="line1087">1087: </a>  SNES_NGMRES_SELECT_LINESEARCH = 2
<a name="line1088">1088: </a>} <a href="../manualpages/SNES/SNESNGMRESSelectType.html">SNESNGMRESSelectType</a>;
<a name="line1089">1089: </a>PETSC_EXTERN const char *const SNESNGMRESSelectTypes[];

<a name="line1091">1091: </a><strong><font color="#4169E1">PETSC_EXTERN <a href="../manualpages/Sys/PetscErrorCode.html">PetscErrorCode</a> <a href="../manualpages/SNES/SNESNGMRESSetRestartType.html">SNESNGMRESSetRestartType</a>(<a href="../manualpages/SNES/SNES.html">SNES</a>, <a href="../manualpages/SNES/SNESNGMRESRestartType.html">SNESNGMRESRestartType</a>)</font></strong>;
<a name="line1092">1092: </a><strong><font color="#4169E1">PETSC_EXTERN <a href="../manualpages/Sys/PetscErrorCode.html">PetscErrorCode</a> <a href="../manualpages/SNES/SNESNGMRESSetSelectType.html">SNESNGMRESSetSelectType</a>(<a href="../manualpages/SNES/SNES.html">SNES</a>, <a href="../manualpages/SNES/SNESNGMRESSelectType.html">SNESNGMRESSelectType</a>)</font></strong>;
<a name="line1093">1093: </a><strong><font color="#4169E1">PETSC_EXTERN <a href="../manualpages/Sys/PetscErrorCode.html">PetscErrorCode</a> <a href="../manualpages/SNES/SNESNGMRESSetRestartFmRise.html">SNESNGMRESSetRestartFmRise</a>(<a href="../manualpages/SNES/SNES.html">SNES</a>, <a href="../manualpages/Sys/PetscBool.html">PetscBool</a>)</font></strong>;
<a name="line1094">1094: </a><strong><font color="#4169E1">PETSC_EXTERN <a href="../manualpages/Sys/PetscErrorCode.html">PetscErrorCode</a> SNESNGMRESGetRestartFmRise(<a href="../manualpages/SNES/SNES.html">SNES</a>, <a href="../manualpages/Sys/PetscBool.html">PetscBool</a> *)</font></strong>;

<a name="line1096">1096: </a><font color="#B22222">/*MC</font>
<a name="line1097">1097: </a><font color="#B22222">   <a href="../manualpages/SNES/SNESNCGType.html">SNESNCGType</a> - the conjugate update approach for `<a href="../manualpages/SNES/SNESNCG.html">SNESNCG</a>`</font>

<a name="line1099">1099: </a><font color="#B22222">   Values:</font>
<a name="line1100">1100: </a><font color="#B22222">+   `SNES_NCG_FR`  - Fletcher-Reeves update</font>
<a name="line1101">1101: </a><font color="#B22222">.   `SNES_NCG_PRP` - Polak-Ribiere-Polyak update, the default and the only one that tolerates generalized search directions</font>
<a name="line1102">1102: </a><font color="#B22222">.   `SNES_NCG_HS`  - Hestenes-Steifel update</font>
<a name="line1103">1103: </a><font color="#B22222">.   `SNES_NCG_DY`  - Dai-Yuan update</font>
<a name="line1104">1104: </a><font color="#B22222">-   `SNES_NCG_CD`  - Conjugate Descent update</font>

<a name="line1106">1106: </a><font color="#B22222">  Options Database Key:</font>
<a name="line1107">1107: </a><font color="#B22222">. -snes_ncg_type&lt;fr,prp,hs,dy,cd&gt; - select type</font>

<a name="line1109">1109: </a><font color="#B22222">   Level: intermediate</font>

<a name="line1111">1111: </a><font color="#B22222">.seealso: `<a href="../manualpages/SNES/SNES.html">SNES</a>, `<a href="../manualpages/SNES/SNESNCG.html">SNESNCG</a>`, `<a href="../manualpages/SNES/SNESNCGSetType.html">SNESNCGSetType</a>()`</font>
<a name="line1112">1112: </a><font color="#B22222">M*/</font>
<a name="line1113">1113: </a><font color="#4169E1">typedef</font> <font color="#4169E1">enum</font> {
<a name="line1114">1114: </a>  SNES_NCG_FR  = 0,
<a name="line1115">1115: </a>  SNES_NCG_PRP = 1,
<a name="line1116">1116: </a>  SNES_NCG_HS  = 2,
<a name="line1117">1117: </a>  SNES_NCG_DY  = 3,
<a name="line1118">1118: </a>  SNES_NCG_CD  = 4
<a name="line1119">1119: </a>} <a href="../manualpages/SNES/SNESNCGType.html">SNESNCGType</a>;
<a name="line1120">1120: </a>PETSC_EXTERN const char *const SNESNCGTypes[];

<a name="line1122">1122: </a><strong><font color="#4169E1">PETSC_EXTERN <a href="../manualpages/Sys/PetscErrorCode.html">PetscErrorCode</a> <a href="../manualpages/SNES/SNESNCGSetType.html">SNESNCGSetType</a>(<a href="../manualpages/SNES/SNES.html">SNES</a>, <a href="../manualpages/SNES/SNESNCGType.html">SNESNCGType</a>)</font></strong>;

<a name="line1124">1124: </a><font color="#B22222">/*MC</font>
<a name="line1125">1125: </a><font color="#B22222">   <a href="../manualpages/SNES/SNESQNScaleType.html">SNESQNScaleType</a> - the scaling type used by `<a href="../manualpages/SNES/SNESQN.html">SNESQN</a>`</font>

<a name="line1127">1127: </a><font color="#B22222">   Values:</font>
<a name="line1128">1128: </a><font color="#B22222">+   `SNES_QN_SCALE_NONE`     - don't scale the problem</font>
<a name="line1129">1129: </a><font color="#B22222">.   `SNES_QN_SCALE_SCALAR`   - use Shanno scaling</font>
<a name="line1130">1130: </a><font color="#B22222">.   `SNES_QN_SCALE_DIAGONAL` - scale with a diagonalized BFGS formula (see Gilbert and Lemarechal 1989), available</font>
<a name="line1131">1131: </a><font color="#B22222">-   `SNES_QN_SCALE_JACOBIAN` - scale by solving a linear system coming from the Jacobian you provided with `<a href="../manualpages/SNES/SNESSetJacobian.html">SNESSetJacobian</a>()`</font>
<a name="line1132">1132: </a><font color="#B22222">                               computed at the first iteration of `<a href="../manualpages/SNES/SNESQN.html">SNESQN</a>` and at ever restart.</font>

<a name="line1134">1134: </a><font color="#B22222">    Options Database Key:</font>
<a name="line1135">1135: </a><font color="#B22222">. -snes_qn_scale_type &lt;diagonal,none,scalar,jacobian&gt; - Scaling type</font>

<a name="line1137">1137: </a><font color="#B22222">   Level: intermediate</font>

<a name="line1139">1139: </a><font color="#B22222">.seealso: `<a href="../manualpages/SNES/SNES.html">SNES</a>, `<a href="../manualpages/SNES/SNESQN.html">SNESQN</a>`, `<a href="../manualpages/SNES/SNESQNSetScaleType.html">SNESQNSetScaleType</a>()`, `<a href="../manualpages/SNES/SNESQNType.html">SNESQNType</a>`, `<a href="../manualpages/SNES/SNESQNSetType.html">SNESQNSetType</a>()`, `<a href="../manualpages/SNES/SNESQNSetRestartType.html">SNESQNSetRestartType</a>()`, `<a href="../manualpages/SNES/SNESQNRestartType.html">SNESQNRestartType</a>`</font>
<a name="line1140">1140: </a><font color="#B22222">M*/</font>
<a name="line1141">1141: </a><font color="#4169E1">typedef</font> <font color="#4169E1">enum</font> {
<a name="line1142">1142: </a>  SNES_QN_SCALE_DEFAULT  = 0,
<a name="line1143">1143: </a>  SNES_QN_SCALE_NONE     = 1,
<a name="line1144">1144: </a>  SNES_QN_SCALE_SCALAR   = 2,
<a name="line1145">1145: </a>  SNES_QN_SCALE_DIAGONAL = 3,
<a name="line1146">1146: </a>  SNES_QN_SCALE_JACOBIAN = 4
<a name="line1147">1147: </a>} <a href="../manualpages/SNES/SNESQNScaleType.html">SNESQNScaleType</a>;
<a name="line1148">1148: </a>PETSC_EXTERN const char *const SNESQNScaleTypes[];

<a name="line1150">1150: </a><font color="#B22222">/*MC</font>
<a name="line1151">1151: </a><font color="#B22222">   <a href="../manualpages/SNES/SNESQNRestartType.html">SNESQNRestartType</a> - the restart approached used by `<a href="../manualpages/SNES/SNESQN.html">SNESQN</a>`</font>

<a name="line1153">1153: </a><font color="#B22222">   Values:</font>
<a name="line1154">1154: </a><font color="#B22222">+   `SNES_QN_RESTART_NONE`     - never restart</font>
<a name="line1155">1155: </a><font color="#B22222">.   `SNES_QN_RESTART_POWELL`   - restart based upon descent criteria</font>
<a name="line1156">1156: </a><font color="#B22222">-   `SNES_QN_RESTART_PERIODIC` - restart after a fixed number of iterations</font>

<a name="line1158">1158: </a><font color="#B22222">  Options Database Keys:</font>
<a name="line1159">1159: </a><font color="#B22222">+ -snes_qn_restart_type &lt;powell,periodic,none&gt; - set the restart type</font>
<a name="line1160">1160: </a><font color="#B22222">- -snes_qn_m &lt;m&gt;                               - sets the number of stored updates and the restart period for periodic</font>

<a name="line1162">1162: </a><font color="#B22222">   Level: intermediate</font>

<a name="line1164">1164: </a><font color="#B22222">.seealso: `<a href="../manualpages/SNES/SNES.html">SNES</a>, `<a href="../manualpages/SNES/SNESQN.html">SNESQN</a>`, `<a href="../manualpages/SNES/SNESQNSetScaleType.html">SNESQNSetScaleType</a>()`, `<a href="../manualpages/SNES/SNESQNType.html">SNESQNType</a>`, `<a href="../manualpages/SNES/SNESQNSetType.html">SNESQNSetType</a>()`, `<a href="../manualpages/SNES/SNESQNSetRestartType.html">SNESQNSetRestartType</a>()`, `<a href="../manualpages/SNES/SNESQNScaleType.html">SNESQNScaleType</a>`</font>
<a name="line1165">1165: </a><font color="#B22222">M*/</font>
<a name="line1166">1166: </a><font color="#4169E1">typedef</font> <font color="#4169E1">enum</font> {
<a name="line1167">1167: </a>  SNES_QN_RESTART_DEFAULT  = 0,
<a name="line1168">1168: </a>  SNES_QN_RESTART_NONE     = 1,
<a name="line1169">1169: </a>  SNES_QN_RESTART_POWELL   = 2,
<a name="line1170">1170: </a>  SNES_QN_RESTART_PERIODIC = 3
<a name="line1171">1171: </a>} <a href="../manualpages/SNES/SNESQNRestartType.html">SNESQNRestartType</a>;
<a name="line1172">1172: </a>PETSC_EXTERN const char *const SNESQNRestartTypes[];

<a name="line1174">1174: </a><font color="#B22222">/*MC</font>
<a name="line1175">1175: </a><font color="#B22222">   <a href="../manualpages/SNES/SNESQNType.html">SNESQNType</a> - the type used by `<a href="../manualpages/SNES/SNESQN.html">SNESQN</a>`</font>

<a name="line1177">1177: </a><font color="#B22222">  Values:</font>
<a name="line1178">1178: </a><font color="#B22222">+   `SNES_QN_LBFGS`      - LBFGS variant</font>
<a name="line1179">1179: </a><font color="#B22222">.   `SNES_QN_BROYDEN`    - Broyden variant</font>
<a name="line1180">1180: </a><font color="#B22222">-   `SNES_QN_BADBROYDEN` - Bad Broyden variant</font>

<a name="line1182">1182: </a><font color="#B22222">  Options Database Key:</font>
<a name="line1183">1183: </a><font color="#B22222">. -snes_qn_type &lt;lbfgs,broyden,badbroyden&gt; - quasi-Newton type</font>

<a name="line1185">1185: </a><font color="#B22222">   Level: intermediate</font>

<a name="line1187">1187: </a><font color="#B22222">.seealso: `<a href="../manualpages/SNES/SNES.html">SNES</a>, `<a href="../manualpages/SNES/SNESQN.html">SNESQN</a>`, `<a href="../manualpages/SNES/SNESQNSetScaleType.html">SNESQNSetScaleType</a>()`, `<a href="../manualpages/SNES/SNESQNSetType.html">SNESQNSetType</a>()`, `<a href="../manualpages/SNES/SNESQNScaleType.html">SNESQNScaleType</a>`, `<a href="../manualpages/SNES/SNESQNRestartType.html">SNESQNRestartType</a>`, `<a href="../manualpages/SNES/SNESQNSetRestartType.html">SNESQNSetRestartType</a>()`</font>
<a name="line1188">1188: </a><font color="#B22222">M*/</font>
<a name="line1189">1189: </a><font color="#4169E1">typedef</font> <font color="#4169E1">enum</font> {
<a name="line1190">1190: </a>  SNES_QN_LBFGS      = 0,
<a name="line1191">1191: </a>  SNES_QN_BROYDEN    = 1,
<a name="line1192">1192: </a>  SNES_QN_BADBROYDEN = 2
<a name="line1193">1193: </a>} <a href="../manualpages/SNES/SNESQNType.html">SNESQNType</a>;
<a name="line1194">1194: </a>PETSC_EXTERN const char *const SNESQNTypes[];

<a name="line1196">1196: </a><strong><font color="#4169E1">PETSC_EXTERN <a href="../manualpages/Sys/PetscErrorCode.html">PetscErrorCode</a> <a href="../manualpages/SNES/SNESQNSetType.html">SNESQNSetType</a>(<a href="../manualpages/SNES/SNES.html">SNES</a>, <a href="../manualpages/SNES/SNESQNType.html">SNESQNType</a>)</font></strong>;
<a name="line1197">1197: </a><strong><font color="#4169E1">PETSC_EXTERN <a href="../manualpages/Sys/PetscErrorCode.html">PetscErrorCode</a> <a href="../manualpages/SNES/SNESQNSetScaleType.html">SNESQNSetScaleType</a>(<a href="../manualpages/SNES/SNES.html">SNES</a>, <a href="../manualpages/SNES/SNESQNScaleType.html">SNESQNScaleType</a>)</font></strong>;
<a name="line1198">1198: </a><strong><font color="#4169E1">PETSC_EXTERN <a href="../manualpages/Sys/PetscErrorCode.html">PetscErrorCode</a> <a href="../manualpages/SNES/SNESQNSetRestartType.html">SNESQNSetRestartType</a>(<a href="../manualpages/SNES/SNES.html">SNES</a>, <a href="../manualpages/SNES/SNESQNRestartType.html">SNESQNRestartType</a>)</font></strong>;

<a name="line1200">1200: </a><strong><font color="#4169E1">PETSC_EXTERN <a href="../manualpages/Sys/PetscErrorCode.html">PetscErrorCode</a> <a href="../manualpages/SNES/SNESNASMGetType.html">SNESNASMGetType</a>(<a href="../manualpages/SNES/SNES.html">SNES</a>, <a href="../manualpages/PC/PCASMType.html">PCASMType</a> *)</font></strong>;
<a name="line1201">1201: </a><strong><font color="#4169E1">PETSC_EXTERN <a href="../manualpages/Sys/PetscErrorCode.html">PetscErrorCode</a> <a href="../manualpages/SNES/SNESNASMSetType.html">SNESNASMSetType</a>(<a href="../manualpages/SNES/SNES.html">SNES</a>, <a href="../manualpages/PC/PCASMType.html">PCASMType</a>)</font></strong>;
<a name="line1202">1202: </a><strong><font color="#4169E1">PETSC_EXTERN <a href="../manualpages/Sys/PetscErrorCode.html">PetscErrorCode</a> <a href="../manualpages/SNES/SNESNASMGetSubdomains.html">SNESNASMGetSubdomains</a>(<a href="../manualpages/SNES/SNES.html">SNES</a>, <a href="../manualpages/Sys/PetscInt.html">PetscInt</a> *, <a href="../manualpages/SNES/SNES.html">SNES</a> *[], <a href="../manualpages/PetscSF/VecScatter.html">VecScatter</a> *[], <a href="../manualpages/PetscSF/VecScatter.html">VecScatter</a> *[], <a href="../manualpages/PetscSF/VecScatter.html">VecScatter</a> *[])</font></strong>;
<a name="line1203">1203: </a><strong><font color="#4169E1">PETSC_EXTERN <a href="../manualpages/Sys/PetscErrorCode.html">PetscErrorCode</a> <a href="../manualpages/SNES/SNESNASMSetSubdomains.html">SNESNASMSetSubdomains</a>(<a href="../manualpages/SNES/SNES.html">SNES</a>, <a href="../manualpages/Sys/PetscInt.html">PetscInt</a>, <a href="../manualpages/SNES/SNES.html">SNES</a>[], <a href="../manualpages/PetscSF/VecScatter.html">VecScatter</a>[], <a href="../manualpages/PetscSF/VecScatter.html">VecScatter</a>[], <a href="../manualpages/PetscSF/VecScatter.html">VecScatter</a>[])</font></strong>;
<a name="line1204">1204: </a><strong><font color="#4169E1">PETSC_EXTERN <a href="../manualpages/Sys/PetscErrorCode.html">PetscErrorCode</a> <a href="../manualpages/SNES/SNESNASMSetDamping.html">SNESNASMSetDamping</a>(<a href="../manualpages/SNES/SNES.html">SNES</a>, <a href="../manualpages/Sys/PetscReal.html">PetscReal</a>)</font></strong>;
<a name="line1205">1205: </a><strong><font color="#4169E1">PETSC_EXTERN <a href="../manualpages/Sys/PetscErrorCode.html">PetscErrorCode</a> <a href="../manualpages/SNES/SNESNASMGetDamping.html">SNESNASMGetDamping</a>(<a href="../manualpages/SNES/SNES.html">SNES</a>, <a href="../manualpages/Sys/PetscReal.html">PetscReal</a> *)</font></strong>;
<a name="line1206">1206: </a><strong><font color="#4169E1">PETSC_EXTERN <a href="../manualpages/Sys/PetscErrorCode.html">PetscErrorCode</a> <a href="../manualpages/SNES/SNESNASMGetSubdomainVecs.html">SNESNASMGetSubdomainVecs</a>(<a href="../manualpages/SNES/SNES.html">SNES</a>, <a href="../manualpages/Sys/PetscInt.html">PetscInt</a> *, <a href="../manualpages/Vec/Vec.html">Vec</a> *[], <a href="../manualpages/Vec/Vec.html">Vec</a> *[], <a href="../manualpages/Vec/Vec.html">Vec</a> *[], <a href="../manualpages/Vec/Vec.html">Vec</a> *[])</font></strong>;
<a name="line1207">1207: </a><strong><font color="#4169E1">PETSC_EXTERN <a href="../manualpages/Sys/PetscErrorCode.html">PetscErrorCode</a> <a href="../manualpages/SNES/SNESNASMSetComputeFinalJacobian.html">SNESNASMSetComputeFinalJacobian</a>(<a href="../manualpages/SNES/SNES.html">SNES</a>, <a href="../manualpages/Sys/PetscBool.html">PetscBool</a>)</font></strong>;
<a name="line1208">1208: </a><strong><font color="#4169E1">PETSC_EXTERN <a href="../manualpages/Sys/PetscErrorCode.html">PetscErrorCode</a> <a href="../manualpages/SNES/SNESNASMGetSNES.html">SNESNASMGetSNES</a>(<a href="../manualpages/SNES/SNES.html">SNES</a>, <a href="../manualpages/Sys/PetscInt.html">PetscInt</a>, <a href="../manualpages/SNES/SNES.html">SNES</a> *)</font></strong>;
<a name="line1209">1209: </a><strong><font color="#4169E1">PETSC_EXTERN <a href="../manualpages/Sys/PetscErrorCode.html">PetscErrorCode</a> <a href="../manualpages/SNES/SNESNASMGetNumber.html">SNESNASMGetNumber</a>(<a href="../manualpages/SNES/SNES.html">SNES</a>, <a href="../manualpages/Sys/PetscInt.html">PetscInt</a> *)</font></strong>;
<a name="line1210">1210: </a><strong><font color="#4169E1">PETSC_EXTERN <a href="../manualpages/Sys/PetscErrorCode.html">PetscErrorCode</a> <a href="../manualpages/SNES/SNESNASMSetWeight.html">SNESNASMSetWeight</a>(<a href="../manualpages/SNES/SNES.html">SNES</a>, <a href="../manualpages/Vec/Vec.html">Vec</a>)</font></strong>;

<a name="line1212">1212: </a><font color="#B22222">/*E</font>
<a name="line1213">1213: </a><font color="#B22222">  <a href="../manualpages/SNES/SNESCompositeType.html">SNESCompositeType</a> - Determines how two or more preconditioners are composed with the `<a href="../manualpages/SNES/SNESType.html">SNESType</a>` of `<a href="../manualpages/SNES/SNESCOMPOSITE.html">SNESCOMPOSITE</a>`</font>

<a name="line1215">1215: </a><font color="#B22222">  Values:</font>
<a name="line1216">1216: </a><font color="#B22222">+ `<a href="../manualpages/SNES/SNESCompositeType.html">SNES_COMPOSITE_ADDITIVE</a>`        - results from application of all preconditioners are added together</font>
<a name="line1217">1217: </a><font color="#B22222">. `<a href="../manualpages/SNES/SNESCompositeType.html">SNES_COMPOSITE_MULTIPLICATIVE</a>`  - preconditioners are applied sequentially to the residual freshly</font>
<a name="line1218">1218: </a><font color="#B22222">                                     computed after the previous preconditioner application</font>
<a name="line1219">1219: </a><font color="#B22222">- `<a href="../manualpages/SNES/SNESCompositeType.html">SNES_COMPOSITE_ADDITIVEOPTIMAL</a>` - uses a linear combination of the solutions obtained with each preconditioner that approximately minimize the function</font>
<a name="line1220">1220: </a><font color="#B22222">                                     value at the new iteration.</font>

<a name="line1222">1222: </a><font color="#B22222">   Level: beginner</font>

<a name="line1224">1224: </a><font color="#B22222">.seealso: [](sec_pc), `<a href="../manualpages/PC/PCCOMPOSITE.html">PCCOMPOSITE</a>`, `<a href="../manualpages/PC/PCFIELDSPLIT.html">PCFIELDSPLIT</a>`, `<a href="../manualpages/PC/PC.html">PC</a>`, `<a href="../manualpages/PC/PCCompositeSetType.html">PCCompositeSetType</a>()`, `<a href="../manualpages/PC/PCCompositeType.html">PCCompositeType</a>`</font>
<a name="line1225">1225: </a><font color="#B22222">E*/</font>
<a name="line1226">1226: </a><font color="#4169E1">typedef</font> <font color="#4169E1">enum</font> {
<a name="line1227">1227: </a>  <a href="../manualpages/SNES/SNESCompositeType.html">SNES_COMPOSITE_ADDITIVE</a>,
<a name="line1228">1228: </a>  <a href="../manualpages/SNES/SNESCompositeType.html">SNES_COMPOSITE_MULTIPLICATIVE</a>,
<a name="line1229">1229: </a>  <a href="../manualpages/SNES/SNESCompositeType.html">SNES_COMPOSITE_ADDITIVEOPTIMAL</a>
<a name="line1230">1230: </a>} <a href="../manualpages/SNES/SNESCompositeType.html">SNESCompositeType</a>;
<a name="line1231">1231: </a>PETSC_EXTERN const char *const SNESCompositeTypes[];

<a name="line1233">1233: </a><strong><font color="#4169E1">PETSC_EXTERN <a href="../manualpages/Sys/PetscErrorCode.html">PetscErrorCode</a> <a href="../manualpages/SNES/SNESCompositeSetType.html">SNESCompositeSetType</a>(<a href="../manualpages/SNES/SNES.html">SNES</a>, <a href="../manualpages/SNES/SNESCompositeType.html">SNESCompositeType</a>)</font></strong>;
<a name="line1234">1234: </a><strong><font color="#4169E1">PETSC_EXTERN <a href="../manualpages/Sys/PetscErrorCode.html">PetscErrorCode</a> <a href="../manualpages/SNES/SNESCompositeAddSNES.html">SNESCompositeAddSNES</a>(<a href="../manualpages/SNES/SNES.html">SNES</a>, <a href="../manualpages/SNES/SNESType.html">SNESType</a>)</font></strong>;
<a name="line1235">1235: </a><strong><font color="#4169E1">PETSC_EXTERN <a href="../manualpages/Sys/PetscErrorCode.html">PetscErrorCode</a> <a href="../manualpages/SNES/SNESCompositeGetSNES.html">SNESCompositeGetSNES</a>(<a href="../manualpages/SNES/SNES.html">SNES</a>, <a href="../manualpages/Sys/PetscInt.html">PetscInt</a>, <a href="../manualpages/SNES/SNES.html">SNES</a> *)</font></strong>;
<a name="line1236">1236: </a><strong><font color="#4169E1">PETSC_EXTERN <a href="../manualpages/Sys/PetscErrorCode.html">PetscErrorCode</a> <a href="../manualpages/SNES/SNESCompositeGetNumber.html">SNESCompositeGetNumber</a>(<a href="../manualpages/SNES/SNES.html">SNES</a>, <a href="../manualpages/Sys/PetscInt.html">PetscInt</a> *)</font></strong>;
<a name="line1237">1237: </a><strong><font color="#4169E1">PETSC_EXTERN <a href="../manualpages/Sys/PetscErrorCode.html">PetscErrorCode</a> <a href="../manualpages/SNES/SNESCompositeSetDamping.html">SNESCompositeSetDamping</a>(<a href="../manualpages/SNES/SNES.html">SNES</a>, <a href="../manualpages/Sys/PetscInt.html">PetscInt</a>, <a href="../manualpages/Sys/PetscReal.html">PetscReal</a>)</font></strong>;

<a name="line1239">1239: </a><strong><font color="#4169E1">PETSC_EXTERN <a href="../manualpages/Sys/PetscErrorCode.html">PetscErrorCode</a> SNESPatchSetDiscretisationInfo(<a href="../manualpages/SNES/SNES.html">SNES</a>, <a href="../manualpages/Sys/PetscInt.html">PetscInt</a>, <a href="../manualpages/DM/DM.html">DM</a> *, <a href="../manualpages/Sys/PetscInt.html">PetscInt</a> *, <a href="../manualpages/Sys/PetscInt.html">PetscInt</a> *, const <a href="../manualpages/Sys/PetscInt.html">PetscInt</a> **, const <a href="../manualpages/Sys/PetscInt.html">PetscInt</a> *, <a href="../manualpages/Sys/PetscInt.html">PetscInt</a>, const <a href="../manualpages/Sys/PetscInt.html">PetscInt</a> *, <a href="../manualpages/Sys/PetscInt.html">PetscInt</a>, const <a href="../manualpages/Sys/PetscInt.html">PetscInt</a> *)</font></strong>;
<a name="line1240">1240: </a><strong><font color="#4169E1">PETSC_EXTERN <a href="../manualpages/Sys/PetscErrorCode.html">PetscErrorCode</a> SNESPatchSetComputeOperator(<a href="../manualpages/SNES/SNES.html">SNES</a>, <a href="../manualpages/Sys/PetscErrorCode.html">PetscErrorCode</a> (*func)(<a href="../manualpages/PC/PC.html">PC</a>, <a href="../manualpages/Sys/PetscInt.html">PetscInt</a>, <a href="../manualpages/Vec/Vec.html">Vec</a>, <a href="../manualpages/Mat/Mat.html">Mat</a>, <a href="../manualpages/IS/IS.html">IS</a>, <a href="../manualpages/Sys/PetscInt.html">PetscInt</a>, const <a href="../manualpages/Sys/PetscInt.html">PetscInt</a> *, const <a href="../manualpages/Sys/PetscInt.html">PetscInt</a> *, void *), void *)</font></strong>;
<a name="line1241">1241: </a><strong><font color="#4169E1">PETSC_EXTERN <a href="../manualpages/Sys/PetscErrorCode.html">PetscErrorCode</a> SNESPatchSetComputeFunction(<a href="../manualpages/SNES/SNES.html">SNES</a>, <a href="../manualpages/Sys/PetscErrorCode.html">PetscErrorCode</a> (*func)(<a href="../manualpages/PC/PC.html">PC</a>, <a href="../manualpages/Sys/PetscInt.html">PetscInt</a>, <a href="../manualpages/Vec/Vec.html">Vec</a>, <a href="../manualpages/Vec/Vec.html">Vec</a>, <a href="../manualpages/IS/IS.html">IS</a>, <a href="../manualpages/Sys/PetscInt.html">PetscInt</a>, const <a href="../manualpages/Sys/PetscInt.html">PetscInt</a> *, const <a href="../manualpages/Sys/PetscInt.html">PetscInt</a> *, void *), void *)</font></strong>;
<a name="line1242">1242: </a><strong><font color="#4169E1">PETSC_EXTERN <a href="../manualpages/Sys/PetscErrorCode.html">PetscErrorCode</a> SNESPatchSetConstructType(<a href="../manualpages/SNES/SNES.html">SNES</a>, <a href="../manualpages/PC/PCPatchConstructType.html">PCPatchConstructType</a>, <a href="../manualpages/Sys/PetscErrorCode.html">PetscErrorCode</a> (*func)(<a href="../manualpages/PC/PC.html">PC</a>, <a href="../manualpages/Sys/PetscInt.html">PetscInt</a> *, <a href="../manualpages/IS/IS.html">IS</a> **, <a href="../manualpages/IS/IS.html">IS</a> *, void *), void *)</font></strong>;
<a name="line1243">1243: </a><strong><font color="#4169E1">PETSC_EXTERN <a href="../manualpages/Sys/PetscErrorCode.html">PetscErrorCode</a> SNESPatchSetCellNumbering(<a href="../manualpages/SNES/SNES.html">SNES</a>, <a href="../manualpages/PetscSection/PetscSection.html">PetscSection</a>)</font></strong>;

<a name="line1245">1245: </a><font color="#B22222">/*E</font>
<a name="line1246">1246: </a><font color="#B22222">    <a href="../manualpages/SNES/SNESFASType.html">SNESFASType</a> - Determines the type of nonlinear multigrid method that is run.</font>

<a name="line1248">1248: </a><font color="#B22222">   Values:</font>
<a name="line1249">1249: </a><font color="#B22222">+  `<a href="../manualpages/SNES/SNESFASType.html">SNES_FAS_MULTIPLICATIVE</a>` (default) - traditional V or W cycle as determined by `<a href="../manualpages/SNESFAS/SNESFASSetCycles.html">SNESFASSetCycles</a>()`</font>
<a name="line1250">1250: </a><font color="#B22222">.  `<a href="../manualpages/SNES/SNESFASType.html">SNES_FAS_ADDITIVE</a>`                 - additive FAS cycle</font>
<a name="line1251">1251: </a><font color="#B22222">.  `<a href="../manualpages/SNES/SNESFASType.html">SNES_FAS_FULL</a>`                     - full FAS cycle</font>
<a name="line1252">1252: </a><font color="#B22222">-  `<a href="../manualpages/SNES/SNESFASType.html">SNES_FAS_KASKADE</a>`                  - Kaskade FAS cycle</font>

<a name="line1254">1254: </a><font color="#B22222">   Level: beginner</font>

<a name="line1256">1256: </a><font color="#B22222">.seealso: [](ch_snes), `<a href="../manualpages/SNESFAS/SNESFAS.html">SNESFAS</a>`, `<a href="../manualpages/PC/PCMGSetType.html">PCMGSetType</a>()`, `<a href="../manualpages/PC/PCMGType.html">PCMGType</a>`</font>
<a name="line1257">1257: </a><font color="#B22222">E*/</font>
<a name="line1258">1258: </a><font color="#4169E1">typedef</font> <font color="#4169E1">enum</font> {
<a name="line1259">1259: </a>  <a href="../manualpages/SNES/SNESFASType.html">SNES_FAS_MULTIPLICATIVE</a>,
<a name="line1260">1260: </a>  <a href="../manualpages/SNES/SNESFASType.html">SNES_FAS_ADDITIVE</a>,
<a name="line1261">1261: </a>  <a href="../manualpages/SNES/SNESFASType.html">SNES_FAS_FULL</a>,
<a name="line1262">1262: </a>  <a href="../manualpages/SNES/SNESFASType.html">SNES_FAS_KASKADE</a>
<a name="line1263">1263: </a>} <a href="../manualpages/SNES/SNESFASType.html">SNESFASType</a>;
<a name="line1264">1264: </a>PETSC_EXTERN const char *const SNESFASTypes[];

<a name="line1266">1266: </a><font color="#B22222">/* called on the finest level FAS instance*/</font>
<a name="line1267">1267: </a><strong><font color="#4169E1">PETSC_EXTERN <a href="../manualpages/Sys/PetscErrorCode.html">PetscErrorCode</a> <a href="../manualpages/SNESFAS/SNESFASSetType.html">SNESFASSetType</a>(<a href="../manualpages/SNES/SNES.html">SNES</a>, <a href="../manualpages/SNES/SNESFASType.html">SNESFASType</a>)</font></strong>;
<a name="line1268">1268: </a><strong><font color="#4169E1">PETSC_EXTERN <a href="../manualpages/Sys/PetscErrorCode.html">PetscErrorCode</a> <a href="../manualpages/SNESFAS/SNESFASGetType.html">SNESFASGetType</a>(<a href="../manualpages/SNES/SNES.html">SNES</a>, <a href="../manualpages/SNES/SNESFASType.html">SNESFASType</a> *)</font></strong>;
<a name="line1269">1269: </a><strong><font color="#4169E1">PETSC_EXTERN <a href="../manualpages/Sys/PetscErrorCode.html">PetscErrorCode</a> <a href="../manualpages/SNESFAS/SNESFASSetLevels.html">SNESFASSetLevels</a>(<a href="../manualpages/SNES/SNES.html">SNES</a>, <a href="../manualpages/Sys/PetscInt.html">PetscInt</a>, <a href="../manualpages/Sys/MPI_Comm.html">MPI_Comm</a> *)</font></strong>;
<a name="line1270">1270: </a><strong><font color="#4169E1">PETSC_EXTERN <a href="../manualpages/Sys/PetscErrorCode.html">PetscErrorCode</a> <a href="../manualpages/SNESFAS/SNESFASGetLevels.html">SNESFASGetLevels</a>(<a href="../manualpages/SNES/SNES.html">SNES</a>, <a href="../manualpages/Sys/PetscInt.html">PetscInt</a> *)</font></strong>;
<a name="line1271">1271: </a><strong><font color="#4169E1">PETSC_EXTERN <a href="../manualpages/Sys/PetscErrorCode.html">PetscErrorCode</a> <a href="../manualpages/SNESFAS/SNESFASGetCycleSNES.html">SNESFASGetCycleSNES</a>(<a href="../manualpages/SNES/SNES.html">SNES</a>, <a href="../manualpages/Sys/PetscInt.html">PetscInt</a>, <a href="../manualpages/SNES/SNES.html">SNES</a> *)</font></strong>;
<a name="line1272">1272: </a><strong><font color="#4169E1">PETSC_EXTERN <a href="../manualpages/Sys/PetscErrorCode.html">PetscErrorCode</a> <a href="../manualpages/SNESFAS/SNESFASSetNumberSmoothUp.html">SNESFASSetNumberSmoothUp</a>(<a href="../manualpages/SNES/SNES.html">SNES</a>, <a href="../manualpages/Sys/PetscInt.html">PetscInt</a>)</font></strong>;
<a name="line1273">1273: </a><strong><font color="#4169E1">PETSC_EXTERN <a href="../manualpages/Sys/PetscErrorCode.html">PetscErrorCode</a> <a href="../manualpages/SNESFAS/SNESFASSetNumberSmoothDown.html">SNESFASSetNumberSmoothDown</a>(<a href="../manualpages/SNES/SNES.html">SNES</a>, <a href="../manualpages/Sys/PetscInt.html">PetscInt</a>)</font></strong>;
<a name="line1274">1274: </a><strong><font color="#4169E1">PETSC_EXTERN <a href="../manualpages/Sys/PetscErrorCode.html">PetscErrorCode</a> <a href="../manualpages/SNESFAS/SNESFASSetCycles.html">SNESFASSetCycles</a>(<a href="../manualpages/SNES/SNES.html">SNES</a>, <a href="../manualpages/Sys/PetscInt.html">PetscInt</a>)</font></strong>;
<a name="line1275">1275: </a><strong><font color="#4169E1">PETSC_EXTERN <a href="../manualpages/Sys/PetscErrorCode.html">PetscErrorCode</a> <a href="../manualpages/SNESFAS/SNESFASSetMonitor.html">SNESFASSetMonitor</a>(<a href="../manualpages/SNES/SNES.html">SNES</a>, PetscViewerAndFormat *, <a href="../manualpages/Sys/PetscBool.html">PetscBool</a>)</font></strong>;
<a name="line1276">1276: </a><strong><font color="#4169E1">PETSC_EXTERN <a href="../manualpages/Sys/PetscErrorCode.html">PetscErrorCode</a> <a href="../manualpages/SNESFAS/SNESFASSetLog.html">SNESFASSetLog</a>(<a href="../manualpages/SNES/SNES.html">SNES</a>, <a href="../manualpages/Sys/PetscBool.html">PetscBool</a>)</font></strong>;

<a name="line1278">1278: </a><strong><font color="#4169E1">PETSC_EXTERN <a href="../manualpages/Sys/PetscErrorCode.html">PetscErrorCode</a> <a href="../manualpages/SNESFAS/SNESFASSetGalerkin.html">SNESFASSetGalerkin</a>(<a href="../manualpages/SNES/SNES.html">SNES</a>, <a href="../manualpages/Sys/PetscBool.html">PetscBool</a>)</font></strong>;
<a name="line1279">1279: </a><strong><font color="#4169E1">PETSC_EXTERN <a href="../manualpages/Sys/PetscErrorCode.html">PetscErrorCode</a> <a href="../manualpages/SNESFAS/SNESFASGetGalerkin.html">SNESFASGetGalerkin</a>(<a href="../manualpages/SNES/SNES.html">SNES</a>, <a href="../manualpages/Sys/PetscBool.html">PetscBool</a> *)</font></strong>;
<a name="line1280">1280: </a><strong><font color="#4169E1">PETSC_EXTERN <a href="../manualpages/Sys/PetscErrorCode.html">PetscErrorCode</a> <a href="../manualpages/SNESFAS/SNESFASGalerkinFunctionDefault.html">SNESFASGalerkinFunctionDefault</a>(<a href="../manualpages/SNES/SNES.html">SNES</a>, <a href="../manualpages/Vec/Vec.html">Vec</a>, <a href="../manualpages/Vec/Vec.html">Vec</a>, void *)</font></strong>;

<a name="line1282">1282: </a><font color="#B22222">/* called on any level -- "Cycle" FAS instance */</font>
<a name="line1283">1283: </a><strong><font color="#4169E1">PETSC_EXTERN <a href="../manualpages/Sys/PetscErrorCode.html">PetscErrorCode</a> <a href="../manualpages/SNESFAS/SNESFASCycleGetSmoother.html">SNESFASCycleGetSmoother</a>(<a href="../manualpages/SNES/SNES.html">SNES</a>, <a href="../manualpages/SNES/SNES.html">SNES</a> *)</font></strong>;
<a name="line1284">1284: </a><strong><font color="#4169E1">PETSC_EXTERN <a href="../manualpages/Sys/PetscErrorCode.html">PetscErrorCode</a> <a href="../manualpages/SNESFAS/SNESFASCycleGetSmootherUp.html">SNESFASCycleGetSmootherUp</a>(<a href="../manualpages/SNES/SNES.html">SNES</a>, <a href="../manualpages/SNES/SNES.html">SNES</a> *)</font></strong>;
<a name="line1285">1285: </a><strong><font color="#4169E1">PETSC_EXTERN <a href="../manualpages/Sys/PetscErrorCode.html">PetscErrorCode</a> <a href="../manualpages/SNESFAS/SNESFASCycleGetSmootherDown.html">SNESFASCycleGetSmootherDown</a>(<a href="../manualpages/SNES/SNES.html">SNES</a>, <a href="../manualpages/SNES/SNES.html">SNES</a> *)</font></strong>;
<a name="line1286">1286: </a><strong><font color="#4169E1">PETSC_EXTERN <a href="../manualpages/Sys/PetscErrorCode.html">PetscErrorCode</a> <a href="../manualpages/SNESFAS/SNESFASCycleGetCorrection.html">SNESFASCycleGetCorrection</a>(<a href="../manualpages/SNES/SNES.html">SNES</a>, <a href="../manualpages/SNES/SNES.html">SNES</a> *)</font></strong>;
<a name="line1287">1287: </a><strong><font color="#4169E1">PETSC_EXTERN <a href="../manualpages/Sys/PetscErrorCode.html">PetscErrorCode</a> <a href="../manualpages/SNESFAS/SNESFASCycleGetInterpolation.html">SNESFASCycleGetInterpolation</a>(<a href="../manualpages/SNES/SNES.html">SNES</a>, <a href="../manualpages/Mat/Mat.html">Mat</a> *)</font></strong>;
<a name="line1288">1288: </a><strong><font color="#4169E1">PETSC_EXTERN <a href="../manualpages/Sys/PetscErrorCode.html">PetscErrorCode</a> <a href="../manualpages/SNESFAS/SNESFASCycleGetRestriction.html">SNESFASCycleGetRestriction</a>(<a href="../manualpages/SNES/SNES.html">SNES</a>, <a href="../manualpages/Mat/Mat.html">Mat</a> *)</font></strong>;
<a name="line1289">1289: </a><strong><font color="#4169E1">PETSC_EXTERN <a href="../manualpages/Sys/PetscErrorCode.html">PetscErrorCode</a> <a href="../manualpages/SNESFAS/SNESFASCycleGetInjection.html">SNESFASCycleGetInjection</a>(<a href="../manualpages/SNES/SNES.html">SNES</a>, <a href="../manualpages/Mat/Mat.html">Mat</a> *)</font></strong>;
<a name="line1290">1290: </a><strong><font color="#4169E1">PETSC_EXTERN <a href="../manualpages/Sys/PetscErrorCode.html">PetscErrorCode</a> <a href="../manualpages/SNESFAS/SNESFASCycleGetRScale.html">SNESFASCycleGetRScale</a>(<a href="../manualpages/SNES/SNES.html">SNES</a>, <a href="../manualpages/Vec/Vec.html">Vec</a> *)</font></strong>;
<a name="line1291">1291: </a><strong><font color="#4169E1">PETSC_EXTERN <a href="../manualpages/Sys/PetscErrorCode.html">PetscErrorCode</a> <a href="../manualpages/SNESFAS/SNESFASCycleSetCycles.html">SNESFASCycleSetCycles</a>(<a href="../manualpages/SNES/SNES.html">SNES</a>, <a href="../manualpages/Sys/PetscInt.html">PetscInt</a>)</font></strong>;
<a name="line1292">1292: </a><strong><font color="#4169E1">PETSC_EXTERN <a href="../manualpages/Sys/PetscErrorCode.html">PetscErrorCode</a> <a href="../manualpages/SNESFAS/SNESFASCycleIsFine.html">SNESFASCycleIsFine</a>(<a href="../manualpages/SNES/SNES.html">SNES</a>, <a href="../manualpages/Sys/PetscBool.html">PetscBool</a> *)</font></strong>;

<a name="line1294">1294: </a><font color="#B22222">/* called on the (outer) finest level FAS to set/get parameters on any level instance */</font>
<a name="line1295">1295: </a><strong><font color="#4169E1">PETSC_EXTERN <a href="../manualpages/Sys/PetscErrorCode.html">PetscErrorCode</a> <a href="../manualpages/SNESFAS/SNESFASSetInterpolation.html">SNESFASSetInterpolation</a>(<a href="../manualpages/SNES/SNES.html">SNES</a>, <a href="../manualpages/Sys/PetscInt.html">PetscInt</a>, <a href="../manualpages/Mat/Mat.html">Mat</a>)</font></strong>;
<a name="line1296">1296: </a><strong><font color="#4169E1">PETSC_EXTERN <a href="../manualpages/Sys/PetscErrorCode.html">PetscErrorCode</a> <a href="../manualpages/SNESFAS/SNESFASGetInterpolation.html">SNESFASGetInterpolation</a>(<a href="../manualpages/SNES/SNES.html">SNES</a>, <a href="../manualpages/Sys/PetscInt.html">PetscInt</a>, <a href="../manualpages/Mat/Mat.html">Mat</a> *)</font></strong>;
<a name="line1297">1297: </a><strong><font color="#4169E1">PETSC_EXTERN <a href="../manualpages/Sys/PetscErrorCode.html">PetscErrorCode</a> <a href="../manualpages/SNESFAS/SNESFASSetRestriction.html">SNESFASSetRestriction</a>(<a href="../manualpages/SNES/SNES.html">SNES</a>, <a href="../manualpages/Sys/PetscInt.html">PetscInt</a>, <a href="../manualpages/Mat/Mat.html">Mat</a>)</font></strong>;
<a name="line1298">1298: </a><strong><font color="#4169E1">PETSC_EXTERN <a href="../manualpages/Sys/PetscErrorCode.html">PetscErrorCode</a> <a href="../manualpages/SNESFAS/SNESFASGetRestriction.html">SNESFASGetRestriction</a>(<a href="../manualpages/SNES/SNES.html">SNES</a>, <a href="../manualpages/Sys/PetscInt.html">PetscInt</a>, <a href="../manualpages/Mat/Mat.html">Mat</a> *)</font></strong>;
<a name="line1299">1299: </a><strong><font color="#4169E1">PETSC_EXTERN <a href="../manualpages/Sys/PetscErrorCode.html">PetscErrorCode</a> <a href="../manualpages/SNESFAS/SNESFASSetInjection.html">SNESFASSetInjection</a>(<a href="../manualpages/SNES/SNES.html">SNES</a>, <a href="../manualpages/Sys/PetscInt.html">PetscInt</a>, <a href="../manualpages/Mat/Mat.html">Mat</a>)</font></strong>;
<a name="line1300">1300: </a><strong><font color="#4169E1">PETSC_EXTERN <a href="../manualpages/Sys/PetscErrorCode.html">PetscErrorCode</a> <a href="../manualpages/SNESFAS/SNESFASGetInjection.html">SNESFASGetInjection</a>(<a href="../manualpages/SNES/SNES.html">SNES</a>, <a href="../manualpages/Sys/PetscInt.html">PetscInt</a>, <a href="../manualpages/Mat/Mat.html">Mat</a> *)</font></strong>;
<a name="line1301">1301: </a><strong><font color="#4169E1">PETSC_EXTERN <a href="../manualpages/Sys/PetscErrorCode.html">PetscErrorCode</a> <a href="../manualpages/SNESFAS/SNESFASSetRScale.html">SNESFASSetRScale</a>(<a href="../manualpages/SNES/SNES.html">SNES</a>, <a href="../manualpages/Sys/PetscInt.html">PetscInt</a>, <a href="../manualpages/Vec/Vec.html">Vec</a>)</font></strong>;
<a name="line1302">1302: </a><strong><font color="#4169E1">PETSC_EXTERN <a href="../manualpages/Sys/PetscErrorCode.html">PetscErrorCode</a> SNESFASGetRScale(<a href="../manualpages/SNES/SNES.html">SNES</a>, <a href="../manualpages/Sys/PetscInt.html">PetscInt</a>, <a href="../manualpages/Vec/Vec.html">Vec</a> *)</font></strong>;
<a name="line1303">1303: </a><strong><font color="#4169E1">PETSC_EXTERN <a href="../manualpages/Sys/PetscErrorCode.html">PetscErrorCode</a> <a href="../manualpages/SNESFAS/SNESFASSetContinuation.html">SNESFASSetContinuation</a>(<a href="../manualpages/SNES/SNES.html">SNES</a>, <a href="../manualpages/Sys/PetscBool.html">PetscBool</a>)</font></strong>;

<a name="line1305">1305: </a><strong><font color="#4169E1">PETSC_EXTERN <a href="../manualpages/Sys/PetscErrorCode.html">PetscErrorCode</a> <a href="../manualpages/SNESFAS/SNESFASGetSmoother.html">SNESFASGetSmoother</a>(<a href="../manualpages/SNES/SNES.html">SNES</a>, <a href="../manualpages/Sys/PetscInt.html">PetscInt</a>, <a href="../manualpages/SNES/SNES.html">SNES</a> *)</font></strong>;
<a name="line1306">1306: </a><strong><font color="#4169E1">PETSC_EXTERN <a href="../manualpages/Sys/PetscErrorCode.html">PetscErrorCode</a> <a href="../manualpages/SNESFAS/SNESFASGetSmootherUp.html">SNESFASGetSmootherUp</a>(<a href="../manualpages/SNES/SNES.html">SNES</a>, <a href="../manualpages/Sys/PetscInt.html">PetscInt</a>, <a href="../manualpages/SNES/SNES.html">SNES</a> *)</font></strong>;
<a name="line1307">1307: </a><strong><font color="#4169E1">PETSC_EXTERN <a href="../manualpages/Sys/PetscErrorCode.html">PetscErrorCode</a> <a href="../manualpages/SNESFAS/SNESFASGetSmootherDown.html">SNESFASGetSmootherDown</a>(<a href="../manualpages/SNES/SNES.html">SNES</a>, <a href="../manualpages/Sys/PetscInt.html">PetscInt</a>, <a href="../manualpages/SNES/SNES.html">SNES</a> *)</font></strong>;
<a name="line1308">1308: </a><strong><font color="#4169E1">PETSC_EXTERN <a href="../manualpages/Sys/PetscErrorCode.html">PetscErrorCode</a> <a href="../manualpages/SNESFAS/SNESFASGetCoarseSolve.html">SNESFASGetCoarseSolve</a>(<a href="../manualpages/SNES/SNES.html">SNES</a>, <a href="../manualpages/SNES/SNES.html">SNES</a> *)</font></strong>;

<a name="line1310">1310: </a><font color="#B22222">/* parameters for full FAS */</font>
<a name="line1311">1311: </a><strong><font color="#4169E1">PETSC_EXTERN <a href="../manualpages/Sys/PetscErrorCode.html">PetscErrorCode</a> <a href="../manualpages/SNESFAS/SNESFASFullSetDownSweep.html">SNESFASFullSetDownSweep</a>(<a href="../manualpages/SNES/SNES.html">SNES</a>, <a href="../manualpages/Sys/PetscBool.html">PetscBool</a>)</font></strong>;
<a name="line1312">1312: </a><strong><font color="#4169E1">PETSC_EXTERN <a href="../manualpages/Sys/PetscErrorCode.html">PetscErrorCode</a> <a href="../manualpages/SNESFAS/SNESFASCreateCoarseVec.html">SNESFASCreateCoarseVec</a>(<a href="../manualpages/SNES/SNES.html">SNES</a>, <a href="../manualpages/Vec/Vec.html">Vec</a> *)</font></strong>;
<a name="line1313">1313: </a><strong><font color="#4169E1">PETSC_EXTERN <a href="../manualpages/Sys/PetscErrorCode.html">PetscErrorCode</a> <a href="../manualpages/SNESFAS/SNESFASRestrict.html">SNESFASRestrict</a>(<a href="../manualpages/SNES/SNES.html">SNES</a>, <a href="../manualpages/Vec/Vec.html">Vec</a>, <a href="../manualpages/Vec/Vec.html">Vec</a>)</font></strong>;
<a name="line1314">1314: </a><strong><font color="#4169E1">PETSC_EXTERN <a href="../manualpages/Sys/PetscErrorCode.html">PetscErrorCode</a> <a href="../manualpages/SNESFAS/SNESFASFullSetTotal.html">SNESFASFullSetTotal</a>(<a href="../manualpages/SNES/SNES.html">SNES</a>, <a href="../manualpages/Sys/PetscBool.html">PetscBool</a>)</font></strong>;
<a name="line1315">1315: </a><strong><font color="#4169E1">PETSC_EXTERN <a href="../manualpages/Sys/PetscErrorCode.html">PetscErrorCode</a> <a href="../manualpages/SNESFAS/SNESFASFullGetTotal.html">SNESFASFullGetTotal</a>(<a href="../manualpages/SNES/SNES.html">SNES</a>, <a href="../manualpages/Sys/PetscBool.html">PetscBool</a> *)</font></strong>;

<a name="line1317">1317: </a><strong><font color="#4169E1">PETSC_EXTERN <a href="../manualpages/Sys/PetscErrorCode.html">PetscErrorCode</a> DMPlexSetSNESVariableBounds(<a href="../manualpages/DM/DM.html">DM</a>, <a href="../manualpages/SNES/SNES.html">SNES</a>)</font></strong>;
<a name="line1318">1318: </a><strong><font color="#4169E1">PETSC_EXTERN <a href="../manualpages/Sys/PetscErrorCode.html">PetscErrorCode</a> <a href="../manualpages/SNES/DMSNESCheckDiscretization.html">DMSNESCheckDiscretization</a>(<a href="../manualpages/SNES/SNES.html">SNES</a>, <a href="../manualpages/DM/DM.html">DM</a>, <a href="../manualpages/Sys/PetscReal.html">PetscReal</a>, <a href="../manualpages/Vec/Vec.html">Vec</a>, <a href="../manualpages/Sys/PetscReal.html">PetscReal</a>, <a href="../manualpages/Sys/PetscReal.html">PetscReal</a>[])</font></strong>;
<a name="line1319">1319: </a><strong><font color="#4169E1">PETSC_EXTERN <a href="../manualpages/Sys/PetscErrorCode.html">PetscErrorCode</a> <a href="../manualpages/SNES/DMSNESCheckResidual.html">DMSNESCheckResidual</a>(<a href="../manualpages/SNES/SNES.html">SNES</a>, <a href="../manualpages/DM/DM.html">DM</a>, <a href="../manualpages/Vec/Vec.html">Vec</a>, <a href="../manualpages/Sys/PetscReal.html">PetscReal</a>, <a href="../manualpages/Sys/PetscReal.html">PetscReal</a> *)</font></strong>;
<a name="line1320">1320: </a><strong><font color="#4169E1">PETSC_EXTERN <a href="../manualpages/Sys/PetscErrorCode.html">PetscErrorCode</a> <a href="../manualpages/SNES/DMSNESCheckJacobian.html">DMSNESCheckJacobian</a>(<a href="../manualpages/SNES/SNES.html">SNES</a>, <a href="../manualpages/DM/DM.html">DM</a>, <a href="../manualpages/Vec/Vec.html">Vec</a>, <a href="../manualpages/Sys/PetscReal.html">PetscReal</a>, <a href="../manualpages/Sys/PetscBool.html">PetscBool</a> *, <a href="../manualpages/Sys/PetscReal.html">PetscReal</a> *)</font></strong>;
<a name="line1321">1321: </a><strong><font color="#4169E1">PETSC_EXTERN <a href="../manualpages/Sys/PetscErrorCode.html">PetscErrorCode</a> <a href="../manualpages/SNES/DMSNESCheckFromOptions.html">DMSNESCheckFromOptions</a>(<a href="../manualpages/SNES/SNES.html">SNES</a>, <a href="../manualpages/Vec/Vec.html">Vec</a>)</font></strong>;
<a name="line1322">1322: </a><strong><font color="#4169E1">PETSC_EXTERN <a href="../manualpages/Sys/PetscErrorCode.html">PetscErrorCode</a> <a href="../manualpages/SNES/DMSNESComputeJacobianAction.html">DMSNESComputeJacobianAction</a>(<a href="../manualpages/DM/DM.html">DM</a>, <a href="../manualpages/Vec/Vec.html">Vec</a>, <a href="../manualpages/Vec/Vec.html">Vec</a>, <a href="../manualpages/Vec/Vec.html">Vec</a>, void *)</font></strong>;
<a name="line1323">1323: </a><strong><font color="#4169E1">PETSC_EXTERN <a href="../manualpages/Sys/PetscErrorCode.html">PetscErrorCode</a> <a href="../manualpages/SNES/DMSNESCreateJacobianMF.html">DMSNESCreateJacobianMF</a>(<a href="../manualpages/DM/DM.html">DM</a>, <a href="../manualpages/Vec/Vec.html">Vec</a>, void *, <a href="../manualpages/Mat/Mat.html">Mat</a> *)</font></strong>;

<a name="line1325">1325: </a><strong><font color="#4169E1">PETSC_EXTERN <a href="../manualpages/Sys/PetscErrorCode.html">PetscErrorCode</a> <a href="../manualpages/SNES/SNESNewtonALSetFunction.html">SNESNewtonALSetFunction</a>(<a href="../manualpages/SNES/SNES.html">SNES</a>, <a href="../manualpages/SNES/SNESFunctionFn.html">SNESFunctionFn</a> *, void *ctx)</font></strong>;
<a name="line1326">1326: </a><strong><font color="#4169E1">PETSC_EXTERN <a href="../manualpages/Sys/PetscErrorCode.html">PetscErrorCode</a> <a href="../manualpages/SNES/SNESNewtonALGetFunction.html">SNESNewtonALGetFunction</a>(<a href="../manualpages/SNES/SNES.html">SNES</a>, <a href="../manualpages/SNES/SNESFunctionFn.html">SNESFunctionFn</a> **, void **ctx)</font></strong>;
<a name="line1327">1327: </a><strong><font color="#4169E1">PETSC_EXTERN <a href="../manualpages/Sys/PetscErrorCode.html">PetscErrorCode</a> <a href="../manualpages/SNES/SNESNewtonALComputeFunction.html">SNESNewtonALComputeFunction</a>(<a href="../manualpages/SNES/SNES.html">SNES</a>, <a href="../manualpages/Vec/Vec.html">Vec</a>, <a href="../manualpages/Vec/Vec.html">Vec</a>)</font></strong>;
<a name="line1328">1328: </a><strong><font color="#4169E1">PETSC_EXTERN <a href="../manualpages/Sys/PetscErrorCode.html">PetscErrorCode</a> <a href="../manualpages/SNES/SNESNewtonALGetLoadParameter.html">SNESNewtonALGetLoadParameter</a>(<a href="../manualpages/SNES/SNES.html">SNES</a>, <a href="../manualpages/Sys/PetscReal.html">PetscReal</a> *)</font></strong>;

<a name="line1330">1330: </a><font color="#B22222">/*MC</font>
<a name="line1331">1331: </a><font color="#B22222">   <a href="../manualpages/SNES/SNESNewtonALCorrectionType.html">SNESNewtonALCorrectionType</a> - the approach used by `<a href="../manualpages/SNES/SNESNEWTONAL.html">SNESNEWTONAL</a>` to determine</font>
<a name="line1332">1332: </a><font color="#B22222">   the correction to the current increment. While the exact correction satisfies</font>
<a name="line1333">1333: </a><font color="#B22222">   the constraint surface at every iteration, it also requires solving a quadratic</font>
<a name="line1334">1334: </a><font color="#B22222">   equation which may not have real roots. Conversely, the normal correction is more</font>
<a name="line1335">1335: </a><font color="#B22222">   efficient and always yields a real correction and is the default.</font>

<a name="line1337">1337: </a><font color="#B22222">   Values:</font>
<a name="line1338">1338: </a><font color="#B22222">+   `SNES_NEWTONAL_CORRECTION_EXACT` - choose the correction which exactly satisfies the constraint</font>
<a name="line1339">1339: </a><font color="#B22222">-   `SNES_NEWTONAL_CORRECTION_NORMAL` - choose the correction in the updated normal hyper-surface to the constraint surface</font>

<a name="line1341">1341: </a><font color="#B22222">   Options Database Key:</font>
<a name="line1342">1342: </a><font color="#B22222">. -snes_newtonal_correction_type &lt;exact&gt; - select type from &lt;exact,normal&gt;</font>

<a name="line1344">1344: </a><font color="#B22222">   Level: intermediate</font>

<a name="line1346">1346: </a><font color="#B22222">.seealso: `<a href="../manualpages/SNES/SNES.html">SNES</a>`, `<a href="../manualpages/SNES/SNESNEWTONAL.html">SNESNEWTONAL</a>`, `<a href="../manualpages/SNES/SNESNewtonALSetCorrectionType.html">SNESNewtonALSetCorrectionType</a>()`</font>
<a name="line1347">1347: </a><font color="#B22222">M*/</font>
<a name="line1348">1348: </a><font color="#4169E1">typedef</font> <font color="#4169E1">enum</font> {
<a name="line1349">1349: </a>  SNES_NEWTONAL_CORRECTION_EXACT  = 0,
<a name="line1350">1350: </a>  SNES_NEWTONAL_CORRECTION_NORMAL = 1,
<a name="line1351">1351: </a>} <a href="../manualpages/SNES/SNESNewtonALCorrectionType.html">SNESNewtonALCorrectionType</a>;
<a name="line1352">1352: </a>PETSC_EXTERN const char *const SNESNewtonALCorrectionTypes[];

<a name="line1354">1354: </a><strong><font color="#4169E1">PETSC_EXTERN <a href="../manualpages/Sys/PetscErrorCode.html">PetscErrorCode</a> <a href="../manualpages/SNES/SNESNewtonALSetCorrectionType.html">SNESNewtonALSetCorrectionType</a>(<a href="../manualpages/SNES/SNES.html">SNES</a>, <a href="../manualpages/SNES/SNESNewtonALCorrectionType.html">SNESNewtonALCorrectionType</a>)</font></strong>;
</pre>
</body>

</html>