| setupts.c (433eda4da4555c4a6e27c94cc36bce0197288780) | setupts.c (3e0c2f3f098a94aa29497d10cd3cab29dd4ca6e3) |
|---|---|
| 1// Copyright (c) 2017-2024, Lawrence Livermore National Security, LLC and other CEED contributors. 2// All Rights Reserved. See the top-level LICENSE and NOTICE files for details. 3// 4// SPDX-License-Identifier: BSD-2-Clause 5// 6// This file is part of CEED: http://github.com/ceed 7 8/// @file --- 126 unchanged lines hidden (view full) --- 135 PetscCall(PetscLogGpuTimeEnd()); 136 PetscCall(PetscLogEventEnd(FLUIDS_CeedOperatorApply, Q, G, 0, 0)); 137 138 // Restore vectors 139 PetscCall(VecReadCeedToPetsc(user->q_ceed, q_mem_type, Q_loc)); 140 PetscCall(VecReadCeedToPetsc(user->q_dot_ceed, q_dot_mem_type, Q_dot_loc)); 141 PetscCall(VecCeedToPetsc(user->g_ceed, g_mem_type, G_loc)); 142 | 1// Copyright (c) 2017-2024, Lawrence Livermore National Security, LLC and other CEED contributors. 2// All Rights Reserved. See the top-level LICENSE and NOTICE files for details. 3// 4// SPDX-License-Identifier: BSD-2-Clause 5// 6// This file is part of CEED: http://github.com/ceed 7 8/// @file --- 126 unchanged lines hidden (view full) --- 135 PetscCall(PetscLogGpuTimeEnd()); 136 PetscCall(PetscLogEventEnd(FLUIDS_CeedOperatorApply, Q, G, 0, 0)); 137 138 // Restore vectors 139 PetscCall(VecReadCeedToPetsc(user->q_ceed, q_mem_type, Q_loc)); 140 PetscCall(VecReadCeedToPetsc(user->q_dot_ceed, q_dot_mem_type, Q_dot_loc)); 141 PetscCall(VecCeedToPetsc(user->g_ceed, g_mem_type, G_loc)); 142 |
| 143 if (user->app_ctx->sgs_model_type == SGS_MODEL_DATA_DRIVEN) { 144 PetscCall(SgsDDApplyIFunction(user, Q_loc, G_loc)); 145 } 146 | |
| 147 // Local-to-Global 148 PetscCall(VecZeroEntries(G)); 149 PetscCall(DMLocalToGlobal(user->dm, G_loc, ADD_VALUES, G)); 150 151 // Restore vectors 152 PetscCall(DMRestoreNamedLocalVector(user->dm, "ResidualLocal", &G_loc)); 153 PetscFunctionReturn(PETSC_SUCCESS); 154} --- 213 unchanged lines hidden (view full) --- 368 if (app_ctx->turb_spanstats_enable) { 369 PetscCall(TSMonitorSet(*ts, TSMonitor_TurbulenceStatistics, user, NULL)); 370 CeedScalar previous_time = app_ctx->cont_time * user->units->second; 371 PetscCallCeed(user->ceed, 372 CeedOperatorSetContextDouble(user->spanstats.op_stats_collect_ctx->op, user->spanstats.previous_time_label, &previous_time)); 373 } 374 if (app_ctx->diff_filter_monitor) PetscCall(TSMonitorSet(*ts, TSMonitor_DifferentialFilter, user, NULL)); 375 | 143 // Local-to-Global 144 PetscCall(VecZeroEntries(G)); 145 PetscCall(DMLocalToGlobal(user->dm, G_loc, ADD_VALUES, G)); 146 147 // Restore vectors 148 PetscCall(DMRestoreNamedLocalVector(user->dm, "ResidualLocal", &G_loc)); 149 PetscFunctionReturn(PETSC_SUCCESS); 150} --- 213 unchanged lines hidden (view full) --- 364 if (app_ctx->turb_spanstats_enable) { 365 PetscCall(TSMonitorSet(*ts, TSMonitor_TurbulenceStatistics, user, NULL)); 366 CeedScalar previous_time = app_ctx->cont_time * user->units->second; 367 PetscCallCeed(user->ceed, 368 CeedOperatorSetContextDouble(user->spanstats.op_stats_collect_ctx->op, user->spanstats.previous_time_label, &previous_time)); 369 } 370 if (app_ctx->diff_filter_monitor) PetscCall(TSMonitorSet(*ts, TSMonitor_DifferentialFilter, user, NULL)); 371 |
| 376 if (app_ctx->sgs_train_enable) { 377 PetscCall(TSMonitorSet(*ts, TSMonitor_SGS_DD_Training, user, NULL)); 378 PetscCall(TSSetPostStep(*ts, TSPostStep_SGS_DD_Training)); 379 } 380 | |
| 381 if (app_ctx->test_type == TESTTYPE_NONE) PetscCall(PrintRunInfo(user, user->phys, problem, *ts)); 382 // Solve 383 PetscReal start_time; 384 PetscInt start_step; 385 PetscCall(TSGetTime(*ts, &start_time)); 386 PetscCall(TSGetStepNumber(*ts, &start_step)); 387 388 PetscCall(PetscLogDefaultBegin()); // So we can use PetscLogStageGetPerfInfo without -log_view --- 43 unchanged lines hidden --- | 372 if (app_ctx->test_type == TESTTYPE_NONE) PetscCall(PrintRunInfo(user, user->phys, problem, *ts)); 373 // Solve 374 PetscReal start_time; 375 PetscInt start_step; 376 PetscCall(TSGetTime(*ts, &start_time)); 377 PetscCall(TSGetStepNumber(*ts, &start_step)); 378 379 PetscCall(PetscLogDefaultBegin()); // So we can use PetscLogStageGetPerfInfo without -log_view --- 43 unchanged lines hidden --- |