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