1 // SPDX-FileCopyrightText: Copyright (c) 2017-2024, HONEE contributors. 2 // SPDX-License-Identifier: Apache-2.0 OR BSD-2-Clause 3 // 4 // @file This creates weak functions for smartsim dependent functions. If the smartsim-dependent functions are actually built, these functions are not 5 // linked to the final executable. 6 7 #include <navierstokes.h> 8 9 PetscErrorCode SGS_DD_TrainingSetup(Ceed ceed, Honee honee, ProblemData problem) __attribute__((weak)); 10 PetscErrorCode SGS_DD_TrainingSetup(Ceed ceed, Honee honee, ProblemData problem) { 11 PetscFunctionBeginUser; 12 SETERRQ(PETSC_COMM_WORLD, PETSC_ERR_SUP, "Must build with SMARTREDIS_DIR set to run %s", __func__); 13 }; 14 15 PetscErrorCode TSMonitor_SGS_DD_Training(TS ts, PetscInt step_num, PetscReal solution_time, Vec Q, void *ctx) __attribute__((weak)); 16 PetscErrorCode TSMonitor_SGS_DD_Training(TS ts, PetscInt step_num, PetscReal solution_time, Vec Q, void *ctx) { 17 PetscFunctionBeginUser; 18 SETERRQ(PETSC_COMM_WORLD, PETSC_ERR_SUP, "Must build with SMARTREDIS_DIR set to run %s", __func__); 19 }; 20 21 PetscErrorCode TSPostStep_SGS_DD_Training(TS ts) __attribute__((weak)); 22 PetscErrorCode TSPostStep_SGS_DD_Training(TS ts) { 23 PetscFunctionBeginUser; 24 SETERRQ(PETSC_COMM_WORLD, PETSC_ERR_SUP, "Must build with SMARTREDIS_DIR set to run %s", __func__); 25 }; 26