www.mooseframework.org
MooseParsedVectorFunction.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 
21 {
22 public:
28 
30 
31  virtual RealVectorValue vectorValue(Real t, const Point & p) const override;
32 
33  virtual RealVectorValue curl(Real t, const Point & p) const override;
34 
35  virtual Real div(Real t, const Point & p) const override;
36 
37  virtual RealGradient gradient(Real t, const Point & p) const override;
38 
39  virtual void initialSetup() override;
40 
41 protected:
43  std::string _vector_value;
44 
46  std::string _curl_value;
47 
49  std::string _div_value;
50 
52  std::unique_ptr<MooseParsedFunctionWrapper> _curl_function_ptr;
53 
55  std::unique_ptr<MooseParsedFunctionWrapper> _div_function_ptr;
56 };
Base class for function objects.
Definition: Function.h:37
virtual void initialSetup() override
Gets called at the beginning of the simulation before this object is asked to do its job...
virtual RealVectorValue curl(Real t, const Point &p) const override
Override this to evaluate the curl of the vector function at a point (t,x,y,z), by default this retur...
Creates the &#39;vars&#39; and &#39;vals&#39; parameters used by all ParsedFunctions, the parameters provided from th...
virtual RealVectorValue vectorValue(Real t, const Point &p) const override
Override this to evaluate the vector function at a point (t,x,y,z), by default this returns a zero ve...
The main MOOSE class responsible for handling user-defined parameters in almost every MOOSE system...
std::string _vector_value
Storage for vector input function(s), in format ready for libMesh.
static InputParameters validParams()
Class constructor.
std::string _curl_value
Storage for curl input function(s), in format ready for libMesh.
virtual Real div(Real t, const Point &p) const override
Override this to evaluate the divergence of the vector function at a point (t,x,y,z), by default this returns zero, you must override it.
virtual RealGradient gradient(Real t, const Point &p) const override
Function objects can optionally provide a gradient at a point.
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
const InputParameters & parameters() const
Get the parameters of the object.
MooseParsedVectorFunction(const InputParameters &parameters)
std::unique_ptr< MooseParsedFunctionWrapper > _curl_function_ptr
Pointer to the Parsed function wrapper object for the curl.
This class is similar to ParsedFunction except it returns a vector function.
std::string _div_value
Storage for div input function, in format ready for libMesh.
std::unique_ptr< MooseParsedFunctionWrapper > _div_function_ptr
Pointer to the Parsed function wrapper object for the div.