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 "AuxNodalScalarKernel.h" 11 : #include "SystemBase.h" 12 : 13 : InputParameters 14 14345 : AuxNodalScalarKernel::validParams() 15 : { 16 14345 : InputParameters params = AuxScalarKernel::validParams(); 17 14345 : params.addRequiredParam<std::vector<dof_id_type>>("nodes", "Node ids"); 18 14345 : return params; 19 0 : } 20 : 21 43 : AuxNodalScalarKernel::AuxNodalScalarKernel(const InputParameters & parameters) 22 : : AuxScalarKernel(parameters), 23 : Coupleable(this, true), 24 : MooseVariableDependencyInterface(this), 25 43 : _node_ids(getParam<std::vector<dof_id_type>>("nodes")) 26 : { 27 : // Fill in the MooseVariable dependencies 28 43 : const std::vector<MooseVariableFEBase *> & coupled_vars = getCoupledMooseVars(); 29 86 : for (const auto & var : coupled_vars) 30 43 : addMooseVariableDependency(var); 31 43 : } 32 : 33 : void 34 0 : AuxNodalScalarKernel::compute() 35 : { 36 0 : _subproblem.reinitNodes(_node_ids, _tid); // compute variables at nodes 37 0 : AuxScalarKernel::compute(); 38 0 : }