www.mooseframework.org
PiecewiseConstant.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 "Piecewise.h"
13 
14 // Forward declarations
15 class PiecewiseConstant;
16 
17 template <>
19 
25 {
26 public:
28 
35  virtual Real value(Real t, const Point & pt) override;
36 
43  virtual Real timeDerivative(Real t, const Point & pt) override;
44 
45  virtual Real integral() override;
46 
47  virtual Real average() override;
48 
49 private:
51  {
52  LEFT = 0,
55  };
56  DirectionEnum getDirection(const std::string & direction);
57 
59 };
60 
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 >()
const InputParameters & parameters() const
Get the parameters of the object.
Definition: MooseObject.h:65
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 DirectionEnum _direction
Function which provides a piecewise approximation to a provided (x,y) point data set generated from f...
Definition: Piecewise.h:25