Line data Source code
1 : //* This file is part of the MOOSE framework 2 : //* https://www.mooseframework.org 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 "KokkosKernelBase.h" 11 : 12 : #include "MooseVariableFE.h" 13 : #include "Problem.h" 14 : #include "SubProblem.h" 15 : #include "SystemBase.h" 16 : #include "NonlinearSystem.h" 17 : 18 : namespace Moose::Kokkos 19 : { 20 : 21 : InputParameters 22 48170 : KernelBase::validParams() 23 : { 24 48170 : auto params = ResidualObject::validParams(); 25 48170 : params += BlockRestrictable::validParams(); 26 48170 : params += MaterialPropertyInterface::validParams(); 27 : 28 99192 : params.addParam<unsigned int>( 29 : "num_local_threads", 30 90636 : 4, 31 : "The number of threads for additional parallelization of local DOFs."); 32 : 33 : // Kernels always couple within their element 34 148758 : params.addRelationshipManager("ElementSideNeighborLayers", 35 : Moose::RelationshipManagerType::COUPLING, 36 50441 : [](const InputParameters &, InputParameters & rm_params) 37 18742 : { rm_params.set<unsigned short>("layers") = 0; }); 38 : 39 48170 : params.registerBase("Kernel"); 40 : 41 48170 : return params; 42 0 : } 43 : 44 4539 : KernelBase::KernelBase(const InputParameters & parameters, Moose::VarFieldType field_type) 45 : : ResidualObject(parameters, field_type), 46 : BlockRestrictable(this), 47 : CoupleableMooseVariableDependencyIntermediateInterface(this, false), 48 : MaterialPropertyInterface(this, blockIDs(), Moose::EMPTY_BOUNDARY_IDS), 49 3414 : _num_local_threads(getParam<unsigned int>("num_local_threads")) 50 : { 51 3123 : } 52 : 53 154033 : KernelBase::KernelBase(const KernelBase & object) 54 : : ResidualObject(object), 55 : BlockRestrictable(object, {}), 56 : CoupleableMooseVariableDependencyIntermediateInterface(object, {}), 57 : MaterialPropertyInterface(object, {}), 58 89468 : _num_local_threads(object._num_local_threads) 59 : { 60 154033 : } 61 : 62 : } // namespace Moose::Kokkos