https://mooseframework.inl.gov
NodalBCBase.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 
10 #include "NodalBCBase.h"
11 
14 {
16  params.addParam<std::vector<AuxVariableName>>(
17  "save_in",
18  {},
19  "The name of auxiliary variables to save this BC's residual contributions to. "
20  "Everything about that variable must match everything about this variable (the "
21  "type, what blocks it's on, etc.)");
22  params.addParam<std::vector<AuxVariableName>>(
23  "diag_save_in",
24  {},
25  "The name of auxiliary variables to save this BC's diagonal jacobian "
26  "contributions to. Everything about that variable must match everything "
27  "about this variable (the type, what blocks it's on, etc.)");
28 
29  params.addParamNamesToGroup("vector_tags matrix_tags", "Tagging");
30 
31  params.set<MultiMooseEnum>("vector_tags") = "residual";
32  params.set<MultiMooseEnum>("matrix_tags") = "system time";
33  return params;
34 }
35 
37  : BoundaryCondition(parameters, true), // true is for being Nodal
39  _save_in_strings(parameters.get<std::vector<AuxVariableName>>("save_in")),
40  _diag_save_in_strings(parameters.get<std::vector<AuxVariableName>>("diag_save_in"))
41 {
42 }
T * get(const std::unique_ptr< T > &u)
The MooseUtils::get() specializations are used to support making forwards-compatible code changes fro...
Definition: MooseUtils.h:1155
T & set(const std::string &name, bool quiet_mode=false)
Returns a writable reference to the named parameters.
The main MOOSE class responsible for handling user-defined parameters in almost every MOOSE system...
NodalBCBase(const InputParameters &parameters)
Definition: NodalBCBase.C:36
Base class for creating new types of boundary conditions.
Intermediate base class that ties together all the interfaces for getting MooseVariableFEBases with t...
void addParam(const std::string &name, const S &value, const std::string &doc_string)
These methods add an optional parameter and a documentation string to the InputParameters object...
This is a "smart" enum class intended to replace many of the shortcomings in the C++ enum type...
static InputParameters validParams()
void addParamNamesToGroup(const std::string &space_delim_names, const std::string group_name)
This method takes a space delimited list of parameter names and adds them to the specified group name...
static InputParameters validParams()
Definition: NodalBCBase.C:13