www.mooseframework.org
BoundaryRestrictableRequired.C
Go to the documentation of this file.
1 /****************************************************************/
2 /* DO NOT MODIFY THIS HEADER */
3 /* MOOSE - Multiphysics Object Oriented Simulation Environment */
4 /* */
5 /* (c) 2010 Battelle Energy Alliance, LLC */
6 /* ALL RIGHTS RESERVED */
7 /* */
8 /* Prepared by Battelle Energy Alliance, LLC */
9 /* Under Contract No. DE-AC07-05ID14517 */
10 /* With the U. S. Department of Energy */
11 /* */
12 /* See COPYRIGHT for full restrictions */
13 /****************************************************************/
14 
16 
17 #include "InputParameters.h"
18 
19 template <>
22 {
23  // Create instance of InputParameters
25 
26  // Create user-facing 'boundary' input for restricting inheriting object to boundaries
27  params.addRequiredParam<std::vector<BoundaryName>>(
28  "boundary", "The list of boundary IDs from the mesh where this boundary condition applies");
29 
30  // A parameter for disabling error message for objects restrictable by boundary and block,
31  // if the parameter is valid it was already set so don't do anything
32  if (!params.isParamValid("_dual_restrictable"))
33  params.addPrivateParam<bool>("_dual_restrictable", false);
34 
35  return params;
36 }
37 
39  bool nodal)
40  : BoundaryRestrictable(moose_object, nodal)
41 {
42 }
void addPrivateParam(const std::string &name, const T &value)
These method add a parameter to the InputParameters object which can be retrieved like any other para...
InputParameters validParams< BoundaryRestrictableRequired >()
The main MOOSE class responsible for handling user-defined parameters in almost every MOOSE system...
/class BoundaryRestrictable /brief Provides functionality for limiting the object to certain boundary...
BoundaryRestrictableRequired(const MooseObject *moose_object, bool nodal)
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...
InputParameters emptyInputParameters()
bool isParamValid(const std::string &name) const
This method returns parameters that have been initialized in one fashion or another, i.e.
Every object that can be built by the factory should be derived from this class.
Definition: MooseObject.h:36