https://mooseframework.inl.gov
Loading...
Searching...
No Matches
ForcingFunctionAux.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 "ForcingFunctionAux.h"
11#include "Function.h"
12
14
17{
19 params.addClassDescription("Auxiliary Kernel that adds a forcing function to the value of an "
20 "AuxVariable from the previous time step.");
21 return params;
22}
23
25 : FunctionAux(parameters), _u_old(uOld())
26{
27 if (isNodal())
28 paramError("variable", "The variable must be elemental");
29}
30
31Real
registerMooseObject("MooseApp", ForcingFunctionAux)
bool isNodal() const
Nodal or elemental kernel?
Definition AuxKernel.h:43
const MooseArray< Point > & _q_point
Active quadrature points.
Definition AuxKernel.h:125
unsigned int _qp
Quadrature point index.
Definition AuxKernel.h:155
Add a forcing function to the previous time step value of an AuxVariable.
static InputParameters validParams()
ForcingFunctionAux(const InputParameters &parameters)
virtual Real computeValue() override
Compute and return the value of the aux variable.
const VariableValue & _u_old
AuxVariable value at previous time step.
Function auxiliary value.
Definition FunctionAux.h:20
static InputParameters validParams()
Definition FunctionAux.C:16
const Function & _func
Function being used to compute the value of this kernel.
Definition FunctionAux.h:34
virtual Real value(Real t, const Point &p) const
Override this to evaluate the scalar function at point (t,x,y,z), by default this returns zero,...
Definition Function.C:30
The main MOOSE class responsible for handling user-defined parameters in almost every MOOSE system.
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.
void paramError(const std::string &param, Args... args) const
Emits an error prefixed with the file and line number of the given param (from the input file) along ...
Definition MooseBase.h:457
Real & _dt
Time step size.