www.mooseframework.org
SolutionFunction.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 SOLUTIONFUNCTION_H
16 #define SOLUTIONFUNCTION_H
17 
18 #include "Function.h"
19 
20 // Forward decleration
21 class SolutionFunction;
22 class SolutionUserObject;
23 
24 template <>
26 
32 class SolutionFunction : public Function
33 {
34 public:
39 
46  virtual Real value(Real t, const Point & p) override;
47 
54  virtual RealGradient gradient(Real t, const Point & p) override;
55 
62  virtual void initialSetup() override;
63 
64 protected:
67 
70 
72  const Real _scale_factor;
73 
75  const Real _add_factor;
76 
79 };
80 
81 #endif // SOLUTIONFUNCTION_H
RealVectorValue RealGradient
Definition: Assembly.h:43
Base class for function objects.
Definition: Function.h:46
virtual Real value(Real t, const Point &p) override
Extract a value from the solution.
RealGradient _add_grad
Factor to add to the solution if gradient is requested (default = {0})
virtual RealGradient gradient(Real t, const Point &p) override
Extract a gradient from the solution.
The main MOOSE class responsible for handling user-defined parameters in almost every MOOSE system...
const SolutionUserObject * _solution_object_ptr
Pointer to SolutionUserObject containing the solution of interest.
InputParameters validParams< SolutionFunction >()
const Real _scale_factor
Factor to scale the solution by (default = 1)
Function for reading a solution from file Creates a function that extracts values from a solution rea...
const Real _add_factor
Factor to add to the solution (default = 0)
unsigned int _solution_object_var_index
The local SolutionUserObject index for the variable extracted from the file.
const InputParameters & parameters() const
Get the parameters of the object.
Definition: MooseObject.h:53
SolutionFunction(const InputParameters &parameters)
Constructor.
User object that reads an existing solution from an input file and uses it in the current simulation...
virtual void initialSetup() override
Setup the function for use Gathers a pointer to the SolutionUserObject containing the solution that w...