xref: /libCEED/examples/fluids/src/log_events.c (revision 70dc8078dbe287928145230e5a499c81da54eabb)
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, 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 
24 PetscErrorCode RegisterLogEvents() {
25   PetscFunctionBeginUser;
26   PetscCall(PetscClassIdRegister("libCEED", &libCEED_classid));
27   PetscCall(PetscLogEventRegister("CeedOpApply", libCEED_classid, &FLUIDS_CeedOperatorApply));
28   PetscCall(PetscLogEventRegister("CeedOpAsm", libCEED_classid, &FLUIDS_CeedOperatorAssemble));
29   PetscCall(PetscLogEventRegister("CeedOpAsmD", libCEED_classid, &FLUIDS_CeedOperatorAssembleDiagonal));
30   PetscCall(PetscLogEventRegister("CeedOpAsmPBD", libCEED_classid, &FLUIDS_CeedOperatorAssemblePointBlockDiagonal));
31 
32   PetscCall(PetscClassIdRegister("Miscellaneous", &misc_classid));
33   PetscCall(PetscLogEventRegister("DiffFilter", misc_classid, &FLUIDS_DifferentialFilter));
34   PetscCall(PetscLogEventRegister("VeloGradProj", misc_classid, &FLUIDS_VelocityGradientProjection));
35   PetscFunctionReturn(PETSC_SUCCESS);
36 }
37