www.mooseframework.org
FunctionPresetBC.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 
15 #include "FunctionPresetBC.h"
16 #include "Function.h"
17 
18 template <>
21 {
23  params.addRequiredParam<FunctionName>("function", "The forcing function.");
24  params.addClassDescription(
25  "The same as FunctionDirichletBC except the value is applied before the solve begins");
26  return params;
27 }
28 
30  : PresetNodalBC(parameters), _func(getFunction("function"))
31 {
32 }
33 
34 Real
36 {
37  return _func.value(_t, *_current_node);
38 }
virtual Real value(Real t, const Point &p)
Override this to evaluate the scalar function at point (t,x,y,z), by default this returns zero...
Definition: Function.C:43
The main MOOSE class responsible for handling user-defined parameters in almost every MOOSE system...
Function & _func
Function being used for evaluation of this BC.
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 validParams< FunctionPresetBC >()
virtual Real computeQpValue() override
Evaluate the function at the current quadrature point and timestep.
InputParameters validParams< PresetNodalBC >()
Definition: PresetNodalBC.C:24
FunctionPresetBC(const InputParameters &parameters)
const Node *& _current_node
current node being processed
Definition: NodalBC.h:53
void addClassDescription(const std::string &doc_string)
This method adds a description of the class that will be displayed in the input file syntax dump...