Home
last modified time | relevance | path

Searched refs:monitor (Results 1 – 25 of 121) sorted by relevance

12345

/petsc/src/snes/linesearch/impls/secant/
H A Dlinesearchsecant.c17 PetscViewer monitor; in SNESLineSearchApply_Secant() local
31 PetscCall(SNESLineSearchGetDefaultMonitor(linesearch, &monitor)); in SNESLineSearchApply_Secant()
84 if (monitor) { in SNESLineSearchApply_Secant()
85 PetscCall(PetscViewerASCIIAddTab(monitor, ((PetscObject)linesearch)->tablevel)); in SNESLineSearchApply_Secant()
86 …PetscCall(PetscViewerASCIIPrintf(monitor, " Line search: objective function at lambda = %g is i… in SNESLineSearchApply_Secant()
87 PetscCall(PetscViewerASCIISubtractTab(monitor, ((PetscObject)linesearch)->tablevel)); in SNESLineSearchApply_Secant()
92 if (monitor) { in SNESLineSearchApply_Secant()
93 PetscCall(PetscViewerASCIIAddTab(monitor, ((PetscObject)linesearch)->tablevel)); in SNESLineSearchApply_Secant()
94 …PetscCall(PetscViewerASCIIPrintf(monitor, " Line search: objective function at lambda = %g <= l… in SNESLineSearchApply_Secant()
95 PetscCall(PetscViewerASCIISubtractTab(monitor, ((PetscObject)linesearch)->tablevel)); in SNESLineSearchApply_Secant()
[all …]
/petsc/src/dm/impls/network/
H A Dnetworkmonitor.c21 DMNetworkMonitor monitor; in DMNetworkMonitorCreate() local
30 PetscCall(PetscMalloc1(1, &monitor)); in DMNetworkMonitorCreate()
31 monitor->comm = comm; in DMNetworkMonitorCreate()
32 monitor->network = network; in DMNetworkMonitorCreate()
33 monitor->firstnode = NULL; in DMNetworkMonitorCreate()
35 *monitorptr = monitor; in DMNetworkMonitorCreate()
51 PetscErrorCode DMNetworkMonitorDestroy(DMNetworkMonitor *monitor) in DMNetworkMonitorDestroy() argument
54 while ((*monitor)->firstnode) PetscCall(DMNetworkMonitorPop(*monitor)); in DMNetworkMonitorDestroy()
56 PetscCall(PetscFree(*monitor)); in DMNetworkMonitorDestroy()
72 PetscErrorCode DMNetworkMonitorPop(DMNetworkMonitor monitor) in DMNetworkMonitorPop() argument
[all …]
/petsc/src/snes/linesearch/impls/bisection/
H A Dlinesearchbisection.c12 PetscViewer monitor; in SNESLineSearchApply_Bisection() local
21 PetscCall(SNESLineSearchGetDefaultMonitor(linesearch, &monitor)); in SNESLineSearchApply_Bisection()
60 if (monitor) { in SNESLineSearchApply_Bisection()
61 PetscCall(PetscViewerASCIIAddTab(monitor, ((PetscObject)linesearch)->tablevel)); in SNESLineSearchApply_Bisection()
62 …PetscCall(PetscViewerASCIIPrintf(monitor, " Line search: sign of fty does not change in step … in SNESLineSearchApply_Bisection()
63 PetscCall(PetscViewerASCIISubtractTab(monitor, ((PetscObject)linesearch)->tablevel)); in SNESLineSearchApply_Bisection()
73 if (monitor) { in SNESLineSearchApply_Bisection()
74 PetscCall(PetscViewerASCIIAddTab(monitor, ((PetscObject)linesearch)->tablevel)); in SNESLineSearchApply_Bisection()
75 PetscCall(PetscViewerASCIIPrintf(monitor, " Line search fty is infinity or NaN!\n")); in SNESLineSearchApply_Bisection()
76 PetscCall(PetscViewerASCIISubtractTab(monitor, ((PetscObject)linesearch)->tablevel)); in SNESLineSearchApply_Bisection()
[all …]
/petsc/src/snes/linesearch/impls/nleqerr/
H A Dlinesearchnleqerr.c40 PetscViewer monitor; in SNESLineSearchApply_NLEQERR() local
53 PetscCall(SNESLineSearchGetDefaultMonitor(linesearch, &monitor)); in SNESLineSearchApply_NLEQERR()
73 if (monitor) { in SNESLineSearchApply_NLEQERR()
74 PetscCall(PetscViewerASCIIAddTab(monitor, ((PetscObject)linesearch)->tablevel)); in SNESLineSearchApply_NLEQERR()
75 … PetscCall(PetscViewerASCIIPrintf(monitor, " Line search: Initial direction and size is 0\n")); in SNESLineSearchApply_NLEQERR()
76 PetscCall(PetscViewerASCIISubtractTab(monitor, ((PetscObject)linesearch)->tablevel)); in SNESLineSearchApply_NLEQERR()
91 if (monitor) { in SNESLineSearchApply_NLEQERR()
92 PetscCall(PetscViewerASCIIAddTab(monitor, ((PetscObject)linesearch)->tablevel)); in SNESLineSearchApply_NLEQERR()
93 …PetscCall(PetscViewerASCIIPrintf(monitor, " Line search: norm of Newton step: %14.12e\n", (doub… in SNESLineSearchApply_NLEQERR()
94 PetscCall(PetscViewerASCIISubtractTab(monitor, ((PetscObject)linesearch)->tablevel)); in SNESLineSearchApply_NLEQERR()
[all …]
/petsc/src/snes/linesearch/impls/cp/
H A Dlinesearchcp.c13 PetscViewer monitor; in SNESLineSearchApply_CP() local
22 PetscCall(SNESLineSearchGetDefaultMonitor(linesearch, &monitor)); in SNESLineSearchApply_CP()
35 if (monitor) { in SNESLineSearchApply_CP()
36 PetscCall(PetscViewerASCIIAddTab(monitor, ((PetscObject)linesearch)->tablevel)); in SNESLineSearchApply_CP()
37 …PetscCall(PetscViewerASCIIPrintf(monitor, " Line search terminated at initial point because dot… in SNESLineSearchApply_CP()
38 PetscCall(PetscViewerASCIISubtractTab(monitor, ((PetscObject)linesearch)->tablevel)); in SNESLineSearchApply_CP()
61 if (monitor) { in SNESLineSearchApply_CP()
62 PetscCall(PetscViewerASCIIAddTab(monitor, ((PetscObject)linesearch)->tablevel)); in SNESLineSearchApply_CP()
63 …PetscCall(PetscViewerASCIIPrintf(monitor, " Line search: abs(dlambda) = %g < ltol = %g\n", (dou… in SNESLineSearchApply_CP()
64 PetscCall(PetscViewerASCIISubtractTab(monitor, ((PetscObject)linesearch)->tablevel)); in SNESLineSearchApply_CP()
[all …]
/petsc/src/snes/linesearch/impls/bt/
H A Dlinesearchbt.c68 PetscViewer monitor; in SNESLineSearchApply_BT() local
79 PetscCall(SNESLineSearchGetDefaultMonitor(linesearch, &monitor)); in SNESLineSearchApply_BT()
97 if (monitor) { in SNESLineSearchApply_BT()
98 PetscCall(PetscViewerASCIIAddTab(monitor, ((PetscObject)linesearch)->tablevel)); in SNESLineSearchApply_BT()
99 … PetscCall(PetscViewerASCIIPrintf(monitor, " Line search: Initial direction and size is 0\n")); in SNESLineSearchApply_BT()
100 PetscCall(PetscViewerASCIISubtractTab(monitor, ((PetscObject)linesearch)->tablevel)); in SNESLineSearchApply_BT()
155 if (monitor) { in SNESLineSearchApply_BT()
156 PetscCall(PetscViewerASCIIAddTab(monitor, ((PetscObject)linesearch)->tablevel)); in SNESLineSearchApply_BT()
157 …PetscCall(PetscViewerASCIIPrintf(monitor, " Line search: objective function at lambdas = %g is … in SNESLineSearchApply_BT()
158 PetscCall(PetscViewerASCIISubtractTab(monitor, ((PetscObject)linesearch)->tablevel)); in SNESLineSearchApply_BT()
[all …]
/petsc/src/ts/trajectory/utils/
H A Dreconstruct.c64 …if (tj->monitor) PetscCall(PetscViewerASCIIPrintf(tj->monitor, "Reconstructing at time %g, order %… in TSTrajectoryReconstruct_Private()
79 if (tj->monitor) PetscCall(PetscViewerASCIIPushTab(tj->monitor)); in TSTrajectoryReconstruct_Private()
86 …if (tj->monitor) PetscCall(PetscViewerASCIIPrintf(tj->monitor, "Reusing snapshot %" PetscInt_FMT "… in TSTrajectoryReconstruct_Private()
103 if (tj->monitor) { in TSTrajectoryReconstruct_Private()
105 …PetscCall(PetscViewerASCIIPrintf(tj->monitor, "Discarding snapshot %" PetscInt_FMT " at time %g\n"… in TSTrajectoryReconstruct_Private()
107 PetscCall(PetscViewerASCIIPrintf(tj->monitor, "New snapshot %" PetscInt_FMT "\n", tid)); in TSTrajectoryReconstruct_Private()
109 PetscCall(PetscViewerASCIIPushTab(tj->monitor)); in TSTrajectoryReconstruct_Private()
113 if (tj->monitor) PetscCall(PetscViewerASCIIPopTab(tj->monitor)); in TSTrajectoryReconstruct_Private()
120 if (tj->monitor) PetscCall(PetscViewerASCIIPopTab(tj->monitor)); in TSTrajectoryReconstruct_Private()
125 if (tj->monitor) { in TSTrajectoryReconstruct_Private()
[all …]
/petsc/src/sys/tests/
H A Dex47.c19 PetscBool monitor = PETSC_FALSE; in main() local
21 PetscCall(PetscOptionsGetBool(NULL, NULL, "-monitor", &monitor, NULL)); in main()
22 …if (monitor) PetscCall(PetscOptionsMonitorSet(PetscOptionsMonitorDefault, PETSC_VIEWER_STDOUT_WORL… in main()
29 PetscBool monitor = PETSC_FALSE; in main() local
31 PetscCall(PetscOptionsGetBool(NULL, NULL, "-monitor", &monitor, NULL)); in main()
32 if (monitor) PetscCall(PetscOptionsMonitorSet(PetscOptionsMonitorDefault, NULL, NULL)); in main()
/petsc/src/ts/trajectory/interface/
H A Dtraj.c62 …if (tj->monitor) PetscCall(PetscViewerASCIIPrintf(tj->monitor, "TSTrajectorySet: stepnum %" PetscI… in TSTrajectorySet()
125 if (tj->monitor) { in TSTrajectoryGet()
126 …PetscCall(PetscViewerASCIIPrintf(tj->monitor, "TSTrajectoryGet: stepnum %" PetscInt_FMT ", stages … in TSTrajectoryGet()
127 PetscCall(PetscViewerFlush(tj->monitor)); in TSTrajectoryGet()
171 if (tj->monitor) { in TSTrajectoryGetVecs()
175 …PetscCall(PetscViewerASCIIPrintf(tj->monitor, "Requested by GetVecs %" PetscInt_FMT " %" PetscInt_… in TSTrajectoryGetVecs()
176 PetscCall(PetscViewerFlush(tj->monitor)); in TSTrajectoryGetVecs()
189 if (tj->monitor && !U) { in TSTrajectoryGetVecs()
190 PetscCall(PetscViewerASCIIPushTab(tj->monitor)); in TSTrajectoryGetVecs()
191 PetscCall(PetscViewerASCIIPrintf(tj->monitor, "State vector cached\n")); in TSTrajectoryGetVecs()
[all …]
/petsc/src/ksp/ksp/interface/ftn-custom/
H A Dzitfuncf.c60 PetscFortranCallbackId monitor; member
68 …PetscObjectUseFortranCallback(ksp, _cb.monitor, (KSP *, PetscInt *, PetscReal *, void *, PetscErro… in ourmonitor()
92 PETSC_EXTERN void kspmonitorset_(KSP *ksp, void (*monitor)(KSP *, PetscInt *, PetscReal *, void *, … in kspmonitorset_()
96 if ((PetscFortranCallbackFn *)monitor == (PetscFortranCallbackFn *)kspmonitorresidual_) { in kspmonitorset_()
98 } else if ((PetscFortranCallbackFn *)monitor == (PetscFortranCallbackFn *)kspmonitorsolution_) { in kspmonitorset_()
100 …} else if ((PetscFortranCallbackFn *)monitor == (PetscFortranCallbackFn *)kspmonitortrueresidual_)… in kspmonitorset_()
102 …} else if ((PetscFortranCallbackFn *)monitor == (PetscFortranCallbackFn *)kspmonitorsingularvalue_… in kspmonitorset_()
104 …} else if ((PetscFortranCallbackFn *)monitor == (PetscFortranCallbackFn *)kspgmresmonitorkrylov_) { in kspmonitorset_()
107 …((PetscObject)*ksp, PETSC_FORTRAN_CALLBACK_CLASS, &_cb.monitor, (PetscFortranCallbackFn *)monitor,… in kspmonitorset_()
/petsc/src/snes/impls/ngmres/
H A Dngmresfunc.c172 …if (ngmres->monitor) PetscCall(PetscViewerASCIIPrintf(ngmres->monitor, "obj(X_A) = %e, ||F_A||_2 =… in SNESNGMRESSelect_Private()
208 if (ngmres->monitor) { in SNESNGMRESSelect_Private()
214 …PetscCall(PetscViewerASCIIPrintf(ngmres->monitor, "Additive solution: objective = %e\n", (double)o… in SNESNGMRESSelect_Private()
224 …if (ngmres->monitor) PetscCall(PetscViewerASCIIPrintf(ngmres->monitor, "picked X_A, obj(X_A) = %e,… in SNESNGMRESSelect_Private()
232 …if (ngmres->monitor) PetscCall(PetscViewerASCIIPrintf(ngmres->monitor, "picked X_M, obj(X_A) = %e,… in SNESNGMRESSelect_Private()
258 …if (ngmres->monitor) PetscCall(PetscViewerASCIIPrintf(ngmres->monitor, "ascent restart: %e > 0\n",… in SNESNGMRESSelectRestart_Private()
264 …if (ngmres->monitor) PetscCall(PetscViewerASCIIPrintf(ngmres->monitor, "difference restart: %e > %… in SNESNGMRESSelectRestart_Private()
269 …if (ngmres->monitor) PetscCall(PetscViewerASCIIPrintf(ngmres->monitor, "residual restart: %e > %e\… in SNESNGMRESSelectRestart_Private()
275 …if (ngmres->monitor) PetscCall(PetscViewerASCIIPrintf(ngmres->monitor, "F_M rise restart: %e > %e\… in SNESNGMRESSelectRestart_Private()
H A Danderson.c6 PetscBool monitor = PETSC_FALSE; in SNESSetFromOptions_Anderson() local
15 …, "Monitor steps of Anderson Mixing", "SNES", ngmres->monitor ? PETSC_TRUE : PETSC_FALSE, &monitor in SNESSetFromOptions_Anderson()
16 if (monitor) ngmres->monitor = PETSC_VIEWER_STDOUT_(PetscObjectComm((PetscObject)snes)); in SNESSetFromOptions_Anderson()
130 …if (ngmres->monitor) PetscCall(PetscViewerASCIIPrintf(ngmres->monitor, "periodic restart after %" … in SNESSolve_Anderson()
138 …if (ngmres->monitor) PetscCall(PetscViewerASCIIPrintf(ngmres->monitor, "Restarted at iteration %" … in SNESSolve_Anderson()
/petsc/src/ts/adapt/interface/
H A Dtsadapt.c324 PetscCall(PetscViewerDestroy(&(*adapt)->monitor)); in TSAdaptDestroy()
351 …if (!adapt->monitor) PetscCall(PetscViewerASCIIOpen(PetscObjectComm((PetscObject)adapt), "stdout",… in TSAdaptSetMonitor()
353 PetscCall(PetscViewerDestroy(&adapt->monitor)); in TSAdaptSetMonitor()
788 …"Print choices made by adaptive controller", "TSAdaptSetMonitor", adapt->monitor ? PETSC_TRUE : PE… in TSAdaptSetFromOptions()
934 if (adapt->monitor) { in TSAdaptChoose()
935 PetscCall(PetscViewerASCIIAddTab(adapt->monitor, ((PetscObject)adapt)->tablevel)); in TSAdaptChoose()
945 …PetscCall(PetscViewerASCIIPrintf(adapt->monitor, " TSAdapt does not interfere, step %3" PetscIn… in TSAdaptChoose()
946 …} else PetscCall(PetscViewerASCIIPrintf(adapt->monitor, " TSAdapt does not interfere, step %3" … in TSAdaptChoose()
948 PetscCall(PetscViewerASCIISubtractTab(adapt->monitor, ((PetscObject)adapt)->tablevel)); in TSAdaptChoose()
1000 if (adapt->monitor) { in TSAdaptChoose()
[all …]
/petsc/src/ksp/pc/impls/svd/
H A Dsvd.c15 PetscViewer monitor; member
104 if (jac->monitor) { in PCSetUp_SVD()
105 PetscCall(PetscViewerASCIIAddTab(jac->monitor, ((PetscObject)pc)->tablevel)); in PCSetUp_SVD()
106 …PetscCall(PetscViewerASCIIPrintf(jac->monitor, " SVD: condition number %14.12e, %" PetscInt_FMT… in PCSetUp_SVD()
108 PetscCall(PetscViewerASCIIPrintf(jac->monitor, " SVD: singular values:\n")); in PCSetUp_SVD()
111 if (i != 0) PetscCall(PetscViewerASCIIPrintf(jac->monitor, "\n")); in PCSetUp_SVD()
112 PetscCall(PetscViewerASCIIPrintf(jac->monitor, " ")); in PCSetUp_SVD()
114 PetscCall(PetscViewerASCIIPrintf(jac->monitor, " %14.12e", (double)PetscRealPart(d[i]))); in PCSetUp_SVD()
116 PetscCall(PetscViewerASCIIPrintf(jac->monitor, "\n")); in PCSetUp_SVD()
118 …PetscCall(PetscViewerASCIIPrintf(jac->monitor, " SVD: smallest singular values: %14.12e %14.12e… in PCSetUp_SVD()
[all …]
/petsc/src/ts/trajectory/impls/memory/
H A Dtrajmemory.c348 if (tj->monitor) { in StackDumpAll()
349 PetscCall(PetscViewerASCIIPushTab(tj->monitor)); in StackDumpAll()
350 PetscCall(PetscViewerASCIIPrintf(tj->monitor, "Dump stack id %" PetscInt_FMT " to file\n", id)); in StackDumpAll()
351 PetscCall(PetscViewerASCIIPopTab(tj->monitor)); in StackDumpAll()
386 if (tj->monitor) { in StackLoadAll()
387 PetscCall(PetscViewerASCIIAddTab(tj->monitor, ((PetscObject)tj)->tablevel)); in StackLoadAll()
388 PetscCall(PetscViewerASCIIPrintf(tj->monitor, "Load stack from file\n")); in StackLoadAll()
389 PetscCall(PetscViewerASCIISubtractTab(tj->monitor, ((PetscObject)tj)->tablevel)); in StackLoadAll()
430 if (tj->monitor) { in StackLoadLast()
431 PetscCall(PetscViewerASCIIAddTab(tj->monitor, ((PetscObject)tj)->tablevel)); in StackLoadLast()
[all …]
/petsc/src/binding/petsc4py/test/
H A Dtest_ts.py57 def monitor(self, ts, s, t, u): member in MyODE
101 ts.setMonitor(ode.monitor)
129 ts.monitor(ts.step_number, ts.time)
133 ts.monitor(ts.step_number, ts.time)
148 ts.setMonitor(ode.monitor)
195 ts.setMonitor(ode.monitor)
219 ts.monitor(ts.step_number, ts.time)
223 ts.monitor(ts.step_number, ts.time)
239 ts.setMonitor(ode.monitor)
H A Dtest_ksp.py144 def monitor(ksp, its, rnorm): function
149 refcnt = getrefcount(monitor)
150 self.ksp.setMonitor(monitor)
151 self.assertEqual(getrefcount(monitor), refcnt + 1)
155 self.assertEqual(getrefcount(monitor), refcnt)
/petsc/src/snes/impls/ncg/
H A Dsnesncgimpl.h11 …PetscViewer monitor; /* monitor for ncg (prints out the alpha and beta parameters at each iteratio… member
/petsc/src/ts/tutorials/hamiltonian/
H A Dex1.c112 PetscBool monitor = PETSC_FALSE; in main() local
130 PetscCall(PetscOptionsGetBool(NULL, NULL, "-monitor", &monitor, NULL)); in main()
160 if (monitor) PetscCall(TSMonitorSet(ts, Monitor, &user, NULL)); in main()
/petsc/src/ts/tutorials/
H A Dex19.c159 PetscBool monitor = PETSC_FALSE; in main() local
179 PetscCall(PetscOptionsGetBool(NULL, NULL, "-monitor", &monitor, NULL)); in main()
199 if (monitor) PetscCall(TSMonitorSet(ts, Monitor, &user, NULL)); in main()
H A Dex16fwd.c143 PetscBool monitor = PETSC_FALSE; in main() local
164 PetscCall(PetscOptionsGetBool(NULL, NULL, "-monitor", &monitor, NULL)); in main()
194 if (monitor) PetscCall(TSMonitorSet(ts, Monitor, &user, NULL)); in main()
/petsc/src/sys/tests/output/
H A Dex47_3_env.out2 -monitor # (source: command line)
/petsc/src/ts/event/
H A Dtsevent.c65 PetscCall(PetscViewerDestroy(&(*event)->monitor)); in TSEventDestroy()
385 …(flg) PetscCall(PetscViewerASCIIOpen(PetscObjectComm((PetscObject)ts), "stdout", &event->monitor)); in TSSetEventHandler()
483 …if (event->monitor) PetscCall(PetscPrintf(((PetscObject)ts)->comm, "TSEvent: at time %g the vector… in TSPostEvent()
840 if (event->monitor) in TSEventHandler()
841 …PetscCall(PetscViewerASCIIPrintf(event->monitor, "[%d] TSEvent: iter %" PetscInt_FMT " - reached t… in TSEventHandler()
868 if (event->monitor) in TSEventHandler()
869 …PetscCall(PetscViewerASCIIPrintf(event->monitor, "[%d] TSEvent: iter %" PetscInt_FMT " - Event %" … in TSEventHandler()
884 if (event->monitor) in TSEventHandler()
885 …PetscCall(PetscViewerASCIIPrintf(event->monitor, "[%d] TSEvent: iter %" PetscInt_FMT " - Event %" … in TSEventHandler()
888 if (event->monitor) in TSEventHandler()
[all …]
/petsc/src/snes/impls/qn/
H A Dqn.c13 PetscViewer monitor; member
240 PetscCall(PetscViewerASCIIAddTab(qn->monitor, ((PetscObject)snes)->tablevel + 2)); in SNESSolve_QN()
242 …PetscCall(PetscViewerASCIIPrintf(qn->monitor, "Powell restart! |%14.12e| > %6.4f*|%14.12e| i_r = %… in SNESSolve_QN()
244 …PetscCall(PetscViewerASCIIPrintf(qn->monitor, "Periodic restart! i_r = %" PetscInt_FMT "\n", i_r)); in SNESSolve_QN()
246 PetscCall(PetscViewerASCIISubtractTab(qn->monitor, ((PetscObject)snes)->tablevel + 2)); in SNESSolve_QN()
356 …qn->monflg) PetscCall(PetscViewerASCIIGetStdout(PetscObjectComm((PetscObject)snes), &qn->monitor)); in SNESSetFromOptions_QN()
537 qn->monitor = NULL; in SNESCreate_QN()
/petsc/src/binding/petsc4py/demo/legacy/ode/
H A Drober.py61 def monitor(ts, i, t, x): function
66 ts.setMonitor(monitor)

12345