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 #include <log_events.h> 9 #include <petsc.h> 10 11 static PetscClassId libCEED_classid, onlineTrain_classid, sgs_model_classid, misc_classid; 12 13 PetscLogEvent FLUIDS_CeedOperatorApply; 14 PetscLogEvent FLUIDS_CeedOperatorAssemble; 15 PetscLogEvent FLUIDS_CeedOperatorAssembleDiagonal; 16 PetscLogEvent FLUIDS_CeedOperatorAssemblePointBlockDiagonal; 17 PetscLogEvent FLUIDS_SmartRedis_Init; 18 PetscLogEvent FLUIDS_SmartRedis_Meta; 19 PetscLogEvent FLUIDS_SmartRedis_Train; 20 PetscLogEvent FLUIDS_TrainDataCompute; 21 PetscLogEvent FLUIDS_DifferentialFilter; 22 PetscLogEvent FLUIDS_VelocityGradientProjection; 23 PetscLogEvent FLUIDS_SgsModel; 24 PetscLogEvent FLUIDS_SgsModelDDInference; 25 PetscLogEvent FLUIDS_SgsModelDDData; 26 27 PetscErrorCode RegisterLogEvents() { 28 PetscFunctionBeginUser; 29 PetscCall(PetscClassIdRegister("libCEED", &libCEED_classid)); 30 PetscCall(PetscLogEventRegister("CeedOpApply", libCEED_classid, &FLUIDS_CeedOperatorApply)); 31 PetscCall(PetscLogEventRegister("CeedOpAsm", libCEED_classid, &FLUIDS_CeedOperatorAssemble)); 32 PetscCall(PetscLogEventRegister("CeedOpAsmD", libCEED_classid, &FLUIDS_CeedOperatorAssembleDiagonal)); 33 PetscCall(PetscLogEventRegister("CeedOpAsmPBD", libCEED_classid, &FLUIDS_CeedOperatorAssemblePointBlockDiagonal)); 34 35 PetscCall(PetscClassIdRegister("onlineTrain", &onlineTrain_classid)); 36 PetscCall(PetscLogEventRegister("SmartRedis_Init", onlineTrain_classid, &FLUIDS_SmartRedis_Init)); 37 PetscCall(PetscLogEventRegister("SmartRedis_Meta", onlineTrain_classid, &FLUIDS_SmartRedis_Meta)); 38 PetscCall(PetscLogEventRegister("SmartRedis_Train", onlineTrain_classid, &FLUIDS_SmartRedis_Train)); 39 PetscCall(PetscLogEventRegister("TrainDataCompute", onlineTrain_classid, &FLUIDS_TrainDataCompute)); 40 41 PetscCall(PetscClassIdRegister("SGS Model", &sgs_model_classid)); 42 PetscCall(PetscLogEventRegister("SgsModel", sgs_model_classid, &FLUIDS_SgsModel)); 43 PetscCall(PetscLogEventRegister("SgsModelDDInfer", sgs_model_classid, &FLUIDS_SgsModelDDInference)); 44 PetscCall(PetscLogEventRegister("SgsModelDDData", sgs_model_classid, &FLUIDS_SgsModelDDData)); 45 46 PetscCall(PetscClassIdRegister("Miscellaneous", &misc_classid)); 47 PetscCall(PetscLogEventRegister("DiffFilter", misc_classid, &FLUIDS_DifferentialFilter)); 48 PetscCall(PetscLogEventRegister("VeloGradProj", misc_classid, &FLUIDS_VelocityGradientProjection)); 49 PetscFunctionReturn(PETSC_SUCCESS); 50 } 51