www.mooseframework.org
BoundaryRestrictableRequired.C
Go to the documentation of this file.
1 //* This file is part of the MOOSE framework
2 //* https://www.mooseframework.org
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 
12 #include "InputParameters.h"
13 
15 
18 {
19 
20  // Create instance of InputParameters
22 
23  // Create user-facing 'boundary' input for restricting inheriting object to boundaries
24  params.addRequiredParam<std::vector<BoundaryName>>(
25  "boundary", "The list of boundary IDs from the mesh where this boundary condition applies");
26 
27  // A parameter for disabling error message for objects restrictable by boundary and block,
28  // if the parameter is valid it was already set so don't do anything
29  if (!params.isParamValid("_dual_restrictable"))
30  params.addPrivateParam<bool>("_dual_restrictable", false);
31 
32  return params;
33 }
34 
36  bool nodal)
37  : BoundaryRestrictable(moose_object, nodal)
38 {
39 }
BoundaryRestrictableRequired
A class for requiring an object to be boundary restricted.
Definition: BoundaryRestrictableRequired.h:27
BoundaryRestrictableRequired.h
emptyInputParameters
InputParameters emptyInputParameters()
Definition: InputParameters.C:24
BoundaryRestrictable
/class BoundaryRestrictable /brief Provides functionality for limiting the object to certain boundary...
Definition: BoundaryRestrictable.h:30
MooseObject
Every object that can be built by the factory should be derived from this class.
Definition: MooseObject.h:50
InputParameters
The main MOOSE class responsible for handling user-defined parameters in almost every MOOSE system.
Definition: InputParameters.h:53
InputParameters.h
InputParameters::isParamValid
bool isParamValid(const std::string &name) const
This method returns parameters that have been initialized in one fashion or another,...
Definition: InputParameters.C:257
BoundaryRestrictableRequired::BoundaryRestrictableRequired
BoundaryRestrictableRequired(const MooseObject *moose_object, bool nodal)
Definition: BoundaryRestrictableRequired.C:35
defineLegacyParams
defineLegacyParams(BoundaryRestrictableRequired)
BoundaryRestrictableRequired::validParams
static InputParameters validParams()
Definition: BoundaryRestrictableRequired.C:17
InputParameters::addPrivateParam
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...
Definition: InputParameters.h:1308
InputParameters::addRequiredParam
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...
Definition: InputParameters.h:1176