https://mooseframework.inl.gov
Loading...
Searching...
No Matches
AuxNodalScalarKernel.C
Go to the documentation of this file.
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
11#include "SystemBase.h"
12
15{
17 params.addRequiredParam<std::vector<dof_id_type>>("nodes", "Node ids");
18 return params;
19}
20
22 : AuxScalarKernel(parameters),
23 Coupleable(this, true),
25 _node_ids(getParam<std::vector<dof_id_type>>("nodes"))
26{
27 // Fill in the MooseVariable dependencies
28 const std::vector<MooseVariableFEBase *> & coupled_vars = getCoupledMooseVars();
29 for (const auto & var : coupled_vars)
31}
32
33void
AuxNodalScalarKernel(const InputParameters &parameters)
std::vector< dof_id_type > _node_ids
List of node IDs.
static InputParameters validParams()
virtual void compute() override
Evaluate the kernel.
Base class for making kernels that work on auxiliary scalar variables.
static InputParameters validParams()
SubProblem & _subproblem
virtual void compute()
Evaluate the kernel.
Interface for objects that needs coupling capabilities.
Definition Coupleable.h:53
const std::vector< MooseVariableFieldBase * > & getCoupledMooseVars() const
Get the list of all coupled variables.
Definition Coupleable.h:84
The main MOOSE class responsible for handling user-defined parameters in almost every MOOSE system.
void addRequiredParam(const std::string &name, const std::string &doc_string)
This method adds a parameter and documentation string to the InputParameters object that will be extr...
void addMooseVariableDependency(MooseVariableFieldBase *var)
Call this function to add the passed in MooseVariableFieldBase as a variable that this object depends...
virtual void reinitNodes(const std::vector< dof_id_type > &nodes, const THREAD_ID tid)=0