Lines Matching refs:app_ctx

14 static PetscErrorCode RegisterProblems_NS(AppCtx app_ctx) {  in RegisterProblems_NS()  argument
15 app_ctx->problems = NULL; in RegisterProblems_NS()
18 PetscCall(PetscFunctionListAdd(&app_ctx->problems, "density_current", NS_DENSITY_CURRENT)); in RegisterProblems_NS()
19 PetscCall(PetscFunctionListAdd(&app_ctx->problems, "euler_vortex", NS_EULER_VORTEX)); in RegisterProblems_NS()
20 PetscCall(PetscFunctionListAdd(&app_ctx->problems, "shocktube", NS_SHOCKTUBE)); in RegisterProblems_NS()
21 PetscCall(PetscFunctionListAdd(&app_ctx->problems, "advection", NS_ADVECTION)); in RegisterProblems_NS()
22 PetscCall(PetscFunctionListAdd(&app_ctx->problems, "blasius", NS_BLASIUS)); in RegisterProblems_NS()
23 PetscCall(PetscFunctionListAdd(&app_ctx->problems, "channel", NS_CHANNEL)); in RegisterProblems_NS()
24 PetscCall(PetscFunctionListAdd(&app_ctx->problems, "gaussian_wave", NS_GAUSSIAN_WAVE)); in RegisterProblems_NS()
25 PetscCall(PetscFunctionListAdd(&app_ctx->problems, "newtonian", NS_NEWTONIAN_IG)); in RegisterProblems_NS()
26 PetscCall(PetscFunctionListAdd(&app_ctx->problems, "taylor_green", NS_TAYLOR_GREEN)); in RegisterProblems_NS()
73 AppCtx app_ctx = honee->app_ctx; in ProcessCommandLineOptions() local
99 PetscCall(RegisterProblems_NS(app_ctx)); in ProcessCommandLineOptions()
102 …PetscOptionsString("-ceed", "CEED resource specifier", NULL, app_ctx->ceed_resource, app_ctx->ceed… in ProcessCommandLineOptions()
103 sizeof(app_ctx->ceed_resource), &ceed_flag)); in ProcessCommandLineOptions()
105 app_ctx->test_type = TESTTYPE_NONE; in ProcessCommandLineOptions()
106 …pe", "Type of test to run", NULL, TestTypes, (PetscEnum)app_ctx->test_type, (PetscEnum *)&app_ctx-… in ProcessCommandLineOptions()
109 app_ctx->test_tol = 1E-11; in ProcessCommandLineOptions()
110 …("-compare_final_state_atol", "Test absolute tolerance", NULL, app_ctx->test_tol, &app_ctx->test_t… in ProcessCommandLineOptions()
112 …ing("-compare_final_state_filename", "Test filename", NULL, app_ctx->test_file_path, app_ctx->test… in ProcessCommandLineOptions()
113 sizeof(app_ctx->test_file_path), NULL)); in ProcessCommandLineOptions()
115 …cOptionsFList("-problem", "Problem to solve", NULL, app_ctx->problems, app_ctx->problem_name, app_… in ProcessCommandLineOptions()
116 sizeof(app_ctx->problem_name), &problem_flag)); in ProcessCommandLineOptions()
118 app_ctx->viz_refine = 0; in ProcessCommandLineOptions()
119 …refine", "Regular refinement levels for visualization", NULL, app_ctx->viz_refine, &app_ctx->viz_r… in ProcessCommandLineOptions()
121 app_ctx->checkpoint_interval = 0; in ProcessCommandLineOptions()
122 app_ctx->checkpoint_vtk = PETSC_FALSE; in ProcessCommandLineOptions()
124 …ionsInt("-output_freq", "Frequency of output, in number of steps", NULL, app_ctx->checkpoint_inter… in ProcessCommandLineOptions()
125 &app_ctx->checkpoint_interval, &option_set)); in ProcessCommandLineOptions()
126 if (option_set) app_ctx->checkpoint_vtk = PETSC_TRUE; in ProcessCommandLineOptions()
127 …"-checkpoint_interval", "Frequency of output, in number of steps", NULL, app_ctx->checkpoint_inter… in ProcessCommandLineOptions()
128 &app_ctx->checkpoint_interval, NULL)); in ProcessCommandLineOptions()
129 …kpoint_vtk", "Include VTK (*.vtu) output at each binary checkpoint", NULL, app_ctx->checkpoint_vtk, in ProcessCommandLineOptions()
130 &app_ctx->checkpoint_vtk, NULL)); in ProcessCommandLineOptions()
132 …"-output_add_stepnum2bin", "Add step number to the binary outputs", NULL, app_ctx->add_stepnum2bin, in ProcessCommandLineOptions()
133 &app_ctx->add_stepnum2bin, NULL)); in ProcessCommandLineOptions()
135 PetscCall(PetscStrncpy(app_ctx->output_dir, ".", 2)); in ProcessCommandLineOptions()
136 …String("-output_dir", "Output directory", NULL, app_ctx->output_dir, app_ctx->output_dir, sizeof(a… in ProcessCommandLineOptions()
139 if (!rank) PetscCall(PetscMkdir(app_ctx->output_dir)); in ProcessCommandLineOptions()
141 …nue_filename", "Filename to get initial condition from", NULL, app_ctx->cont_file, app_ctx->cont_f… in ProcessCommandLineOptions()
142 sizeof(app_ctx->cont_file), NULL)); in ProcessCommandLineOptions()
143 if (app_ctx->cont_file[0] != '\0') app_ctx->use_continue_file = PETSC_TRUE; in ProcessCommandLineOptions()
150 app_ctx->degree = 1; in ProcessCommandLineOptions()
151 …onsInt("-degree", "Polynomial degree of finite elements", NULL, app_ctx->degree, &app_ctx->degree,… in ProcessCommandLineOptions()
153 app_ctx->q_extra = 0; in ProcessCommandLineOptions()
154 …ionsInt("-q_extra", "Number of extra quadrature points", NULL, app_ctx->q_extra, &app_ctx->q_extra… in ProcessCommandLineOptions()
161 if (option_set) PetscCall(PetscStrallocpy(amat_type, (char **)&app_ctx->amat_type)); in ProcessCommandLineOptions()
172 strncpy(app_ctx->ceed_resource, ceed_resource, 10); in ProcessCommandLineOptions()
177 …if (strncmp(app_ctx->ceed_resource, "/gpu", 4) == 0) PetscCall(PetscDeviceInitialize(PETSC_DEVICE_… in ProcessCommandLineOptions()
182 strncpy(app_ctx->problem_name, problem_name, 16); in ProcessCommandLineOptions()
185 …s_monitor_wall_force", "Viewer for force on each (no-slip) wall", NULL, &app_ctx->wall_forces.view… in ProcessCommandLineOptions()
186 &app_ctx->wall_forces.viewer_format, NULL)); in ProcessCommandLineOptions()
189 app_ctx->sgs_model_type = SGS_MODEL_NONE; in ProcessCommandLineOptions()
190 …_model_type", "Subgrid Stress Model type", NULL, SGSModelTypes, (PetscEnum)app_ctx->sgs_model_type, in ProcessCommandLineOptions()
191 (PetscEnum *)&app_ctx->sgs_model_type, NULL)); in ProcessCommandLineOptions()
193 …gs_train_enable", "Enable Data-Driven SGS training", NULL, app_ctx->sgs_train_enable, &app_ctx->sg… in ProcessCommandLineOptions()
195 if (app_ctx->sgs_train_enable) honee->set_poststep = PETSC_TRUE; in ProcessCommandLineOptions()
198 …DivDiffFluxProjectionMethods, (PetscEnum)app_ctx->divFdiffproj_method, (PetscEnum *)&app_ctx->divF… in ProcessCommandLineOptions()
201 app_ctx->check_step_interval = -1; in ProcessCommandLineOptions()
204 app_ctx->check_step_interval, &app_ctx->check_step_interval, NULL)); in ProcessCommandLineOptions()
205 if (app_ctx->check_step_interval > 0) honee->set_poststep = PETSC_TRUE; in ProcessCommandLineOptions()