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 : #pragma once 11 : 12 : // MOOSE 13 : #include "ResidualObject.h" 14 : #include "GeometricSearchInterface.h" 15 : #include "BlockRestrictable.h" 16 : #include "BoundaryRestrictable.h" 17 : #include "CoupleableMooseVariableDependencyIntermediateInterface.h" 18 : #include "MooseFunctorArguments.h" 19 : #include "MooseVariableFieldBase.h" 20 : 21 : /** 22 : * Base class for creating new types of nodal kernels 23 : */ 24 : class NodalKernelBase : public ResidualObject, 25 : public BlockRestrictable, 26 : public BoundaryRestrictable, 27 : public GeometricSearchInterface, 28 : public CoupleableMooseVariableDependencyIntermediateInterface 29 : { 30 : public: 31 : /** 32 : * Class constructor. 33 : * @param parameters The InputParameters for the object 34 : */ 35 : static InputParameters validParams(); 36 : 37 : NodalKernelBase(const InputParameters & parameters); 38 : 39 3560503 : void setSubdomains(const std::set<SubdomainID> & sub_ids) { _sub_ids = &sub_ids; } 40 : 41 : protected: 42 129822 : Moose::NodeArg nodeArg() const { return Moose::NodeArg{_current_node, _sub_ids}; } 43 : 44 : /// Reference to FEProblemBase 45 : FEProblemBase & _fe_problem; 46 : 47 : /// current node being processed 48 : const Node * const & _current_node; 49 : 50 : /// Quadrature point index 51 : unsigned int _qp; 52 : 53 : /// The set of subdomains connected to the current node 54 : const std::set<SubdomainID> * _sub_ids; 55 : };