Lines Matching refs:app_ctx
46 AppCtx app_ctx; // Contains problem options in main() local
84 PetscCall(PetscCalloc1(1, &app_ctx)); in main()
85 PetscCall(ProcessCommandLineOptions(comm, app_ctx)); in main()
88 num_levels = app_ctx->num_levels; in main()
95 CeedInit(app_ctx->ceed_resource, &ceed); in main()
103 PetscCall(PetscFunctionListFind(problem_functions->setupPhysics, app_ctx->name, &SetupPhysics)); in main()
104 … if (!SetupPhysics) SETERRQ(PETSC_COMM_SELF, 1, "Physics setup for '%s' not found", app_ctx->name); in main()
107 …PetscCall(PetscFunctionListFind(problem_functions->setupSmootherPhysics, app_ctx->name, &SetupSmoo… in main()
108 …erPhysics) SETERRQ(PETSC_COMM_SELF, 1, "Smoother physics setup for '%s' not found", app_ctx->name); in main()
120 PetscCall(CreateDistributedDM(comm, app_ctx, &dm_orig)); in main()
144 …PetscCall(SetupDMByDegree(level_dms[level], app_ctx, app_ctx->level_degrees[level], PETSC_TRUE, nu… in main()
157 …PetscCall(SetupDMByDegree(dm_energy, app_ctx, app_ctx->level_degrees[fine_level], PETSC_FALSE, num… in main()
159 …PetscCall(SetupDMByDegree(dm_diagnostic, app_ctx, app_ctx->level_degrees[fine_level], PETSC_FALSE,… in main()
223 if (app_ctx->forcing_choice != FORCE_NONE) { in main()
233 if (app_ctx->bc_traction_count > 0) { in main()
248 …PetscCall(PetscFunctionListFind(problem_functions->setupLibceedFineLevel, app_ctx->name, &SetupLib… in main()
249 …LibceedFineLevel) SETERRQ(PETSC_COMM_SELF, 1, "Fine grid setup for '%s' not found", app_ctx->name); in main()
250 …LibceedFineLevel)(level_dms[fine_level], dm_energy, dm_diagnostic, ceed, app_ctx, ctx_phys, fine_l… in main()
271 …PetscCall(PetscFunctionListFind(problem_functions->setupLibceedLevel, app_ctx->name, &SetupLibceed… in main()
272 …upLibceedLevel) SETERRQ(PETSC_COMM_SELF, 1, "Coarse grid setup for '%s' not found", app_ctx->name); in main()
273 …PetscCall((*SetupLibceedLevel)(level_dms[level], ceed, app_ctx, level, num_comp_u, U_g_size[level]… in main()
291 if (app_ctx->forcing_choice != FORCE_NONE) { in main()
298 if (app_ctx->bc_traction_count > 0) { in main()
309 if (!app_ctx->test_mode) { in main()
349 app_ctx->name_for_disp, forcing_types_for_disp[app_ctx->forcing_choice], in main()
350 … app_ctx->mesh_file[0] ? app_ctx->mesh_file : "Box Mesh", app_ctx->degree + 1, app_ctx->degree + 1, in main()
352 … (app_ctx->degree == 1 && app_ctx->multigrid_choice != MULTIGRID_NONE) ? "Algebraic multigrid" in main()
353 … : multigrid_types_for_disp[app_ctx->multigrid_choice], in main()
354 … (app_ctx->degree == 1 || app_ctx->multigrid_choice == MULTIGRID_NONE) ? 0 : num_levels)); in main()
356 if (app_ctx->multigrid_choice != MULTIGRID_NONE) { in main()
365 … level, i ? "fine" : "coarse", app_ctx->level_degrees[level] + 1, U_g_size[level] / num_comp_u, in main()
388 …PetscCall(SetupJacobianCtx(comm, app_ctx, level_dms[level], U_g[level], U_loc[level], ceed_data[le… in main()
408 if (app_ctx->bc_traction_count > 0) res_ctx->neumann_bcs = neumann_bcs; in main()
418 …PetscCall(SetupProlongRestrictCtx(comm, app_ctx, level_dms[level - 1], level_dms[level], U_g[level… in main()
433 if (app_ctx->multigrid_choice != MULTIGRID_NONE) { in main()
437 if (app_ctx->degree > 1) { in main()
464 if (app_ctx->degree > 1) { in main()
489 if (app_ctx->multigrid_choice == MULTIGRID_NONE) { in main()
493 } else if (app_ctx->degree == 1) { in main()
583 if (app_ctx->view_soln) { in main()
584 PetscCall(ViewSolution(comm, app_ctx, U, 0, 0.0)); in main()
603 for (increment = 1; increment <= app_ctx->num_increments; increment++) { in main()
610 PetscScalar load_increment = 1.0 * increment / app_ctx->num_increments, in main()
613 if (app_ctx->num_increments > 1 && app_ctx->forcing_choice != FORCE_NONE) { in main()
621 if (app_ctx->view_soln) { in main()
622 PetscCall(ViewSolution(comm, app_ctx, U, increment, load_increment)); in main()
636 if (app_ctx->energy_viewer) { in main()
641 if (!app_ctx->test_mode) { in main()
645 PetscCall(PetscViewerASCIIPrintf(app_ctx->energy_viewer, "%f,%e\n", load_increment, energy)); in main()
658 if (!app_ctx->test_mode) { in main()
674 …snes_type, SNESConvergedReasons[reason], app_ctx->num_increments, increment - 1, snes_its, (double… in main()
723 if (!app_ctx->test_mode) { in main()
736 if (app_ctx->forcing_choice == FORCE_MMS) { in main()
761 if (!app_ctx->test_mode || l2_error > 0.05) { in main()
775 if (!app_ctx->test_mode) { in main()
779 PetscCall(RegressionTests_solids(app_ctx, energy)); in main()
784 if (app_ctx->view_soln || app_ctx->view_final_soln) { in main()
793 …PetscCall(ViewDiagnosticQuantities(comm, level_dms[fine_level], diagnostic_ctx, app_ctx, U, ceed_d… in main()
826 PetscCall(PetscViewerDestroy(&app_ctx->energy_viewer)); in main()
838 PetscCall(PetscFree(app_ctx->level_degrees)); in main()
872 PetscCall(PetscFree(app_ctx)); in main()