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