www.mooseframework.org
PiecewiseConstant.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 PIECEWISECONSTANT_H
16 #define PIECEWISECONSTANT_H
17 
18 #include "Piecewise.h"
19 
20 // Forward declarations
21 class PiecewiseConstant;
22 
23 template <>
25 
31 {
32 public:
34 
41  virtual Real value(Real t, const Point & pt) override;
42 
49  virtual Real timeDerivative(Real t, const Point & pt) override;
50 
51  virtual Real integral() override;
52 
53  virtual Real average() override;
54 
55 private:
57  {
58  LEFT = 0,
61  };
62  DirectionEnum getDirection(const std::string & direction);
63 
65 };
66 
67 #endif
virtual Real integral() override
DirectionEnum getDirection(const std::string &direction)
Function which provides a piecewise continuous constant interpolation of a provided (x...
virtual Real value(Real t, const Point &pt) override
Get the value of the function (based on time only)
The main MOOSE class responsible for handling user-defined parameters in almost every MOOSE system...
InputParameters validParams< PiecewiseConstant >()
virtual Real average() override
virtual Real timeDerivative(Real t, const Point &pt) override
Get the time derivative of the function (based on time only)
PiecewiseConstant(const InputParameters &parameters)
const InputParameters & parameters() const
Get the parameters of the object.
Definition: MooseObject.h:53
const DirectionEnum _direction
Function which provides a piecewise approximation to a provided (x,y) point data set.
Definition: Piecewise.h:31