Home
last modified time | relevance | path

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

/honee/src/
H A Dcloptions.c14 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()
[all …]
H A Dsetupts.c48 …if (honee->app_ctx->divFdiffproj_method != DIV_DIFF_FLUX_PROJ_NONE) PetscCall(DivDiffFluxProjectio… in RHS_NS()
136 …if (honee->app_ctx->divFdiffproj_method != DIV_DIFF_FLUX_PROJ_NONE) PetscCall(DivDiffFluxProjectio… in IFunction_NS()
156 if (honee->app_ctx->sgs_model_type == SGS_MODEL_DATA_DRIVEN) { in IFunction_NS()
201 if (honee->app_ctx->checkpoint_vtk) { in WriteOutput()
209 …ntf(file_path, sizeof file_path, "%s/ns-%03" PetscInt_FMT ".vtu", honee->app_ctx->output_dir, step… in WriteOutput()
227 …ined, sizeof file_path_refined, "%s/nsrefined-%03" PetscInt_FMT ".vtu", honee->app_ctx->output_dir, in WriteOutput()
240 if (honee->app_ctx->add_stepnum2bin) { in WriteOutput()
241 …e_path, sizeof file_path, "%s/ns-solution-%" PetscInt_FMT ".bin", honee->app_ctx->output_dir, step… in WriteOutput()
243 …PetscCall(PetscSNPrintf(file_path, sizeof file_path, "%s/ns-solution.bin", honee->app_ctx->output_… in WriteOutput()
257 PetscInt num_wall = honee->app_ctx->wall_forces.num_wall, dim = 3; in TSMonitor_WallForce()
[all …]
H A Dhonee.c31 …PetscCall(PetscCalloc4(1, &honee_->app_ctx, 1, &honee_->problem_data, 1, &honee_->phys, 1, &honee_… in HoneeInit()
55 AppCtx app_ctx = honee_->app_ctx; in HoneeDestroy() local
100 PetscCall(PetscFunctionListDestroy(&app_ctx->problems)); in HoneeDestroy()
102 PetscCall(PetscFree(app_ctx->amat_type)); in HoneeDestroy()
103 PetscCall(PetscFree(app_ctx->wall_forces.walls)); in HoneeDestroy()
104 PetscCall(PetscViewerDestroy(&app_ctx->wall_forces.viewer)); in HoneeDestroy()
116 PetscCall(PetscFree4(honee_->app_ctx, honee_->problem_data, honee_->phys, honee_->units)); in HoneeDestroy()
H A Dsetupdm.c124 DM dm_hierarchy[honee->app_ctx->viz_refine + 1]; in VizRefineDM()
131 for (PetscInt i = 0, d = honee->app_ctx->degree; i < honee->app_ctx->viz_refine; i++) { in VizRefineDM()
138 PetscInt q_order = d + honee->app_ctx->q_extra; in VizRefineDM()
139 if (i + 1 == honee->app_ctx->viz_refine) d = 1; in VizRefineDM()
153 for (PetscInt i = 1; i < honee->app_ctx->viz_refine; i++) { in VizRefineDM()
156 honee->dm_viz = dm_hierarchy[honee->app_ctx->viz_refine]; in VizRefineDM()
H A Dmisc.c94 PetscErrorCode RegressionTest(AppCtx app_ctx, Vec Q) { in RegressionTest() argument
103 …PetscCheck(strcmp(app_ctx->test_file_path, "") != 0, comm, PETSC_ERR_FILE_READ, "File for regressi… in RegressionTest()
104 PetscCall(PetscViewerBinaryOpen(comm, app_ctx->test_file_path, FILE_MODE_READ, &viewer)); in RegressionTest()
114 if (error > app_ctx->test_tol) { in RegressionTest()
156 if (problem->compute_exact_solution_error && honee->app_ctx->test_type == TESTTYPE_NONE) { in PostProcess()
163 if (honee->app_ctx->test_type == TESTTYPE_NONE) { in PostProcess()
172 if (honee->app_ctx->test_type == TESTTYPE_SOLVER) { in PostProcess()
173 PetscCall(RegressionTest(honee->app_ctx, Q)); in PostProcess()
283 PetscCall(problem->print_info(honee, problem, honee->app_ctx)); in PrintRunInfo()
338 if (honee->app_ctx->use_continue_file) { in PrintRunInfo()
[all …]
H A Dsetuplibceed.c92 PetscErrorCode SetupLibceed(Ceed ceed, DM dm, Honee honee, AppCtx app_ctx, ProblemData problem) { in SetupLibceed() argument
130 if (app_ctx->divFdiffproj_method != DIV_DIFF_FLUX_PROJ_NONE) { in SetupLibceed()
172 if (app_ctx->divFdiffproj_method != DIV_DIFF_FLUX_PROJ_NONE) in SetupLibceed()
182 if (app_ctx->divFdiffproj_method != DIV_DIFF_FLUX_PROJ_NONE) in SetupLibceed()
202 if (app_ctx->divFdiffproj_method != DIV_DIFF_FLUX_PROJ_NONE) in SetupLibceed()
214 if (app_ctx->divFdiffproj_method != DIV_DIFF_FLUX_PROJ_NONE) in SetupLibceed()
264 …PetscCheck(app_ctx->sgs_model_type == SGS_MODEL_NONE, honee->comm, PETSC_ERR_SUP, "SGS modeling no… in SetupLibceed()
286 … if (app_ctx->sgs_model_type == SGS_MODEL_DATA_DRIVEN) PetscCall(SgsDDSetup(ceed, honee, problem)); in SetupLibceed()
290 if (app_ctx->sgs_train_enable) PetscCall(SGS_DD_TrainingSetup(ceed, honee)); in SetupLibceed()
291 …if (app_ctx->divFdiffproj_method != DIV_DIFF_FLUX_PROJ_NONE) PetscCall(DivDiffFluxProjectionSetup(… in SetupLibceed()
H A Ddifferential_filter.c221 …etscCall(DMSetupByOrder_FEM(PETSC_TRUE, PETSC_TRUE, honee->app_ctx->degree, 1, honee->app_ctx->q_e… in DifferentialFilterSetup()
231 …etscCall(DMSetupByOrder_FEM(PETSC_TRUE, PETSC_TRUE, honee->app_ctx->degree, 1, honee->app_ctx->q_e… in DifferentialFilterSetup()
353 …if (honee->app_ctx->test_type == TESTTYPE_DIFF_FILTER) PetscCall(RegressionTest(honee->app_ctx, Fi… in TSMonitor_DifferentialFilter()
H A Dvelocity_gradient_projection.c22 …PetscCall(DMSetupByOrder_FEM(PETSC_TRUE, PETSC_TRUE, honee->app_ctx->degree, 1, honee->app_ctx->q_… in VelocityGradientProjectionCreateDM()
50 PetscCall(VelocityGradientProjectionCreateDM(grad_velo_proj, honee, honee->app_ctx->degree)); in VelocityGradientProjectionSetup()
H A Dboundary_condition.c30 PetscErrorCode BoundaryConditionSetUp(Honee honee, ProblemData problem, AppCtx app_ctx) { in BoundaryConditionSetUp() argument
48 app_ctx->wall_forces.num_wall = bc_def->num_label_values; in BoundaryConditionSetUp()
49 PetscCall(PetscMalloc1(bc_def->num_label_values, &app_ctx->wall_forces.walls)); in BoundaryConditionSetUp()
50 …PetscCall(PetscArraycpy(app_ctx->wall_forces.walls, bc_def->label_values, bc_def->num_label_values… in BoundaryConditionSetUp()
H A Ddiff_flux_projection.c24 … height = 0, dm_field = 0, dim, degree = honee->app_ctx->degree, q_extra = honee->app_ctx-… in DivDiffFluxProjectionCreate()
322 switch (honee->app_ctx->divFdiffproj_method) { in DivDiffFluxProjectionSetup()
331 DivDiffFluxProjectionMethods[honee->app_ctx->divFdiffproj_method]); in DivDiffFluxProjectionSetup()
H A Dgrid_anisotropy_tensor.c32 …PetscCall(DMSetupByOrder_FEM(PETSC_TRUE, PETSC_TRUE, honee->app_ctx->degree, 1, honee->app_ctx->q_… in GridAnisotropyTensorProjectionSetupApply()
H A Dmonitor_cfl.c95 PetscCall(PetscStrcmp("advection", honee->app_ctx->problem_name, &is_advection)); in SetupMontiorCfl()
/honee/examples/
H A Dnavierstokes.c28 AppCtx app_ctx = honee->app_ctx; in main() local
37 PetscCall(BoundaryConditionSetUp(honee, problem, app_ctx)); in main()
45 …PetscCheck(CeedInit(app_ctx->ceed_resource, &ceed) == CEED_ERROR_SUCCESS, comm, PETSC_ERR_LIB, "Ce… in main()
94 PetscCall(PetscFunctionListFind(app_ctx->problems, app_ctx->problem_name, &p)); in main()
95 PetscCheck(p, PETSC_COMM_SELF, 1, "Problem '%s' not found", app_ctx->problem_name); in main()
100 PetscCall(SetUpDM(dm, problem, app_ctx->degree, app_ctx->q_extra, phys_ctx)); in main()
103 if (app_ctx->viz_refine) PetscCall(VizRefineDM(dm, honee, problem, phys_ctx)); in main()
120 PetscCall(SetupLibceed(ceed, dm, honee, app_ctx, problem)); in main()
147 if (app_ctx->use_continue_file) { in main()
148 …PetscCall(HoneeLoadInitialCondition(app_ctx->cont_file, &app_ctx->cont_steps, &app_ctx->cont_time,… in main()
[all …]
/honee/src/spanstats/
H A Dcflpe.c82 PetscCall(PetscStrcmp("advection", honee->app_ctx->problem_name, &is_advection)); in CreateStatisticCollectionOperator()
157 …PetscCheck(!is_ascii || honee->app_ctx->test_type != TESTTYPE_NONE, PetscObjectComm((PetscObject)t… in SpanwiseStatisticsSetup_CflPe()
160 …PetscCall(SpanwiseStatisticsSetupInitialize(honee, honee->app_ctx->degree, 6, prefix, &stats_setup… in SpanwiseStatisticsSetup_CflPe()
198 if (steps == honee->app_ctx->cont_steps) PetscFunctionReturn(PETSC_SUCCESS); in TSMonitor_SpanwiseStatisticsCflPe()
212 if (honee->app_ctx->test_type == TESTTYPE_NONE) { in TSMonitor_SpanwiseStatisticsCflPe()
236 … } else if (honee->app_ctx->test_type == TESTTYPE_SPANSTATS && reason != TS_CONVERGED_ITERATING) { in TSMonitor_SpanwiseStatisticsCflPe()
237 PetscCall(RegressionTest(honee->app_ctx, stats)); in TSMonitor_SpanwiseStatisticsCflPe()
H A Dturbulence.c159 …PetscCheck(!is_ascii || honee->app_ctx->test_type != TESTTYPE_NONE, PetscObjectComm((PetscObject)t… in SpanwiseStatisticsSetup_Turbulence()
162 …PetscCall(SpanwiseStatisticsSetupInitialize(honee, honee->app_ctx->degree, TURB_NUM_COMPONENTS, pr… in SpanwiseStatisticsSetup_Turbulence()
220 if (steps == honee->app_ctx->cont_steps) PetscFunctionReturn(PETSC_SUCCESS); in TSMonitor_SpanwiseStatisticsTurbulence()
231 if (honee->app_ctx->test_type == TESTTYPE_NONE) { in TSMonitor_SpanwiseStatisticsTurbulence()
258 … if (honee->app_ctx->test_type == TESTTYPE_TURB_SPANSTATS && reason != TS_CONVERGED_ITERATING) { in TSMonitor_SpanwiseStatisticsTurbulence()
259 PetscCall(RegressionTest(honee->app_ctx, stats)); in TSMonitor_SpanwiseStatisticsTurbulence()
H A Dspanstats.c110 …PetscCall(DMSetupByOrder_FEM(PETSC_TRUE, PETSC_TRUE, honee->app_ctx->degree, 1, honee->app_ctx->q_… in SpanwiseStatisticssCreateDM()
455 PetscReal summing_duration = solution_time - honee->app_ctx->cont_time; in SpanwiseStatisticsProcess()
/honee/include/
H A Dnavierstokes.h162 AppCtx app_ctx; member
215 PetscErrorCode BoundaryConditionSetUp(Honee honee, ProblemData problem, AppCtx app_ctx);
272 PetscErrorCode SetupLibceed(Ceed ceed, DM dm, Honee honee, AppCtx app_ctx, ProblemData problem);
287 PetscErrorCode TSSolve_NS(DM dm, Honee honee, AppCtx app_ctx, Physics phys, ProblemData problem, Ve…
314 PetscErrorCode RegressionTest(AppCtx app_ctx, Vec Q);
/honee/problems/
H A Dshocktube.c14 static PetscErrorCode PRINT_SHOCKTUBE(Honee honee, ProblemData problem, AppCtx app_ctx) { in PRINT_SHOCKTUBE() argument
21 app_ctx->problem_name)); in PRINT_SHOCKTUBE()
H A Dadvection.c21 static PetscErrorCode PRINT_ADVECTION(Honee honee, ProblemData problem, AppCtx app_ctx) { in PRINT_ADVECTION() argument
38 app_ctx->problem_name, StabilizationTypes[advection_ctx->stabilization], in PRINT_ADVECTION()
408 CeedScalar Ctau_a = PetscPowScalarInt(honee->app_ctx->degree, 2); in NS_ADVECTION()
409 CeedScalar Ctau_d = PetscPowScalarInt(honee->app_ctx->degree, 4); in NS_ADVECTION()
531 advection_ctx->divFdiff_method = honee->app_ctx->divFdiffproj_method; in NS_ADVECTION()
570 …PetscCall(DivDiffFluxProjectionCreate(honee, honee->app_ctx->divFdiffproj_method, 1, &honee->diff_… in NS_ADVECTION()
592 DivDiffFluxProjectionMethods[honee->app_ctx->divFdiffproj_method]); in NS_ADVECTION()
H A Deulervortex.c14 static PetscErrorCode PRINT_EULER_VORTEX(Honee honee, ProblemData problem, AppCtx app_ctx) { in PRINT_EULER_VORTEX() argument
27app_ctx->problem_name, EulerTestTypes[euler_ctx->euler_test], euler_ctx->mean_velocity[0], euler_c… in PRINT_EULER_VORTEX()
H A Dnewtonian.c19 static PetscErrorCode PRINT_NEWTONIAN(Honee honee, ProblemData problem, AppCtx app_ctx) { in PRINT_NEWTONIAN() argument
30 app_ctx->problem_name, StabilizationTypes[newt_ctx->stabilization])); in PRINT_NEWTONIAN()
373 CeedInt degree = honee->app_ctx->degree; in NS_NEWTONIAN_IG()
499 newtonian_ig_ctx->divFdiff_method = honee->app_ctx->divFdiffproj_method; in NS_NEWTONIAN_IG()
572 …PetscCall(DivDiffFluxProjectionCreate(honee, honee->app_ctx->divFdiffproj_method, 4, &honee->diff_… in NS_NEWTONIAN_IG()
606 DivDiffFluxProjectionMethods[honee->app_ctx->divFdiffproj_method]); in NS_NEWTONIAN_IG()
H A Dblasius.c225 …PetscCheck((honee->phys->state_var == STATEVAR_CONSERVATIVE) || (honee->app_ctx->test_type == TEST… in NS_BLASIUS()
H A Dsgs_dd_model.c698 …PetscCall(SgsDDCreateDM(honee->dm, &sgs_dd_data->dm_sgs, honee->app_ctx->degree, honee->app_ctx->q… in SgsDDSetup()
H A Dstg_shur14.c243 … u0 = 0.0, alpha = 1.01, stg_dx = -1, stg_h_scale_factor = 1 / honee->app_ctx->degree; in SetupStg()
/honee/src/smartsim/
H A Dsgs_dd_training.c199 …ingCreateDM(honee->dm, &sgs_dd_train->dm_dd_training, honee->app_ctx->degree, honee->app_ctx->q_ex… in SGS_DD_TrainingSetup()