Lines Matching refs:ctx

26 PetscErrorCode SetupMontiorCfl(TS ts, PetscViewerAndFormat *ctx) {  in SetupMontiorCfl()  argument
41 PetscCall(PetscObjectTypeCompare((PetscObject)ctx->viewer, PETSCVIEWERASCII, &is_ascii)); in SetupMontiorCfl()
124 ctx->data = monitor_ctx; in SetupMontiorCfl()
125 ctx->data_destroy = (PetscCtxDestroyFn *)MonitorCflCtxDestroy; in SetupMontiorCfl()
138 …de TSMonitor_Cfl(TS ts, PetscInt step, PetscReal solution_time, Vec Q, PetscViewerAndFormat *ctx) { in TSMonitor_Cfl() argument
139 MonitorCflCtx monitor_ctx = (MonitorCflCtx)ctx->data; in TSMonitor_Cfl()
147 …if (!(step % ctx->view_interval == 0 || reason != TS_CONVERGED_ITERATING)) PetscFunctionReturn(PET… in TSMonitor_Cfl()
164 if (ctx->format == PETSC_VIEWER_ASCII_CSV) { in TSMonitor_Cfl()
171 PetscCall(PetscViewerASCIIPrintf(ctx->viewer, "# petsc_version: %s\n", buf)); in TSMonitor_Cfl()
173 PetscCall(PetscViewerASCIIPrintf(ctx->viewer, "# petsc_directory: %s\n", buf_const)); in TSMonitor_Cfl()
175 PetscCall(PetscViewerASCIIPrintf(ctx->viewer, "# petsc_arch: %s\n", buf)); in TSMonitor_Cfl()
177 PetscCall(PetscViewerASCIIPrintf(ctx->viewer, "# date: %s\n", buf)); in TSMonitor_Cfl()
179 PetscCall(PetscViewerASCIIPrintf(ctx->viewer, "# date_timezone: %s\n", buf)); in TSMonitor_Cfl()
181 PetscCall(PetscViewerASCIIPrintf(ctx->viewer, "# username: %s\n", buf)); in TSMonitor_Cfl()
183 PetscCall(PetscViewerASCIIPrintf(ctx->viewer, "# hostname: %s\n", buf)); in TSMonitor_Cfl()
185 PetscCall(PetscViewerASCIIPrintf(ctx->viewer, "# working_directory: %s\n", buf)); in TSMonitor_Cfl()
187 PetscCall(PetscViewerFileGetName(ctx->viewer, &buf_const)); in TSMonitor_Cfl()
189 PetscCall(PetscViewerASCIIPrintf(ctx->viewer, "# original_file_path: %s\n", buf)); in TSMonitor_Cfl()
190 PetscCall(PetscViewerASCIIPrintf(ctx->viewer, "#\n")); in TSMonitor_Cfl()
191 PetscCall(PetscViewerASCIIPrintf(ctx->viewer, "step,time,mincfl,maxcfl\n")); in TSMonitor_Cfl()
195 … PetscCall(PetscViewerASCIIPrintf(ctx->viewer, "%" PetscInt_FMT ",%0.17e,", step, solution_time)); in TSMonitor_Cfl()
196 …PetscCall(PetscViewerASCIIPrintf(ctx->viewer, "%0.17e,%0.17e", global_minmax[0], global_minmax[1])… in TSMonitor_Cfl()
197 PetscCall(PetscViewerASCIIPrintf(ctx->viewer, "\n")); in TSMonitor_Cfl()
199 PetscCall(PetscViewerASCIIAddTab(ctx->viewer, monitor_ctx->tab_level)); in TSMonitor_Cfl()
200 …PetscCall(PetscViewerASCIIPrintf(ctx->viewer, "Min, Max CFL: %0.5g, %0.5g\n", global_minmax[0], gl… in TSMonitor_Cfl()
201 PetscCall(PetscViewerASCIISubtractTab(ctx->viewer, monitor_ctx->tab_level)); in TSMonitor_Cfl()