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 "NodalKernelBase.h" 11 : #include "Problem.h" 12 : #include "SubProblem.h" 13 : #include "SystemBase.h" 14 : #include "MooseVariableFE.h" 15 : #include "Assembly.h" 16 : 17 : InputParameters 18 207683 : NodalKernelBase::validParams() 19 : { 20 207683 : InputParameters params = ResidualObject::validParams(); 21 207683 : params += BlockRestrictable::validParams(); 22 207683 : params += BoundaryRestrictable::validParams(); 23 207683 : params += GeometricSearchInterface::validParams(); 24 623049 : params.addParam<bool>("use_displaced_mesh", 25 415366 : false, 26 : "Whether or not this object should use the " 27 : "displaced mesh for computation. Note that " 28 : "in the case this is true but no " 29 : "displacements are provided in the Mesh block " 30 : "the undisplaced mesh will still be used."); 31 830732 : params.addParamNamesToGroup("use_displaced_mesh", "Advanced"); 32 830732 : params.addParam<std::vector<AuxVariableName>>( 33 : "save_in", 34 : {}, 35 : "The name of auxiliary variables to save this BC's residual contributions to. " 36 : "Everything about that variable must match everything about this variable (the " 37 : "type, what blocks it's on, etc.)"); 38 830732 : params.addParam<std::vector<AuxVariableName>>( 39 : "diag_save_in", 40 : {}, 41 : "The name of auxiliary variables to save this BC's diagonal jacobian " 42 : "contributions to. Everything about that variable must match everything " 43 : "about this variable (the type, what blocks it's on, etc.)"); 44 415366 : params.registerBase("NodalKernel"); 45 415366 : params.registerSystemAttributeName("NodalKernel"); 46 623049 : params.addParamNamesToGroup("diag_save_in save_in", "Advanced"); 47 207683 : return params; 48 0 : } 49 : 50 671 : NodalKernelBase::NodalKernelBase(const InputParameters & parameters) 51 : : ResidualObject(parameters, true), 52 : BlockRestrictable(this), 53 : BoundaryRestrictable(this, true), // true for applying to nodesets 54 : GeometricSearchInterface(this), 55 : CoupleableMooseVariableDependencyIntermediateInterface(this, true), 56 : MooseVariableInterface<Real>(this, 57 : true, 58 : "variable", 59 : Moose::VarKindType::VAR_SOLVER, 60 : Moose::VarFieldType::VAR_FIELD_STANDARD), 61 2013 : _fe_problem(*getCheckedPointerParam<FEProblemBase *>("_fe_problem_base")), 62 671 : _var(*mooseVariable()), 63 2684 : _current_node(_var.node()) 64 : { 65 671 : }