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 "KokkosNodalUserObject.h" 11 : 12 : namespace Moose::Kokkos 13 : { 14 : 15 : InputParameters 16 13094 : NodalUserObject::validParams() 17 : { 18 13094 : InputParameters params = UserObject::validParams(); 19 13094 : params += NodalReducer::validParams(); 20 13094 : params += ::BoundaryRestrictable::validParams(); 21 13094 : params += ::TransientInterface::validParams(); 22 13094 : params += ::RandomInterface::validParams(); 23 : 24 13094 : return params; 25 0 : } 26 : 27 255 : NodalUserObject::NodalUserObject(const InputParameters & parameters) 28 : : UserObject(parameters), 29 : NodalReducer(this), 30 : ::CoupleableMooseVariableDependencyIntermediateInterface(this, true), 31 : ::TransientInterface(this), 32 135 : ::RandomInterface(parameters, _fe_problem, _tid, false) 33 : { 34 255 : } 35 : 36 2600 : NodalUserObject::NodalUserObject(const NodalUserObject & object) 37 : : UserObject(object), 38 : NodalReducer(object), 39 : ::CoupleableMooseVariableDependencyIntermediateInterface(object, {}), 40 : ::TransientInterface(object, {}), 41 1392 : ::RandomInterface(object, {}) 42 : { 43 2600 : } 44 : 45 : void 46 799 : NodalUserObject::compute() 47 : { 48 799 : if (DispatcherRegistry::hasUserMethod<DefaultLoop>(type()) == 49 428 : DispatcherRegistry::hasUserMethod<ReducerLoop>(type())) 50 0 : mooseError("Cannot determine whether '", 51 0 : name(), 52 : "' is a regular user object or a reducer object. Either none or both of the " 53 : "execute() and reduce() methods were specified. Check if they were defined properly " 54 : "and override compute() if you want to manually choose the behavior."); 55 : 56 799 : if (DispatcherRegistry::hasUserMethod<ReducerLoop>(type())) 57 784 : computeReducer(); 58 : else 59 15 : computeUserObject(); 60 799 : } 61 : 62 : } // namespace Moose::Kokkos