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