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 15932836 : SetupInterface::validParams() 16 : { 17 15932836 : InputParameters params = emptyInputParameters(); 18 : 19 : // Add the 'execute_on' input parameter for users to set 20 15932836 : ExecFlagEnum execute_options = MooseUtils::getDefaultExecFlagEnum(); 21 15932836 : execute_options = EXEC_LINEAR; 22 47798508 : params.addParam<ExecFlagEnum>("execute_on", execute_options, execute_options.getDocString()); 23 31865672 : return params; 24 15932836 : } 25 : 26 1157627 : SetupInterface::SetupInterface(const MooseObject * moose_object) 27 2315254 : : _execute_enum(moose_object->parameters().isParamValid("execute_on") 28 1157627 : ? moose_object->parameters().get<ExecFlagEnum>("execute_on") 29 : : _empty_execute_enum), 30 1157619 : _current_execute_flag( 31 1157627 : (moose_object->parameters().getCheckedPointerParam<FEProblemBase *>("_fe_problem_base")) 32 4630500 : ->getCurrentExecuteOnFlag()) 33 : { 34 : _empty_execute_enum 35 1157619 : .clearSetValues(); // remove any flags for the case when "execute_on" is not used 36 1157619 : } 37 : 38 : #ifdef MOOSE_KOKKOS_ENABLED 39 200105 : SetupInterface::SetupInterface(const SetupInterface & object, const Moose::Kokkos::FunctorCopy &) 40 200105 : : _execute_enum(object._execute_enum), _current_execute_flag(object._current_execute_flag) 41 : { 42 200105 : } 43 : #endif 44 : 45 1295094 : SetupInterface::~SetupInterface() {} 46 : 47 : void 48 555116 : SetupInterface::initialSetup() 49 : { 50 555116 : } 51 : 52 : void 53 5058822 : SetupInterface::timestepSetup() 54 : { 55 5058822 : } 56 : 57 : void 58 7093977 : SetupInterface::jacobianSetup() 59 : { 60 7093977 : } 61 : 62 : void 63 46111645 : SetupInterface::residualSetup() 64 : { 65 46111645 : } 66 : 67 : void 68 49977200 : SetupInterface::subdomainSetup() 69 : { 70 49977200 : } 71 : 72 : const ExecFlagEnum & 73 529837 : SetupInterface::getExecuteOnEnum() const 74 : { 75 529837 : return _execute_enum; 76 : }