www.mooseframework.org
MooseParsedGradFunction.h
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 #ifndef MOOSEPARSEDGRADFUNCTION_H
16 #define MOOSEPARSEDGRADFUNCTION_H
17 
18 // MOOSE includes
19 #include "Function.h"
21 
22 // Forward declerations
24 
25 template <>
27 
36 {
37 public:
43 
47  virtual ~MooseParsedGradFunction();
48 
54  virtual Real value(Real t, const Point & p) override;
55 
62  virtual RealGradient gradient(Real t, const Point & p) override;
63 
68  virtual RealVectorValue vectorValue(Real t, const Point & p) override;
69 
74  virtual void initialSetup() override;
75 
76 protected:
78  std::string _value;
79 
81  std::string _grad_value;
82 
84  std::unique_ptr<MooseParsedFunctionWrapper> _grad_function_ptr;
85 };
86 
87 #endif // MOOSEPARSEDGRADFUNCTION_H
RealVectorValue RealGradient
Definition: Assembly.h:43
Base class for function objects.
Definition: Function.h:46
Adds user facing parameters for parsed function.
VectorValue< Real > RealVectorValue
Definition: Assembly.h:40
std::string _value
String for the scalar function string.
The main MOOSE class responsible for handling user-defined parameters in almost every MOOSE system...
MooseParsedGradFunction(const InputParameters &parameters)
Class constructor.
virtual void initialSetup() override
Creates two libMesh::ParsedFunction objects for returning a vector via the &#39;gradient&#39; method and a sc...
virtual RealGradient gradient(Real t, const Point &p) override
Compute the gradient of the function.
std::string _grad_value
String for the gradient, vector function string.
virtual Real value(Real t, const Point &p) override
Return a scalar value from the function.
virtual ~MooseParsedGradFunction()
Destructor necessary for std::unique_ptr usage.
This class is similar to ParsedFunction except it also supports returning the gradient of the functio...
std::unique_ptr< MooseParsedFunctionWrapper > _grad_function_ptr
Pointer to the Parsed function wrapper object for the gradient.
const InputParameters & parameters() const
Get the parameters of the object.
Definition: MooseObject.h:53
virtual RealVectorValue vectorValue(Real t, const Point &p) override
Method invalid for ParsedGradFunction.
InputParameters validParams< MooseParsedGradFunction >()