LCOV - code coverage report
Current view: top level - src/interfaces - SetupInterface.C (source / functions) Hit Total Coverage
Test: idaholab/moose framework: #31706 (f8ed4a) with base bb0a08 Lines: 31 31 100.0 %
Date: 2025-11-03 17:23:24 Functions: 10 11 90.9 %
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 "SetupInterface.h"
      11             : #include "Conversion.h"
      12             : #include "FEProblem.h"
      13             : 
      14             : InputParameters
      15    16113323 : SetupInterface::validParams()
      16             : {
      17    16113323 :   InputParameters params = emptyInputParameters();
      18             : 
      19             :   // Add the 'execute_on' input parameter for users to set
      20    16113323 :   ExecFlagEnum execute_options = MooseUtils::getDefaultExecFlagEnum();
      21    16113323 :   execute_options = EXEC_LINEAR;
      22    48339969 :   params.addParam<ExecFlagEnum>("execute_on", execute_options, execute_options.getDocString());
      23    32226646 :   return params;
      24    16113323 : }
      25             : 
      26     1161152 : SetupInterface::SetupInterface(const MooseObject * moose_object)
      27     2322304 :   : _execute_enum(moose_object->parameters().isParamValid("execute_on")
      28     1161152 :                       ? moose_object->parameters().get<ExecFlagEnum>("execute_on")
      29             :                       : _empty_execute_enum),
      30     1161144 :     _current_execute_flag(
      31     1161152 :         (moose_object->parameters().getCheckedPointerParam<FEProblemBase *>("_fe_problem_base"))
      32     4644600 :             ->getCurrentExecuteOnFlag())
      33             : {
      34             :   _empty_execute_enum
      35     1161144 :       .clearSetValues(); // remove any flags for the case when "execute_on" is not used
      36     1161144 : }
      37             : 
      38             : #ifdef MOOSE_KOKKOS_ENABLED
      39      223399 : SetupInterface::SetupInterface(const SetupInterface & object, const Moose::Kokkos::FunctorCopy &)
      40      223399 :   : _execute_enum(object._execute_enum), _current_execute_flag(object._current_execute_flag)
      41             : {
      42      223399 : }
      43             : #endif
      44             : 
      45     1321474 : SetupInterface::~SetupInterface() {}
      46             : 
      47             : void
      48      559299 : SetupInterface::initialSetup()
      49             : {
      50      559299 : }
      51             : 
      52             : void
      53     5065595 : SetupInterface::timestepSetup()
      54             : {
      55     5065595 : }
      56             : 
      57             : void
      58     7108271 : SetupInterface::jacobianSetup()
      59             : {
      60     7108271 : }
      61             : 
      62             : void
      63    46195539 : SetupInterface::residualSetup()
      64             : {
      65    46195539 : }
      66             : 
      67             : void
      68    50021377 : SetupInterface::subdomainSetup()
      69             : {
      70    50021377 : }
      71             : 
      72             : const ExecFlagEnum &
      73      531428 : SetupInterface::getExecuteOnEnum() const
      74             : {
      75      531428 :   return _execute_enum;
      76             : }

Generated by: LCOV version 1.14