LCOV - code coverage report
Current view: top level - src/executors - Executor.C (source / functions) Hit Total Coverage
Test: idaholab/moose framework: 2bf808 Lines: 20 22 90.9 %
Date: 2025-07-17 01:28:37 Functions: 3 3 100.0 %
Legend: Lines: hit not hit

          Line data    Source code
       1             : //* This file is part of the MOOSE framework
       2             : //* https://mooseframework.inl.gov
       3             : //*
       4             : //* All rights reserved, see COPYRIGHT for full restrictions
       5             : //* https://github.com/idaholab/moose/blob/master/COPYRIGHT
       6             : //*
       7             : //* Licensed under LGPL 2.1, please see LICENSE for details
       8             : //* https://www.gnu.org/licenses/lgpl-2.1.html
       9             : 
      10             : #include "Executor.h"
      11             : #include "MooseApp.h"
      12             : #include "FEProblem.h"
      13             : 
      14             : #include "ExecFlagRegistry.h"
      15             : 
      16             : InputParameters
      17       28712 : Executor::validParams()
      18             : {
      19       28712 :   InputParameters params = Executioner::validParams();
      20             : 
      21       28712 :   params.addParam<ExecFlagType>(
      22             :       "begin_exec_flag", EXEC_NONE, "exec flag associated with the beginning of this executor");
      23       28712 :   params.addParam<ExecFlagType>(
      24             :       "end_exec_flag", EXEC_NONE, "exec flag associated with the end of this executor");
      25       28712 :   params.registerBase("Executor");
      26       28712 :   return params;
      27           0 : }
      28             : 
      29          88 : Executor::Executor(const InputParameters & parameters)
      30             :   : Executioner(parameters, false),
      31             :     ExecutorInterface(this),
      32          88 :     _begin_flag(getParam<ExecFlagType>("begin_exec_flag")),
      33         176 :     _end_flag(getParam<ExecFlagType>("end_exec_flag"))
      34             : {
      35          88 :   if (!parameters.isParamSetByUser("begin_exec_flag"))
      36          88 :     _begin_flag = registerExecFlag("exec_" + _name + "_begin");
      37          88 :   if (!parameters.isParamSetByUser("end_exec_flag"))
      38          88 :     _end_flag = registerExecFlag("exec_" + _name + "_end");
      39          88 : }
      40             : 
      41             : Executor::Result
      42          40 : Executor::exec()
      43             : {
      44          40 :   _fe_problem.executeAllObjects(_begin_flag);
      45          40 :   auto result = run();
      46          40 :   _fe_problem.executeAllObjects(_end_flag);
      47             : 
      48          40 :   _result = result;
      49          40 :   return result;
      50           0 : }

Generated by: LCOV version 1.14