www.mooseframework.org
Function.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 #include "MooseObject.h"
13 #include "SetupInterface.h"
14 #include "TransientInterface.h"
15 #include "PostprocessorInterface.h"
16 #include "UserObjectInterface.h"
17 #include "Restartable.h"
18 #include "MeshChangedInterface.h"
19 #include "ScalarCoupleable.h"
20 
21 // libMesh
22 #include "libmesh/vector_value.h"
23 
24 // Forward declarations
25 class Function;
26 
27 // libMesh forward declarations
28 namespace libMesh
29 {
30 class Point;
31 }
32 
33 template <>
35 
40 class Function : public MooseObject,
41  public SetupInterface,
42  public TransientInterface,
44  public UserObjectInterface,
45  public Restartable,
46  public MeshChangedInterface,
47  public ScalarCoupleable
48 {
49 public:
55 
57 
61  virtual ~Function();
62 
70  virtual Real value(Real t, const Point & p) const;
71 
79  virtual RealVectorValue vectorValue(Real t, const Point & p) const;
80 
88  virtual RealVectorValue vectorCurl(Real t, const Point & p) const;
89 
97  virtual RealGradient gradient(Real t, const Point & p) const;
98 
105  virtual Real timeDerivative(Real t, const Point & p) const;
106 
107  // Not defined
108  virtual Real integral() const;
109 
110  // Not defined
111  virtual Real average() const;
112 };
Function::Function
Function(const InputParameters &parameters)
Definition: Function.C:24
SetupInterface
Definition: SetupInterface.h:28
Function::value
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:39
MeshChangedInterface.h
UserObjectInterface.h
Function::gradient
virtual RealGradient gradient(Real t, const Point &p) const
Function objects can optionally provide a gradient at a point.
Definition: Function.C:45
Function::integral
virtual Real integral() const
Definition: Function.C:70
libMesh
The following methods are specializations for using the libMesh::Parallel::packed_range_* routines fo...
Definition: AddPeriodicBCAction.h:16
MooseObject::parameters
const InputParameters & parameters() const
Get the parameters of the object.
Definition: MooseObject.h:76
UserObjectInterface
Interface for objects that need to use UserObjects.
Definition: UserObjectInterface.h:28
validParams< Function >
InputParameters validParams< Function >()
libMesh::RealVectorValue
VectorValue< Real > RealVectorValue
Definition: Assembly.h:30
SetupInterface.h
Function::average
virtual Real average() const
Definition: Function.C:77
Function::vectorValue
virtual RealVectorValue vectorValue(Real t, const Point &p) const
Override this to evaluate the vector function at a point (t,x,y,z), by default this returns a zero ve...
Definition: Function.C:58
MooseObject
Every object that can be built by the factory should be derived from this class.
Definition: MooseObject.h:50
InputParameters
The main MOOSE class responsible for handling user-defined parameters in almost every MOOSE system.
Definition: InputParameters.h:53
Function::timeDerivative
virtual Real timeDerivative(Real t, const Point &p) const
Get the time derivative of the function.
Definition: Function.C:51
ScalarCoupleable
Interface for objects that needs scalar coupling capabilities.
Definition: ScalarCoupleable.h:34
TransientInterface.h
PostprocessorInterface
Interface class for classes which interact with Postprocessors.
Definition: PostprocessorInterface.h:34
Function::~Function
virtual ~Function()
Function destructor.
Definition: Function.C:36
Restartable
A class for creating restricted objects.
Definition: Restartable.h:29
TransientInterface
Interface for objects that needs transient capabilities.
Definition: TransientInterface.h:35
MeshChangedInterface
Interface for notifications that the mesh has changed.
Definition: MeshChangedInterface.h:28
MooseObject.h
Function::vectorCurl
virtual RealVectorValue vectorCurl(Real t, const Point &p) const
Override this to evaluate the curl of the vector function at a point (t,x,y,z), by default this retur...
Definition: Function.C:64
Restartable.h
Function::validParams
static InputParameters validParams()
Class constructor.
Definition: Function.C:15
Function
Base class for function objects.
Definition: Function.h:40
PostprocessorInterface.h
ScalarCoupleable.h