www.mooseframework.org
MooseParsedGradFunction.h
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 
10 #pragma once
11 
12 // MOOSE includes
13 #include "Function.h"
15 
24 {
25 public:
31 
33 
37  virtual ~MooseParsedGradFunction();
38 
39  using Function::value;
45  virtual Real value(Real t, const Point & p) const override;
46 
53  virtual RealGradient gradient(Real t, const Point & p) const override;
54 
59  virtual RealVectorValue vectorValue(Real t, const Point & p) const override;
60 
65  virtual void initialSetup() override;
66 
67 protected:
69  std::string _value;
70 
72  std::string _grad_value;
73 
75  std::unique_ptr<MooseParsedFunctionWrapper> _grad_function_ptr;
76 };
Base class for function objects.
Definition: Function.h:37
Creates the &#39;vars&#39; and &#39;vals&#39; parameters used by all ParsedFunctions, the parameters provided from th...
virtual RealGradient gradient(Real t, const Point &p) const override
Compute the gradient of the function.
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)
virtual void initialSetup() override
Creates two libMesh::ParsedFunction objects for returning a vector via the &#39;gradient&#39; method and a sc...
std::string _grad_value
String for the gradient, vector function string.
virtual Real value(Real t, const Point &p) const 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.
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
virtual RealVectorValue vectorValue(Real t, const Point &p) const override
Method invalid for ParsedGradFunction.
const InputParameters & parameters() const
Get the parameters of the object.
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:41
static InputParameters validParams()
Class constructor.