https://mooseframework.inl.gov
MooseParsedFunction.h
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 #pragma once
11 
12 // MOOSE includes
13 #include "Function.h"
15 
25 {
26 public:
32 
34 
35  using Function::value;
43  virtual Real value(Real t, const Point & pt) const override;
44 
45  using Function::gradient;
50  virtual RealGradient gradient(Real t, const Point & p) const override;
51 
59  virtual Real timeDerivative(Real t, const Point & p) const override;
60 
65  virtual RealVectorValue vectorValue(Real t, const Point & p) const override;
66 
70  virtual void initialSetup() override;
71 
72 protected:
74  std::string _value;
75 
76  friend class ParsedFunctionTest;
77 };
Base class for function objects.
Definition: Function.h:36
virtual RealVectorValue vectorValue(Real t, const Point &p) const override
Method invalid for ParsedGradFunction.
Adds user facing parameters for parsed function.
MooseParsedFunction(const InputParameters &parameters)
The main MOOSE class responsible for handling user-defined parameters in almost every MOOSE system...
This class is used to evaluate symbolic equations passed in to Moose through the input file...
virtual void initialSetup() override
Creates the parsed function.
virtual Real value(Real t, const Point &pt) const override
Evaluate the equation at the given location.
static InputParameters validParams()
Created from MooseSystem via the FunctionFactory.
std::string _value
The function defined by the user.
virtual RealGradient gradient(Real t, const Point &p) const override
Evaluate the gradient of the function.
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
virtual RealGradient gradient(Real t, const Point &p) const
Function objects can optionally provide a gradient at a point.
Definition: Function.C:76
const InputParameters & parameters() const
Get the parameters of the object.
virtual Real timeDerivative(Real t, const Point &p) const override
Evaluate the time derivative of the function.
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:44