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 16132866 : SetupInterface::validParams() 16 : { 17 16132866 : InputParameters params = emptyInputParameters(); 18 : 19 : // Add the 'execute_on' input parameter for users to set 20 16132866 : ExecFlagEnum execute_options = MooseUtils::getDefaultExecFlagEnum(); 21 16132866 : execute_options = EXEC_LINEAR; 22 48398598 : params.addParam<ExecFlagEnum>("execute_on", execute_options, execute_options.getDocString()); 23 32265732 : return params; 24 16132866 : } 25 : 26 1161800 : SetupInterface::SetupInterface(const MooseObject * moose_object) 27 2323600 : : _execute_enum(moose_object->parameters().isParamValid("execute_on") 28 1161800 : ? moose_object->parameters().get<ExecFlagEnum>("execute_on") 29 : : _empty_execute_enum), 30 1161792 : _current_execute_flag( 31 1161800 : (moose_object->parameters().getCheckedPointerParam<FEProblemBase *>("_fe_problem_base")) 32 4647192 : ->getCurrentExecuteOnFlag()) 33 : { 34 : _empty_execute_enum 35 1161792 : .clearSetValues(); // remove any flags for the case when "execute_on" is not used 36 1161792 : } 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 1322162 : SetupInterface::~SetupInterface() {} 46 : 47 : void 48 559744 : SetupInterface::initialSetup() 49 : { 50 559744 : } 51 : 52 : void 53 5066454 : SetupInterface::timestepSetup() 54 : { 55 5066454 : } 56 : 57 : void 58 7108755 : SetupInterface::jacobianSetup() 59 : { 60 7108755 : } 61 : 62 : void 63 46199036 : SetupInterface::residualSetup() 64 : { 65 46199036 : } 66 : 67 : void 68 50029078 : SetupInterface::subdomainSetup() 69 : { 70 50029078 : } 71 : 72 : const ExecFlagEnum & 73 531942 : SetupInterface::getExecuteOnEnum() const 74 : { 75 531942 : return _execute_enum; 76 : }